From gerrit-no-reply at lists.osmocom.org Sat Oct 1 09:22:36 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Sat, 1 Oct 2016 09:22:36 +0000 Subject: osmo-pcu[master]: EGPRS: fix for EPDAN out of window In-Reply-To: References: Message-ID: Patch Set 4: (1 comment) https://gerrit.osmocom.org/#/c/862/2/src/rlc.cpp File src/rlc.cpp: Line 108: unsigned num_blocks = rbb->cur_bit > (unsigned)distance() > It is not enough that it is supposed to be positive, What is meant is distance is guaranteed to be positive. since the formula for distance calculation is distance = (vs - va) & window_size with vs = 1,va = 3 and window = 255. i.e (1-3) & 255 = 254 with vs = 3,va = 1 and window = 255. i.e (3-1) & 255 = 2 so with whatever values we put, we cannot get the calculation as negative. Let me know if any other queries -- To view, visit https://gerrit.osmocom.org/862 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id07d178970f168f5389016c1eea31eb6b82057b6 Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat Oct 1 11:05:44 2016 From: gerrit-no-reply at lists.osmocom.org (pravin) Date: Sat, 1 Oct 2016 11:05:44 +0000 Subject: osmo-pcu[master]: EGPRS: Add EPDAN CRBB Tree based decoding In-Reply-To: References: Message-ID: Patch Set 25: (22 comments) https://gerrit.osmocom.org/#/c/416/25/src/decoding.cpp File src/decoding.cpp: Line 697: LOGP(DRLCMACDL, LOGL_DEBUG, "Compress bitmap exists, " > Actually ... what do you mean by 'exists'? Is received? This means compress bitmap is present in the received bitmap. https://gerrit.osmocom.org/#/c/416/25/src/egprs_rlc_compression.cpp File src/egprs_rlc_compression.cpp: Line 22: extern const char *zero_run_len_code_list[EGPRS_CODEWORDS]; > the two arrays are not extern but defined further below. Done Line 37: /* The function expands the given tree by incorporating > Still no need to state that it is a function! For example: Done Line 40: * \param cdwd[in] Code word > plural, and indicate the length: Done Line 74: > (remove space from the blank line) Done Line 248: * \param rlen[out] Caluculate run length > fix typo. As I said before, it should say 'Calculated', not 'Calculate' (wh Done Line 267: dir = ((bmbuf[BITS_TO_BYTES(bit_pos) - 1] > Come on, in BITS_TO_BYTES you '+1' and here you '-1' again? Since this is t Done Line 268: >> (7 - MOD8(bit_pos))) & 0x01); > Drop outermost braces. Done Line 271: if (((dir&0x01) == 0) && (iter->left != NULL)) > dir is already & 0x01 above. Done Line 273: else if (((dir&0x01) == 1) && (iter->right != NULL)) > 'if (dir && (iter...' Done Line 279: (*rlen) = (iter->run_length); > drop all braces Done Line 283: /* Function to decompress compressed received block bitmap > I *see* that it is a function! Start with Done Line 285: * \param color_code_bit[in] Color code 1 for Ones runlength 0 for Zero runlength > As asked before, please explain why you call it 'color code' in the first p Done Line 297: uint8_t data = 0x0; > '= 0' ? Done Line 304: egprs_compress *compress = egprs_compress::instance(); > just ' = instance()' should suffice? Done Line 307: if (color_code_bit == 1) { > 'if (color_code_bit) {' Done Line 320: color_code_bit ? color_code_bit = 0 : color_code_bit = 1; > "color_code_bit = !color_code_bit;" Done https://gerrit.osmocom.org/#/c/416/25/src/egprs_rlc_compression.h File src/egprs_rlc_compression.h: Line 7: #define BITS_TO_BYTES(X) (((X) ? (X)/8 : 0) + 1) > Then this should be called BITPOS_TO_BYTES instead. Done Line 8: #define MOD8(X) ((X) & (0x07)) > you're using this define only once, just drop it and use '& 0x7' directly i Done Line 14: } egprs_compress_node; > What I meant: here just say "struct egprs_compress_node;", Done Line 32: { > I would move the function definition to .cpp as well Done Line 41: decode_tree_init(); > and move this one to .cpp as well. Done -- To view, visit https://gerrit.osmocom.org/416 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieae1992ed4b02bb1e09eec2d3de1a030eabd16ce Gerrit-PatchSet: 25 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: pravin Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: pravin Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat Oct 1 11:08:30 2016 From: gerrit-no-reply at lists.osmocom.org (pravin) Date: Sat, 1 Oct 2016 11:08:30 +0000 Subject: [PATCH] osmo-pcu[master]: EGPRS: Add EPDAN CRBB Tree based decoding In-Reply-To: References: Message-ID: Hello Max, Neels Hofmeyr, arvind.sirsikar, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/416 to look at the new patch set (#26). EGPRS: Add EPDAN CRBB Tree based decoding Implemented tree based algorithm to decode compressed bitmap in EPDAN as described in section 9.1.10 of 3GPP 44.060. This algorithm intends to improve the performance over existing method. New Regression test is added under bitcomp directory. Test case is added to validate decompressed result of the bitmap Present in EPDAN. Test is done for multiple bitmaps of varying length. Invalid inputs are also part of the test vector. Change-Id: Ieae1992ed4b02bb1e09eec2d3de1a030eabd16ce --- M src/Makefile.am M src/decoding.cpp A src/egprs_rlc_compression.cpp A src/egprs_rlc_compression.h M tests/Makefile.am A tests/bitcomp/BitcompTest.cpp A tests/bitcomp/BitcompTest.err A tests/bitcomp/BitcompTest.ok M tests/testsuite.at 9 files changed, 789 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/16/416/26 diff --git a/src/Makefile.am b/src/Makefile.am index 9bdec2f..9b047e7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -62,7 +62,8 @@ rlc.cpp \ osmobts_sock.cpp \ gprs_codel.c \ - gprs_coding_scheme.cpp + gprs_coding_scheme.cpp \ + egprs_rlc_compression.cpp bin_PROGRAMS = \ osmo-pcu @@ -94,7 +95,8 @@ pcu_utils.h \ cxx_linuxlist.h \ gprs_codel.h \ - gprs_coding_scheme.h + gprs_coding_scheme.h \ + egprs_rlc_compression.h osmo_pcu_SOURCES = pcu_main.cpp diff --git a/src/decoding.cpp b/src/decoding.cpp index 3f5c4d2..6ae4b16 100644 --- a/src/decoding.cpp +++ b/src/decoding.cpp @@ -20,6 +20,7 @@ #include #include #include +#include extern "C" { #include @@ -692,21 +693,17 @@ if (crbb_len > 0) { int old_len = bits->cur_bit; - struct bitvec crbb; - crbb.data = (uint8_t *)desc->CRBB; - crbb.data_len = sizeof(desc->CRBB); - crbb.cur_bit = desc->CRBB_LENGTH; - - rc = osmo_t4_decode(&crbb, desc->CRBB_STARTING_COLOR_CODE, - bits); - + LOGP(DRLCMACDL, LOGL_DEBUG, "Compress bitmap exists, " + "CRBB LEN = %d and Starting color code = %d", + desc->CRBB_LENGTH, desc->CRBB_STARTING_COLOR_CODE); + rc = egprs_compress::decompress_crbb(desc->CRBB_LENGTH, + desc->CRBB_STARTING_COLOR_CODE, desc->CRBB, bits); if (rc < 0) { LOGP(DRLCMACUL, LOGL_NOTICE, - "Failed to decode CRBB: " - "length %d, data '%s'\n", - desc->CRBB_LENGTH, - osmo_hexdump(crbb.data, crbb.data_len)); + "Failed to decode CRBB: length %d, data '%s'\n", + desc->CRBB_LENGTH, osmo_hexdump( + desc->CRBB, (desc->CRBB_LENGTH + 7)/8)); /* We don't know the SSN offset for the URBB, * return what we have so far and assume the * bitmap has stopped here */ diff --git a/src/egprs_rlc_compression.cpp b/src/egprs_rlc_compression.cpp new file mode 100644 index 0000000..bc74c68 --- /dev/null +++ b/src/egprs_rlc_compression.cpp @@ -0,0 +1,363 @@ +/* egprs_rlc_compression.h +* Routines for EGPRS RLC bitmap compression handling +*/ +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +#define EGPRS_CODEWORDS 79 /* total number of codewords */ + +struct egprs_compress_node{ + struct egprs_compress_node *left; + struct egprs_compress_node *right; + int run_length; +} egprs_compress_node; + +extern void *tall_pcu_ctx; + +egprs_compress *egprs_compress::s_instance = 0; + +struct egprs_compress_node *egprs_compress::create_tree_node(void *parent) +{ + struct egprs_compress_node *new_node; + + new_node = talloc_zero(parent, struct egprs_compress_node); + new_node->left = NULL; + new_node->right = NULL; + new_node->run_length = -1; + return new_node; +} + +egprs_compress *egprs_compress::instance() +{ + if (!egprs_compress::s_instance) + egprs_compress::s_instance = new egprs_compress; + return egprs_compress::s_instance; +} + +/* Expands the given tree by incorporating + * the given codewords. + * \param root[in] Root of ones or zeros tree + * \param cdwd[in] Array of code words + * number of codewords is EGPRS_CODEWORDS + */ +void egprs_compress::build_codewords(struct egprs_compress_node *root, const char *cdwd[]) +{ + struct egprs_compress_node *iter; + int len; + int i; + int idx; + + for (idx = 0; idx < EGPRS_CODEWORDS; idx++) { + len = strlen((const char *)cdwd[idx]); + iter = root; + for (i = 0; i < len; i++) { + if (cdwd[idx][i] == '0') { + if (!iter->left) + iter->left = create_tree_node(root); + iter = iter->left; + } else { + if (!iter->right) + iter->right = create_tree_node(root); + iter = iter->right; + } + } + if (iter) { + if (idx < 64) + iter->run_length = idx; + else + /* The first 64 run lengths are 0, 1, 2, ..., 63 + * and the following ones are 64, 128, 192 described in + * section 9.1.10 of 3gpp 44.060 */ + iter->run_length = (idx - 63) * 64; + } + } +} + +/* 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", + "000111", + "0111", + "1000", + "1011", + "1100", + "1110", + "1111", + "10011", + "10100", + "00111", + "01000", + "001000", + "000011", + "110100", + "110101", + "101010", + "101011", + "0100111", + "0001100", + "0001000", + "0010111", + "0000011", + "0000100", + "0101000", + "0101011", + "0010011", + "0100100", + "0011000", + "00000010", + "00000011", + "00011010", + "00011011", + "00010010", + "00010011", + "00010100", + "00010101", + "00010110", + "00010111", + "00101000", + "00101001", + "00101010", + "00101011", + "00101100", + "00101101", + "00000100", + "00000101", + "00001010", + "00001011", + "01010010", + "01010011", + "01010100", + "01010101", + "00100100", + "00100101", + "01011000", + "01011001", + "01011010", + "01011011", + "01001010", + "01001011", + "00110010", + "00110011", + "00110100", + "11011", + "10010", + "010111", + "0110111", + "00110110", + "00110111", + "01100100", + "01100101", + "01101000", + "01100111", + "011001100", + "011001101", + "011010010", + "011010011", + "011010100" +}; + +const char *zero_run_len_code_list[EGPRS_CODEWORDS] = { + "0000110111", + "10", + "11", + "010", + "011", + "0011", + "0010", + "00011", + "000101", + "000100", + "0000100", + "0000101", + "0000111", + "00000100", + "00000111", + "000011000", + "0000010111", + "0000011000", + "0000001000", + "00001100111", + "00001101000", + "00001101100", + "00000110111", + "00000101000", + "00000010111", + "00000011000", + "000011001010", + "000011001011", + "000011001100", + "000011001101", + "000001101000", + "000001101001", + "000001101010", + "000001101011", + "000011010010", + "000011010011", + "000011010100", + "000011010101", + "000011010110", + "000011010111", + "000001101100", + "000001101101", + "000011011010", + "000011011011", + "000001010100", + "000001010101", + "000001010110", + "000001010111", + "000001100100", + "000001100101", + "000001010010", + "000001010011", + "000000100100", + "000000110111", + "000000111000", + "000000100111", + "000000101000", + "000001011000", + "000001011001", + "000000101011", + "000000101100", + "000001011010", + "000001100110", + "000001100111", + "0000001111", + "000011001000", + "000011001001", + "000001011011", + "000000110011", + "000000110100", + "000000110101", + "0000001101100", + "0000001101101", + "0000001001010", + "0000001001011", + "0000001001100", + "0000001001101", + "0000001110010", + "0000001110011" +}; + +/* Calculate runlength of a codeword + * \param root[in] Root of Ones or Zeros tree + * \param bmbuf[in] Received compressed bitmap buf + * \param bit_pos[in] The start bit pos to read codeword + * \param len_codewd[in] Length of code word + * \param rlen[out] Calculated run length + */ +static int search_runlen( + struct egprs_compress_node *root, + const uint8_t *bmbuf, + uint8_t bit_pos, + uint8_t *len_codewd, + uint16_t *rlen) +{ + struct egprs_compress_node *iter; + uint8_t dir; + + iter = root; + *len_codewd = 0; + + while (iter->run_length == -1) { + if ((!iter->left) && (!iter->right)) + return -1; + /* get the bit value at the bitpos and put it in right most of dir */ + dir = (bmbuf[bit_pos/8] + >> (7 - (bit_pos & 0x07))) & 0x01; + (bit_pos)++; + (*len_codewd)++; + if (!dir && (iter->left != NULL)) + iter = iter->left; + else if (dir && (iter->right != NULL)) + iter = iter->right; + else + return -1; + } + LOGP(DRLCMACUL, LOGL_DEBUG, "Run_length = %d\n", iter->run_length); + *rlen = iter->run_length; + return 1; +} + +/* Decompress received block bitmap + * \param compress_bmap_len[in] Compressed bitmap length + * \param color_code_bit[in] Color code 1 for Ones runlength 0 for Zero runlength + * as described in section 9.1.10 of 3gpp 44.060. + * \param orig_crbb_buf[in] Received block crbb bitmap + * \param dest[out] Uncompressed bitvector + */ +int egprs_compress::decompress_crbb( + int8_t compress_bmap_len, + bool color_code_bit, + const uint8_t *orig_crbb_buf, + bitvec *dest) +{ + + uint8_t bit_pos = 0; + uint8_t data; + struct egprs_compress_node *list = NULL; + uint8_t nbits = 0; /* number of bits of codeword */ + uint16_t run_length = 0; + uint16_t cbmaplen = 0; /* compressed bitmap part after decompression */ + unsigned wp = dest->cur_bit; + int rc = 0; + egprs_compress *compress = instance(); + + while (compress_bmap_len > 0) { + if (color_code_bit) { + data = 0xff; + list = compress->ones_list; + } else { + data = 0x00; + list = compress->zeros_list; + } + rc = search_runlen(list, orig_crbb_buf, + bit_pos, &nbits, &run_length); + if (rc == -1) + return -1; + /* If run length > 64, need makeup and terminating code */ + if (run_length < 64) + color_code_bit = !color_code_bit; + cbmaplen = cbmaplen + run_length; + /* put run length of Ones in uncompressed bitmap */ + while (run_length != 0) { + if (run_length > 8) { + bitvec_write_field(dest, wp, data, 8); + run_length = run_length - 8; + } else { + bitvec_write_field(dest, wp, data, run_length); + run_length = 0; + } + } + bit_pos = bit_pos + nbits; + compress_bmap_len = compress_bmap_len - nbits; + } + return 0; +} + +void egprs_compress::decode_tree_init() +{ + ones_list = create_tree_node(tall_pcu_ctx); + zeros_list = create_tree_node(tall_pcu_ctx); + build_codewords(ones_list, one_run_len_code_list); + build_codewords(zeros_list, zero_run_len_code_list); +} + +egprs_compress::egprs_compress() +{ + decode_tree_init(); +} + diff --git a/src/egprs_rlc_compression.h b/src/egprs_rlc_compression.h new file mode 100644 index 0000000..87d9b50 --- /dev/null +++ b/src/egprs_rlc_compression.h @@ -0,0 +1,29 @@ +/* egprs_rlc_compression.h + * Routines for EGPRS RLC bitmap compression handling + */ + +#pragma once + +struct egprs_compress_node; + +/* Singleton to manage the EGPRS compression algorithm. */ +class egprs_compress +{ +public: + static int decompress_crbb(int8_t compress_bmap_len, + bool color_code_bit, const uint8_t *orig_buf, + bitvec *dest); + egprs_compress(); + +private: + egprs_compress_node *ones_list; + egprs_compress_node *zeros_list; + + void decode_tree_init(void); + static egprs_compress *s_instance; + static egprs_compress*instance(); + egprs_compress_node *create_tree_node(void *); + void build_codewords(egprs_compress_node *root, const char *cdwd[]); + /* singleton class, so this private destructor is left unimplemented. */ + ~egprs_compress(); +}; diff --git a/tests/Makefile.am b/tests/Makefile.am index 2a3415e..a24f4ea 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,7 +1,7 @@ AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGB_CFLAGS) $(LIBOSMOGSM_CFLAGS) -I$(top_srcdir)/src/ AM_LDFLAGS = -lrt -check_PROGRAMS = rlcmac/RLCMACTest alloc/AllocTest tbf/TbfTest types/TypesTest ms/MsTest llist/LListTest llc/LlcTest codel/codel_test edge/EdgeTest +check_PROGRAMS = rlcmac/RLCMACTest alloc/AllocTest tbf/TbfTest types/TypesTest ms/MsTest llist/LListTest llc/LlcTest codel/codel_test edge/EdgeTest bitcomp/BitcompTest noinst_PROGRAMS = emu/pcu_emu rlcmac_RLCMACTest_SOURCES = rlcmac/RLCMACTest.cpp @@ -23,6 +23,11 @@ $(top_builddir)/src/libgprs.la \ $(LIBOSMOGB_LIBS) \ $(LIBOSMOGSM_LIBS) \ + $(LIBOSMOCORE_LIBS) \ + $(COMMON_LA) + +bitcomp_BitcompTest_SOURCES = bitcomp/BitcompTest.cpp ../src/egprs_rlc_compression.cpp +bitcomp_BitcompTest_LDADD = \ $(LIBOSMOCORE_LIBS) \ $(COMMON_LA) @@ -108,6 +113,7 @@ rlcmac/RLCMACTest.ok rlcmac/RLCMACTest.err \ alloc/AllocTest.ok alloc/AllocTest.err \ tbf/TbfTest.ok tbf/TbfTest.err \ + bitcomp/BitcompTest.ok bitcomp/BitcompTest.err \ types/TypesTest.ok types/TypesTest.err \ ms/MsTest.ok ms/MsTest.err \ llc/LlcTest.ok llc/LlcTest.err \ diff --git a/tests/bitcomp/BitcompTest.cpp b/tests/bitcomp/BitcompTest.cpp new file mode 100644 index 0000000..fd3b0df --- /dev/null +++ b/tests/bitcomp/BitcompTest.cpp @@ -0,0 +1,236 @@ +#include +#include + +#include "rlc.h" +#include "gprs_debug.h" +#include +#include "egprs_rlc_compression.h" + +extern "C" { +#include +#include +#include +#include +} + +#define NEW 1 +#define MASK(n) (0xFF << (8-n)) +#define MAX_CRBB_LEN 23 +#define MAX_URBB_LEN 40 + +void *tall_pcu_ctx; + +struct test_data { + int8_t crbb_len; + uint8_t cc; + uint8_t crbb_data[MAX_CRBB_LEN]; /* compressed data */ + uint8_t ucmp_data[MAX_URBB_LEN]; /* uncompressed data */ + int ucmp_len; + int verify; +} test[] = { + { .crbb_len = 67, .cc = 1, + .crbb_data = { + 0x02, 0x0c, 0xa0, 0x30, 0xcb, 0x1a, 0x0c, 0xe3, 0x6c + }, + .ucmp_data = { + 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x01, 0xff, 0xff, + 0xff, 0xf8, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xfe, + 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xdb + }, + .ucmp_len = 194, .verify = 1 + }, + { .crbb_len = 40, .cc = 1, + .crbb_data = { + 0x53, 0x06, 0xc5, 0x40, 0x6d + }, + .ucmp_data = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, + 0x00, 0x00, 0x00, 0x00, 0x03 + }, + .ucmp_len = 182, .verify = 1 + }, + { .crbb_len = 8, .cc = 1, + .crbb_data = {0x02}, + .ucmp_data = {0xff, 0xff, 0xff, 0xf8}, + .ucmp_len = 29, .verify = 1 + }, + { .crbb_len = 103, .cc = 1, + .crbb_data = { + 0x02, 0x0c, 0xe0, 0x41, 0xa0, 0x0c, 0x36, 0x0d, 0x03, + 0x71, 0xb0, 0x6e, 0x24 + }, + .ucmp_data = { + 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xff, 0xff, + 0xf8, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xfe, 0x00, 0x00, + 0x0f, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xff, + 0xff, 0xff, 0x80, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff + }, + .ucmp_len = 288, .verify = 1 + }, + /* Test vector from libosmocore test */ + { .crbb_len = 35, .cc = 0, + .crbb_data = {0xde, 0x88, 0x75, 0x65, 0x80}, + .ucmp_data = {0x37, 0x47, 0x81, 0xf0}, + .ucmp_len = 28, .verify = 1 + }, + { .crbb_len = 18, .cc = 1, + .crbb_data = {0xdd, 0x41, 0x00}, + .ucmp_data = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x00, 0x00 + }, + .ucmp_len = 90, .verify = 1 + }, + /*Invalid inputs*/ + { .crbb_len = 18, .cc = 1, + .crbb_data = {0x1E, 0x70, 0xc0}, + .ucmp_data = {0x0}, + .ucmp_len = 0, .verify = 0 + }, + { .crbb_len = 14, .cc = 1, + .crbb_data = {0x00, 0x1E, 0x7c}, + .ucmp_data = {0x0}, + .ucmp_len = 0, .verify = 0 + }, + { .crbb_len = 24, .cc = 0, + .crbb_data = {0x00, 0x00, 0x00}, + .ucmp_data = {0x0}, + .ucmp_len = 0, .verify = 0 + } + }; + +static const struct log_info_cat default_categories[] = { + {"DCSN1", "\033[1;31m", "Concrete Syntax Notation One (CSN1)", LOGL_INFO, 0}, + {"DL1IF", "\033[1;32m", "GPRS PCU L1 interface (L1IF)", LOGL_DEBUG, 1}, + {"DRLCMAC", "\033[0;33m", "GPRS RLC/MAC layer (RLCMAC)", LOGL_DEBUG, 1}, + {"DRLCMACDATA", "\033[0;33m", "GPRS RLC/MAC layer Data (RLCMAC)", LOGL_DEBUG, 1}, + {"DRLCMACDL", "\033[1;33m", "GPRS RLC/MAC layer Downlink (RLCMAC)", LOGL_DEBUG, 1}, + {"DRLCMACUL", "\033[1;36m", "GPRS RLC/MAC layer Uplink (RLCMAC)", LOGL_DEBUG, 1}, + {"DRLCMACSCHED", "\033[0;36m", "GPRS RLC/MAC layer Scheduling (RLCMAC)", LOGL_DEBUG, 1}, + {"DRLCMACMEAS", "\033[1;31m", "GPRS RLC/MAC layer Measurements (RLCMAC)", LOGL_INFO, 1}, + {"DNS", "\033[1;34m", "GPRS Network Service Protocol (NS)", LOGL_INFO, 1}, + {"DBSSGP", "\033[1;34m", "GPRS BSS Gateway Protocol (BSSGP)", LOGL_INFO, 1}, + {"DPCU", "\033[1;35m", "GPRS Packet Control Unit (PCU)", LOGL_NOTICE, 1}, +}; + +static int filter_fn(const struct log_context *ctx, + struct log_target *tar) +{ + return 1; +} + +/* To verify the result with expected result */ +int check_result(bitvec bits, uint8_t *exp_data, int exp_len) +{ + if (bits.cur_bit != exp_len) + return 0; + size_t n = (exp_len / 8); + int rem = (exp_len % 8); + + if (memcmp(exp_data, bits.data, n) == 0) { + if (rem == 0) + return 1; + if ((bits.data[n] & MASK(rem)) == ((*(exp_data + n)) & MASK(rem))) + return 1; + else + return 0; + } else + return 0; +} + +/* To test decoding of compressed bitmap by Tree based method + * and to verify the result with expected result + * for invalid input verfication is suppressed + */ +static void test_EPDAN_decode_tree(void) +{ + bitvec dest; + int init_flag = 1; + int itr; + int rc; + uint8_t bits_data[RLC_EGPRS_MAX_WS/8]; + + printf("=== start %s ===\n", __func__); + + for (itr = 0 ; itr < (sizeof(test) / sizeof(test_data)) ; itr++) { + dest.data = bits_data; + dest.data_len = sizeof(bits_data); + dest.cur_bit = 0; + memset(dest.data, 0, sizeof(bits_data)); + LOGP(DRLCMACDL, LOGL_DEBUG, "\nTest:%d\nTree based decoding:" + "\nuncompressed data = %s\nlen = %d\n", itr + 1, + osmo_hexdump(test[itr].crbb_data, + (test[itr].crbb_len + 7)/8), test[itr].crbb_len + ); + rc = egprs_compress::decompress_crbb(test[itr].crbb_len, + test[itr].cc, test[itr].crbb_data, &dest); + if (rc < 0) { + LOGP(DRLCMACUL, LOGL_NOTICE, + "\nFailed to decode CRBB: length %d, data %s", + test[itr].crbb_len, osmo_hexdump( + test[itr].crbb_data, (test[itr].crbb_len + 7)/8)); + } + if (init_flag) + init_flag = 0; + if (test[itr].verify) { + if (check_result(dest, test[itr].ucmp_data, + test[itr].ucmp_len) == 0) { + LOGP(DRLCMACDL, LOGL_DEBUG, "\nTree based decoding" + ":Error\nexpected data = %s\nexpected" + " len = %d\ndecoded data = %s\n" + "decoded len = %d\n", + osmo_hexdump(test[itr].ucmp_data, + (test[itr].ucmp_len + 7)/8), + test[itr].ucmp_len, osmo_hexdump(dest.data, + (dest.cur_bit + 7)/8), dest.cur_bit + ); + OSMO_ASSERT(0); + } + } + LOGP(DRLCMACDL, LOGL_DEBUG, "\nexpected data = %s\nexpected len = %d" + "\ndecoded data = %s\ndecoded len = %d\n", + osmo_hexdump(test[itr].ucmp_data, + (test[itr].ucmp_len + 7)/8), + test[itr].ucmp_len, osmo_hexdump(dest.data, + (dest.cur_bit + 7)/8), dest.cur_bit + ); + } + + printf("=== end %s ===\n", __func__); +} + +const struct log_info debug_log_info = { + filter_fn, + (struct log_info_cat *)default_categories, + ARRAY_SIZE(default_categories), +}; + +int main(int argc, char **argv) +{ + osmo_init_logging(&debug_log_info); + log_set_use_color(osmo_stderr_target, 0); + log_set_print_filename(osmo_stderr_target, 0); + + tall_pcu_ctx = talloc_named_const(NULL, 1, "moiji-mobile bitcompTest context"); + if (!tall_pcu_ctx) + abort(); + + test_EPDAN_decode_tree(); + + if (getenv("TALLOC_REPORT_FULL")) + talloc_report_full(tall_pcu_ctx, stderr); + talloc_free(tall_pcu_ctx); + return EXIT_SUCCESS; +} + +/* + * stubs that should not be reached + */ +extern "C" { +void l1if_pdch_req() { abort(); } +void l1if_connect_pdch() { abort(); } +void l1if_close_pdch() { abort(); } +void l1if_open_pdch() { abort(); } +} + diff --git a/tests/bitcomp/BitcompTest.err b/tests/bitcomp/BitcompTest.err new file mode 100644 index 0000000..7481d72 --- /dev/null +++ b/tests/bitcomp/BitcompTest.err @@ -0,0 +1,132 @@ + +Test:1 +Tree based decoding: +uncompressed data = 02 0c a0 30 cb 1a 0c e3 6c +len = 67 +Run_length = 29 +Run_length = 26 +Run_length = 30 +Run_length = 27 +Run_length = 31 +Run_length = 19 +Run_length = 32 + +expected data = ff ff ff f8 00 00 01 ff ff ff f8 00 00 00 ff ff ff fe 00 00 3f ff ff ff db +expected len = 194 +decoded data = ff ff ff f8 00 00 01 ff ff ff f8 00 00 00 ff ff ff fe 00 00 3f ff ff ff db +decoded len = 194 + +Test:2 +Tree based decoding: +uncompressed data = 53 06 c5 40 6d +len = 40 +Run_length = 50 +Run_length = 40 +Run_length = 51 +Run_length = 41 + +expected data = ff ff ff ff ff ff c0 00 00 00 00 3f ff ff ff ff ff f8 00 00 00 00 03 +expected len = 182 +decoded data = ff ff ff ff ff ff c0 00 00 00 00 3f ff ff ff ff ff f8 00 00 00 00 03 +decoded len = 182 + +Test:3 +Tree based decoding: +uncompressed data = 02 +len = 8 +Run_length = 29 + +expected data = ff ff ff f8 +expected len = 29 +decoded data = ff ff ff f8 +decoded len = 29 + +Test:4 +Tree based decoding: +uncompressed data = 02 0c e0 41 a0 0c 36 0d 03 71 b0 6e 24 +len = 103 +Run_length = 29 +Run_length = 19 +Run_length = 29 +Run_length = 20 +Run_length = 30 +Run_length = 21 +Run_length = 31 +Run_length = 22 +Run_length = 32 +Run_length = 22 +Run_length = 33 + +expected data = ff ff ff f8 00 00 ff ff ff f8 00 00 7f ff ff fe 00 00 0f ff ff ff e0 00 00 7f ff ff ff 80 00 01 ff ff ff ff +expected len = 288 +decoded data = ff ff ff f8 00 00 ff ff ff f8 00 00 7f ff ff fe 00 00 0f ff ff ff e0 00 00 7f ff ff ff 80 00 01 ff ff ff ff +decoded len = 288 + +Test:5 +Tree based decoding: +uncompressed data = de 88 75 65 80 +len = 35 +Run_length = 2 +Run_length = 2 +Run_length = 1 +Run_length = 3 +Run_length = 1 +Run_length = 1 +Run_length = 3 +Run_length = 4 +Run_length = 6 +Run_length = 5 + +expected data = 37 47 81 f0 +expected len = 28 +decoded data = 37 47 81 f0 +decoded len = 28 + +Test:6 +Tree based decoding: +uncompressed data = dd 41 00 +len = 18 +Run_length = 64 +Run_length = 16 +Run_length = 10 + +expected data = ff ff ff ff ff ff ff ff ff ff 00 00 +expected len = 90 +decoded data = ff ff ff ff ff ff ff ff ff ff 00 00 +decoded len = 90 + +Test:7 +Tree based decoding: +uncompressed data = 1e 70 c0 +len = 18 +Run_length = 1 +Run_length = 1 +Run_length = 2 +Run_length = 15 + +expected data = +expected len = 0 +decoded data = +decoded len = 19 + +Test:8 +Tree based decoding: +uncompressed data = 00 1e +len = 14 + +Failed to decode CRBB: length 14, data 00 1e +expected data = +expected len = 0 +decoded data = +decoded len = 0 + +Test:9 +Tree based decoding: +uncompressed data = 00 00 00 +len = 24 + +Failed to decode CRBB: length 24, data 00 00 00 +expected data = +expected len = 0 +decoded data = +decoded len = 0 diff --git a/tests/bitcomp/BitcompTest.ok b/tests/bitcomp/BitcompTest.ok new file mode 100644 index 0000000..f7720fc --- /dev/null +++ b/tests/bitcomp/BitcompTest.ok @@ -0,0 +1,2 @@ +=== start test_EPDAN_decode_tree === +=== end test_EPDAN_decode_tree === diff --git a/tests/testsuite.at b/tests/testsuite.at index 1049b31..e42a0fd 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -23,6 +23,13 @@ AT_CHECK([$OSMO_QEMU $abs_top_builddir/tests/tbf/TbfTest], [0], [expout], [experr]) AT_CLEANUP +AT_SETUP([bitcomp]) +AT_KEYWORDS([bitcomp]) +cat $abs_srcdir/bitcomp/BitcompTest.ok > expout +cat $abs_srcdir/bitcomp/BitcompTest.err > experr +AT_CHECK([$OSMO_QEMU $abs_top_builddir/tests/bitcomp/BitcompTest], [0], [expout], [experr]) +AT_CLEANUP + AT_SETUP([edge]) AT_KEYWORDS([edge]) cat $abs_srcdir/edge/EdgeTest.ok > expout -- To view, visit https://gerrit.osmocom.org/416 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ieae1992ed4b02bb1e09eec2d3de1a030eabd16ce Gerrit-PatchSet: 26 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: pravin Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: pravin From gerrit-no-reply at lists.osmocom.org Sun Oct 2 13:23:33 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:23:33 +0000 Subject: osmo-bts[master]: DTX: further AMR SID cache fixes (lc15, sysmo) In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/960 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5a1c1ad0b0a295a50e67775a4db85f1d331755ed 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 Sun Oct 2 13:23:54 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:23:54 +0000 Subject: osmo-bts[master]: DTX: move scheduling check inside repeat_last_sid In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/967 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I96594cf3aa1013d505bd20069d5bf261d9a2aefb 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 Sun Oct 2 13:24:02 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:24:02 +0000 Subject: [MERGED] osmo-bts[master]: DTX: move scheduling check inside repeat_last_sid In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: DTX: move scheduling check inside repeat_last_sid ...................................................................... DTX: move scheduling check inside repeat_last_sid Note: this also require changes to properly link against libosmocodec - see 2bb65be159dfdabf664fec569b343320301701b0 in libosmocore. Change-Id: I96594cf3aa1013d505bd20069d5bf261d9a2aefb --- M include/osmo-bts/msg_utils.h M src/common/Makefile.am M src/common/msg_utils.c M src/osmo-bts-litecell15/tch.c M src/osmo-bts-sysmo/Makefile.am M src/osmo-bts-sysmo/tch.c M tests/misc/Makefile.am 7 files changed, 61 insertions(+), 79 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmo-bts/msg_utils.h b/include/osmo-bts/msg_utils.h index f03eb43..14c2320 100644 --- a/include/osmo-bts/msg_utils.h +++ b/include/osmo-bts/msg_utils.h @@ -6,6 +6,8 @@ #include +#include + #include struct msgb; @@ -27,7 +29,5 @@ void save_last_sid(struct gsm_lchan *lchan, uint8_t *l1_payload, size_t length, uint32_t fn, bool update); uint8_t repeat_last_sid(struct gsm_lchan *lchan, uint8_t *dst, uint32_t fn); -bool dtx_amr_sid_optional(const struct gsm_lchan *lchan, uint32_t fn); -bool dtx_sched_optional(struct gsm_lchan *lchan, uint32_t fn); int msg_verify_ipa_structure(struct msgb *msg); int msg_verify_oml_structure(struct msgb *msg); diff --git a/src/common/Makefile.am b/src/common/Makefile.am index fbb6572..856f741 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -1,6 +1,6 @@ AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(OPENBSC_INCDIR) -AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOTRAU_CFLAGS) -LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOTRAU_LIBS) +AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOTRAU_CFLAGS) $(LIBOSMOCODEC_CFLAGS) +LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOTRAU_LIBS) $(LIBOSMOCODEC_LIBS) noinst_LIBRARIES = libbts.a libl1sched.a libbts_a_SOURCES = gsm_data_shared.c sysinfo.c logging.c abis.c oml.c bts.c \ diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 967b10d..f5a48a3 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -112,32 +112,13 @@ memcpy(lchan->tch.last_sid.buf, l1_payload, copy_len); } -/* repeat last SID if possible, returns SID length + 1 or 0 */ -/*! \brief Repeat last SID if possible in case of DTX - * \param[in] lchan Logical channel on which we check scheduling - * \param[in] dst Buffer to copy last SID into - * \returns Number of bytes copied + 1 (to accommodate for extra byte with - * payload type) or 0 if there's nothing to copy - */ -uint8_t repeat_last_sid(struct gsm_lchan *lchan, uint8_t *dst, uint32_t fn) -{ - if (lchan->tch.last_sid.len) { - memcpy(dst, lchan->tch.last_sid.buf, lchan->tch.last_sid.len); - lchan->tch.last_sid.fn = fn; - return lchan->tch.last_sid.len + 1; - } - LOGP(DL1C, LOGL_NOTICE, "Have to send %s frame on TCH but SID buffer " - "is empty - sent nothing\n", - get_value_string(gsm48_chan_mode_names, lchan->tch_mode)); - return 0; -} - /*! \brief Check if enough time has passed since last SID (if any) to repeat it * \param[in] lchan Logical channel on which we check scheduling * \param[in] fn Frame Number for which we check scheduling * \returns true if transmission can be omitted, false otherwise */ -bool dtx_amr_sid_optional(const struct gsm_lchan *lchan, uint32_t fn) +static inline bool dtx_amr_sid_optional(const struct gsm_lchan *lchan, + uint32_t fn) { /* Compute approx. time delta based on Fn duration */ uint32_t delta = GSM_FN_TO_MS(fn - lchan->tch.last_sid.fn); @@ -169,7 +150,7 @@ * \param[in] fn Frame Number for which we check scheduling * \returns true if transmission can be omitted, false otherwise */ -bool dtx_sched_optional(struct gsm_lchan *lchan, uint32_t fn) +static inline bool dtx_sched_optional(struct gsm_lchan *lchan, uint32_t fn) { /* According to 3GPP TS 45.008 ? 8.3: */ static const uint8_t f[] = { 52, 53, 54, 55, 56, 57, 58, 59 }, @@ -184,6 +165,39 @@ return false; } +/* repeat last SID if possible, returns SID length + 1 or 0 */ +/*! \brief Repeat last SID if possible in case of DTX + * \param[in] lchan Logical channel on which we check scheduling + * \param[in] dst Buffer to copy last SID into + * \returns Number of bytes copied + 1 (to accommodate for extra byte with + * payload type), 0 if there's nothing to copy + */ +uint8_t repeat_last_sid(struct gsm_lchan *lchan, uint8_t *dst, uint32_t fn) +{ + /* FIXME: add EFR support */ + if (lchan->tch_mode == GSM48_CMODE_SPEECH_EFR) + return 0; + + if (lchan->tch_mode != GSM48_CMODE_SPEECH_AMR) { + if (dtx_sched_optional(lchan, fn)) + return 0; + } else + if (dtx_amr_sid_optional(lchan, fn)) + return 0; + + if (lchan->tch.last_sid.len) { + memcpy(dst, lchan->tch.last_sid.buf, lchan->tch.last_sid.len); + lchan->tch.last_sid.fn = fn; + return lchan->tch.last_sid.len + 1; + } + + LOGP(DL1C, LOGL_DEBUG, "Have to send %s frame on TCH but SID buffer " + "is empty - sent nothing\n", + get_value_string(gsm48_chan_mode_names, lchan->tch_mode)); + + return 0; +} + /** * Return 0 in case the IPA structure is okay and in this * case the l2h will be set to the beginning of the data. diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index bcf981e..5ec1ee7 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include @@ -492,6 +491,7 @@ GsmL1_MsgUnitParam_t *msu_param; uint8_t *payload_type; uint8_t *l1_payload; + int rc; msg = l1p_msgb_alloc(); if (!msg) @@ -506,43 +506,27 @@ switch (lchan->tch_mode) { case GSM48_CMODE_SPEECH_AMR: *payload_type = GsmL1_TchPlType_Amr; - if (dtx_amr_sid_optional(lchan, fn)) { - msgb_free(msg); - return NULL; - } - msu_param->u8Size = repeat_last_sid(lchan, l1_payload, fn); - if (!msu_param->u8Size) - osmo_amr_rtp_enc(l1_payload, 0, AMR_NO_DATA, AMR_GOOD); break; case GSM48_CMODE_SPEECH_V1: if (lchan->type == GSM_LCHAN_TCH_F) *payload_type = GsmL1_TchPlType_Fr; else *payload_type = GsmL1_TchPlType_Hr; - /* unlike AMR, FR & HR schedued based on absolute FN value */ - if (dtx_sched_optional(lchan, fn)) { - msgb_free(msg); - return NULL; - } - msu_param->u8Size = repeat_last_sid(lchan, l1_payload, fn); - if (!msu_param->u8Size) - return NULL; break; case GSM48_CMODE_SPEECH_EFR: *payload_type = GsmL1_TchPlType_Efr; - if (dtx_sched_optional(lchan, fn)) { - msgb_free(msg); - return NULL; - } - msu_param->u8Size = repeat_last_sid(lchan, l1_payload, fn); - if (!msu_param->u8Size) - return NULL; break; default: msgb_free(msg); - msg = NULL; - break; + return NULL; } + rc = repeat_last_sid(lchan, l1_payload, fn); + if (!rc) { + msgb_free(msg); + return NULL; + } + msu_param->u8Size = rc; + return msg; } diff --git a/src/osmo-bts-sysmo/Makefile.am b/src/osmo-bts-sysmo/Makefile.am index 34f4bb0..8e39a3a 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 +sysmobts_mgr_LDADD = $(LIBGPS_LIBS) $(LIBOSMOCORE_LIBS) $(LIBOSMOVTY_LIBS) $(LIBOSMOABIS_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCTRL_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/tch.c b/src/osmo-bts-sysmo/tch.c index f350398..0e4b2da 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include @@ -595,6 +594,7 @@ GsmL1_MsgUnitParam_t *msu_param; uint8_t *payload_type; uint8_t *l1_payload; + int rc; msg = l1p_msgb_alloc(); if (!msg) @@ -609,43 +609,27 @@ switch (lchan->tch_mode) { case GSM48_CMODE_SPEECH_AMR: *payload_type = GsmL1_TchPlType_Amr; - if (dtx_amr_sid_optional(lchan, fn)) { - msgb_free(msg); - return NULL; - } - msu_param->u8Size = repeat_last_sid(lchan, l1_payload, fn); - if (!msu_param->u8Size) - osmo_amr_rtp_enc(l1_payload, 0, AMR_NO_DATA, AMR_GOOD); break; case GSM48_CMODE_SPEECH_V1: if (lchan->type == GSM_LCHAN_TCH_F) *payload_type = GsmL1_TchPlType_Fr; else *payload_type = GsmL1_TchPlType_Hr; - /* unlike AMR, FR & HR schedued based on absolute FN value */ - if (dtx_sched_optional(lchan, fn)) { - msgb_free(msg); - return NULL; - } - msu_param->u8Size = repeat_last_sid(lchan, l1_payload, fn); - if (!msu_param->u8Size) - return NULL; break; case GSM48_CMODE_SPEECH_EFR: *payload_type = GsmL1_TchPlType_Efr; - if (dtx_sched_optional(lchan, fn)) { - msgb_free(msg); - return NULL; - } - msu_param->u8Size = repeat_last_sid(lchan, l1_payload, fn); - if (!msu_param->u8Size) - return NULL; break; default: msgb_free(msg); - msg = NULL; - break; + return NULL; } + rc = repeat_last_sid(lchan, l1_payload, fn); + if (!rc) { + msgb_free(msg); + return NULL; + } + msu_param->u8Size = rc; + return msg; } diff --git a/tests/misc/Makefile.am b/tests/misc/Makefile.am index f60325b..d5acb18 100644 --- a/tests/misc/Makefile.am +++ b/tests/misc/Makefile.am @@ -1,6 +1,6 @@ AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(OPENBSC_INCDIR) -AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) -LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) +AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOCODEC_CFLAGS) +LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCODEC_LIBS) noinst_PROGRAMS = misc_test EXTRA_DIST = misc_test.ok -- To view, visit https://gerrit.osmocom.org/967 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I96594cf3aa1013d505bd20069d5bf261d9a2aefb 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 Sun Oct 2 13:24:02 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:24:02 +0000 Subject: [MERGED] osmo-bts[master]: DTX: further AMR SID cache fixes (lc15, sysmo) In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: DTX: further AMR SID cache fixes (lc15, sysmo) ...................................................................... DTX: further AMR SID cache fixes (lc15, sysmo) * consolidate AMR CMR and CMI handling in common/amr.c * use it in save_last_sid() * remove dead code * properly compute RTP payload length for AMR * use save_last_sid() for FR & HR as well * invalidate cached SID if SPEECH frame is received Fixes: OS #1800, #1801 Change-Id: I5a1c1ad0b0a295a50e67775a4db85f1d331755ed --- M include/osmo-bts/amr.h M include/osmo-bts/msg_utils.h M src/common/amr.c M src/common/msg_utils.c M src/osmo-bts-litecell15/tch.c M src/osmo-bts-sysmo/tch.c 6 files changed, 133 insertions(+), 173 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmo-bts/amr.h b/include/osmo-bts/amr.h index 6bdc41f..f313287 100644 --- a/include/osmo-bts/amr.h +++ b/include/osmo-bts/amr.h @@ -11,7 +11,8 @@ int amr_parse_mr_conf(struct amr_multirate_conf *amr_mrc, const uint8_t *mr_conf, unsigned int len); -int get_amr_mode_idx(const struct amr_multirate_conf *amr_mrc, uint8_t cmi); +void amr_set_mode_pref(uint8_t *data, const struct amr_multirate_conf *amr_mrc, + uint8_t cmi, uint8_t cmr); unsigned int amr_get_initial_mode(struct gsm_lchan *lchan); #endif /* _OSMO_BTS_AMR_H */ diff --git a/include/osmo-bts/msg_utils.h b/include/osmo-bts/msg_utils.h index 14c2320..f07623d 100644 --- a/include/osmo-bts/msg_utils.h +++ b/include/osmo-bts/msg_utils.h @@ -26,8 +26,9 @@ }; void lchan_set_marker(bool t, struct gsm_lchan *lchan); -void save_last_sid(struct gsm_lchan *lchan, uint8_t *l1_payload, size_t length, - uint32_t fn, bool update); +void save_last_sid(struct gsm_lchan *lchan, const uint8_t *l1_payload, + size_t length, uint32_t fn, int update, uint8_t cmr, + int8_t cmi); uint8_t repeat_last_sid(struct gsm_lchan *lchan, uint8_t *dst, uint32_t fn); int msg_verify_ipa_structure(struct msgb *msg); int msg_verify_oml_structure(struct msgb *msg); diff --git a/src/common/amr.c b/src/common/amr.c index 56ed430..b5d2c37 100644 --- a/src/common/amr.c +++ b/src/common/amr.c @@ -22,7 +22,8 @@ LOGPC(ss, logl, "\n"); } -int get_amr_mode_idx(const struct amr_multirate_conf *amr_mrc, uint8_t cmi) +static inline int get_amr_mode_idx(const struct amr_multirate_conf *amr_mrc, + uint8_t cmi) { unsigned int i; for (i = 0; i < amr_mrc->num_modes; i++) { @@ -32,6 +33,46 @@ return -EINVAL; } +static inline uint8_t set_cmr_mode_idx(const struct amr_multirate_conf *amr_mrc, + uint8_t cmr) +{ + int rc; + + /* Codec Mode Request is in upper 4 bits of RTP payload header, + * and we simply copy the CMR into the CMC */ + if (cmr == 0xF) { + /* FIXME: we need some state about the last codec mode */ + return 0; + } + + rc = get_amr_mode_idx(amr_mrc, cmr); + if (rc < 0) { + /* FIXME: we need some state about the last codec mode */ + LOGP(DRTP, LOGL_INFO, "RTP->L1: overriding CMR %u\n", cmr); + return 0; + } + return rc; +} + +static inline uint8_t set_cmi_mode_idx(const struct amr_multirate_conf *amr_mrc, + uint8_t cmi) +{ + int rc = get_amr_mode_idx(amr_mrc, cmi); + if (rc < 0) { + LOGP(DRTP, LOGL_ERROR, "AMR CMI %u not part of AMR MR set\n", + cmi); + return 0; + } + return rc; +} + +void amr_set_mode_pref(uint8_t *data, const struct amr_multirate_conf *amr_mrc, + uint8_t cmi, uint8_t cmr) +{ + data[0] = set_cmi_mode_idx(amr_mrc, cmi); + data[1] = set_cmr_mode_idx(amr_mrc, cmr); +} + /* parse a GSM 04.08 MultiRate Config IE (10.5.2.21aa) in a more * comfortable internal data structure */ int amr_parse_mr_conf(struct amr_multirate_conf *amr_mrc, diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index f5a48a3..5c6bbbe 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -99,17 +100,30 @@ } /* store the last SID frame in lchan context */ -void save_last_sid(struct gsm_lchan *lchan, uint8_t *l1_payload, size_t length, - uint32_t fn, bool update) +/*! \brief Store the last SID frame in lchan context + * \param[in] lchan Logical channel on which we check scheduling + * \param[in] l1_payload buffer with SID data + * \param[in] length length of l1_payload + * \param[in] fn Frame Number for which we check scheduling + * \param[in] update 0 if SID_FIRST, 1 if SID_UPDATE, -1 if not AMR SID + * \param[in] cmr Codec Mode Request (AMR-specific, ignored otherwise) + * \param[in] cmi Codec Mode Indication (AMR-specific, ignored otherwise) + */ +void save_last_sid(struct gsm_lchan *lchan, const uint8_t *l1_payload, + size_t length, uint32_t fn, int update, uint8_t cmr, + int8_t cmi) { - size_t copy_len = OSMO_MIN(length + 1, - ARRAY_SIZE(lchan->tch.last_sid.buf)); + size_t amr = (update < 0) ? 0 : 2, + copy_len = OSMO_MIN(length + 1, ARRAY_SIZE(lchan->tch.last_sid.buf)); - lchan->tch.last_sid.len = copy_len; + lchan->tch.last_sid.len = copy_len + amr; lchan->tch.last_sid.fn = fn; lchan->tch.last_sid.is_update = update; - memcpy(lchan->tch.last_sid.buf, l1_payload, copy_len); + if (amr) + amr_set_mode_pref(lchan->tch.last_sid.buf, &lchan->tch.amr_mr, + cmi, cmr); + memcpy(lchan->tch.last_sid.buf + amr, l1_payload, copy_len); } /*! \brief Check if enough time has passed since last SID (if any) to repeat it diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index 5ec1ee7..5b5a375 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -199,85 +199,13 @@ */ static int rtppayload_to_l1_amr(uint8_t *l1_payload, const uint8_t *rtp_payload, uint8_t payload_len, - struct gsm_lchan *lchan, uint32_t fn) + struct gsm_lchan *lchan, uint8_t cmr, int8_t cmi, + uint8_t ft) { - struct amr_multirate_conf *amr_mrc = &lchan->tch.amr_mr; - enum osmo_amr_type ft; - enum osmo_amr_quality bfi; - uint8_t cmr; - int8_t sti, cmi; - uint8_t *l1_cmi_idx = l1_payload; - uint8_t *l1_cmr_idx = l1_payload+1; - int rc; - - osmo_amr_rtp_dec(rtp_payload, payload_len, &cmr, &cmi, &ft, &bfi, &sti); memcpy(l1_payload+2, rtp_payload, payload_len); + amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi, cmr); - /* CMI in downlink tells the L1 encoder which encoding function - * it will use, so we have to use the frame type */ - switch (ft) { - case 0: case 1: case 2: case 3: - case 4: case 5: case 6: case 7: - cmi = ft; - LOGP(DRTP, LOGL_DEBUG, "SPEECH frame with CMI %u\n", cmi); - break; - case AMR_NO_DATA: - LOGP(DRTP, LOGL_DEBUG, "SPEECH frame AMR NO_DATA\n"); - break; - case AMR_SID: - LOGP(DRTP, LOGL_DEBUG, "SID %s frame with CMI %u\n", - sti ? "UPDATE" : "FIRST", cmi); - break; - default: - LOGP(DRTP, LOGL_ERROR, "unsupported AMR FT 0x%02x\n", ft); - return -EINVAL; - break; - } - - rc = get_amr_mode_idx(amr_mrc, cmi); - if (rc < 0) { - LOGP(DRTP, LOGL_ERROR, "AMR CMI %u not part of AMR MR set\n", - cmi); - *l1_cmi_idx = 0; - } else - *l1_cmi_idx = rc; - - /* Codec Mode Request is in upper 4 bits of RTP payload header, - * and we simply copy the CMR into the CMC */ - if (cmr == 0xF) { - /* FIXME: we need some state about the last codec mode */ - *l1_cmr_idx = 0; - } else { - rc = get_amr_mode_idx(amr_mrc, cmr); - if (rc < 0) { - /* FIXME: we need some state about the last codec mode */ - LOGP(DRTP, LOGL_INFO, "RTP->L1: overriding CMR %u\n", cmr); - *l1_cmr_idx = 0; - } else - *l1_cmr_idx = rc; - } -#if 0 - /* check for bad quality indication */ - if (bfi == AMR_GOOD) { - /* obtain frame type from AMR FT */ - l1_payload[2] = ft; - } else { - /* bad quality, we should indicate that... */ - if (ft == AMR_SID) { - /* FIXME: Should we do GsmL1_TchPlType_Amr_SidBad? */ - l1_payload[2] = ft; - } else { - l1_payload[2] = ft; - } - } -#endif - - if (ft == AMR_SID) { - save_last_sid(lchan, l1_payload, payload_len, fn, sti); - return -EALREADY; - } - - return payload_len+1; + return payload_len + 2; } #define RTP_MSGB_ALLOC_SIZE 512 @@ -304,6 +232,7 @@ enum osmo_amr_quality bfi; int8_t sti, cmi; int rc; + bool is_sid = false; DEBUGP(DRTP, "%s RTP IN: %s\n", gsm_lchan_name(lchan), osmo_hexdump(rtp_pl, rtp_pl_len)); @@ -317,32 +246,55 @@ *payload_type = GsmL1_TchPlType_Fr; rc = rtppayload_to_l1_fr(l1_payload, rtp_pl, rtp_pl_len); + if (rc) + is_sid = osmo_fr_check_sid(rtp_pl, rtp_pl_len); } else{ *payload_type = GsmL1_TchPlType_Hr; rc = rtppayload_to_l1_hr(l1_payload, rtp_pl, rtp_pl_len); + if (rc) + is_sid = osmo_hr_check_sid(rtp_pl, rtp_pl_len); } + if (is_sid) + save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, -1, 0, 0); break; case GSM48_CMODE_SPEECH_EFR: *payload_type = GsmL1_TchPlType_Efr; rc = rtppayload_to_l1_efr(l1_payload, rtp_pl, rtp_pl_len); + /* FIXME: detect and save EFR SID */ break; case GSM48_CMODE_SPEECH_AMR: + osmo_amr_rtp_dec(rtp_pl, rtp_pl_len, &cmr, &cmi, &ft, &bfi, + &sti); + if (ft == AMR_SID) { + save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, sti, cmr, + cmi); + return false; + } + if (ft != AMR_NO_DATA && !osmo_amr_is_speech(ft)) { + LOGP(DRTP, LOGL_ERROR, "unsupported AMR FT 0x%02x\n", + ft); + return false; + } + if (osmo_amr_is_speech(ft)) { + if (lchan->tch.last_sid.len) { /* FIXME: force ONSET */ + marker = true; + } + /* We received AMR SPEECH frame - invalidate saved SID */ + lchan->tch.last_sid.len = 0; + } if (marker) { *payload_type = GsmL1_TchPlType_Amr_Onset; rc = 0; - osmo_amr_rtp_dec(rtp_pl, rtp_pl_len, &cmr, &cmi, &ft, - &bfi, &sti); LOGP(DRTP, LOGL_ERROR, "Marker SPEECH frame AMR %s\n", get_value_string(osmo_amr_type_names, ft)); } else { *payload_type = GsmL1_TchPlType_Amr; rc = rtppayload_to_l1_amr(l1_payload, rtp_pl, - rtp_pl_len, lchan, fn); - if (-EALREADY == rc) - return false; + rtp_pl_len, lchan, cmr, cmi, + ft); } break; default: diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index 0e4b2da..655884d 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -282,19 +282,9 @@ */ static int rtppayload_to_l1_amr(uint8_t *l1_payload, const uint8_t *rtp_payload, uint8_t payload_len, - struct gsm_lchan *lchan, uint32_t fn) + struct gsm_lchan *lchan, uint8_t cmr, int8_t cmi, + uint8_t ft) { - struct amr_multirate_conf *amr_mrc = &lchan->tch.amr_mr; - enum osmo_amr_type ft; - enum osmo_amr_quality bfi; - uint8_t cmr; - int8_t sti, cmi; - uint8_t *l1_cmi_idx = l1_payload; - uint8_t *l1_cmr_idx = l1_payload+1; - int rc; - - osmo_amr_rtp_dec(rtp_payload, payload_len, &cmr, &cmi, &ft, &bfi, &sti); - #ifdef USE_L1_RTP_MODE memcpy(l1_payload+2, rtp_payload, payload_len); #else @@ -309,72 +299,9 @@ /* lower 4 bit of first FR2 byte contains FT */ l1_payload[2] |= ft; #endif /* USE_L1_RTP_MODE */ + amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi, cmr); - /* CMI in downlink tells the L1 encoder which encoding function - * it will use, so we have to use the frame type */ - switch (ft) { - case 0: case 1: case 2: case 3: - case 4: case 5: case 6: case 7: - cmi = ft; - LOGP(DRTP, LOGL_DEBUG, "SPEECH frame with CMI %u\n", cmi); - break; - case AMR_NO_DATA: - LOGP(DRTP, LOGL_DEBUG, "SPEECH frame AMR NO_DATA\n"); - break; - case AMR_SID: - LOGP(DRTP, LOGL_DEBUG, "SID %s frame with CMI %u\n", - sti ? "UPDATE" : "FIRST", cmi); - break; - default: - LOGP(DRTP, LOGL_ERROR, "unsupported AMR FT 0x%02x\n", ft); - return -EINVAL; - break; - } - - rc = get_amr_mode_idx(amr_mrc, cmi); - if (rc < 0) { - LOGP(DRTP, LOGL_ERROR, "AMR CMI %u not part of AMR MR set\n", - cmi); - *l1_cmi_idx = 0; - } else - *l1_cmi_idx = rc; - - /* Codec Mode Request is in upper 4 bits of RTP payload header, - * and we simply copy the CMR into the CMC */ - if (cmr == 0xF) { - /* FIXME: we need some state about the last codec mode */ - *l1_cmr_idx = 0; - } else { - rc = get_amr_mode_idx(amr_mrc, cmr); - if (rc < 0) { - /* FIXME: we need some state about the last codec mode */ - LOGP(DRTP, LOGL_INFO, "RTP->L1: overriding CMR %u\n", cmr); - *l1_cmr_idx = 0; - } else - *l1_cmr_idx = rc; - } -#if 0 - /* check for bad quality indication */ - if (bfi == AMR_GOOD) { - /* obtain frame type from AMR FT */ - l1_payload[2] = ft; - } else { - /* bad quality, we should indicate that... */ - if (ft == AMR_SID) { - /* FIXME: Should we do GsmL1_TchPlType_Amr_SidBad? */ - l1_payload[2] = ft; - } else { - l1_payload[2] = ft; - } - } -#endif - - if (ft == AMR_SID) { - save_last_sid(lchan, l1_payload, payload_len, fn, sti); - return -EALREADY; - } - - return payload_len+1; + return payload_len + 2; } #define RTP_MSGB_ALLOC_SIZE 512 @@ -401,6 +328,7 @@ enum osmo_amr_quality bfi; int8_t sti, cmi; int rc; + bool is_sid = false; DEBUGP(DRTP, "%s RTP IN: %s\n", gsm_lchan_name(lchan), osmo_hexdump(rtp_pl, rtp_pl_len)); @@ -414,34 +342,57 @@ *payload_type = GsmL1_TchPlType_Fr; rc = rtppayload_to_l1_fr(l1_payload, rtp_pl, rtp_pl_len); + if (rc) + is_sid = osmo_fr_check_sid(rtp_pl, rtp_pl_len); } else{ *payload_type = GsmL1_TchPlType_Hr; rc = rtppayload_to_l1_hr(l1_payload, rtp_pl, rtp_pl_len); + if (rc) + is_sid = osmo_hr_check_sid(rtp_pl, rtp_pl_len); } + if (is_sid) + save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, -1, 0, 0); break; #if defined(L1_HAS_EFR) && defined(USE_L1_RTP_MODE) case GSM48_CMODE_SPEECH_EFR: *payload_type = GsmL1_TchPlType_Efr; rc = rtppayload_to_l1_efr(l1_payload, rtp_pl, rtp_pl_len); + /* FIXME: detect and save EFR SID */ break; #endif case GSM48_CMODE_SPEECH_AMR: + osmo_amr_rtp_dec(rtp_pl, rtp_pl_len, &cmr, &cmi, &ft, &bfi, + &sti); + if (ft == AMR_SID) { + save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, sti, cmr, + cmi); + return false; + } + if (ft != AMR_NO_DATA && !osmo_amr_is_speech(ft)) { + LOGP(DRTP, LOGL_ERROR, "unsupported AMR FT 0x%02x\n", + ft); + return false; + } + if (osmo_amr_is_speech(ft)) { + if (lchan->tch.last_sid.len) { /* FIXME: force ONSET */ + marker = true; + } + /* We received AMR SPEECH frame - invalidate saved SID */ + lchan->tch.last_sid.len = 0; + } if (marker) { *payload_type = GsmL1_TchPlType_Amr_Onset; rc = 0; - osmo_amr_rtp_dec(rtp_pl, rtp_pl_len, &cmr, &cmi, &ft, - &bfi, &sti); LOGP(DRTP, LOGL_ERROR, "Marker SPEECH frame AMR %s\n", get_value_string(osmo_amr_type_names, ft)); } else { *payload_type = GsmL1_TchPlType_Amr; rc = rtppayload_to_l1_amr(l1_payload, rtp_pl, - rtp_pl_len, lchan, fn); - if (-EALREADY == rc) - return false; + rtp_pl_len, lchan, cmr, cmi, + ft); } break; default: -- To view, visit https://gerrit.osmocom.org/960 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5a1c1ad0b0a295a50e67775a4db85f1d331755ed 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 Sun Oct 2 13:24:02 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:24:02 +0000 Subject: [MERGED] osmo-bts[master]: DTX: send AMR voice alongside with ONSET In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: DTX: send AMR voice alongside with ONSET ...................................................................... DTX: send AMR voice alongside with ONSET When ONSET event happens (either via Marker bit or due to unmarked talkspurt) we should first send Onset event to L1 and than send voice data in response to the same PH-RTS.ind. Change-Id: I2a7b89430ca49eee4a350c5f980bd6bcbc386347 --- M src/osmo-bts-litecell15/l1_if.c M src/osmo-bts-litecell15/l1_if.h M src/osmo-bts-litecell15/tch.c M src/osmo-bts-sysmo/l1_if.c M src/osmo-bts-sysmo/l1_if.h M src/osmo-bts-sysmo/tch.c 6 files changed, 32 insertions(+), 20 deletions(-) Approvals: Harald Welte: 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 cf7ce58..a4378c1 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -441,6 +441,7 @@ uint8_t chan_nr; GsmL1_Prim_t *l1p; struct msgb *nmsg = NULL; + int rc = -1; chan_nr = l1sap->u.tch.chan_nr; u32Fn = l1sap->u.tch.fn; @@ -464,17 +465,20 @@ if (!nmsg) return -ENOMEM; l1p = msgb_l1prim(nmsg); - if (!l1if_tch_encode(lchan, + rc = l1if_tch_encode(lchan, l1p->u.phDataReq.msgUnitParam.u8Buffer, &l1p->u.phDataReq.msgUnitParam.u8Size, msg->data, msg->len, u32Fn, - l1sap->u.tch.marker)) { + l1sap->u.tch.marker); + if (rc < 0) { + /* no data encoded for L1: smth will be generated below */ msgb_free(nmsg); nmsg = NULL; } } - /* no message/data, we generate an empty traffic msg */ + /* no message/data, we might generate an empty traffic msg or re-send + cached SID in case of DTX */ if (!nmsg) nmsg = gen_empty_tch_msg(lchan, u32Fn); @@ -502,7 +506,7 @@ /* send message to DSP's queue */ osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], nmsg); - if (l1sap->u.tch.marker) { /* Send voice after ONSET was sent */ + if (l1sap->u.tch.marker) { /* DTX: send voice after ONSET was sent */ l1sap->u.tch.marker = 0; return ph_tch_req(trx, l1sap->oph.msg, l1sap); } diff --git a/src/osmo-bts-litecell15/l1_if.h b/src/osmo-bts-litecell15/l1_if.h index 88d71bf..adb197d 100644 --- a/src/osmo-bts-litecell15/l1_if.h +++ b/src/osmo-bts-litecell15/l1_if.h @@ -89,7 +89,7 @@ struct gsm_lchan *l1if_hLayer_to_lchan(struct gsm_bts_trx *trx, uint32_t hLayer); /* tch.c */ -bool l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, +int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, bool marker); int l1if_tch_rx(struct gsm_bts_trx *trx, uint8_t chan_nr, struct msgb *l1p_msg); diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index bcb1edd..e246ffb 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -211,7 +211,9 @@ * \param[in] rtp_pl buffer containing RTP payload * \param[in] rtp_pl_len length of \a rtp_pl * \param[in] marker RTP header Marker bit (indicates speech onset) - * \returns true if encoding result can be sent further to L1, false otherwise + * \returns 0 if encoding result can be sent further to L1 without extra actions + * positive value if data is ready AND extra actions are required + * negative value otherwise * * This function prepares a msgb with a L1 PH-DATA.req primitive and * queues it into lchan->dl_tch_queue. @@ -220,7 +222,7 @@ * yet, as things like the frame number, etc. are unknown at the time we * pre-fill the primtive. */ -bool l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, +int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, bool marker) { uint8_t *payload_type; @@ -269,7 +271,7 @@ LOGP(DRTP, LOGL_NOTICE, "%s SPEECH frame without" " Marker: ONSET forced\n", get_value_string(osmo_amr_type_names, ft)); - return true; + return rc; } LOGP(DRTP, LOGL_DEBUG, "%s SPEECH frame with Marker\n", get_value_string(osmo_amr_type_names, ft)); @@ -289,14 +291,14 @@ if (rc < 0) { LOGP(DRTP, LOGL_ERROR, "%s unable to parse RTP payload\n", gsm_lchan_name(lchan)); - return false; + return -EBADMSG; } *len = rc + 1; DEBUGP(DRTP, "%s RTP->L1: %s\n", gsm_lchan_name(lchan), osmo_hexdump(data, *len)); - return true; + return 0; } static int is_recv_only(uint8_t speech_mode) diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 3c6db43..09627af 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -436,6 +436,7 @@ uint8_t chan_nr; GsmL1_Prim_t *l1p; struct msgb *nmsg = NULL; + int rc = -1; chan_nr = l1sap->u.tch.chan_nr; u32Fn = l1sap->u.tch.fn; @@ -459,17 +460,20 @@ if (!nmsg) return -ENOMEM; l1p = msgb_l1prim(nmsg); - if (!l1if_tch_encode(lchan, + rc = l1if_tch_encode(lchan, l1p->u.phDataReq.msgUnitParam.u8Buffer, &l1p->u.phDataReq.msgUnitParam.u8Size, msg->data, msg->len, u32Fn, - l1sap->u.tch.marker)) { + l1sap->u.tch.marker); + if (rc < 0) { + /* no data encoded for L1: smth will be generated below */ msgb_free(nmsg); nmsg = NULL; } } - /* no message/data, we generate an empty traffic msg */ + /* no message/data, we might generate an empty traffic msg or re-send + cached SID in case of DTX */ if (!nmsg) nmsg = gen_empty_tch_msg(lchan, u32Fn); @@ -497,7 +501,7 @@ /* send message to DSP's queue */ osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], nmsg); - if (l1sap->u.tch.marker) { /* Send voice after ONSET was sent */ + if (l1sap->u.tch.marker) { /* DTX: send voice after ONSET was sent */ l1sap->u.tch.marker = 0; return ph_tch_req(trx, l1sap->oph.msg, l1sap); } diff --git a/src/osmo-bts-sysmo/l1_if.h b/src/osmo-bts-sysmo/l1_if.h index a90c39b..ece7a01 100644 --- a/src/osmo-bts-sysmo/l1_if.h +++ b/src/osmo-bts-sysmo/l1_if.h @@ -109,7 +109,7 @@ struct gsm_lchan *l1if_hLayer_to_lchan(struct gsm_bts_trx *trx, uint32_t hLayer); /* tch.c */ -bool l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, +int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, bool marker); int l1if_tch_rx(struct gsm_bts_trx *trx, uint8_t chan_nr, struct msgb *l1p_msg); diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index 9be8659..ca9045e 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -307,7 +307,9 @@ * \param[in] rtp_pl buffer containing RTP payload * \param[in] rtp_pl_len length of \a rtp_pl * \param[in] marker RTP header Marker bit (indicates speech onset) - * \returns true if encoding result can be sent further to L1, false otherwise + * \returns 0 if encoding result can be sent further to L1 without extra actions + * positive value if data is ready AND extra actions are required + * negative value otherwise * * This function prepares a msgb with a L1 PH-DATA.req primitive and * queues it into lchan->dl_tch_queue. @@ -316,7 +318,7 @@ * yet, as things like the frame number, etc. are unknown at the time we * pre-fill the primtive. */ -bool l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, +int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, bool marker) { uint8_t *payload_type; @@ -367,7 +369,7 @@ LOGP(DRTP, LOGL_NOTICE, "%s SPEECH frame without" " Marker: ONSET forced\n", get_value_string(osmo_amr_type_names, ft)); - return true; + return rc; } LOGP(DRTP, LOGL_DEBUG, "%s SPEECH frame with Marker\n", get_value_string(osmo_amr_type_names, ft)); @@ -387,14 +389,14 @@ if (rc < 0) { LOGP(DRTP, LOGL_ERROR, "%s unable to parse RTP payload\n", gsm_lchan_name(lchan)); - return false; + return -EBADMSG; } *len = rc + 1; DEBUGP(DRTP, "%s RTP->L1: %s\n", gsm_lchan_name(lchan), osmo_hexdump(data, *len)); - return true; + return 0; } static int is_recv_only(uint8_t speech_mode) -- To view, visit https://gerrit.osmocom.org/961 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2a7b89430ca49eee4a350c5f980bd6bcbc386347 Gerrit-PatchSet: 14 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 Sun Oct 2 13:24:03 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:24:03 +0000 Subject: [MERGED] osmo-bts[master]: DTX: move ONSET detection into separate function In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: DTX: move ONSET detection into separate function ...................................................................... DTX: move ONSET detection into separate function Move code from tch.c (lc15, sysmo) into generic function which: - check if talkspurt is happening - cache SID if necessary or invalidate cache - fill in CMR & CMI prefix This also fixes the problem when SID FIRST was cached without sending just like SID UPDATE instead of being sent right away. Change-Id: I6c7016a54749abadeef4fd4f5b6f750b256fb916 --- M include/osmo-bts/msg_utils.h M src/common/msg_utils.c M src/osmo-bts-litecell15/tch.c M src/osmo-bts-sysmo/tch.c 4 files changed, 96 insertions(+), 74 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmo-bts/msg_utils.h b/include/osmo-bts/msg_utils.h index f07623d..f99f3c4 100644 --- a/include/osmo-bts/msg_utils.h +++ b/include/osmo-bts/msg_utils.h @@ -29,6 +29,9 @@ void save_last_sid(struct gsm_lchan *lchan, const uint8_t *l1_payload, size_t length, uint32_t fn, int update, uint8_t cmr, int8_t cmi); +int dtx_amr_check_onset(struct gsm_lchan *lchan, const uint8_t *rtp_pl, + size_t rtp_pl_len, uint32_t fn, uint8_t *l1_payload, + uint8_t *ft_out); uint8_t repeat_last_sid(struct gsm_lchan *lchan, uint8_t *dst, uint32_t fn); int msg_verify_ipa_structure(struct msgb *msg); int msg_verify_oml_structure(struct msgb *msg); diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 5c6bbbe..99a211f 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -29,7 +29,7 @@ #include #include - +#include static int check_fom(struct abis_om_hdr *omh, size_t len) { @@ -99,7 +99,7 @@ } } -/* store the last SID frame in lchan context */ + /*! \brief Store the last SID frame in lchan context * \param[in] lchan Logical channel on which we check scheduling * \param[in] l1_payload buffer with SID data @@ -126,6 +126,59 @@ memcpy(lchan->tch.last_sid.buf + amr, l1_payload, copy_len); } +/*! \brief Check current and cached SID to decide if talkspurt takes place + * \param[in] lchan Logical channel on which we check scheduling + * \param[in] rtp_pl buffer with RTP data + * \param[in] rtp_pl_len length of rtp_pl + * \param[in] fn Frame Number for which we check scheduling + * \param[in] l1_payload buffer where CMR and CMI prefix should be added + * \param[out] ft_out Frame Type to be populated after decoding + * \returns 0 if frame should be send immediately (2 byte CMR,CMI prefix added: + * caller must adjust length as necessary), + * 1 if ONSET event is detected + * negative if no sending is necessary (either error or cached SID + * UPDATE) + */ +int dtx_amr_check_onset(struct gsm_lchan *lchan, const uint8_t *rtp_pl, + size_t rtp_pl_len, uint32_t fn, uint8_t *l1_payload, + uint8_t *ft_out) +{ + uint8_t cmr; + enum osmo_amr_type ft; + enum osmo_amr_quality bfi; + int8_t sti, cmi; + osmo_amr_rtp_dec(rtp_pl, rtp_pl_len, &cmr, &cmi, &ft, &bfi, &sti); + *ft_out = ft; /* only needed for old sysmo firmware */ + + if (ft == AMR_SID) { + save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, sti, cmr, cmi); + if (sti) /* SID_UPDATE should be cached and send later */ + return -EAGAIN; + else { /* SID_FIRST - cached and send right away */ + amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi, + cmr); + return 0; + } + } + + if (ft != AMR_NO_DATA && !osmo_amr_is_speech(ft)) { + LOGP(DRTP, LOGL_ERROR, "unsupported AMR FT 0x%02x\n", ft); + return -ENOTSUP; + } + + if (osmo_amr_is_speech(ft)) { + if (lchan->tch.last_sid.len) { /* force ONSET */ + lchan->tch.last_sid.len = 0; + return 1; + } + /* We received AMR SPEECH frame - invalidate saved SID */ + lchan->tch.last_sid.len = 0; + amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi, cmr); + } + + return 0; +} + /*! \brief Check if enough time has passed since last SID (if any) to repeat it * \param[in] lchan Logical channel on which we check scheduling * \param[in] fn Frame Number for which we check scheduling diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index 5b5a375..bcb1edd 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -199,13 +199,10 @@ */ static int rtppayload_to_l1_amr(uint8_t *l1_payload, const uint8_t *rtp_payload, uint8_t payload_len, - struct gsm_lchan *lchan, uint8_t cmr, int8_t cmi, - uint8_t ft) + struct gsm_lchan *lchan, uint8_t ft) { - memcpy(l1_payload+2, rtp_payload, payload_len); - amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi, cmr); - - return payload_len + 2; + memcpy(l1_payload, rtp_payload, payload_len); + return payload_len; } #define RTP_MSGB_ALLOC_SIZE 512 @@ -227,11 +224,8 @@ const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, bool marker) { uint8_t *payload_type; - uint8_t *l1_payload, cmr; - enum osmo_amr_type ft; - enum osmo_amr_quality bfi; - int8_t sti, cmi; - int rc; + uint8_t *l1_payload, ft; + int rc = 0; bool is_sid = false; DEBUGP(DRTP, "%s RTP IN: %s\n", gsm_lchan_name(lchan), @@ -265,36 +259,25 @@ /* FIXME: detect and save EFR SID */ break; case GSM48_CMODE_SPEECH_AMR: - osmo_amr_rtp_dec(rtp_pl, rtp_pl_len, &cmr, &cmi, &ft, &bfi, - &sti); - if (ft == AMR_SID) { - save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, sti, cmr, - cmi); - return false; - } - if (ft != AMR_NO_DATA && !osmo_amr_is_speech(ft)) { - LOGP(DRTP, LOGL_ERROR, "unsupported AMR FT 0x%02x\n", - ft); - return false; - } - if (osmo_amr_is_speech(ft)) { - if (lchan->tch.last_sid.len) { /* FIXME: force ONSET */ - marker = true; - } - /* We received AMR SPEECH frame - invalidate saved SID */ - lchan->tch.last_sid.len = 0; - } - if (marker) { + rc = dtx_amr_check_onset(lchan, rtp_pl, rtp_pl_len, fn, + l1_payload, &ft); + + if (marker || rc > 0) { *payload_type = GsmL1_TchPlType_Amr_Onset; - rc = 0; - LOGP(DRTP, LOGL_ERROR, "Marker SPEECH frame AMR %s\n", + *len = 1; + if (rc != 0) { + LOGP(DRTP, LOGL_NOTICE, "%s SPEECH frame without" + " Marker: ONSET forced\n", + get_value_string(osmo_amr_type_names, ft)); + return true; + } + LOGP(DRTP, LOGL_DEBUG, "%s SPEECH frame with Marker\n", get_value_string(osmo_amr_type_names, ft)); } else { *payload_type = GsmL1_TchPlType_Amr; - rc = rtppayload_to_l1_amr(l1_payload, rtp_pl, - rtp_pl_len, lchan, cmr, cmi, - ft); + rc = 2 + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, + rtp_pl_len, lchan, ft); } break; default: diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index 655884d..9be8659 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -282,11 +282,10 @@ */ static int rtppayload_to_l1_amr(uint8_t *l1_payload, const uint8_t *rtp_payload, uint8_t payload_len, - struct gsm_lchan *lchan, uint8_t cmr, int8_t cmi, - uint8_t ft) + struct gsm_lchan *lchan, uint8_t ft) { #ifdef USE_L1_RTP_MODE - memcpy(l1_payload+2, rtp_payload, payload_len); + memcpy(l1_payload, rtp_payload, payload_len); #else uint8_t amr_if2_core_len = payload_len - 2; @@ -299,9 +298,7 @@ /* lower 4 bit of first FR2 byte contains FT */ l1_payload[2] |= ft; #endif /* USE_L1_RTP_MODE */ - amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi, cmr); - - return payload_len + 2; + return payload_len; } #define RTP_MSGB_ALLOC_SIZE 512 @@ -323,11 +320,8 @@ const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, bool marker) { uint8_t *payload_type; - uint8_t *l1_payload, cmr; - enum osmo_amr_type ft; - enum osmo_amr_quality bfi; - int8_t sti, cmi; - int rc; + uint8_t *l1_payload, ft; + int rc = 0; bool is_sid = false; DEBUGP(DRTP, "%s RTP IN: %s\n", gsm_lchan_name(lchan), @@ -363,36 +357,25 @@ break; #endif case GSM48_CMODE_SPEECH_AMR: - osmo_amr_rtp_dec(rtp_pl, rtp_pl_len, &cmr, &cmi, &ft, &bfi, - &sti); - if (ft == AMR_SID) { - save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, sti, cmr, - cmi); - return false; - } - if (ft != AMR_NO_DATA && !osmo_amr_is_speech(ft)) { - LOGP(DRTP, LOGL_ERROR, "unsupported AMR FT 0x%02x\n", - ft); - return false; - } - if (osmo_amr_is_speech(ft)) { - if (lchan->tch.last_sid.len) { /* FIXME: force ONSET */ - marker = true; - } - /* We received AMR SPEECH frame - invalidate saved SID */ - lchan->tch.last_sid.len = 0; - } - if (marker) { + rc = dtx_amr_check_onset(lchan, rtp_pl, rtp_pl_len, fn, + l1_payload, &ft); + + if (marker || rc > 0) { *payload_type = GsmL1_TchPlType_Amr_Onset; - rc = 0; - LOGP(DRTP, LOGL_ERROR, "Marker SPEECH frame AMR %s\n", + *len = 1; + if (rc != 0) { + LOGP(DRTP, LOGL_NOTICE, "%s SPEECH frame without" + " Marker: ONSET forced\n", + get_value_string(osmo_amr_type_names, ft)); + return true; + } + LOGP(DRTP, LOGL_DEBUG, "%s SPEECH frame with Marker\n", get_value_string(osmo_amr_type_names, ft)); } else { *payload_type = GsmL1_TchPlType_Amr; - rc = rtppayload_to_l1_amr(l1_payload, rtp_pl, - rtp_pl_len, lchan, cmr, cmi, - ft); + rc = 2 + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, + rtp_pl_len, lchan, ft); } break; default: -- To view, visit https://gerrit.osmocom.org/969 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6c7016a54749abadeef4fd4f5b6f750b256fb916 Gerrit-PatchSet: 10 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 Sun Oct 2 13:27:00 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:27:00 +0000 Subject: openbsc[master]: build: be robust against install-sh files above the root dir In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/991 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3b6d9ad4e5af44c2bdf3844c7bf8e8517bd61d8e Gerrit-PatchSet: 1 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 Sun Oct 2 13:27:05 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:27:05 +0000 Subject: [MERGED] openbsc[master]: build: be robust against install-sh files above the root dir In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: build: be robust against install-sh files above the root dir ...................................................................... build: be robust against install-sh files above the root dir Explicitly set AC_CONFIG_AUX_DIR. To reproduce the error avoided by this patch: rm install-sh # in case it was already generated. touch ../install-sh # yes, outside this source tree autoreconf -fi This will produce an error like ... configure.ac:16: error: required file '../ltmain.sh' not found configure.ac:5: installing '../missing' src/Makefile.am: installing '../depcomp' autoreconf: automake failed with exit status: 1 See also automake (vim `which automake`) and look for 'sub locate_aux_dir'. Change-Id: I3b6d9ad4e5af44c2bdf3844c7bf8e8517bd61d8e --- M openbsc/configure.ac 1 file changed, 3 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 173c6c8..4b00af7 100644 --- a/openbsc/configure.ac +++ b/openbsc/configure.ac @@ -3,6 +3,9 @@ m4_esyscmd([./git-version-gen .tarball-version]), [openbsc at lists.osmocom.org]) +dnl *This* is the root dir, even if an install-sh exists in ../ or ../../ +AC_CONFIG_AUX_DIR([.]) + AM_INIT_AUTOMAKE([dist-bzip2]) AC_CONFIG_TESTDIR(tests) -- To view, visit https://gerrit.osmocom.org/991 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3b6d9ad4e5af44c2bdf3844c7bf8e8517bd61d8e Gerrit-PatchSet: 1 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 Sun Oct 2 13:27:31 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:27:31 +0000 Subject: openbsc[master]: configure: check for pkg-config presence In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/992 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1484fc8b870df6f0aeef0c13078c66d0cfa97e75 Gerrit-PatchSet: 1 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 Sun Oct 2 13:27:34 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:27:34 +0000 Subject: [MERGED] openbsc[master]: configure: check for pkg-config presence In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: configure: check for pkg-config presence ...................................................................... configure: check for pkg-config presence Change-Id: I1484fc8b870df6f0aeef0c13078c66d0cfa97e75 --- M openbsc/configure.ac 1 file changed, 7 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 4b00af7..e2575c1 100644 --- a/openbsc/configure.ac +++ b/openbsc/configure.ac @@ -18,6 +18,13 @@ AC_PROG_INSTALL AC_PROG_RANLIB +dnl check for pkg-config (explained in detail in libosmocore/configure.ac) +AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no) +if test "x$PKG_CONFIG_INSTALLED" = "xno"; then + AC_MSG_WARN([You need to install pkg-config]) +fi +PKG_PROG_PKG_CONFIG([0.20]) + dnl checks for libraries AC_SEARCH_LIBS([dlopen], [dl dld], [LIBRARY_DL="$LIBS";LIBS=""]) AC_SUBST(LIBRARY_DL) -- To view, visit https://gerrit.osmocom.org/992 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1484fc8b870df6f0aeef0c13078c66d0cfa97e75 Gerrit-PatchSet: 1 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 Sun Oct 2 13:27:42 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:27:42 +0000 Subject: osmo-iuh[master]: configure: check for pkg-config presence In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/996 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I940558e1b53b0d42291077eba0568f9974df6957 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh 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 Oct 2 13:27:48 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:27:48 +0000 Subject: osmo-iuh[master]: build: be robust against install-sh files above the root dir In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/995 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5aad87b7d4c043f890f4ae2bc5d68cbad6d2c5c7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh 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 Oct 2 13:28:02 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:28:02 +0000 Subject: [MERGED] osmo-iuh[master]: build: be robust against install-sh files above the root dir In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: build: be robust against install-sh files above the root dir ...................................................................... build: be robust against install-sh files above the root dir Explicitly set AC_CONFIG_AUX_DIR. To reproduce the error avoided by this patch: rm install-sh # in case it was already generated. touch ../install-sh # yes, outside this source tree autoreconf -fi This will produce an error like ... configure.ac:16: error: required file '../ltmain.sh' not found configure.ac:5: installing '../missing' src/Makefile.am: installing '../depcomp' autoreconf: automake failed with exit status: 1 See also automake (vim `which automake`) and look for 'sub locate_aux_dir'. Change-Id: I5aad87b7d4c043f890f4ae2bc5d68cbad6d2c5c7 --- M configure.ac 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 249701e..de70e35 100644 --- a/configure.ac +++ b/configure.ac @@ -2,6 +2,9 @@ m4_esyscmd([./git-version-gen .tarball-version]), [openbsc at lists.osmocom.org]) +dnl *This* is the root dir, even if an install-sh exists in ../ or ../../ +AC_CONFIG_AUX_DIR([.]) + LT_INIT AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip 1.9 tar-ustar]) -- To view, visit https://gerrit.osmocom.org/995 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5aad87b7d4c043f890f4ae2bc5d68cbad6d2c5c7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Oct 2 13:28:07 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:28:07 +0000 Subject: [MERGED] osmo-iuh[master]: configure: check for pkg-config presence In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: configure: check for pkg-config presence ...................................................................... configure: check for pkg-config presence Change-Id: I940558e1b53b0d42291077eba0568f9974df6957 --- M configure.ac 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index de70e35..ab7a637 100644 --- a/configure.ac +++ b/configure.ac @@ -22,6 +22,13 @@ AC_PROG_CC AC_PROG_INSTALL +dnl check for pkg-config (explained in detail in libosmocore/configure.ac) +AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no) +if test "x$PKG_CONFIG_INSTALLED" = "xno"; then + AC_MSG_WARN([You need to install pkg-config]) +fi +PKG_PROG_PKG_CONFIG([0.20]) + PKG_CHECK_MODULES(OSMOCORE, libosmocore) PKG_CHECK_MODULES(OSMOGSM, libosmogsm) PKG_CHECK_MODULES(OSMOVTY, libosmovty) -- To view, visit https://gerrit.osmocom.org/996 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I940558e1b53b0d42291077eba0568f9974df6957 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Oct 2 13:28:27 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:28:27 +0000 Subject: osmo-pcu[master]: build: be robust against install-sh files above the root dir In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/997 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie9a10f14c5e8c5e9b6ea4910b4b9abb7e70f5e04 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu 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 Oct 2 13:28:29 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:28:29 +0000 Subject: osmo-pcu[master]: configure: check for pkg-config presence In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/998 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iaaeb2a926fc3832793dfb3f02e4ced2500950997 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu 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 Oct 2 13:28:31 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:28:31 +0000 Subject: [MERGED] osmo-pcu[master]: configure: check for pkg-config presence In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: configure: check for pkg-config presence ...................................................................... configure: check for pkg-config presence Change-Id: Iaaeb2a926fc3832793dfb3f02e4ced2500950997 --- M configure.ac 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index e1a23c0..950be23 100644 --- a/configure.ac +++ b/configure.ac @@ -19,6 +19,13 @@ AC_PROG_INSTALL LT_INIT +dnl check for pkg-config (explained in detail in libosmocore/configure.ac) +AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no) +if test "x$PKG_CONFIG_INSTALLED" = "xno"; then + AC_MSG_WARN([You need to install pkg-config]) +fi +PKG_PROG_PKG_CONFIG([0.20]) + dnl checks for header files AC_HEADER_STDC -- To view, visit https://gerrit.osmocom.org/998 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaaeb2a926fc3832793dfb3f02e4ced2500950997 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Oct 2 13:28:34 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:28:34 +0000 Subject: [MERGED] osmo-pcu[master]: build: be robust against install-sh files above the root dir In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: build: be robust against install-sh files above the root dir ...................................................................... build: be robust against install-sh files above the root dir Explicitly set AC_CONFIG_AUX_DIR. To reproduce the error avoided by this patch: rm install-sh # in case it was already generated. touch ../install-sh # yes, outside this source tree autoreconf -fi This will produce an error like ... configure.ac:16: error: required file '../ltmain.sh' not found configure.ac:5: installing '../missing' src/Makefile.am: installing '../depcomp' autoreconf: automake failed with exit status: 1 See also automake (vim `which automake`) and look for 'sub locate_aux_dir'. Change-Id: Ie9a10f14c5e8c5e9b6ea4910b4b9abb7e70f5e04 --- M configure.ac 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index d8fe719..e1a23c0 100644 --- a/configure.ac +++ b/configure.ac @@ -3,6 +3,9 @@ m4_esyscmd([./git-version-gen .tarball-version]), [osmocom-net-gprs at lists.osmocom.org]) +dnl *This* is the root dir, even if an install-sh exists in ../ or ../../ +AC_CONFIG_AUX_DIR([.]) + AM_INIT_AUTOMAKE([dist-bzip2]) AC_CONFIG_TESTDIR(tests) -- To view, visit https://gerrit.osmocom.org/997 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie9a10f14c5e8c5e9b6ea4910b4b9abb7e70f5e04 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Oct 2 13:28:51 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:28:51 +0000 Subject: osmo-sip-connector[master]: build: be robust against install-sh files above the root dir In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/999 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c96c087bffb41533ef6fb9b1d00bd903d71693e Gerrit-PatchSet: 1 Gerrit-Project: osmo-sip-connector 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 Oct 2 13:28:53 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:28:53 +0000 Subject: osmo-sip-connector[master]: configure: check for pkg-config presence In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1000 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iaca22089bcb21b56048fa541f588c4ad4bed8f6d Gerrit-PatchSet: 1 Gerrit-Project: osmo-sip-connector 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 Oct 2 13:29:08 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:29:08 +0000 Subject: [MERGED] osmo-sip-connector[master]: configure: check for pkg-config presence In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: configure: check for pkg-config presence ...................................................................... configure: check for pkg-config presence Change-Id: Iaca22089bcb21b56048fa541f588c4ad4bed8f6d --- M configure.ac 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 800a46a..1fa6157 100644 --- a/configure.ac +++ b/configure.ac @@ -7,6 +7,13 @@ AM_INIT_AUTOMAKE([dist-bzip2]) +dnl check for pkg-config (explained in detail in libosmocore/configure.ac) +AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no) +if test "x$PKG_CONFIG_INSTALLED" = "xno"; then + AC_MSG_WARN([You need to install pkg-config]) +fi +PKG_PROG_PKG_CONFIG([0.20]) + dnl kernel style compile messages m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_PROG_CC -- To view, visit https://gerrit.osmocom.org/1000 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaca22089bcb21b56048fa541f588c4ad4bed8f6d Gerrit-PatchSet: 1 Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Oct 2 13:29:08 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:29:08 +0000 Subject: [MERGED] osmo-sip-connector[master]: build: be robust against install-sh files above the root dir In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: build: be robust against install-sh files above the root dir ...................................................................... build: be robust against install-sh files above the root dir Explicitly set AC_CONFIG_AUX_DIR. To reproduce the error avoided by this patch: rm install-sh # in case it was already generated. touch ../install-sh # yes, outside this source tree autoreconf -fi This will produce an error like ... configure.ac:16: error: required file '../ltmain.sh' not found configure.ac:5: installing '../missing' src/Makefile.am: installing '../depcomp' autoreconf: automake failed with exit status: 1 See also automake (vim `which automake`) and look for 'sub locate_aux_dir'. Change-Id: I9c96c087bffb41533ef6fb9b1d00bd903d71693e --- M configure.ac 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 0b42951..800a46a 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,10 @@ AC_INIT([osmo-sip-connector], m4_esyscmd([./git-version-gen .tarball-version]), [openbsc at lists.osmocom.org]) + +dnl *This* is the root dir, even if an install-sh exists in ../ or ../../ +AC_CONFIG_AUX_DIR([.]) + AM_INIT_AUTOMAKE([dist-bzip2]) dnl kernel style compile messages -- To view, visit https://gerrit.osmocom.org/999 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9c96c087bffb41533ef6fb9b1d00bd903d71693e Gerrit-PatchSet: 1 Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Oct 2 13:29:17 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:29:17 +0000 Subject: osmo-bts[master]: build: be robust against install-sh files above the root dir In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/993 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I02153ad52faf1465e9f7821378e04118f17352d2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts 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 Oct 2 13:29:19 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:29:19 +0000 Subject: osmo-bts[master]: configure: check for pkg-config presence In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/994 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifee0434dfa275f9faa517c740fd8577930f37188 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts 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 Oct 2 13:29:21 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:29:21 +0000 Subject: [MERGED] osmo-bts[master]: configure: check for pkg-config presence In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: configure: check for pkg-config presence ...................................................................... configure: check for pkg-config presence Change-Id: Ifee0434dfa275f9faa517c740fd8577930f37188 --- M configure.ac 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index c6ae2d8..d35a52a 100644 --- a/configure.ac +++ b/configure.ac @@ -18,6 +18,13 @@ AC_PROG_INSTALL AC_PROG_RANLIB +dnl check for pkg-config (explained in detail in libosmocore/configure.ac) +AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no) +if test "x$PKG_CONFIG_INSTALLED" = "xno"; then + AC_MSG_WARN([You need to install pkg-config]) +fi +PKG_PROG_PKG_CONFIG([0.20]) + dnl checks for header files AC_HEADER_STDC -- To view, visit https://gerrit.osmocom.org/994 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifee0434dfa275f9faa517c740fd8577930f37188 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Oct 2 13:29:21 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:29:21 +0000 Subject: [MERGED] osmo-bts[master]: build: be robust against install-sh files above the root dir In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: build: be robust against install-sh files above the root dir ...................................................................... build: be robust against install-sh files above the root dir Explicitly set AC_CONFIG_AUX_DIR. To reproduce the error avoided by this patch: rm install-sh # in case it was already generated. touch ../install-sh # yes, outside this source tree autoreconf -fi This will produce an error like ... configure.ac:16: error: required file '../ltmain.sh' not found configure.ac:5: installing '../missing' src/Makefile.am: installing '../depcomp' autoreconf: automake failed with exit status: 1 See also automake (vim `which automake`) and look for 'sub locate_aux_dir'. Change-Id: I02153ad52faf1465e9f7821378e04118f17352d2 --- M configure.ac 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 0951e18..c6ae2d8 100644 --- a/configure.ac +++ b/configure.ac @@ -3,6 +3,9 @@ m4_esyscmd([./git-version-gen .tarball-version]), [openbsc-devel at lists.openbsc.org]) +dnl *This* is the root dir, even if an install-sh exists in ../ or ../../ +AC_CONFIG_AUX_DIR([.]) + AM_INIT_AUTOMAKE([dist-bzip2]) AC_CONFIG_TESTDIR(tests) -- To view, visit https://gerrit.osmocom.org/993 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I02153ad52faf1465e9f7821378e04118f17352d2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Oct 2 13:29:28 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:29:28 +0000 Subject: libosmo-sccp[master]: build: be robust against install-sh files above the root dir In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/988 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iec88e41c1fe80b436d6d08005871bead540e387d Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp 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 Oct 2 13:29:29 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:29:29 +0000 Subject: libosmo-sccp[master]: configure: check for pkg-config presence In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/989 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0066b33ce59d1e107ca8e7389599b232a033ba2e Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp 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 Oct 2 13:29:31 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:29:31 +0000 Subject: [MERGED] libosmo-sccp[master]: configure: check for pkg-config presence In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: configure: check for pkg-config presence ...................................................................... configure: check for pkg-config presence Change-Id: I0066b33ce59d1e107ca8e7389599b232a033ba2e --- M configure.ac 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index d2501a6..6446677 100644 --- a/configure.ac +++ b/configure.ac @@ -19,6 +19,13 @@ LT_INIT AC_PROG_LIBTOOL +dnl check for pkg-config (explained in detail in libosmocore/configure.ac) +AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no) +if test "x$PKG_CONFIG_INSTALLED" = "xno"; then + AC_MSG_WARN([You need to install pkg-config]) +fi +PKG_PROG_PKG_CONFIG([0.20]) + PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.3.0) PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.0.6) -- To view, visit https://gerrit.osmocom.org/989 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0066b33ce59d1e107ca8e7389599b232a033ba2e Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Oct 2 13:29:31 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:29:31 +0000 Subject: [MERGED] libosmo-sccp[master]: build: be robust against install-sh files above the root dir In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: build: be robust against install-sh files above the root dir ...................................................................... build: be robust against install-sh files above the root dir Explicitly set AC_CONFIG_AUX_DIR. To reproduce the error avoided by this patch: rm install-sh # in case it was already generated. touch ../install-sh # yes, outside this source tree autoreconf -fi This will produce an error like ... configure.ac:16: error: required file '../ltmain.sh' not found configure.ac:5: installing '../missing' src/Makefile.am: installing '../depcomp' autoreconf: automake failed with exit status: 1 See also automake (vim `which automake`) and look for 'sub locate_aux_dir'. Change-Id: Iec88e41c1fe80b436d6d08005871bead540e387d --- M configure.ac 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index e19c8da..d2501a6 100644 --- a/configure.ac +++ b/configure.ac @@ -3,6 +3,9 @@ m4_esyscmd([./git-version-gen .tarball-version]), [openbsc at lists.osmocom.org]) +dnl *This* is the root dir, even if an install-sh exists in ../ or ../../ +AC_CONFIG_AUX_DIR([.]) + AM_INIT_AUTOMAKE([dist-bzip2]) AC_CONFIG_TESTDIR(tests) -- To view, visit https://gerrit.osmocom.org/988 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iec88e41c1fe80b436d6d08005871bead540e387d Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Oct 2 13:29:46 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:29:46 +0000 Subject: libosmo-netif[master]: build: be robust against install-sh files above the root dir In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/986 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idcce286e83b802b9cd96cee6230aedd51a660b12 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif 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 Oct 2 13:29:58 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:29:58 +0000 Subject: [MERGED] libosmo-netif[master]: build: be robust against install-sh files above the root dir In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: build: be robust against install-sh files above the root dir ...................................................................... build: be robust against install-sh files above the root dir Explicitly set AC_CONFIG_AUX_DIR. To reproduce the error avoided by this patch: rm install-sh # in case it was already generated. touch ../install-sh # yes, outside this source tree autoreconf -fi This will produce an error like ... configure.ac:16: error: required file '../ltmain.sh' not found configure.ac:5: installing '../missing' src/Makefile.am: installing '../depcomp' autoreconf: automake failed with exit status: 1 See also automake (vim `which automake`) and look for 'sub locate_aux_dir'. Change-Id: Idcce286e83b802b9cd96cee6230aedd51a660b12 --- M configure.ac 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 64a7a1e..135eb57 100644 --- a/configure.ac +++ b/configure.ac @@ -2,6 +2,9 @@ m4_esyscmd([./git-version-gen .tarball-version]), [openbsc-devel at lists.openbsc.org]) +dnl *This* is the root dir, even if an install-sh exists in ../ or ../../ +AC_CONFIG_AUX_DIR([.]) + AM_INIT_AUTOMAKE([subdir-objects dist-bzip2]) AC_CONFIG_TESTDIR(tests) -- To view, visit https://gerrit.osmocom.org/986 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idcce286e83b802b9cd96cee6230aedd51a660b12 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Oct 2 13:30:03 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:30:03 +0000 Subject: libosmo-netif[master]: configure: check for pkg-config presence In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/987 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifaea95befa3d1d8f6f047e22efcd62cb0bd8b287 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif 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 Oct 2 13:30:06 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:30:06 +0000 Subject: [MERGED] libosmo-netif[master]: configure: check for pkg-config presence In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: configure: check for pkg-config presence ...................................................................... configure: check for pkg-config presence Change-Id: Ifaea95befa3d1d8f6f047e22efcd62cb0bd8b287 --- M configure.ac M tests/osmo-pcap-test/configure.ac 2 files changed, 14 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 135eb57..3994aff 100644 --- a/configure.ac +++ b/configure.ac @@ -18,6 +18,13 @@ LT_INIT AC_PROG_LIBTOOL +dnl check for pkg-config (explained in detail in libosmocore/configure.ac) +AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no) +if test "x$PKG_CONFIG_INSTALLED" = "xno"; then + AC_MSG_WARN([You need to install pkg-config]) +fi +PKG_PROG_PKG_CONFIG([0.20]) + AC_CONFIG_MACRO_DIR([m4]) dnl checks for header files diff --git a/tests/osmo-pcap-test/configure.ac b/tests/osmo-pcap-test/configure.ac index 0d496db..47fbfe2 100644 --- a/tests/osmo-pcap-test/configure.ac +++ b/tests/osmo-pcap-test/configure.ac @@ -6,6 +6,13 @@ AM_INIT_AUTOMAKE([-Wall foreign subdir-objects tar-pax no-dist-gzip dist-bzip2 1.6]) +dnl check for pkg-config (explained in detail in libosmocore/configure.ac) +AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no) +if test "x$PKG_CONFIG_INSTALLED" = "xno"; then + AC_MSG_WARN([You need to install pkg-config]) +fi +PKG_PROG_PKG_CONFIG([0.20]) + dnl kernel style compile messages m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -- To view, visit https://gerrit.osmocom.org/987 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifaea95befa3d1d8f6f047e22efcd62cb0bd8b287 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Oct 2 13:30:54 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:30:54 +0000 Subject: libosmo-abis[master]: build: be robust against install-sh files above the root dir In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/984 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5f69112f58b0a8ce0d848b0b6b543500ee63d133 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis 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 Oct 2 13:30:56 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:30:56 +0000 Subject: libosmo-abis[master]: configure: check for pkg-config presence In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/985 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If21ff26a836fd91021e0457ae0316be6b29b4577 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis 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 Oct 2 13:30:58 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:30:58 +0000 Subject: [MERGED] libosmo-abis[master]: configure: check for pkg-config presence In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: configure: check for pkg-config presence ...................................................................... configure: check for pkg-config presence Change-Id: If21ff26a836fd91021e0457ae0316be6b29b4577 --- M configure.ac 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 77feaff..f463c2e 100644 --- a/configure.ac +++ b/configure.ac @@ -17,6 +17,13 @@ AC_PROG_INSTALL LT_INIT([pic-only]) +dnl check for pkg-config (explained in detail in libosmocore/configure.ac) +AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no) +if test "x$PKG_CONFIG_INSTALLED" = "xno"; then + AC_MSG_WARN([You need to install pkg-config]) +fi +PKG_PROG_PKG_CONFIG([0.20]) + AC_CONFIG_MACRO_DIR([m4]) # The following test is taken from WebKit's webkit.m4 -- To view, visit https://gerrit.osmocom.org/985 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If21ff26a836fd91021e0457ae0316be6b29b4577 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Oct 2 13:30:59 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:30:59 +0000 Subject: [MERGED] libosmo-abis[master]: build: be robust against install-sh files above the root dir In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: build: be robust against install-sh files above the root dir ...................................................................... build: be robust against install-sh files above the root dir Explicitly set AC_CONFIG_AUX_DIR. To reproduce the error avoided by this patch: rm install-sh # in case it was already generated. touch ../install-sh # yes, outside this source tree autoreconf -fi This will produce an error like ... configure.ac:16: error: required file '../ltmain.sh' not found configure.ac:5: installing '../missing' src/Makefile.am: installing '../depcomp' autoreconf: automake failed with exit status: 1 See also automake (vim `which automake`) and look for 'sub locate_aux_dir'. Change-Id: I5f69112f58b0a8ce0d848b0b6b543500ee63d133 --- M configure.ac 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 92cba96..77feaff 100644 --- a/configure.ac +++ b/configure.ac @@ -2,6 +2,9 @@ m4_esyscmd([./git-version-gen .tarball-version]), [openbsc at lists.osmocom.org]) +dnl *This* is the root dir, even if an install-sh exists in ../ or ../../ +AC_CONFIG_AUX_DIR([.]) + AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip 1.6 subdir-objects]) AC_CONFIG_TESTDIR(tests) -- To view, visit https://gerrit.osmocom.org/984 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5f69112f58b0a8ce0d848b0b6b543500ee63d133 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Oct 2 13:31:12 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:31:12 +0000 Subject: libosmocore[master]: build: be robust against install-sh files above the root dir In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/983 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If2afbe62e9ceeac8052c7b882ff92a548f3af0bf Gerrit-PatchSet: 2 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 Oct 2 13:31:28 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:31:28 +0000 Subject: libsmpp34[master]: configure: check for pkg-config presence In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/990 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6251b2a8e76e5850a346d88fd3c02435b0b445ad Gerrit-PatchSet: 1 Gerrit-Project: libsmpp34 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 Oct 2 13:31:33 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:31:33 +0000 Subject: [MERGED] libosmocore[master]: build: be robust against install-sh files above the root dir In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: build: be robust against install-sh files above the root dir ...................................................................... build: be robust against install-sh files above the root dir Explicitly set AC_CONFIG_AUX_DIR. To reproduce the error avoided by this patch: rm install-sh # in case it was already generated. touch ../install-sh # yes, outside this source tree autoreconf -fi This will produce an error like ... configure.ac:16: error: required file '../ltmain.sh' not found configure.ac:5: installing '../missing' src/Makefile.am: installing '../depcomp' autoreconf: automake failed with exit status: 1 See also automake (vim `which automake`) and look for 'sub locate_aux_dir'. Change-Id: If2afbe62e9ceeac8052c7b882ff92a548f3af0bf --- M configure.ac 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 1b62278..e3752b4 100644 --- a/configure.ac +++ b/configure.ac @@ -2,6 +2,9 @@ m4_esyscmd([./git-version-gen .tarball-version]), [openbsc at lists.osmocom.org]) +dnl *This* is the root dir, even if an install-sh exists in ../ or ../../ +AC_CONFIG_AUX_DIR([.]) + AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip 1.6 subdir-objects]) AC_CONFIG_TESTDIR(tests) -- To view, visit https://gerrit.osmocom.org/983 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If2afbe62e9ceeac8052c7b882ff92a548f3af0bf 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 Oct 2 13:31:47 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 2 Oct 2016 13:31:47 +0000 Subject: [MERGED] libsmpp34[master]: configure: check for pkg-config presence In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: configure: check for pkg-config presence ...................................................................... configure: check for pkg-config presence Change-Id: I6251b2a8e76e5850a346d88fd3c02435b0b445ad --- M configure.ac 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 6d5b3b3..0d84ffc 100644 --- a/configure.ac +++ b/configure.ac @@ -13,6 +13,13 @@ AC_PROG_LIBTOOL AC_PROG_INSTALL +# check for pkg-config (explained in detail in libosmocore/configure.ac) +AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no) +if test "x$PKG_CONFIG_INSTALLED" = "xno"; then + AC_MSG_WARN([You need to install pkg-config]) +fi +PKG_PROG_PKG_CONFIG([0.20]) + # Checks for libraries. # Checks for header files. -- To view, visit https://gerrit.osmocom.org/990 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6251b2a8e76e5850a346d88fd3c02435b0b445ad Gerrit-PatchSet: 1 Gerrit-Project: libsmpp34 Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Oct 3 07:38:17 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Mon, 3 Oct 2016 07:38:17 +0000 Subject: osmo-pcu[master]: EGPRS: add test case to show EPDAN BSN out of window bug In-Reply-To: References: Message-ID: Patch Set 4: (1 comment) https://gerrit.osmocom.org/#/c/861/4/tests/tbf/TbfTest.cpp File tests/tbf/TbfTest.cpp: Line 2072: dl_tbf = create_dl_tbf(&the_bts, ms_class, egprs_ms_class, &trx_no); > interesting, there was an error here passing 'the_bts' instead of '&the_bts Earlier it was a pointer passed from caller. Now it is a local variable. -- To view, visit https://gerrit.osmocom.org/861 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If32b67f5c05707155281128b776a90a1e3d587b2 Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Oct 3 07:40:08 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Mon, 3 Oct 2016 07:40:08 +0000 Subject: [PATCH] osmo-pcu[master]: EGPRS: add test case to show EPDAN BSN out of window bug 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/861 to look at the new patch set (#5). EGPRS: add test case to show EPDAN BSN out of window bug This patch adds a test case test_egprs_tbf_epdan_out_of_rx_window, which expects a current bug with EPDAN for interpretation of the bitmap explained in section 9.1.8.2.4 in 44.060 version 7.27.0 Release 7. The specification explains that a bit within the uncompressed bitmap whose corresponding BSN is not within the transmit window shall be ignored. But current PCU implementation drops the EPDAN and does not update status of the BSN which are inside the window. The test's expectation is corrected along with the bug fix in a subsequent commit. Related: OS#1789 Change-Id: If32b67f5c05707155281128b776a90a1e3d587b2 --- M tests/tbf/TbfTest.cpp M tests/tbf/TbfTest.err M tests/tbf/TbfTest.ok 3 files changed, 143 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/61/861/5 diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 3e17d8f..92d32f6 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -26,6 +26,7 @@ #include "pcu_utils.h" #include "gprs_bssgp_pcu.h" #include "pcu_l1_if.h" +#include "decoding.h" extern "C" { #include "pcu_vty.h" @@ -2017,6 +2018,109 @@ printf("=== end %s ===\n", __func__); } +/* + * This test simulates the section 9.1.8.2.4 of 44.060 + * version 7.27.0 Release 7. Which explains the Interpretation of the bitmap + * as a bit within the uncompressed bitmap whose BSN is not within the transmit + * window shall be ignored. Which fails because of existing bug. This test case + * expects the same bug. which shall be fixed in subsequent patch + */ +static void test_tbf_epdan_out_of_rx_window(void) +{ + BTS the_bts; + gprs_rlcmac_bts *bts; + uint8_t ms_class = 11; + uint8_t egprs_ms_class = 11; + uint8_t trx_no; + int num_blocks; + uint32_t tlli = 0xffeeddcc; + gprs_rlcmac_dl_tbf *dl_tbf; + int ts_no = 4; + bitvec *block; + uint8_t bits_data[RLC_EGPRS_MAX_WS/8]; + bitvec bits; + int bsn_begin, bsn_end; + EGPRS_PD_AckNack_t *ack_nack; + RlcMacUplink_t ul_control_block; + gprs_rlc_v_b *prlcmvb; + gprs_rlc_dl_window *prlcdlwindow; + + printf("=== start %s ===\n", __func__); + + bts = the_bts.bts_data(); + + setup_bts(&the_bts, ts_no); + bts->dl_tbf_idle_msec = 200; + bts->egprs_enabled = 1; + /* ARQ II */ + bts->dl_arq_type = EGPRS_ARQ2; + + /* + * Simulate a message captured during over-the-air testing, + * where the following values were observed: + * v_a = 1176, vs = 1288, max sns = 2048, window size = 480. + */ + uint8_t data_msg[23] = {0x40, 0x20, 0x0b, 0xff, 0xd1, + 0x61, 0x00, 0x3e, 0x0e, 0x51, 0x9f, + 0xff, 0xff, 0xfb, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + + dl_tbf = create_dl_tbf(&the_bts, ms_class, egprs_ms_class, &trx_no); + dl_tbf->update_ms(tlli, GPRS_RLCMAC_DL_TBF); + prlcdlwindow = &dl_tbf->m_window; + prlcmvb = &prlcdlwindow->m_v_b; + prlcdlwindow->m_v_s = 1288; + prlcdlwindow->m_v_a = 1176; + prlcdlwindow->set_sns(2048); + prlcdlwindow->set_ws(480); + prlcmvb->mark_unacked(1176); + prlcmvb->mark_unacked(1177); + prlcmvb->mark_unacked(1286); + prlcmvb->mark_unacked(1287); + + OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_FLOW)); + + block = bitvec_alloc(23); + + bitvec_unpack(block, data_msg); + + bits.data = bits_data; + bits.data_len = sizeof(bits_data); + bits.cur_bit = 0; + + decode_gsm_rlcmac_uplink(block, &ul_control_block); + + ack_nack = &ul_control_block.u.Egprs_Packet_Downlink_Ack_Nack; + + OSMO_ASSERT(prlcmvb->is_unacked(1176)); + OSMO_ASSERT(prlcmvb->is_unacked(1177)); + OSMO_ASSERT(prlcmvb->is_unacked(1286)); + OSMO_ASSERT(prlcmvb->is_unacked(1287)); + + Decoding::decode_egprs_acknack_bits( + &ack_nack->EGPRS_AckNack.Desc, &bits, + &bsn_begin, &bsn_end, &dl_tbf->m_window); + + dl_tbf->rcvd_dl_ack( + ack_nack->EGPRS_AckNack.Desc.FINAL_ACK_INDICATION, + bsn_begin, &bits); + + /* + * TODO:status of BSN:1176,1177 shall be invalid. + * Status of BSN:1286,1287 shall be acked. + * Below assertions show a bug, and shall be adjusted along + * with the fix in a subsequent commit. + */ + OSMO_ASSERT(prlcmvb->is_unacked(1176)); + OSMO_ASSERT(prlcmvb->is_unacked(1177)); + OSMO_ASSERT(prlcmvb->is_unacked(1286)); + OSMO_ASSERT(prlcmvb->is_unacked(1287)); + + bitvec_free(block); + tbf_free(dl_tbf); + printf("=== end %s ===\n", __func__); +} + static void test_tbf_egprs_two_phase_spb(void) { BTS the_bts; @@ -2695,6 +2799,7 @@ test_tbf_puan_urbb_len(); test_tbf_update_ws(); test_tbf_li_decoding(); + test_tbf_epdan_out_of_rx_window(); 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 0c9c877..877e0ad 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -6521,3 +6521,39 @@ 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 +Searching for first unallocated TFI: TRX=0 + Found TFI=0. +********** TBF starts here ********** +Allocating DL 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 +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 5, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Assign downlink TS=4 TFI=0 +PDCH(TS 4, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS), 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 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 +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 +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge +- ack: (BSN=1176)"RRRRRRRRRRIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIRRRIRRRRRRRRRRRRRRRRRRRRRRRRRRI"(BSN=1288) R=ACK I=NACK +- ack range is out of V(A)..V(S) range TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Free TBF! +DL packet loss of IMSI= / TLLI=0xffeeddcc: 100% +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! +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 +********** TBF ends here ********** diff --git a/tests/tbf/TbfTest.ok b/tests/tbf/TbfTest.ok index eb870ea..efcfdee 100644 --- a/tests/tbf/TbfTest.ok +++ b/tests/tbf/TbfTest.ok @@ -66,3 +66,5 @@ === end test_tbf_update_ws === === start test_tbf_li_decoding === === end test_tbf_li_decoding === +=== start test_egprs_tbf_epdan_out_of_rx_window === +=== end test_egprs_tbf_epdan_out_of_rx_window === -- To view, visit https://gerrit.osmocom.org/861 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If32b67f5c05707155281128b776a90a1e3d587b2 Gerrit-PatchSet: 5 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar From gerrit-no-reply at lists.osmocom.org Mon Oct 3 08:48:11 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Mon, 3 Oct 2016 08:48:11 +0000 Subject: [PATCH] osmo-pcu[master]: EGPRS: add test case to show EPDAN BSN out of window bug 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/861 to look at the new patch set (#6). EGPRS: add test case to show EPDAN BSN out of window bug This patch adds a test case test_egprs_tbf_epdan_out_of_rx_window, which expects a current bug with EPDAN for interpretation of the bitmap explained in section 9.1.8.2.4 in 44.060 version 7.27.0 Release 7. The specification explains that a bit within the uncompressed bitmap whose corresponding BSN is not within the transmit window shall be ignored. But current PCU implementation drops the EPDAN and does not update status of the BSN which are inside the window. The test's expectation is corrected along with the bug fix in a subsequent commit. Related: OS#1789 Change-Id: If32b67f5c05707155281128b776a90a1e3d587b2 --- M tests/tbf/TbfTest.cpp M tests/tbf/TbfTest.err M tests/tbf/TbfTest.ok 3 files changed, 143 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/61/861/6 diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 3e17d8f..92d32f6 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -26,6 +26,7 @@ #include "pcu_utils.h" #include "gprs_bssgp_pcu.h" #include "pcu_l1_if.h" +#include "decoding.h" extern "C" { #include "pcu_vty.h" @@ -2017,6 +2018,109 @@ printf("=== end %s ===\n", __func__); } +/* + * This test simulates the section 9.1.8.2.4 of 44.060 + * version 7.27.0 Release 7. Which explains the Interpretation of the bitmap + * as a bit within the uncompressed bitmap whose BSN is not within the transmit + * window shall be ignored. Which fails because of existing bug. This test case + * expects the same bug. which shall be fixed in subsequent patch + */ +static void test_tbf_epdan_out_of_rx_window(void) +{ + BTS the_bts; + gprs_rlcmac_bts *bts; + uint8_t ms_class = 11; + uint8_t egprs_ms_class = 11; + uint8_t trx_no; + int num_blocks; + uint32_t tlli = 0xffeeddcc; + gprs_rlcmac_dl_tbf *dl_tbf; + int ts_no = 4; + bitvec *block; + uint8_t bits_data[RLC_EGPRS_MAX_WS/8]; + bitvec bits; + int bsn_begin, bsn_end; + EGPRS_PD_AckNack_t *ack_nack; + RlcMacUplink_t ul_control_block; + gprs_rlc_v_b *prlcmvb; + gprs_rlc_dl_window *prlcdlwindow; + + printf("=== start %s ===\n", __func__); + + bts = the_bts.bts_data(); + + setup_bts(&the_bts, ts_no); + bts->dl_tbf_idle_msec = 200; + bts->egprs_enabled = 1; + /* ARQ II */ + bts->dl_arq_type = EGPRS_ARQ2; + + /* + * Simulate a message captured during over-the-air testing, + * where the following values were observed: + * v_a = 1176, vs = 1288, max sns = 2048, window size = 480. + */ + uint8_t data_msg[23] = {0x40, 0x20, 0x0b, 0xff, 0xd1, + 0x61, 0x00, 0x3e, 0x0e, 0x51, 0x9f, + 0xff, 0xff, 0xfb, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + + dl_tbf = create_dl_tbf(&the_bts, ms_class, egprs_ms_class, &trx_no); + dl_tbf->update_ms(tlli, GPRS_RLCMAC_DL_TBF); + prlcdlwindow = &dl_tbf->m_window; + prlcmvb = &prlcdlwindow->m_v_b; + prlcdlwindow->m_v_s = 1288; + prlcdlwindow->m_v_a = 1176; + prlcdlwindow->set_sns(2048); + prlcdlwindow->set_ws(480); + prlcmvb->mark_unacked(1176); + prlcmvb->mark_unacked(1177); + prlcmvb->mark_unacked(1286); + prlcmvb->mark_unacked(1287); + + OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_FLOW)); + + block = bitvec_alloc(23); + + bitvec_unpack(block, data_msg); + + bits.data = bits_data; + bits.data_len = sizeof(bits_data); + bits.cur_bit = 0; + + decode_gsm_rlcmac_uplink(block, &ul_control_block); + + ack_nack = &ul_control_block.u.Egprs_Packet_Downlink_Ack_Nack; + + OSMO_ASSERT(prlcmvb->is_unacked(1176)); + OSMO_ASSERT(prlcmvb->is_unacked(1177)); + OSMO_ASSERT(prlcmvb->is_unacked(1286)); + OSMO_ASSERT(prlcmvb->is_unacked(1287)); + + Decoding::decode_egprs_acknack_bits( + &ack_nack->EGPRS_AckNack.Desc, &bits, + &bsn_begin, &bsn_end, &dl_tbf->m_window); + + dl_tbf->rcvd_dl_ack( + ack_nack->EGPRS_AckNack.Desc.FINAL_ACK_INDICATION, + bsn_begin, &bits); + + /* + * TODO:status of BSN:1176,1177 shall be invalid. + * Status of BSN:1286,1287 shall be acked. + * Below assertions show a bug, and shall be adjusted along + * with the fix in a subsequent commit. + */ + OSMO_ASSERT(prlcmvb->is_unacked(1176)); + OSMO_ASSERT(prlcmvb->is_unacked(1177)); + OSMO_ASSERT(prlcmvb->is_unacked(1286)); + OSMO_ASSERT(prlcmvb->is_unacked(1287)); + + bitvec_free(block); + tbf_free(dl_tbf); + printf("=== end %s ===\n", __func__); +} + static void test_tbf_egprs_two_phase_spb(void) { BTS the_bts; @@ -2695,6 +2799,7 @@ test_tbf_puan_urbb_len(); test_tbf_update_ws(); test_tbf_li_decoding(); + test_tbf_epdan_out_of_rx_window(); 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 0c9c877..877e0ad 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -6521,3 +6521,39 @@ 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 +Searching for first unallocated TFI: TRX=0 + Found TFI=0. +********** TBF starts here ********** +Allocating DL 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 +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 5, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Assign downlink TS=4 TFI=0 +PDCH(TS 4, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS), 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 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 +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 +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge +- ack: (BSN=1176)"RRRRRRRRRRIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIRRRIRRRRRRRRRRRRRRRRRRRRRRRRRRI"(BSN=1288) R=ACK I=NACK +- ack range is out of V(A)..V(S) range TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Free TBF! +DL packet loss of IMSI= / TLLI=0xffeeddcc: 100% +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! +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 +********** TBF ends here ********** diff --git a/tests/tbf/TbfTest.ok b/tests/tbf/TbfTest.ok index eb870ea..2978d6d 100644 --- a/tests/tbf/TbfTest.ok +++ b/tests/tbf/TbfTest.ok @@ -66,3 +66,5 @@ === end test_tbf_update_ws === === start test_tbf_li_decoding === === end test_tbf_li_decoding === +=== start test_tbf_epdan_out_of_rx_window === +=== end test_tbf_epdan_out_of_rx_window === -- To view, visit https://gerrit.osmocom.org/861 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If32b67f5c05707155281128b776a90a1e3d587b2 Gerrit-PatchSet: 6 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar From gerrit-no-reply at lists.osmocom.org Mon Oct 3 08:49:09 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Mon, 3 Oct 2016 08:49:09 +0000 Subject: osmo-pcu[master]: EGPRS: add test case to show EPDAN BSN out of window bug In-Reply-To: References: Message-ID: Patch Set 6: (1 comment) https://gerrit.osmocom.org/#/c/861/6//COMMIT_MSG Commit Message: Line 9: This patch adds a test case test_egprs_tbf_epdan_out_of_rx_window, fix this -- To view, visit https://gerrit.osmocom.org/861 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If32b67f5c05707155281128b776a90a1e3d587b2 Gerrit-PatchSet: 6 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Oct 3 08:50:04 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Mon, 3 Oct 2016 08:50:04 +0000 Subject: [PATCH] osmo-pcu[master]: EGPRS: add test case to show EPDAN BSN out of window bug 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/861 to look at the new patch set (#7). EGPRS: add test case to show EPDAN BSN out of window bug This patch adds a test case test_tbf_epdan_out_of_rx_window, which expects a current bug with EPDAN for interpretation of the bitmap explained in section 9.1.8.2.4 in 44.060 version 7.27.0 Release 7. The specification explains that a bit within the uncompressed bitmap whose corresponding BSN is not within the transmit window shall be ignored. But current PCU implementation drops the EPDAN and does not update status of the BSN which are inside the window. The test's expectation is corrected along with the bug fix in a subsequent commit. Related: OS#1789 Change-Id: If32b67f5c05707155281128b776a90a1e3d587b2 --- M tests/tbf/TbfTest.cpp M tests/tbf/TbfTest.err M tests/tbf/TbfTest.ok 3 files changed, 143 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/61/861/7 diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 3e17d8f..92d32f6 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -26,6 +26,7 @@ #include "pcu_utils.h" #include "gprs_bssgp_pcu.h" #include "pcu_l1_if.h" +#include "decoding.h" extern "C" { #include "pcu_vty.h" @@ -2017,6 +2018,109 @@ printf("=== end %s ===\n", __func__); } +/* + * This test simulates the section 9.1.8.2.4 of 44.060 + * version 7.27.0 Release 7. Which explains the Interpretation of the bitmap + * as a bit within the uncompressed bitmap whose BSN is not within the transmit + * window shall be ignored. Which fails because of existing bug. This test case + * expects the same bug. which shall be fixed in subsequent patch + */ +static void test_tbf_epdan_out_of_rx_window(void) +{ + BTS the_bts; + gprs_rlcmac_bts *bts; + uint8_t ms_class = 11; + uint8_t egprs_ms_class = 11; + uint8_t trx_no; + int num_blocks; + uint32_t tlli = 0xffeeddcc; + gprs_rlcmac_dl_tbf *dl_tbf; + int ts_no = 4; + bitvec *block; + uint8_t bits_data[RLC_EGPRS_MAX_WS/8]; + bitvec bits; + int bsn_begin, bsn_end; + EGPRS_PD_AckNack_t *ack_nack; + RlcMacUplink_t ul_control_block; + gprs_rlc_v_b *prlcmvb; + gprs_rlc_dl_window *prlcdlwindow; + + printf("=== start %s ===\n", __func__); + + bts = the_bts.bts_data(); + + setup_bts(&the_bts, ts_no); + bts->dl_tbf_idle_msec = 200; + bts->egprs_enabled = 1; + /* ARQ II */ + bts->dl_arq_type = EGPRS_ARQ2; + + /* + * Simulate a message captured during over-the-air testing, + * where the following values were observed: + * v_a = 1176, vs = 1288, max sns = 2048, window size = 480. + */ + uint8_t data_msg[23] = {0x40, 0x20, 0x0b, 0xff, 0xd1, + 0x61, 0x00, 0x3e, 0x0e, 0x51, 0x9f, + 0xff, 0xff, 0xfb, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + + dl_tbf = create_dl_tbf(&the_bts, ms_class, egprs_ms_class, &trx_no); + dl_tbf->update_ms(tlli, GPRS_RLCMAC_DL_TBF); + prlcdlwindow = &dl_tbf->m_window; + prlcmvb = &prlcdlwindow->m_v_b; + prlcdlwindow->m_v_s = 1288; + prlcdlwindow->m_v_a = 1176; + prlcdlwindow->set_sns(2048); + prlcdlwindow->set_ws(480); + prlcmvb->mark_unacked(1176); + prlcmvb->mark_unacked(1177); + prlcmvb->mark_unacked(1286); + prlcmvb->mark_unacked(1287); + + OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_FLOW)); + + block = bitvec_alloc(23); + + bitvec_unpack(block, data_msg); + + bits.data = bits_data; + bits.data_len = sizeof(bits_data); + bits.cur_bit = 0; + + decode_gsm_rlcmac_uplink(block, &ul_control_block); + + ack_nack = &ul_control_block.u.Egprs_Packet_Downlink_Ack_Nack; + + OSMO_ASSERT(prlcmvb->is_unacked(1176)); + OSMO_ASSERT(prlcmvb->is_unacked(1177)); + OSMO_ASSERT(prlcmvb->is_unacked(1286)); + OSMO_ASSERT(prlcmvb->is_unacked(1287)); + + Decoding::decode_egprs_acknack_bits( + &ack_nack->EGPRS_AckNack.Desc, &bits, + &bsn_begin, &bsn_end, &dl_tbf->m_window); + + dl_tbf->rcvd_dl_ack( + ack_nack->EGPRS_AckNack.Desc.FINAL_ACK_INDICATION, + bsn_begin, &bits); + + /* + * TODO:status of BSN:1176,1177 shall be invalid. + * Status of BSN:1286,1287 shall be acked. + * Below assertions show a bug, and shall be adjusted along + * with the fix in a subsequent commit. + */ + OSMO_ASSERT(prlcmvb->is_unacked(1176)); + OSMO_ASSERT(prlcmvb->is_unacked(1177)); + OSMO_ASSERT(prlcmvb->is_unacked(1286)); + OSMO_ASSERT(prlcmvb->is_unacked(1287)); + + bitvec_free(block); + tbf_free(dl_tbf); + printf("=== end %s ===\n", __func__); +} + static void test_tbf_egprs_two_phase_spb(void) { BTS the_bts; @@ -2695,6 +2799,7 @@ test_tbf_puan_urbb_len(); test_tbf_update_ws(); test_tbf_li_decoding(); + test_tbf_epdan_out_of_rx_window(); 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 0c9c877..877e0ad 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -6521,3 +6521,39 @@ 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 +Searching for first unallocated TFI: TRX=0 + Found TFI=0. +********** TBF starts here ********** +Allocating DL 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 +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 5, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Assign downlink TS=4 TFI=0 +PDCH(TS 4, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS), 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 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 +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 +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge +- ack: (BSN=1176)"RRRRRRRRRRIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIRRRIRRRRRRRRRRRRRRRRRRRRRRRRRRI"(BSN=1288) R=ACK I=NACK +- ack range is out of V(A)..V(S) range TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Free TBF! +DL packet loss of IMSI= / TLLI=0xffeeddcc: 100% +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! +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 +********** TBF ends here ********** diff --git a/tests/tbf/TbfTest.ok b/tests/tbf/TbfTest.ok index eb870ea..2978d6d 100644 --- a/tests/tbf/TbfTest.ok +++ b/tests/tbf/TbfTest.ok @@ -66,3 +66,5 @@ === end test_tbf_update_ws === === start test_tbf_li_decoding === === end test_tbf_li_decoding === +=== start test_tbf_epdan_out_of_rx_window === +=== end test_tbf_epdan_out_of_rx_window === -- To view, visit https://gerrit.osmocom.org/861 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If32b67f5c05707155281128b776a90a1e3d587b2 Gerrit-PatchSet: 7 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar From gerrit-no-reply at lists.osmocom.org Mon Oct 3 09:31:03 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Mon, 3 Oct 2016 09:31:03 +0000 Subject: [PATCH] osmo-pcu[master]: Fix: DL slot allocation based on direction configured 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/819 to look at the new patch set (#7). Fix: DL slot allocation based on direction configured Currently number of TS for second DL TBF is less compared to first DL TBF because PCU is considering the combined capacity of DL and UL for TS allocation. Since 2nd DL TBF has less DL slots compared to 2nd TBF, there is a difference in throughput between the 2 DL TBFs. This patch enables the user to maximize the number of DL TSs for the TBF based on the direction configured through VTY with cfg_pcu_ts_alloc_maximise_cmd. The maximise_direction is chosen to be an enum to be open for later additions. Related: OS#1792 Change-Id: I4b4a99194ccae68bb3417bce538d16e944d5ec71 --- M src/bts.h M src/gprs_rlcmac_ts_alloc.cpp M src/pcu_main.cpp M src/pcu_vty.c M tests/alloc/AllocTest.cpp M tests/alloc/AllocTest.ok 6 files changed, 54 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/19/819/7 diff --git a/src/bts.h b/src/bts.h index ba6fc4d..7b3bbd4 100644 --- a/src/bts.h +++ b/src/bts.h @@ -44,6 +44,10 @@ #define LLC_CODEL_USE_DEFAULT (-1) #define MAX_GPRS_CS 9 +enum maximise_direction { + MAXIMISE_DIR_DL_ONLY, + MAXIMISE_DIR_NONE +}; struct BTS; struct GprsMs; @@ -191,6 +195,8 @@ /* 0 to support resegmentation in DL, 1 for no reseg */ uint8_t dl_arq_type; + enum maximise_direction maximise_dir; + uint32_t ms_idle_sec; uint8_t cs_adj_enabled; uint8_t cs_adj_upper_limit; diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index 57197b2..10a4093 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -775,9 +775,15 @@ rx_window & tx_window, 'C'), capacity); #endif - - if (capacity <= max_capacity) - continue; + switch (bts->maximise_dir) { + case MAXIMISE_DIR_DL_ONLY: + if (rx_window < max_dl_slots) + continue; + break; + default: + if (capacity <= max_capacity) + continue; + } max_capacity = capacity; max_ul_slots = tx_window; diff --git a/src/pcu_main.cpp b/src/pcu_main.cpp index 4a75c79..57bccd1 100644 --- a/src/pcu_main.cpp +++ b/src/pcu_main.cpp @@ -217,6 +217,8 @@ */ bts->dl_arq_type = EGPRS_ARQ1; + bts->maximise_dir = MAXIMISE_DIR_NONE; + msgb_set_talloc_ctx(tall_pcu_ctx); osmo_init_logging(&gprs_log_info); diff --git a/src/pcu_vty.c b/src/pcu_vty.c index 535d512..edeedb5 100644 --- a/src/pcu_vty.c +++ b/src/pcu_vty.c @@ -497,6 +497,32 @@ return CMD_SUCCESS; } +#define MAXIMISE_STR "Maximise flow of TBF in a certain direction\n" + +DEFUN(cfg_pcu_maximise_direction, + cfg_pcu_maximise_direction_cmd, + "maximise-direction dl", + MAXIMISE_STR "Maximise DL capacity\n") +{ + struct gprs_rlcmac_bts *bts = bts_main_data(); + + bts->maximise_dir = MAXIMISE_DIR_DL_ONLY; + + return CMD_SUCCESS; +} + +DEFUN(cfg_pcu_no_maximise_direction, + cfg_pcu_no_maximise_direction_cmd, + "no maximise-direction", + NO_STR MAXIMISE_STR) +{ + struct gprs_rlcmac_bts *bts = bts_main_data(); + + bts->maximise_dir = MAXIMISE_DIR_NONE; + + return CMD_SUCCESS; +} + DEFUN(cfg_pcu_window_size, cfg_pcu_window_size_cmd, "window-size <0-1024> [<0-256>]", @@ -972,6 +998,8 @@ install_element(PCU_NODE, &cfg_pcu_cs_lqual_ranges_cmd); install_element(PCU_NODE, &cfg_pcu_mcs_cmd); install_element(PCU_NODE, &cfg_pcu_dl_arq_cmd); + install_element(PCU_NODE, &cfg_pcu_maximise_direction_cmd); + install_element(PCU_NODE, &cfg_pcu_no_maximise_direction_cmd); install_element(PCU_NODE, &cfg_pcu_no_mcs_cmd); install_element(PCU_NODE, &cfg_pcu_mcs_max_cmd); install_element(PCU_NODE, &cfg_pcu_no_mcs_max_cmd); diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index f7794f7..39033a6 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -118,6 +118,7 @@ bts = the_bts.bts_data(); bts->alloc_algorithm = alloc_algorithm_a; + bts->maximise_dir = MAXIMISE_DIR_NONE; struct gprs_rlcmac_trx *trx = &bts->trx[0]; for (i = 0; i < 8; i += 1) @@ -196,6 +197,7 @@ bts = the_bts.bts_data(); bts->alloc_algorithm = alloc_algorithm_b; + bts->maximise_dir = MAXIMISE_DIR_NONE; trx = &bts->trx[0]; trx->pdch[5].enable(); @@ -238,6 +240,7 @@ bts = the_bts.bts_data(); bts->alloc_algorithm = alloc_algorithm_b; + bts->maximise_dir = MAXIMISE_DIR_NONE; trx = &bts->trx[0]; trx->pdch[5].enable(); @@ -285,6 +288,7 @@ bts = the_bts.bts_data(); bts->alloc_algorithm = alloc_algorithm_b; + bts->maximise_dir = MAXIMISE_DIR_NONE; trx = &bts->trx[0]; trx->pdch[1].enable(); @@ -660,6 +664,7 @@ bts = the_bts.bts_data(); bts->alloc_algorithm = algo; + bts->maximise_dir = MAXIMISE_DIR_NONE; trx = &bts->trx[0]; trx->pdch[3].enable(); @@ -698,6 +703,7 @@ bts = the_bts.bts_data(); bts->alloc_algorithm = algo; + bts->maximise_dir = MAXIMISE_DIR_NONE; trx = &bts->trx[0]; trx->pdch[3].enable(); @@ -806,6 +812,7 @@ bts = the_bts.bts_data(); bts->alloc_algorithm = alloc_algorithm_b; + bts->maximise_dir = MAXIMISE_DIR_DL_ONLY; trx = &bts->trx[0]; trx->pdch[4].enable(); @@ -830,13 +837,8 @@ if (dl_tbf2->pdch[i]) numTs2++; } - - /* - * TODO: currently 2nd DL TBF gets 3 TS - * This behaviour will be fixed in subsequent patch - */ printf("TBF2: numTs(%d)\n", numTs2); - OSMO_ASSERT(numTs2 == 3); + OSMO_ASSERT(numTs2 == 4); tbf_free(dl_tbf1); tbf_free(dl_tbf2); diff --git a/tests/alloc/AllocTest.ok b/tests/alloc/AllocTest.ok index cbb65aa..9717411 100644 --- a/tests/alloc/AllocTest.ok +++ b/tests/alloc/AllocTest.ok @@ -10795,4 +10795,4 @@ Successfully allocated 160 TBFs Testing DL TS allocation for Multi UEs TBF1: numTs(4) -TBF2: numTs(3) +TBF2: numTs(4) -- To view, visit https://gerrit.osmocom.org/819 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4b4a99194ccae68bb3417bce538d16e944d5ec71 Gerrit-PatchSet: 7 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: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar From gerrit-no-reply at lists.osmocom.org Mon Oct 3 09:56:09 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 09:56:09 +0000 Subject: osmo-pcu[master]: Fix: DL slot allocation based on direction configured In-Reply-To: References: Message-ID: Patch Set 7: I talked about "fairness" before and just remembered we have a test that allocates all timeslots. What would be good is to: a.) Run this test with your new option enabled b.) Determine the maximum parallel users your patch allows (allocate DL, the UL and see when it fails and compare it with the current status quo). I am very skeptical about adding such a config option. We should not fool ourselves and either call it 'cheat-on-micro-benchmark' or see if this is the new default. For the new default it need to perform better (better throughput and better handling on busy cells). Call it "cheat-on-benchmark" because neither just one or two subscribers is realistic. -- To view, visit https://gerrit.osmocom.org/819 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4b4a99194ccae68bb3417bce538d16e944d5ec71 Gerrit-PatchSet: 7 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: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Oct 3 09:57:32 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 09:57:32 +0000 Subject: osmo-bts[master]: LC15: common/rsl.c : Alarm - BTS page table is full In-Reply-To: References: Message-ID: Patch Set 2: No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/261 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie17a87103e289fbbf3fcb3cd60dfd9a1b48d8824 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Oct 3 09:57:36 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 09:57:36 +0000 Subject: [ABANDON] osmo-bts[master]: LC15: common/rsl.c : Alarm - BTS page table is full In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: LC15: common/rsl.c : Alarm - BTS page table is full ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/261 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ie17a87103e289fbbf3fcb3cd60dfd9a1b48d8824 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen From gerrit-no-reply at lists.osmocom.org Mon Oct 3 09:57:51 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 09:57:51 +0000 Subject: [ABANDON] osmo-bts[master]: LC15: Fix coding style In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: LC15: Fix coding style ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/273 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Icb8100eb9a3f89f2f6dfdcc7d5b33efab48e7860 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Oct 3 09:57:56 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 09:57:56 +0000 Subject: [ABANDON] osmo-bts[master]: LC15: Enable to bypass LED control by the BTS via configurat... In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: LC15: Enable to bypass LED control by the BTS via configuration file ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/240 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I17639bfffa2429d70eb254427812260ec8802ef6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Oct 3 09:58:03 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 09:58:03 +0000 Subject: [ABANDON] osmo-bts[master]: LC15: common/oml.c: Support Tx power reduction 1 dB and 2 dB... In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: LC15: common/oml.c: Support Tx power reduction 1 dB and 2 dB step ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/241 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I16c66452acad1a0fb52561d829d708206ab4a5f6 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen From gerrit-no-reply at lists.osmocom.org Mon Oct 3 09:58:06 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 09:58:06 +0000 Subject: [ABANDON] osmo-bts[master]: LC15: BTS parameters are configurable via configuration file... In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: LC15: BTS parameters are configurable via configuration file : - Maximum cell size - Diversity - Unused TS pedestal - Adjustment of Tx output power - Reduction Tx power level in 8-PSK modulation scheme ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/239 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I3622d5b6f22525b798b0c75bbc2bab3767aba923 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen From gerrit-no-reply at lists.osmocom.org Mon Oct 3 09:58:17 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 09:58:17 +0000 Subject: [ABANDON] osmo-bts[master]: configure: Add LT_INIT macro to enable libtool configuration. In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: configure: Add LT_INIT macro to enable libtool configuration. ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/301 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I93ed9e3191a29776fbd54031177463bae353a05d Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Alexander Chemeris Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Oct 3 09:58:22 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 09:58:22 +0000 Subject: [ABANDON] osmo-bts[master]: LC15: common/oml.c : Alarm - Formatted O&M with BTS number i... In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: LC15: common/oml.c : Alarm - Formatted O&M with BTS number is out of range ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/256 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I15a227a60c75b8a91005b18afb6256f34d6b71b4 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Oct 3 09:58:57 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 09:58:57 +0000 Subject: [ABANDON] osmo-bts[master]: LC15: common/oml.c : Alarm - Formatted O&M message too short In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: LC15: common/oml.c : Alarm - Formatted O&M message too short ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/255 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I697c7e14efb2ebdbf789b2e0db13c43521791d85 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Oct 3 09:59:00 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 09:59:00 +0000 Subject: [ABANDON] osmo-bts[master]: LC15: common/oml.c : Alarm - Unsupported channel attributes In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: LC15: common/oml.c : Alarm - Unsupported channel attributes ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/254 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I52fd6f3edb0e7eb88c6ea97454696fa84e322cf9 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Oct 3 09:59:04 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 09:59:04 +0000 Subject: [ABANDON] osmo-bts[master]: LC15: common/oml.c: Alarm - Unsupported radio attributes In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: LC15: common/oml.c: Alarm - Unsupported radio attributes ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/253 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I209ea1ca0b54fb36189ca1154134344f57c1898c Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Oct 3 09:59:11 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 09:59:11 +0000 Subject: [ABANDON] osmo-bts[master]: LC15: common/oml.c: Alarm - Unsupported BTS attributes In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: LC15: common/oml.c: Alarm - Unsupported BTS attributes ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/252 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I1a515a8fca128b924c82d8a88eb5d420e14b3604 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Oct 3 09:59:14 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 09:59:14 +0000 Subject: [ABANDON] osmo-bts[master]: LC15: common/bts.c : Alarm - Failed to establish RSL link an... In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: LC15: common/bts.c : Alarm - Failed to establish RSL link and deactivate RF ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/251 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I8adac2c9dd1570feec14b3e66f8b05c4274cf127 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 From gerrit-no-reply at lists.osmocom.org Mon Oct 3 09:59:17 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 09:59:17 +0000 Subject: [ABANDON] osmo-bts[master]: LC15: osmo-bts-litecell15/calib_file.c: Alarm - Calibration ... In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: LC15: osmo-bts-litecell15/calib_file.c: Alarm - Calibration file path not specified ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/250 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Iff46e7ed6093cf77b95758a866a58991cd807bfa Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Oct 3 09:59:24 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 09:59:24 +0000 Subject: [ABANDON] osmo-bts[master]: LC15: osmo-bts-litecell15/calib_file.c: Alarm - Failed to ve... In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: LC15: osmo-bts-litecell15/calib_file.c: Alarm - Failed to verify calibration data file ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/249 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I0472ca8024124a9123eef1a2a93742cf15e1371f Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Oct 3 09:59:27 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 09:59:27 +0000 Subject: [ABANDON] osmo-bts[master]: LC15: osmo-bts-litecell15/calib_file.c: Alarm - Failed to op... In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: LC15: osmo-bts-litecell15/calib_file.c: Alarm - Failed to open calibration data file ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/248 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: If2829d68531494f0ede8f9dd2fe19ea99c63ea99 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Oct 3 09:59:35 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 09:59:35 +0000 Subject: [ABANDON] osmo-bts[master]: LC15: common/oml.c : Alarm - Unsupported IPA set attributes In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: LC15: common/oml.c : Alarm - Unsupported IPA set attributes ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/258 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I78f2f846132f9996bb4008643f1a666e366d2f85 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Oct 3 09:59:39 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 09:59:39 +0000 Subject: [ABANDON] osmo-bts[master]: LC15: osmo-bts-litecell15/l1_if.c : Alarm - Unknown l1sap do... In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: LC15: osmo-bts-litecell15/l1_if.c : Alarm - Unknown l1sap downlink operation ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/247 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ia31720a495fb460a6449d89e02a29ef18503b885 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Oct 3 09:59:42 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 09:59:42 +0000 Subject: [ABANDON] osmo-bts[master]: LC15: osmo-bts-litecell15/l1_if.c: Alarm - Unknown MPH-INFO.req In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: LC15: osmo-bts-litecell15/l1_if.c: Alarm - Unknown MPH-INFO.req ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/246 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Iff984987ac0db06825afccfcb982d33f53c70a04 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Oct 3 09:59:51 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 09:59:51 +0000 Subject: [ABANDON] osmo-bts[master]: LC15: osmo-bts-litecell15/oml.c: Alarm - Timeout waiting for... In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: LC15: osmo-bts-litecell15/oml.c: Alarm - Timeout waiting for primitives ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/245 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: If35dc4c0d3c04d328d0d8f85d5cfa4038afe723b Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Oct 3 09:59:54 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 09:59:54 +0000 Subject: [ABANDON] osmo-bts[master]: LC15: osmo-bts-litecell15/l1_if.c: Alarm - DSP L1 is no long... In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: LC15: osmo-bts-litecell15/l1_if.c: Alarm - DSP L1 is no longer sending primitives ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/244 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ic19e21c31a8f95c5e15c91cd886788ec4e83ec13 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 From gerrit-no-reply at lists.osmocom.org Mon Oct 3 09:59:59 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 09:59:59 +0000 Subject: [ABANDON] osmo-bts[master]: LC15: Introduce DSP alive timer per TRX In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: LC15: Introduce DSP alive timer per TRX ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/243 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ic075063a5b3294b72cc502a01e9616c296797238 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Oct 3 10:00:03 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 10:00:03 +0000 Subject: [ABANDON] osmo-bts[master]: LC15: Introduce TS 12.21 8.8.2 Abis/OML failure event report In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: LC15: Introduce TS 12.21 8.8.2 Abis/OML failure event report ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/242 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Id710f452c4e0eecbba855e87ab86a3087988e326 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 From gerrit-no-reply at lists.osmocom.org Mon Oct 3 10:00:07 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 10:00:07 +0000 Subject: [ABANDON] osmo-bts[master]: LC15: common/rsl.c : Alarm - Failed to bind RTP/RTCP socket In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: LC15: common/rsl.c : Alarm - Failed to bind RTP/RTCP socket ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/263 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ief24e775dd186dbf2bb773afbc3e16d7037f179d Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon Oct 3 10:00:10 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 10:00:10 +0000 Subject: [ABANDON] osmo-bts[master]: LC15: common/rsl.c : Alarm - Failed to create IPAC RTP/RTCP ... In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: LC15: common/rsl.c : Alarm - Failed to create IPAC RTP/RTCP socket ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/262 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I6426f7fcb1e2e25f8143c0b5835c24fedc8089be Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Oct 3 10:00:13 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 10:00:13 +0000 Subject: [ABANDON] osmo-bts[master]: LC15: Introduce measurement management messages, TS 12.21 se... In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: LC15: Introduce measurement management messages, TS 12.21 section 8.10 ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/260 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon 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 From gerrit-no-reply at lists.osmocom.org Mon Oct 3 10:00:17 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 10:00:17 +0000 Subject: [ABANDON] osmo-bts[master]: LC15: common/l1sap.c : Alarm - Unknown uplink L1SAP primitive In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: LC15: common/l1sap.c : Alarm - Unknown uplink L1SAP primitive ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/259 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I4943eabecb971f7cfece24c35b0e9e0e660f31a0 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Oct 3 10:00:20 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 10:00:20 +0000 Subject: [ABANDON] osmo-bts[master]: LC15: common/oml.c : Alarm - Unknown formatted O&M message type In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: LC15: common/oml.c : Alarm - Unknown formatted O&M message type ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/257 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I6b700c58b3780d401968610965f07b63872b578c Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Oct 3 10:00:50 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 10:00:50 +0000 Subject: [ABANDON] sandbox[master]: t3 In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: t3 ...................................................................... Abandoned No activity by patch submitter => abandon -- To view, visit https://gerrit.osmocom.org/719 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I0928e9cd687ef30ee5ba0e0a35d2a7d584750e52 Gerrit-PatchSet: 1 Gerrit-Project: sandbox Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Anonymous Coward #1000055 From gerrit-no-reply at lists.osmocom.org Mon Oct 3 10:00:54 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 10:00:54 +0000 Subject: [ABANDON] sandbox[master]: t1 In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: t1 ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/717 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I21de28ca57e9150524f45aea997186b2fce43c15 Gerrit-PatchSet: 1 Gerrit-Project: sandbox Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Anonymous Coward #1000055 Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 3 10:00:57 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 10:00:57 +0000 Subject: [ABANDON] sandbox[master]: t2 In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: t2 ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/718 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I1906b498ff1cd1438399bfbb516c2d766075ddcc Gerrit-PatchSet: 1 Gerrit-Project: sandbox Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Anonymous Coward #1000055 Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 3 10:02:09 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 10:02:09 +0000 Subject: osmo-pcu[master]: build: add -Wall In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/982 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I16711cf5a1ef8bd611074b3dd486ed7a0ae9df64 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu 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 Mon Oct 3 10:02:17 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 10:02:17 +0000 Subject: [MERGED] osmo-pcu[master]: build: add -Wall In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: build: add -Wall ...................................................................... build: add -Wall I noticed that unused variables are not complained about by the build. Let's add -Wall. I also noticed that the Makefile.ams include STD_DEFINES_AND_INCLUDES, which is never set in configure.ac, so using that to add -Wall to all build contexts. Change-Id: I16711cf5a1ef8bd611074b3dd486ed7a0ae9df64 --- M configure.ac 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/configure.ac b/configure.ac index 950be23..022a7f7 100644 --- a/configure.ac +++ b/configure.ac @@ -79,6 +79,9 @@ AC_MSG_RESULT([$enable_vty_tests]) AM_CONDITIONAL(ENABLE_VTY_TESTS, test "x$enable_vty_tests" = "xyes") +STD_DEFINES_AND_INCLUDES="-Wall" +AC_SUBST(STD_DEFINES_AND_INCLUDES) + AC_OUTPUT( src/Makefile examples/Makefile -- To view, visit https://gerrit.osmocom.org/982 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I16711cf5a1ef8bd611074b3dd486ed7a0ae9df64 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Oct 3 10:08:03 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 10:08:03 +0000 Subject: [PATCH] libosmocore[master]: jenkins.sh: add -fsanitize flags, add 'make check' 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/978 to look at the new patch set (#3). jenkins.sh: add -fsanitize flags, add 'make check' Change-Id: I1692a4730e83b71f2976651993e94de0fe060b8e --- M contrib/jenkins.sh 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/78/978/3 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index e9f63e4..b4eaa18 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -3,8 +3,15 @@ set -ex +export CFLAGS="-fsanitize=address -fsanitize=undefined" +export CPPFLAGS="-fsanitize=address -fsanitize=undefined" +export LDFLAGS="-fsanitize=address -fsanitize=undefined" +export ASAN_OPTIONS="detect_leaks=0" +export UBSAN_OPTIONS="print_stacktrace=1:halt_on_error=1" + autoreconf --install --force ./configure --enable-static -$MAKE $PARALLEL_MAKE +$MAKE $PARALLEL_MAKE check \ + || cat-testlogs.sh $MAKE distcheck \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/978 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1692a4730e83b71f2976651993e94de0fe060b8e Gerrit-PatchSet: 3 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 Oct 3 10:08:20 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 3 Oct 2016 10:08:20 +0000 Subject: libosmocore[master]: jenkins.sh: add -fsanitize flags, add 'make check' In-Reply-To: References: Message-ID: Patch Set 3: /tmp/conftest-89c3e2.o: In function `main': conftest.c:(.text+0x1a): undefined reference to `__asan_option_detect_stack_use_after_return' conftest.c:(.text+0x45): undefined reference to `__asan_stack_malloc_1' conftest.c:(.text+0xfc): undefined reference to `__asan_report_store4' /tmp/conftest-89c3e2.o: In function `asan.module_ctor': conftest.c:(.text+0x179): undefined reference to `__asan_init_v3' cc: error: linker command failed with exit code 1 (use -v to see invocation) was the compile error on FreeBSD -- To view, visit https://gerrit.osmocom.org/978 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1692a4730e83b71f2976651993e94de0fe060b8e Gerrit-PatchSet: 3 Gerrit-Project: libosmocore 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 Mon Oct 3 10:38:32 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Mon, 3 Oct 2016 10:38:32 +0000 Subject: osmo-pcu[master]: EGPRS: fix for EPDAN out of window In-Reply-To: References: Message-ID: Patch Set 5: (1 comment) https://gerrit.osmocom.org/#/c/862/4/src/tbf_dl.cpp File src/tbf_dl.cpp: Line 939: > I've tried for some minutes to understand, but I don't see it yet... why ca We get the first_bsn as an argument, which is v_a. In worst case, we calculate the num_blocks from v_a and v_s. which is inside the window. Hence we shall never enter this log section even during the worst case scenario, when epdan is out of RLC window. So removing this section of the code. Let me know any other queries. -- To view, visit https://gerrit.osmocom.org/862 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id07d178970f168f5389016c1eea31eb6b82057b6 Gerrit-PatchSet: 5 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Oct 3 13:51:59 2016 From: gerrit-no-reply at lists.osmocom.org (Minh-Quang Nguyen) Date: Mon, 3 Oct 2016 13:51:59 +0000 Subject: libosmocore[master]: IPAC manufacture-defined measurement pre-processing definitions In-Reply-To: References: Message-ID: Patch Set 1: > have you abandoned this patch? No I am not. I am actually assigned into an urgent task so that I can not get back to revise the changes. I will get back with you 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 Oct 3 16:41:00 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 3 Oct 2016 16:41:00 +0000 Subject: [PATCH] openbsc[master]: DTX: add flag for AMR HR P* Message-ID: Review at https://gerrit.osmocom.org/1001 DTX: add flag for AMR HR P* Add flag to explicitly track the state of DTX DL for AMR HR whe SID_FIRST_P1 has been sent to L1 already but no next frame available yet: this can be followed by SID_FIRST_P2 or SID_FIRST_INH depending on arrival of voice frame within next 60 ms. Change-Id: Id28b07b8e83cfe5e84de48a2f124084036580cd4 --- 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/01/1001/1 diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index 368ac6b..d8f651c 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -300,9 +300,14 @@ uint32_t fn; bool is_update; } last_sid; + /* FIXME: 2 flags below are mutually exclusive - is it worth it + to merge them? */ /* set for each SID frame to detect talkspurt for codecs without explicit ONSET event */ bool ul_sid; + /* set for each SID_FIRST_P1 sent to L1 but not followed by + either of _P2 or InH */ + bool dl_fst; uint8_t last_cmr; uint32_t last_fn; /* indicates if DTXd was active during DL measurement period */ -- To view, visit https://gerrit.osmocom.org/1001 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id28b07b8e83cfe5e84de48a2f124084036580cd4 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Oct 3 23:09:07 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Mon, 3 Oct 2016 23:09:07 +0000 Subject: [PATCH] openbsc[master]: bsc: count the usage of codec by setting the lchan active 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/794 to look at the new patch set (#3). bsc: count the usage of codec by setting the lchan active we count the codec when the channel was successful setted up Change-Id: Ifc8a406a11dce16b9e7f3310841e470545550a2c --- M openbsc/include/openbsc/gsm_data.h M openbsc/src/libbsc/abis_rsl.c 2 files changed, 45 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/94/794/3 diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index ffb7dd2..5829c8d 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -168,6 +168,11 @@ BSC_CTR_CHAN_RLL_ERR, BSC_CTR_BTS_OML_FAIL, BSC_CTR_BTS_RSL_FAIL, + BSC_CTR_CODEC_AMR_F, + BSC_CTR_CODEC_AMR_H, + BSC_CTR_CODEC_EFR, + BSC_CTR_CODEC_V1_FR, + BSC_CTR_CODEC_V1_HR, }; static const struct rate_ctr_desc bsc_ctr_description[] = { @@ -186,6 +191,11 @@ [BSC_CTR_CHAN_RLL_ERR] = {"chan.rll_err", "Received a RLL failure with T200 cause from BTS."}, [BSC_CTR_BTS_OML_FAIL] = {"bts.oml_fail", "Received a TEI down on a OML link."}, [BSC_CTR_BTS_RSL_FAIL] = {"bts.rsl_fail", "Received a TEI down on a OML link."}, + [BSC_CTR_CODEC_AMR_F] = {"bts.codec_amr_f", "Count the usage of AMR/F codec by channel mode requested."}, + [BSC_CTR_CODEC_AMR_H] = {"bts.codec_amr_h", "Count the usage of AMR/H codec by channel mode requested."}, + [BSC_CTR_CODEC_EFR] = {"bts.codec_efr", "Count the usage of EFR codec by channel mode requested."}, + [BSC_CTR_CODEC_V1_FR] = {"bts.codec_fr", "Count the usage of FR codec by channel mode requested."}, + [BSC_CTR_CODEC_V1_HR] = {"bts.codec_hr", "Count the usage of HR codec by channel mode requested."}, }; enum { diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c index dc4ede2..ae88f8c 100644 --- a/openbsc/src/libbsc/abis_rsl.c +++ b/openbsc/src/libbsc/abis_rsl.c @@ -82,6 +82,39 @@ lchan_free(lchan); } +static void count_codecs(struct gsm_bts *bts, struct gsm_lchan *lchan) +{ + if (lchan->type == GSM_LCHAN_TCH_H) { + switch (lchan->tch_mode) { + case GSM48_CMODE_SPEECH_AMR: + rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_AMR_H]); + break; + case GSM48_CMODE_SPEECH_V1: + rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_V1_HR]); + break; + default: + break; + } + } else if (lchan->type == GSM_LCHAN_TCH_F) { + switch (lchan->tch_mode) { + case GSM48_CMODE_SPEECH_AMR: + rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_AMR_F]); + break; + case GSM48_CMODE_SPEECH_V1: + rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_V1_FR]); + break; + case GSM48_CMODE_SPEECH_EFR: + rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_EFR]); + break; + default: + break; + } + } else { + LOGP(DRSL, LOGL_ERROR, "count_codecs unknown lchan->type %x on channel %s\n", + lchan->type, gsm_ts_and_pchan_name(lchan->ts)); + } +} + static uint8_t mdisc_by_msgtype(uint8_t msg_type) { /* mask off the transparent bit ? */ @@ -1170,6 +1203,7 @@ lchan->rqd_ta = 0; } + count_codecs(msg->trx->bts, lchan); send_lchan_signal(S_LCHAN_ACTIVATE_ACK, lchan, NULL); return 0; @@ -1479,6 +1513,7 @@ rc = rsl_rx_rf_chan_rel_ack(msg->lchan); break; case RSL_MT_MODE_MODIFY_ACK: + count_codecs(msg->trx->bts, msg->lchan); DEBUGP(DRSL, "%s CHANNEL MODE MODIFY ACK\n", ts_name); break; case RSL_MT_MODE_MODIFY_NACK: -- To view, visit https://gerrit.osmocom.org/794 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ifc8a406a11dce16b9e7f3310841e470545550a2c Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Oct 3 23:09:07 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Mon, 3 Oct 2016 23:09:07 +0000 Subject: [PATCH] openbsc[master]: msc: add counters to track call attempts/active/success/failed 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/795 to look at the new patch set (#3). msc: add counters to track call attempts/active/success/failed active_calls describe all calls in active state. call.complete Call got terminated by disconnect requested either by MS or MSC. call.incomplete Call got terminated by any other reason. call.active Calls reached active state. Change-Id: I49b93af2e6a0ba16c2fb00b7b83974e8a6a16df3 --- M openbsc/include/openbsc/gsm_data.h M openbsc/src/libbsc/net_init.c M openbsc/src/libmsc/gsm_04_08.c 3 files changed, 42 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/95/795/3 diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 5829c8d..70c08c3 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -215,6 +215,9 @@ MSC_CTR_CALL_MO_CONNECT_ACK, MSC_CTR_CALL_MT_SETUP, MSC_CTR_CALL_MT_CONNECT, + MSC_CTR_CALL_ACTIVE, + MSC_CTR_CALL_COMPLETE, + MSC_CTR_CALL_INCOMPLETE, }; static const struct rate_ctr_desc msc_ctr_description[] = { @@ -235,6 +238,9 @@ [MSC_CTR_CALL_MO_CONNECT_ACK] = {"call.mo_connect_ack", "Received a connect ack from MS of a MO call. Call is now succesful connected up."}, [MSC_CTR_CALL_MT_SETUP] = {"call.mt_setup", "Sent setup requests to the MS (MT)."}, [MSC_CTR_CALL_MT_CONNECT] = {"call.mt_connect", "Sent a connect to the MS (MT)."}, + [MSC_CTR_CALL_ACTIVE] = {"call.active", "Count total amount of calls that ever reached active state."}, + [MSC_CTR_CALL_COMPLETE] = {"call.complete", "Count total amount of calls which got terminated by disconnect req or ind after reaching active state."}, + [MSC_CTR_CALL_INCOMPLETE] = {"call.incomplete", "Count total amount of call which got terminated by any other reason after reaching active state."}, }; @@ -298,7 +304,7 @@ struct rate_ctr_group *bsc_ctrs; struct rate_ctr_group *msc_ctrs; - + struct osmo_counter *active_calls; /* layer 4 */ struct mncc_sock_state *mncc_state; diff --git a/openbsc/src/libbsc/net_init.c b/openbsc/src/libbsc/net_init.c index e53b466..57e3599 100644 --- a/openbsc/src/libbsc/net_init.c +++ b/openbsc/src/libbsc/net_init.c @@ -86,6 +86,7 @@ /* init statistics */ net->bsc_ctrs = rate_ctr_group_alloc(net, &bsc_ctrg_desc, 0); net->msc_ctrs = rate_ctr_group_alloc(net, &msc_ctrg_desc, 0); + net->active_calls = osmo_counter_alloc("msc.active_calls"); net->mncc_recv = mncc_recv; net->ext_min = GSM_MIN_EXTEN; diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index aa3d78a9..be1b260 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -1299,6 +1299,39 @@ return gsm48_conn_sendmsg(msg, conn, NULL); } +/* FIXME: this count_statistics is a state machine behaviour. we should convert + * the complete call control into a state machine. Afterwards we can move this + * code into state transitions. + */ +static void count_statistics(struct gsm_trans *trans, int new_state) +{ + int old_state = trans->cc.state; + struct rate_ctr_group *msc = trans->net->msc_ctrs; + + if (old_state == new_state) + return; + + /* state incoming */ + switch (new_state) { + case GSM_CSTATE_ACTIVE: + osmo_counter_inc(trans->net->active_calls); + rate_ctr_inc(&msc->ctr[MSC_CTR_CALL_ACTIVE]); + break; + } + + /* state outgoing */ + switch (old_state) { + case GSM_CSTATE_ACTIVE: + osmo_counter_dec(trans->net->active_calls); + if (new_state == GSM_CSTATE_DISCONNECT_REQ || + new_state == GSM_CSTATE_DISCONNECT_IND) + rate_ctr_inc(&msc->ctr[MSC_CTR_CALL_COMPLETE]); + else + rate_ctr_inc(&msc->ctr[MSC_CTR_CALL_INCOMPLETE]); + break; + } +} + /* Call Control */ /* The entire call control code is written in accordance with Figure 7.10c @@ -1315,6 +1348,7 @@ gsm48_cc_state_name(trans->cc.state), gsm48_cc_state_name(state)); + count_statistics(trans, state); trans->cc.state = state; } -- To view, visit https://gerrit.osmocom.org/795 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I49b93af2e6a0ba16c2fb00b7b83974e8a6a16df3 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Oct 4 09:07:57 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 4 Oct 2016 09:07:57 +0000 Subject: [PATCH] openbsc[master]: DTX: extend SID cache Message-ID: Review at https://gerrit.osmocom.org/1002 DTX: extend SID cache In addition to RTP payload SID cache got to store CMR/CMI prefix. Extend the buffer so it can fit in. Change-Id: Ibd4a63604a82cad3ce65f0752bffefa4b083e1b3 Fixes: Coverity CID#149508 --- M openbsc/include/openbsc/gsm_data_shared.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/02/1002/1 diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index 368ac6b..fc6c525 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -295,7 +295,7 @@ struct { struct amr_multirate_conf amr_mr; struct { - uint8_t buf[16]; + uint8_t buf[18]; uint8_t len; uint32_t fn; bool is_update; -- To view, visit https://gerrit.osmocom.org/1002 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibd4a63604a82cad3ce65f0752bffefa4b083e1b3 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Oct 4 10:04:30 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 4 Oct 2016 10:04:30 +0000 Subject: [PATCH] libosmocore[master]: vty: `show stats`: fix missing name for osmocom_counters Message-ID: Review at https://gerrit.osmocom.org/1003 vty: `show stats`: fix missing name for osmocom_counters `show stats` shows (null) for osmocom_counters because it's using the counter->description which isn't filled. Use counter->name as used by the other counter types. OpenBSC> show stats Ungrouped counters: (null): 4 Change-Id: I553b88a6fca688924b1f2b49e8cb17e90f057bb1 --- M src/vty/utils.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/03/1003/1 diff --git a/src/vty/utils.c b/src/vty/utils.c index 3a0f138..7e2130b 100644 --- a/src/vty/utils.c +++ b/src/vty/utils.c @@ -161,7 +161,7 @@ struct vty *vty = vctx->vty; vty_out(vty, " %s%s: %8lu%s", - vctx->prefix, counter->description, + vctx->prefix, counter->name, osmo_counter_get(counter), VTY_NEWLINE); return 0; -- To view, visit https://gerrit.osmocom.org/1003 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I553b88a6fca688924b1f2b49e8cb17e90f057bb1 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Oct 4 15:21:15 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 4 Oct 2016 15:21:15 +0000 Subject: [PATCH] libosmocore[master]: stats_statsd: use int64_t instead of int for value and delta. Message-ID: Review at https://gerrit.osmocom.org/1004 stats_statsd: use int64_t instead of int for value and delta. The stats infrastructure use int64_t for values and delta. So the statsd reporter get call with int64_t. Change-Id: I33df86de60007a64fa853d6d3af9b609877a8fc6 --- M src/stats_statsd.c 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/04/1004/1 diff --git a/src/stats_statsd.c b/src/stats_statsd.c index 2813410..3cecec3 100644 --- a/src/stats_statsd.c +++ b/src/stats_statsd.c @@ -39,7 +39,7 @@ int64_t value, int64_t delta); static int osmo_stats_reporter_statsd_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); struct osmo_stats_reporter *osmo_stats_reporter_create_statsd(const char *name) { @@ -57,7 +57,7 @@ } static int osmo_stats_reporter_statsd_send(struct osmo_stats_reporter *srep, - const char *name1, unsigned int index1, const char *name2, int value, + const char *name1, unsigned int index1, const char *name2, int64_t value, const char *unit) { char *buf; @@ -149,7 +149,7 @@ static int osmo_stats_reporter_statsd_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) { const char *unit = desc->unit; -- To view, visit https://gerrit.osmocom.org/1004 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I33df86de60007a64fa853d6d3af9b609877a8fc6 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Oct 4 15:27:08 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 4 Oct 2016 15:27:08 +0000 Subject: [PATCH] libosmocore[master]: vty/osmo_counter: use name if description is NULL In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1003 to look at the new patch set (#2). vty/osmo_counter: use name if description is NULL `show stats` shows (null) for osmocom_counters when description is null. OpenBSC> show stats Ungrouped counters: (null): 4 Change-Id: I553b88a6fca688924b1f2b49e8cb17e90f057bb1 --- M src/vty/utils.c 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/03/1003/2 diff --git a/src/vty/utils.c b/src/vty/utils.c index 3a0f138..27c1a85 100644 --- a/src/vty/utils.c +++ b/src/vty/utils.c @@ -159,9 +159,13 @@ { struct vty_out_context *vctx = vctx_; struct vty *vty = vctx->vty; + const char *description = counter->description; + + if (!counter->description) + description = counter->name; vty_out(vty, " %s%s: %8lu%s", - vctx->prefix, counter->description, + vctx->prefix, description, osmo_counter_get(counter), VTY_NEWLINE); return 0; -- To view, visit https://gerrit.osmocom.org/1003 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I553b88a6fca688924b1f2b49e8cb17e90f057bb1 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 4 15:53:52 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 4 Oct 2016 15:53:52 +0000 Subject: [PATCH] openbsc[master]: gprs/gprs_llc: count UI frames over SAPI in the statistics Message-ID: Review at https://gerrit.osmocom.org/1005 gprs/gprs_llc: count UI frames over SAPI in the statistics Change-Id: I5f38d70e046ce9ca1342e6f862329dc3cded8995 --- M openbsc/src/gprs/gprs_llc.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/05/1005/1 diff --git a/openbsc/src/gprs/gprs_llc.c b/openbsc/src/gprs/gprs_llc.c index 5b1f333..e5a80e5 100644 --- a/openbsc/src/gprs/gprs_llc.c +++ b/openbsc/src/gprs/gprs_llc.c @@ -774,6 +774,9 @@ } } + rate_ctr_inc(&sgsn->rate_ctrs->ctr[CTR_LLC_DL_PACKETS]); + rate_ctr_add(&sgsn->rate_ctrs->ctr[CTR_LLC_DL_BYTES], msg->len); + /* Identifiers passed down: (BVCI, NSEI) */ /* Send BSSGP-DL-UNITDATA.req */ -- To view, visit https://gerrit.osmocom.org/1005 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5f38d70e046ce9ca1342e6f862329dc3cded8995 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Wed Oct 5 05:46:42 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 5 Oct 2016 05:46:42 +0000 Subject: openbsc[master]: bsc: count the usage of codec by setting the lchan active In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/794 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifc8a406a11dce16b9e7f3310841e470545550a2c Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Oct 5 05:47:18 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 5 Oct 2016 05:47:18 +0000 Subject: openbsc[master]: msc: add counters to track call attempts/active/success/failed In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/795 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I49b93af2e6a0ba16c2fb00b7b83974e8a6a16df3 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Oct 5 05:47:28 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 5 Oct 2016 05:47:28 +0000 Subject: openbsc[master]: gprs/gprs_llc: count UI frames over SAPI in the statistics In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1005 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5f38d70e046ce9ca1342e6f862329dc3cded8995 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Oct 5 05:47:33 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 5 Oct 2016 05:47:33 +0000 Subject: [MERGED] openbsc[master]: gprs/gprs_llc: count UI frames over SAPI in the statistics In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gprs/gprs_llc: count UI frames over SAPI in the statistics ...................................................................... gprs/gprs_llc: count UI frames over SAPI in the statistics Change-Id: I5f38d70e046ce9ca1342e6f862329dc3cded8995 --- M openbsc/src/gprs/gprs_llc.c 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/gprs/gprs_llc.c b/openbsc/src/gprs/gprs_llc.c index 5b1f333..e5a80e5 100644 --- a/openbsc/src/gprs/gprs_llc.c +++ b/openbsc/src/gprs/gprs_llc.c @@ -774,6 +774,9 @@ } } + rate_ctr_inc(&sgsn->rate_ctrs->ctr[CTR_LLC_DL_PACKETS]); + rate_ctr_add(&sgsn->rate_ctrs->ctr[CTR_LLC_DL_BYTES], msg->len); + /* Identifiers passed down: (BVCI, NSEI) */ /* Send BSSGP-DL-UNITDATA.req */ -- To view, visit https://gerrit.osmocom.org/1005 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5f38d70e046ce9ca1342e6f862329dc3cded8995 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Oct 5 05:47:34 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 5 Oct 2016 05:47:34 +0000 Subject: [MERGED] openbsc[master]: msc: add counters to track call attempts/active/success/failed In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: msc: add counters to track call attempts/active/success/failed ...................................................................... msc: add counters to track call attempts/active/success/failed active_calls describe all calls in active state. call.complete Call got terminated by disconnect requested either by MS or MSC. call.incomplete Call got terminated by any other reason. call.active Calls reached active state. Change-Id: I49b93af2e6a0ba16c2fb00b7b83974e8a6a16df3 --- M openbsc/include/openbsc/gsm_data.h M openbsc/src/libbsc/net_init.c M openbsc/src/libmsc/gsm_04_08.c 3 files changed, 42 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 5829c8d..70c08c3 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -215,6 +215,9 @@ MSC_CTR_CALL_MO_CONNECT_ACK, MSC_CTR_CALL_MT_SETUP, MSC_CTR_CALL_MT_CONNECT, + MSC_CTR_CALL_ACTIVE, + MSC_CTR_CALL_COMPLETE, + MSC_CTR_CALL_INCOMPLETE, }; static const struct rate_ctr_desc msc_ctr_description[] = { @@ -235,6 +238,9 @@ [MSC_CTR_CALL_MO_CONNECT_ACK] = {"call.mo_connect_ack", "Received a connect ack from MS of a MO call. Call is now succesful connected up."}, [MSC_CTR_CALL_MT_SETUP] = {"call.mt_setup", "Sent setup requests to the MS (MT)."}, [MSC_CTR_CALL_MT_CONNECT] = {"call.mt_connect", "Sent a connect to the MS (MT)."}, + [MSC_CTR_CALL_ACTIVE] = {"call.active", "Count total amount of calls that ever reached active state."}, + [MSC_CTR_CALL_COMPLETE] = {"call.complete", "Count total amount of calls which got terminated by disconnect req or ind after reaching active state."}, + [MSC_CTR_CALL_INCOMPLETE] = {"call.incomplete", "Count total amount of call which got terminated by any other reason after reaching active state."}, }; @@ -298,7 +304,7 @@ struct rate_ctr_group *bsc_ctrs; struct rate_ctr_group *msc_ctrs; - + struct osmo_counter *active_calls; /* layer 4 */ struct mncc_sock_state *mncc_state; diff --git a/openbsc/src/libbsc/net_init.c b/openbsc/src/libbsc/net_init.c index e53b466..57e3599 100644 --- a/openbsc/src/libbsc/net_init.c +++ b/openbsc/src/libbsc/net_init.c @@ -86,6 +86,7 @@ /* init statistics */ net->bsc_ctrs = rate_ctr_group_alloc(net, &bsc_ctrg_desc, 0); net->msc_ctrs = rate_ctr_group_alloc(net, &msc_ctrg_desc, 0); + net->active_calls = osmo_counter_alloc("msc.active_calls"); net->mncc_recv = mncc_recv; net->ext_min = GSM_MIN_EXTEN; diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index aa3d78a9..be1b260 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -1299,6 +1299,39 @@ return gsm48_conn_sendmsg(msg, conn, NULL); } +/* FIXME: this count_statistics is a state machine behaviour. we should convert + * the complete call control into a state machine. Afterwards we can move this + * code into state transitions. + */ +static void count_statistics(struct gsm_trans *trans, int new_state) +{ + int old_state = trans->cc.state; + struct rate_ctr_group *msc = trans->net->msc_ctrs; + + if (old_state == new_state) + return; + + /* state incoming */ + switch (new_state) { + case GSM_CSTATE_ACTIVE: + osmo_counter_inc(trans->net->active_calls); + rate_ctr_inc(&msc->ctr[MSC_CTR_CALL_ACTIVE]); + break; + } + + /* state outgoing */ + switch (old_state) { + case GSM_CSTATE_ACTIVE: + osmo_counter_dec(trans->net->active_calls); + if (new_state == GSM_CSTATE_DISCONNECT_REQ || + new_state == GSM_CSTATE_DISCONNECT_IND) + rate_ctr_inc(&msc->ctr[MSC_CTR_CALL_COMPLETE]); + else + rate_ctr_inc(&msc->ctr[MSC_CTR_CALL_INCOMPLETE]); + break; + } +} + /* Call Control */ /* The entire call control code is written in accordance with Figure 7.10c @@ -1315,6 +1348,7 @@ gsm48_cc_state_name(trans->cc.state), gsm48_cc_state_name(state)); + count_statistics(trans, state); trans->cc.state = state; } -- To view, visit https://gerrit.osmocom.org/795 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I49b93af2e6a0ba16c2fb00b7b83974e8a6a16df3 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Wed Oct 5 05:47:34 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 5 Oct 2016 05:47:34 +0000 Subject: [MERGED] openbsc[master]: bsc: count the usage of codec by setting the lchan active In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: bsc: count the usage of codec by setting the lchan active ...................................................................... bsc: count the usage of codec by setting the lchan active we count the codec when the channel was successful setted up Change-Id: Ifc8a406a11dce16b9e7f3310841e470545550a2c --- M openbsc/include/openbsc/gsm_data.h M openbsc/src/libbsc/abis_rsl.c 2 files changed, 45 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index ffb7dd2..5829c8d 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -168,6 +168,11 @@ BSC_CTR_CHAN_RLL_ERR, BSC_CTR_BTS_OML_FAIL, BSC_CTR_BTS_RSL_FAIL, + BSC_CTR_CODEC_AMR_F, + BSC_CTR_CODEC_AMR_H, + BSC_CTR_CODEC_EFR, + BSC_CTR_CODEC_V1_FR, + BSC_CTR_CODEC_V1_HR, }; static const struct rate_ctr_desc bsc_ctr_description[] = { @@ -186,6 +191,11 @@ [BSC_CTR_CHAN_RLL_ERR] = {"chan.rll_err", "Received a RLL failure with T200 cause from BTS."}, [BSC_CTR_BTS_OML_FAIL] = {"bts.oml_fail", "Received a TEI down on a OML link."}, [BSC_CTR_BTS_RSL_FAIL] = {"bts.rsl_fail", "Received a TEI down on a OML link."}, + [BSC_CTR_CODEC_AMR_F] = {"bts.codec_amr_f", "Count the usage of AMR/F codec by channel mode requested."}, + [BSC_CTR_CODEC_AMR_H] = {"bts.codec_amr_h", "Count the usage of AMR/H codec by channel mode requested."}, + [BSC_CTR_CODEC_EFR] = {"bts.codec_efr", "Count the usage of EFR codec by channel mode requested."}, + [BSC_CTR_CODEC_V1_FR] = {"bts.codec_fr", "Count the usage of FR codec by channel mode requested."}, + [BSC_CTR_CODEC_V1_HR] = {"bts.codec_hr", "Count the usage of HR codec by channel mode requested."}, }; enum { diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c index dc4ede2..ae88f8c 100644 --- a/openbsc/src/libbsc/abis_rsl.c +++ b/openbsc/src/libbsc/abis_rsl.c @@ -82,6 +82,39 @@ lchan_free(lchan); } +static void count_codecs(struct gsm_bts *bts, struct gsm_lchan *lchan) +{ + if (lchan->type == GSM_LCHAN_TCH_H) { + switch (lchan->tch_mode) { + case GSM48_CMODE_SPEECH_AMR: + rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_AMR_H]); + break; + case GSM48_CMODE_SPEECH_V1: + rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_V1_HR]); + break; + default: + break; + } + } else if (lchan->type == GSM_LCHAN_TCH_F) { + switch (lchan->tch_mode) { + case GSM48_CMODE_SPEECH_AMR: + rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_AMR_F]); + break; + case GSM48_CMODE_SPEECH_V1: + rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_V1_FR]); + break; + case GSM48_CMODE_SPEECH_EFR: + rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_EFR]); + break; + default: + break; + } + } else { + LOGP(DRSL, LOGL_ERROR, "count_codecs unknown lchan->type %x on channel %s\n", + lchan->type, gsm_ts_and_pchan_name(lchan->ts)); + } +} + static uint8_t mdisc_by_msgtype(uint8_t msg_type) { /* mask off the transparent bit ? */ @@ -1170,6 +1203,7 @@ lchan->rqd_ta = 0; } + count_codecs(msg->trx->bts, lchan); send_lchan_signal(S_LCHAN_ACTIVATE_ACK, lchan, NULL); return 0; @@ -1479,6 +1513,7 @@ rc = rsl_rx_rf_chan_rel_ack(msg->lchan); break; case RSL_MT_MODE_MODIFY_ACK: + count_codecs(msg->trx->bts, msg->lchan); DEBUGP(DRSL, "%s CHANNEL MODE MODIFY ACK\n", ts_name); break; case RSL_MT_MODE_MODIFY_NACK: -- To view, visit https://gerrit.osmocom.org/794 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifc8a406a11dce16b9e7f3310841e470545550a2c Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Oct 5 05:47:52 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 5 Oct 2016 05:47:52 +0000 Subject: openbsc[master]: DTX: add flag for AMR HR P* In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1001 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id28b07b8e83cfe5e84de48a2f124084036580cd4 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 Oct 5 05:48:09 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 5 Oct 2016 05:48:09 +0000 Subject: openbsc[master]: DTX: extend SID cache In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1002 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibd4a63604a82cad3ce65f0752bffefa4b083e1b3 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 Oct 5 05:48:11 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 5 Oct 2016 05:48:11 +0000 Subject: [MERGED] openbsc[master]: DTX: extend SID cache In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: DTX: extend SID cache ...................................................................... DTX: extend SID cache In addition to RTP payload SID cache got to store CMR/CMI prefix. Extend the buffer so it can fit in. Change-Id: Ibd4a63604a82cad3ce65f0752bffefa4b083e1b3 Fixes: Coverity CID#149508 --- M openbsc/include/openbsc/gsm_data_shared.h 1 file changed, 1 insertion(+), 1 deletion(-) 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 368ac6b..fc6c525 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -295,7 +295,7 @@ struct { struct amr_multirate_conf amr_mr; struct { - uint8_t buf[16]; + uint8_t buf[18]; uint8_t len; uint32_t fn; bool is_update; -- To view, visit https://gerrit.osmocom.org/1002 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibd4a63604a82cad3ce65f0752bffefa4b083e1b3 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 Wed Oct 5 05:48:16 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 5 Oct 2016 05:48:16 +0000 Subject: [MERGED] openbsc[master]: DTX: add flag for AMR HR P* In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: DTX: add flag for AMR HR P* ...................................................................... DTX: add flag for AMR HR P* Add flag to explicitly track the state of DTX DL for AMR HR whe SID_FIRST_P1 has been sent to L1 already but no next frame available yet: this can be followed by SID_FIRST_P2 or SID_FIRST_INH depending on arrival of voice frame within next 60 ms. Change-Id: Id28b07b8e83cfe5e84de48a2f124084036580cd4 --- M openbsc/include/openbsc/gsm_data_shared.h 1 file changed, 5 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 fc6c525..1e3855f 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -300,9 +300,14 @@ uint32_t fn; bool is_update; } last_sid; + /* FIXME: 2 flags below are mutually exclusive - is it worth it + to merge them? */ /* set for each SID frame to detect talkspurt for codecs without explicit ONSET event */ bool ul_sid; + /* set for each SID_FIRST_P1 sent to L1 but not followed by + either of _P2 or InH */ + bool dl_fst; uint8_t last_cmr; uint32_t last_fn; /* indicates if DTXd was active during DL measurement period */ -- To view, visit https://gerrit.osmocom.org/1001 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id28b07b8e83cfe5e84de48a2f124084036580cd4 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 Wed Oct 5 08:07:50 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 5 Oct 2016 08:07:50 +0000 Subject: [PATCH] openbsc[master]: sndcp: Fixups for sndcp layer based on coverity-scan suggest... 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/965 to look at the new patch set (#2). sndcp: Fixups for sndcp layer based on coverity-scan suggestions - missing break in gprs_sndcp_pcomp.c, line 143 - string overflow in slhc_test.c, line 211 - sizeof mismatch in gprs_sndcp_xid.c, line 1369 and 1378 - mismatching signedness in gprs_sndcp_xid.c, line 1377 - needless < 0 comparison in gprs_sndcp_xid.c, line 477 - needless < 0 comparison in gprs_sndcp_xid.c, line 209 - missing returncode check in v42bis_test.c, line 320 - wrong pointer dereferentialization in gprs_sndcp_comp.c, line 73 Change-Id: I4f9adf251f5119e67ffe76baad6f1f996ac8dbad --- M openbsc/src/gprs/gprs_sndcp_comp.c M openbsc/src/gprs/gprs_sndcp_pcomp.c M openbsc/src/gprs/gprs_sndcp_xid.c M openbsc/tests/slhc/slhc_test.c M openbsc/tests/v42bis/v42bis_test.c 5 files changed, 12 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/65/965/2 diff --git a/openbsc/src/gprs/gprs_sndcp_comp.c b/openbsc/src/gprs/gprs_sndcp_comp.c index b13cb8b..cae0039 100644 --- a/openbsc/src/gprs/gprs_sndcp_comp.c +++ b/openbsc/src/gprs/gprs_sndcp_comp.c @@ -70,7 +70,7 @@ comp_field->v42bis_params->nsapi, sizeof(comp_entity->nsapi)); } else if (comp_field->v44_params) { - comp_entity->nsapi_len = comp_field->v42bis_params->nsapi_len; + comp_entity->nsapi_len = comp_field->v44_params->nsapi_len; memcpy(comp_entity->nsapi, comp_field->v42bis_params->nsapi, sizeof(comp_entity->nsapi)); diff --git a/openbsc/src/gprs/gprs_sndcp_pcomp.c b/openbsc/src/gprs/gprs_sndcp_pcomp.c index 5f6fb2c..493b263 100644 --- a/openbsc/src/gprs/gprs_sndcp_pcomp.c +++ b/openbsc/src/gprs/gprs_sndcp_pcomp.c @@ -141,6 +141,7 @@ switch (pcomp_index) { case 0: type = SL_TYPE_IP; + break; case 1: type = SL_TYPE_UNCOMPRESSED_TCP; break; diff --git a/openbsc/src/gprs/gprs_sndcp_xid.c b/openbsc/src/gprs/gprs_sndcp_xid.c index 270bdee..a4f9442 100644 --- a/openbsc/src/gprs/gprs_sndcp_xid.c +++ b/openbsc/src/gprs/gprs_sndcp_xid.c @@ -206,7 +206,6 @@ /* Bail if number of ROHC profiles exceeds limit * (ROHC supports only a maximum of 16 different profiles) */ - OSMO_ASSERT(params->profile_len >= 0); OSMO_ASSERT(params->profile_len <= 16); /* Zero out buffer */ @@ -475,8 +474,7 @@ for (i = 0; i < comp_field->comp_len; i++) { /* Check if submitted PCOMP/DCOMP values are within bounds */ - if ((comp_field->comp[i] < 0) - || (comp_field->comp[i] > 0x0F)) + if (comp_field->comp[i] > 0x0F) return -EINVAL; if (i & 1) { @@ -1360,25 +1358,27 @@ { struct gprs_sndcp_comp_field *comp_field; int i = 0; + int rc; if (!comp_fields) return -EINVAL; if (!lt) return -EINVAL; - memset(lt, 0, lt_len * sizeof(lt)); + memset(lt, 0, sizeof(*lt)); llist_for_each_entry(comp_field, comp_fields, list) { lt[i].entity = comp_field->entity; lt[i].algo = comp_field->algo; - lt[i].compclass = gprs_sndcp_get_compression_class(comp_field); + rc = gprs_sndcp_get_compression_class(comp_field); - if (lt[i].compclass < 0) { - memset(lt, 0, lt_len * sizeof(lt)); + if (rc < 0) { + memset(lt, 0, sizeof(*lt)); return -EINVAL; } + lt[i].compclass = rc; i++; } diff --git a/openbsc/tests/slhc/slhc_test.c b/openbsc/tests/slhc/slhc_test.c index e8ea02f..d2e1cd9 100644 --- a/openbsc/tests/slhc/slhc_test.c +++ b/openbsc/tests/slhc/slhc_test.c @@ -182,6 +182,8 @@ memset(packet, 0, sizeof(packet)); memset(packet_compr, 0, sizeof(packet_compr)); memset(packet_decompr, 0, sizeof(packet_decompr)); + + OSMO_ASSERT(strlen(packets[i]) < sizeof(packet_ascii)); strcpy(packet_ascii, packets[i]); packet_len = diff --git a/openbsc/tests/v42bis/v42bis_test.c b/openbsc/tests/v42bis/v42bis_test.c index 4e05514..7e90785 100644 --- a/openbsc/tests/v42bis/v42bis_test.c +++ b/openbsc/tests/v42bis/v42bis_test.c @@ -318,6 +318,7 @@ len = strlen(uncompr_packets[packet_id]); testvec = talloc_zero_size(ctx, len); len = osmo_hexparse(uncompr_packets[packet_id], testvec, len); + OSMO_ASSERT(len > 0); v42bis(ctx, V42BIS_COMPRESSION_MODE_DYNAMIC, testvec, len); v42bis(ctx, V42BIS_COMPRESSION_MODE_ALWAYS, testvec, len); v42bis(ctx, V42BIS_COMPRESSION_MODE_NEVER, testvec, len); -- To view, visit https://gerrit.osmocom.org/965 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4f9adf251f5119e67ffe76baad6f1f996ac8dbad Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: wax miguel From gerrit-no-reply at lists.osmocom.org Wed Oct 5 12:17:59 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 5 Oct 2016 12:17:59 +0000 Subject: [PATCH] osmo-bts[master]: octphy: set tx attenuation via VTY 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/905 to look at the new patch set (#6). 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(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/05/905/6 diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h index ea0fb33..7c09b2d 100644 --- a/include/osmo-bts/phy_link.h +++ b/include/osmo-bts/phy_link.h @@ -62,6 +62,7 @@ /* configuration */ uint32_t rf_port_index; uint32_t rx_gain_db; + uint32_t tx_atten_flag; uint32_t tx_atten_db; struct octphy_hdl *hdl; diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c index 7735261..4579df7 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -1349,7 +1349,14 @@ oc->Config.usBcchArfcn = trx->bts->c0->arfcn; 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 == 1) { + 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; + } LOGP(DL1C, LOGL_INFO, "Tx TRX-OPEN.req(trx=%u, rf_port=%u, arfcn=%u, " "tsc=%u, rx_gain=%u, tx_atten=%u)\n", diff --git a/src/osmo-bts-octphy/octphy_vty.c b/src/osmo-bts-octphy/octphy_vty.c index 3ea576c..53099c8 100644 --- a/src/osmo-bts-octphy/octphy_vty.c +++ b/src/osmo-bts-octphy/octphy_vty.c @@ -135,6 +135,24 @@ return CMD_SUCCESS; } +DEFUN(cfg_phy_tx_atten_flag, cfg_phy_tx_atten_flag_cmd, + "octphy tx-attenuation-flag <0-1>", + OCT_STR "1 - Use config file to set Tx Attenuation\n" + "Use config file to set Tx Attenuation\n") +{ + struct phy_link *plink = vty->index; + + if (plink->state != PHY_LINK_SHUTDOWN) { + vty_out(vty, "Can only reconfigure a PHY link that is down%s", + VTY_NEWLINE); + return CMD_WARNING; + } + + plink->u.octphy.tx_atten_flag = atoi(argv[0]); + + return CMD_SUCCESS; +} + 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" @@ -202,6 +220,8 @@ VTY_NEWLINE); vty_out(vty, " rx-gain %u%s", plink->u.octphy.rx_gain_db, VTY_NEWLINE); + vty_out(vty, " tx-attenuation-flag %u%s", plink->u.octphy.tx_atten_flag, + VTY_NEWLINE); vty_out(vty, " tx-attenuation %u%s", plink->u.octphy.tx_atten_db, VTY_NEWLINE); vty_out(vty, " rf-port-index %u%s", plink->u.octphy.rf_port_index, @@ -250,6 +270,7 @@ install_element(PHY_NODE, &cfg_phy_netdev_cmd); install_element(PHY_NODE, &cfg_phy_rf_port_idx_cmd); install_element(PHY_NODE, &cfg_phy_rx_gain_db_cmd); + install_element(PHY_NODE, &cfg_phy_tx_atten_flag_cmd); install_element(PHY_NODE, &cfg_phy_tx_atten_db_cmd); install_element_ve(&show_rf_port_stats_cmd); -- 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: 6 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 Wed Oct 5 12:18:01 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 5 Oct 2016 12:18:01 +0000 Subject: [PATCH] osmo-bts[master]: octopy: fixing renamed constant Message-ID: Review at https://gerrit.osmocom.org/1008 octopy: fixing renamed constant The constant cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_UNUSED in header file octvc1/hw/octvc1_hw_api.h has been renamed to cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_IDLE. This commit adds an ifdef decision in to code to ensure that older header files will still work. Change-Id: I4c0b976d29689ace06741c5943434fc33ee2df14 --- M src/osmo-bts-octphy/l1_utils.c M src/osmo-bts-octphy/octphy_hw_api.c 2 files changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/08/1008/1 diff --git a/src/osmo-bts-octphy/l1_utils.c b/src/osmo-bts-octphy/l1_utils.c index 682865b..ac5e217 100644 --- a/src/osmo-bts-octphy/l1_utils.c +++ b/src/osmo-bts-octphy/l1_utils.c @@ -62,7 +62,15 @@ const struct value_string octphy_clkmgr_state_vals[8] = { { 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_EXT_CLOCK" }, { cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_LOCKED, "LOCKED" }, { cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_UNLOCKED, "UNLOCKED" }, diff --git a/src/osmo-bts-octphy/octphy_hw_api.c b/src/osmo-bts-octphy/octphy_hw_api.c index d0d5ec7..dc23676 100644 --- a/src/osmo-bts-octphy/octphy_hw_api.c +++ b/src/osmo-bts-octphy/octphy_hw_api.c @@ -279,7 +279,14 @@ 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" }, -- To view, visit https://gerrit.osmocom.org/1008 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4c0b976d29689ace06741c5943434fc33ee2df14 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Oct 5 12:18:01 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 5 Oct 2016 12:18:01 +0000 Subject: [PATCH] osmo-bts[master]: octphy: reintroducing multi-trx support Message-ID: Review at https://gerrit.osmocom.org/1009 octphy: reintroducing multi-trx support The multi-trx had to be removed because of build conflicts with octphy header that lack the struct members for needed to support multi-trx. For details see the following revert-commits: ed6b48e4a5fba07c3ecccf689991799ae13a2aaa c9a1f284acf518cb4e62c3898e20398ed53807c3 This commit reintroduces multi trx support and ads an ifdef decision to ensure that header files without multi-trx support still work. Change-Id: I7f9b2906cc149c817183745b4c96bcc7f9ebdad0 --- M configure.ac M include/osmo-bts/phy_link.h M src/osmo-bts-octphy/l1_oml.c 3 files changed, 22 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/09/1009/1 diff --git a/configure.ac b/configure.ac index d35a52a..7ba056e 100644 --- a/configure.ac +++ b/configure.ac @@ -70,6 +70,7 @@ AC_MSG_RESULT([$enable_octphy]) AM_CONDITIONAL(ENABLE_OCTPHY, test "x$enable_octphy" = "xyes") if test "$enable_octphy" = "yes" ; then + AC_CHECK_MEMBER([tOCTVC1_GSM_TRX_CONFIG.usCentreArfcn], [define 'OCTPHY_MULTI_TRX'],[],[[#include ]]) oldCPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS -I$OCTSDR2G_INCDIR -I$srcdir/include $LIBOSMOCORE_CFLAGS" AC_CHECK_HEADER([octphy/octvc1/gsm/octvc1_gsm_default.h],[], diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h index 7c09b2d..2db3c51 100644 --- a/include/osmo-bts/phy_link.h +++ b/include/osmo-bts/phy_link.h @@ -64,6 +64,10 @@ uint32_t rx_gain_db; uint32_t tx_atten_flag; uint32_t tx_atten_db; +#ifdef OCTPHY_MULTI_TRX + /* arfcn used by TRX with id 0 */ + uint16_t center_arfcn; +#endif struct octphy_hdl *hdl; } octphy; diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c index e543c15..bb4dad3 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -1347,8 +1347,16 @@ oc->TrxId.byTrxId = pinst->u.octphy.trx_id; oc->Config.ulBand = osmocom_to_octphy_band(trx->bts->band, trx->arfcn); oc->Config.usArfcn = trx->arfcn; - oc->Config.usTsc = trx->bts->bsic & 0x7; +#ifdef OCTPHY_MULTI_TRX + if (pinst->u.octphy.trx_id) + oc->Config.usCentreArfcn = plink->u.octphy.center_arfcn; + else { + oc->Config.usCentreArfcn = trx->arfcn; + plink->u.octphy.center_arfcn = trx->arfcn; + } oc->Config.usBcchArfcn = trx->bts->c0->arfcn; +#endif + 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. */ if (plink->u.octphy.tx_atten_flag == 1) { @@ -1360,11 +1368,19 @@ oc->RfConfig.ulTxAttndB = (trx->max_power_red) << 2; } +#ifdef OCTPHY_MULTI_TRX + LOGP(DL1C, LOGL_INFO, "Tx TRX-OPEN.req(trx=%u, rf_port=%u, arfcn=%u, " + "center=%u, tsc=%u, rx_gain=%u, tx_atten=%u)\n", + oc->TrxId.byTrxId, oc->ulRfPortIndex, oc->Config.usArfcn, + oc->Config.usCentreArfcn, oc->Config.usTsc, oc->RfConfig.ulRxGainDb, + oc->RfConfig.ulTxAttndB); +#else LOGP(DL1C, LOGL_INFO, "Tx TRX-OPEN.req(trx=%u, rf_port=%u, arfcn=%u, " "tsc=%u, rx_gain=%u, tx_atten=%u)\n", oc->TrxId.byTrxId, oc->ulRfPortIndex, oc->Config.usArfcn, oc->Config.usTsc, oc->RfConfig.ulRxGainDb, oc->RfConfig.ulTxAttndB); +#endif mOCTVC1_GSM_MSG_TRX_OPEN_CMD_SWAP(oc); -- To view, visit https://gerrit.osmocom.org/1009 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7f9b2906cc149c817183745b4c96bcc7f9ebdad0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Oct 5 13:10:24 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 5 Oct 2016 13:10:24 +0000 Subject: osmo-bts[master]: octopy: fixing renamed constant In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1008 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4c0b976d29689ace06741c5943434fc33ee2df14 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter 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 Wed Oct 5 13:13:25 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 5 Oct 2016 13:13:25 +0000 Subject: osmo-bts[master]: octphy: reintroducing multi-trx support In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/1009/1/configure.ac File configure.ac: Line 73: AC_CHECK_MEMBER([tOCTVC1_GSM_TRX_CONFIG.usCentreArfcn], [define 'OCTPHY_MULTI_TRX'],[],[[#include ]]) I think this only defines a makefile variable and not a c-level variable. The resulting code in the #ifdef OCTPHY_MULTI_TRX' might thus not be executed at all. -- To view, visit https://gerrit.osmocom.org/1009 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7f9b2906cc149c817183745b4c96bcc7f9ebdad0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Oct 6 09:44:30 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 6 Oct 2016 09:44:30 +0000 Subject: [PATCH] osmo-bts[master]: octphy: reintroducing multi-trx 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/1009 to look at the new patch set (#2). octphy: reintroducing multi-trx support The multi-trx had to be removed because of build conflicts with octphy header that lack the struct members for needed to support multi-trx. For details see the following revert-commits: ed6b48e4a5fba07c3ecccf689991799ae13a2aaa c9a1f284acf518cb4e62c3898e20398ed53807c3 This commit reintroduces multi trx support and ads an ifdef decision to ensure that header files without multi-trx support still work. Change-Id: I7f9b2906cc149c817183745b4c96bcc7f9ebdad0 --- M configure.ac M include/osmo-bts/phy_link.h M src/osmo-bts-octphy/l1_oml.c 3 files changed, 25 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/09/1009/2 diff --git a/configure.ac b/configure.ac index d35a52a..1e8a4ec 100644 --- a/configure.ac +++ b/configure.ac @@ -70,6 +70,7 @@ AC_MSG_RESULT([$enable_octphy]) AM_CONDITIONAL(ENABLE_OCTPHY, test "x$enable_octphy" = "xyes") if test "$enable_octphy" = "yes" ; then + AC_CHECK_MEMBER([tOCTVC1_GSM_TRX_CONFIG.usCentreArfcn], AC_DEFINE([OCTPHY_MULTI_TRX], [1], [Define to 1 if your octphy header files support multi-trx]), [], [[#include ]]) oldCPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS -I$OCTSDR2G_INCDIR -I$srcdir/include $LIBOSMOCORE_CFLAGS" AC_CHECK_HEADER([octphy/octvc1/gsm/octvc1_gsm_default.h],[], diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h index 7c09b2d..d06aa55 100644 --- a/include/osmo-bts/phy_link.h +++ b/include/osmo-bts/phy_link.h @@ -7,6 +7,7 @@ #include #include +#include "btsconfig.h" struct gsm_bts_trx; @@ -64,6 +65,10 @@ uint32_t rx_gain_db; uint32_t tx_atten_flag; uint32_t tx_atten_db; +#if OCTPHY_MULTI_TRX == 1 + /* arfcn used by TRX with id 0 */ + uint16_t center_arfcn; +#endif struct octphy_hdl *hdl; } octphy; diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c index e543c15..88dc041 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -43,6 +43,7 @@ #include "l1_oml.h" #include "l1_utils.h" #include "octphy_hw_api.h" +#include "btsconfig.h" #include #include @@ -1347,8 +1348,17 @@ oc->TrxId.byTrxId = pinst->u.octphy.trx_id; oc->Config.ulBand = osmocom_to_octphy_band(trx->bts->band, trx->arfcn); oc->Config.usArfcn = trx->arfcn; - oc->Config.usTsc = trx->bts->bsic & 0x7; + +#if OCTPHY_MULTI_TRX == 1 + if (pinst->u.octphy.trx_id) + oc->Config.usCentreArfcn = plink->u.octphy.center_arfcn; + else { + oc->Config.usCentreArfcn = trx->arfcn; + plink->u.octphy.center_arfcn = trx->arfcn; + } oc->Config.usBcchArfcn = trx->bts->c0->arfcn; +#endif + 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. */ if (plink->u.octphy.tx_atten_flag == 1) { @@ -1360,11 +1370,19 @@ 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, " + "center=%u, tsc=%u, rx_gain=%u, tx_atten=%u)\n", + oc->TrxId.byTrxId, oc->ulRfPortIndex, oc->Config.usArfcn, + oc->Config.usCentreArfcn, oc->Config.usTsc, oc->RfConfig.ulRxGainDb, + oc->RfConfig.ulTxAttndB); +#else LOGP(DL1C, LOGL_INFO, "Tx TRX-OPEN.req(trx=%u, rf_port=%u, arfcn=%u, " "tsc=%u, rx_gain=%u, tx_atten=%u)\n", oc->TrxId.byTrxId, oc->ulRfPortIndex, oc->Config.usArfcn, oc->Config.usTsc, oc->RfConfig.ulRxGainDb, oc->RfConfig.ulTxAttndB); +#endif mOCTVC1_GSM_MSG_TRX_OPEN_CMD_SWAP(oc); -- To view, visit https://gerrit.osmocom.org/1009 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I7f9b2906cc149c817183745b4c96bcc7f9ebdad0 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts 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 Thu Oct 6 09:46:53 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 6 Oct 2016 09:46:53 +0000 Subject: osmo-bts[master]: octphy: reintroducing multi-trx support In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1009 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7f9b2906cc149c817183745b4c96bcc7f9ebdad0 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter 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 Oct 6 10:11:57 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 6 Oct 2016 10:11:57 +0000 Subject: [MERGED] osmo-bts[master]: octphy: reintroducing multi-trx support In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: octphy: reintroducing multi-trx support ...................................................................... octphy: reintroducing multi-trx support The multi-trx had to be removed because of build conflicts with octphy header that lack the struct members for needed to support multi-trx. For details see the following revert-commits: ed6b48e4a5fba07c3ecccf689991799ae13a2aaa c9a1f284acf518cb4e62c3898e20398ed53807c3 This commit reintroduces multi trx support and ads an ifdef decision to ensure that header files without multi-trx support still work. Change-Id: I7f9b2906cc149c817183745b4c96bcc7f9ebdad0 --- M configure.ac M include/osmo-bts/phy_link.h M src/osmo-bts-octphy/l1_oml.c 3 files changed, 25 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index d35a52a..1e8a4ec 100644 --- a/configure.ac +++ b/configure.ac @@ -70,6 +70,7 @@ AC_MSG_RESULT([$enable_octphy]) AM_CONDITIONAL(ENABLE_OCTPHY, test "x$enable_octphy" = "xyes") if test "$enable_octphy" = "yes" ; then + AC_CHECK_MEMBER([tOCTVC1_GSM_TRX_CONFIG.usCentreArfcn], AC_DEFINE([OCTPHY_MULTI_TRX], [1], [Define to 1 if your octphy header files support multi-trx]), [], [[#include ]]) oldCPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS -I$OCTSDR2G_INCDIR -I$srcdir/include $LIBOSMOCORE_CFLAGS" AC_CHECK_HEADER([octphy/octvc1/gsm/octvc1_gsm_default.h],[], diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h index ea0fb33..6b2f21e 100644 --- a/include/osmo-bts/phy_link.h +++ b/include/osmo-bts/phy_link.h @@ -7,6 +7,7 @@ #include #include +#include "btsconfig.h" struct gsm_bts_trx; @@ -63,6 +64,10 @@ uint32_t rf_port_index; uint32_t rx_gain_db; uint32_t tx_atten_db; +#if OCTPHY_MULTI_TRX == 1 + /* arfcn used by TRX with id 0 */ + uint16_t center_arfcn; +#endif struct octphy_hdl *hdl; } octphy; diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c index 7735261..1b74fd4 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -43,6 +43,7 @@ #include "l1_oml.h" #include "l1_utils.h" #include "octphy_hw_api.h" +#include "btsconfig.h" #include #include @@ -1345,17 +1346,34 @@ oc->TrxId.byTrxId = pinst->u.octphy.trx_id; oc->Config.ulBand = osmocom_to_octphy_band(trx->bts->band, trx->arfcn); oc->Config.usArfcn = trx->arfcn; - oc->Config.usTsc = trx->bts->bsic & 0x7; + +#if OCTPHY_MULTI_TRX == 1 + if (pinst->u.octphy.trx_id) + oc->Config.usCentreArfcn = plink->u.octphy.center_arfcn; + else { + oc->Config.usCentreArfcn = trx->arfcn; + plink->u.octphy.center_arfcn = trx->arfcn; + } oc->Config.usBcchArfcn = trx->bts->c0->arfcn; +#endif + 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 OCTPHY_MULTI_TRX == 1 + LOGP(DL1C, LOGL_INFO, "Tx TRX-OPEN.req(trx=%u, rf_port=%u, arfcn=%u, " + "center=%u, tsc=%u, rx_gain=%u, tx_atten=%u)\n", + oc->TrxId.byTrxId, oc->ulRfPortIndex, oc->Config.usArfcn, + oc->Config.usCentreArfcn, oc->Config.usTsc, oc->RfConfig.ulRxGainDb, + oc->RfConfig.ulTxAttndB); +#else LOGP(DL1C, LOGL_INFO, "Tx TRX-OPEN.req(trx=%u, rf_port=%u, arfcn=%u, " "tsc=%u, rx_gain=%u, tx_atten=%u)\n", oc->TrxId.byTrxId, oc->ulRfPortIndex, oc->Config.usArfcn, oc->Config.usTsc, oc->RfConfig.ulRxGainDb, oc->RfConfig.ulTxAttndB); +#endif mOCTVC1_GSM_MSG_TRX_OPEN_CMD_SWAP(oc); -- To view, visit https://gerrit.osmocom.org/1009 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7f9b2906cc149c817183745b4c96bcc7f9ebdad0 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts 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 Thu Oct 6 10:12:04 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 6 Oct 2016 10:12:04 +0000 Subject: [MERGED] osmo-bts[master]: octopy: fixing renamed constant In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: octopy: fixing renamed constant ...................................................................... octopy: fixing renamed constant The constant cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_UNUSED in header file octvc1/hw/octvc1_hw_api.h has been renamed to cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_IDLE. This commit adds an ifdef decision in to code to ensure that older header files will still work. Change-Id: I4c0b976d29689ace06741c5943434fc33ee2df14 --- M src/osmo-bts-octphy/l1_utils.c M src/osmo-bts-octphy/octphy_hw_api.c 2 files changed, 15 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bts-octphy/l1_utils.c b/src/osmo-bts-octphy/l1_utils.c index 682865b..ac5e217 100644 --- a/src/osmo-bts-octphy/l1_utils.c +++ b/src/osmo-bts-octphy/l1_utils.c @@ -62,7 +62,15 @@ const struct value_string octphy_clkmgr_state_vals[8] = { { 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_EXT_CLOCK" }, { cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_LOCKED, "LOCKED" }, { cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_UNLOCKED, "UNLOCKED" }, diff --git a/src/osmo-bts-octphy/octphy_hw_api.c b/src/osmo-bts-octphy/octphy_hw_api.c index d0d5ec7..dc23676 100644 --- a/src/osmo-bts-octphy/octphy_hw_api.c +++ b/src/osmo-bts-octphy/octphy_hw_api.c @@ -279,7 +279,14 @@ 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" }, -- To view, visit https://gerrit.osmocom.org/1008 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4c0b976d29689ace06741c5943434fc33ee2df14 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts 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 Thu Oct 6 10:44:38 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 6 Oct 2016 10:44:38 +0000 Subject: [PATCH] osmo-bts[master]: DTX: fix array size calculation Message-ID: Review at https://gerrit.osmocom.org/1010 DTX: fix array size calculation Compute array size in-place and pass it to function. Change-Id: I4cd480ceb20efc69df1b00e3c7359fcbd14c19cd Fixes: coverity CID 1357844. --- M src/common/msg_utils.c 1 file changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/10/1010/1 diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 99a211f..388bf72 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -203,10 +203,10 @@ return false; } -static inline bool fn_chk(const uint8_t *t, uint32_t fn) +static inline bool fn_chk(const uint8_t *t, uint32_t fn, uint8_t len) { uint8_t i; - for (i = 0; i < ARRAY_SIZE(t); i++) + for (i = 0; i < len; i++) if (fn % 104 == t[i]) return false; return true; @@ -225,9 +225,10 @@ h1[] = { 14, 16, 18, 20, 66, 68, 70, 72 }; if (lchan->tch_mode == GSM48_CMODE_SPEECH_V1) { if (lchan->type == GSM_LCHAN_TCH_F) - return fn_chk(f, fn); + return fn_chk(f, fn, ARRAY_SIZE(f)); else - return fn_chk(lchan->nr ? h1 : h0, fn); + return fn_chk(lchan->nr ? h1 : h0, fn, + ARRAY_SIZE(lchan->nr ? h1 : h0)); } return false; } -- To view, visit https://gerrit.osmocom.org/1010 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4cd480ceb20efc69df1b00e3c7359fcbd14c19cd Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Oct 6 11:58:58 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 6 Oct 2016 11:58:58 +0000 Subject: [PATCH] openbsc[master]: OML: Fixing static OML attribute tables 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/973 to look at the new patch set (#2). OML: Fixing static OML attribute tables - the OML attribute tables are hardcoded. To set variable parameters, the hardcoded data structure (tlv) is patched on byte level during runtime. This patch replaces that mechanism by setting up the TLV structures on runtime using mesage buffers (struct msgb) Change-Id: Ibeb34a84912d6cf695f553a34c69320fca7d08fa --- M openbsc/.gitignore M openbsc/configure.ac M openbsc/include/openbsc/Makefile.am A openbsc/include/openbsc/bts_ipaccess_nanobts_omlattr.h M openbsc/src/libbsc/Makefile.am M openbsc/src/libbsc/bts_ipaccess_nanobts.c A openbsc/src/libbsc/bts_ipaccess_nanobts_omlattr.c M openbsc/tests/Makefile.am A openbsc/tests/nanobts_omlattr/Makefile.am A openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c A openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.ok M openbsc/tests/testsuite.at 12 files changed, 637 insertions(+), 221 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/73/973/2 diff --git a/openbsc/.gitignore b/openbsc/.gitignore index 6fbd463..3324069 100644 --- a/openbsc/.gitignore +++ b/openbsc/.gitignore @@ -85,6 +85,7 @@ tests/sndcp_xid/sndcp_xid_test tests/slhc/slhc_test tests/v42bis/v42bis_test +tests/nanobts_omlattr/nanobts_omlattr_test tests/atconfig tests/atlocal diff --git a/openbsc/configure.ac b/openbsc/configure.ac index 173c6c8..2b1cacb 100644 --- a/openbsc/configure.ac +++ b/openbsc/configure.ac @@ -234,6 +234,7 @@ tests/sndcp_xid/Makefile tests/slhc/Makefile tests/v42bis/Makefile + tests/nanobts_omlattr/Makefile doc/Makefile doc/examples/Makefile Makefile) diff --git a/openbsc/include/openbsc/Makefile.am b/openbsc/include/openbsc/Makefile.am index c6a0149..86bb981 100644 --- a/openbsc/include/openbsc/Makefile.am +++ b/openbsc/include/openbsc/Makefile.am @@ -81,6 +81,7 @@ vty.h \ v42bis.h \ v42bis_private.h \ + bts_ipaccess_nanobts_omlattr.h \ $(NULL) openbsc_HEADERS = \ diff --git a/openbsc/include/openbsc/bts_ipaccess_nanobts_omlattr.h b/openbsc/include/openbsc/bts_ipaccess_nanobts_omlattr.h new file mode 100644 index 0000000..bc7860b --- /dev/null +++ b/openbsc/include/openbsc/bts_ipaccess_nanobts_omlattr.h @@ -0,0 +1,32 @@ +/* OML attribute table generator for ipaccess nanobts */ + +/* (C) 2016 by sysmocom s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * 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 + +struct msgb *nanobts_attr_bts_get(struct gsm_bts *bts); +struct msgb *nanobts_attr_nse_get(struct gsm_bts *bts); +struct msgb *nanobts_attr_cell_get(struct gsm_bts *bts); +struct msgb *nanobts_attr_nscv_get(struct gsm_bts *bts); +struct msgb *nanobts_attr_radio_get(struct gsm_bts *bts, + struct gsm_bts_trx *trx); diff --git a/openbsc/src/libbsc/Makefile.am b/openbsc/src/libbsc/Makefile.am index 4728e23..8c53817 100644 --- a/openbsc/src/libbsc/Makefile.am +++ b/openbsc/src/libbsc/Makefile.am @@ -49,5 +49,6 @@ bsc_ctrl_lookup.c \ net_init.c \ bsc_dyn_ts.c \ + bts_ipaccess_nanobts_omlattr.c \ $(NULL) diff --git a/openbsc/src/libbsc/bts_ipaccess_nanobts.c b/openbsc/src/libbsc/bts_ipaccess_nanobts.c index a6c8e29..a1bde77 100644 --- a/openbsc/src/libbsc/bts_ipaccess_nanobts.c +++ b/openbsc/src/libbsc/bts_ipaccess_nanobts.c @@ -39,6 +39,7 @@ #include #include #include +#include extern struct gsm_network *bsc_gsmnet; @@ -100,211 +101,6 @@ }, }; -static unsigned char nanobts_attr_bts[] = { - NM_ATT_INTERF_BOUND, 0x55, 0x5b, 0x61, 0x67, 0x6d, 0x73, - /* interference avg. period in numbers of SACCH multifr */ - NM_ATT_INTAVE_PARAM, 0x06, - /* conn fail based on SACCH error rate */ - NM_ATT_CONN_FAIL_CRIT, 0x00, 0x02, 0x01, 0x10, - NM_ATT_T200, 0x1e, 0x24, 0x24, 0xa8, 0x34, 0x21, 0xa8, - NM_ATT_MAX_TA, 0x3f, - NM_ATT_OVERL_PERIOD, 0x00, 0x01, 10, /* seconds */ - NM_ATT_CCCH_L_T, 10, /* percent */ - NM_ATT_CCCH_L_I_P, 1, /* seconds */ - NM_ATT_RACH_B_THRESH, 10, /* busy threshold in - dBm */ - NM_ATT_LDAVG_SLOTS, 0x03, 0xe8, /* rach load averaging 1000 slots */ - NM_ATT_BTS_AIR_TIMER, 128, /* miliseconds */ - NM_ATT_NY1, 10, /* 10 retransmissions of physical config */ - NM_ATT_BCCH_ARFCN, HARDCODED_ARFCN >> 8, HARDCODED_ARFCN & 0xff, - NM_ATT_BSIC, HARDCODED_BSIC, - NM_ATT_IPACC_CGI, 0, 7, 0x00, 0xf1, 0x10, 0x00, 0x01, 0x00, 0x00, -}; - -static unsigned char nanobts_attr_radio[] = { - NM_ATT_RF_MAXPOWR_R, 0x0c, /* number of -2dB reduction steps / Pn */ - NM_ATT_ARFCN_LIST, 0x00, 0x02, HARDCODED_ARFCN >> 8, HARDCODED_ARFCN & 0xff, -}; - -static unsigned char nanobts_attr_nse[] = { - NM_ATT_IPACC_NSEI, 0, 2, 0x03, 0x9d, /* NSEI 925 */ - /* all timers in seconds */ - NM_ATT_IPACC_NS_CFG, 0, 7, 3, /* (un)blocking timer (Tns-block) */ - 3, /* (un)blocking retries */ - 3, /* reset timer (Tns-reset) */ - 3, /* reset retries */ - 30, /* test timer (Tns-test) */ - 3, /* alive timer (Tns-alive) */ - 10, /* alive retrires */ - /* all timers in seconds, unless otherwise stated */ - NM_ATT_IPACC_BSSGP_CFG, 0, 11, - 3, /* blockimg timer (T1) */ - 3, /* blocking retries */ - 3, /* unblocking retries */ - 3, /* reset timer (T2) */ - 3, /* reset retries */ - 10, /* suspend timer (T3) in 100ms */ - 3, /* suspend retries */ - 10, /* resume timer (T4) in 100ms */ - 3, /* resume retries */ - 10, /* capability update timer (T5) */ - 3, /* capability update retries */ -}; - -static unsigned char nanobts_attr_cell[] = { - NM_ATT_IPACC_RAC, 0, 1, 1, /* routing area code */ - NM_ATT_IPACC_GPRS_PAGING_CFG, 0, 2, - 5, /* repeat time (50ms) */ - 3, /* repeat count */ - NM_ATT_IPACC_BVCI, 0, 2, 0x03, 0x9d, /* BVCI 925 */ - /* all timers in seconds, unless otherwise stated */ - NM_ATT_IPACC_RLC_CFG, 0, 9, - 20, /* T3142 */ - 5, /* T3169 */ - 5, /* T3191 */ - 160, /* T3193 (units of 10ms) */ - 5, /* T3195 */ - 10, /* N3101 */ - 4, /* N3103 */ - 8, /* N3105 */ - 15, /* RLC CV countdown */ - NM_ATT_IPACC_CODING_SCHEMES, 0, 2, 0x0f, 0x00, /* CS1..CS4 */ - NM_ATT_IPACC_RLC_CFG_2, 0, 5, - 0x00, 250, /* T downlink TBF extension (0..500) */ - 0x00, 250, /* T uplink TBF extension (0..500) */ - 2, /* CS2 */ -#if 0 - /* EDGE model only, breaks older models. - * Should inquire the BTS capabilities */ - NM_ATT_IPACC_RLC_CFG_3, 0, 1, - 2, /* MCS2 */ -#endif -}; - -static unsigned char nanobts_attr_nsvc0[] = { - NM_ATT_IPACC_NSVCI, 0, 2, 0x03, 0x9d, /* 925 */ - NM_ATT_IPACC_NS_LINK_CFG, 0, 8, - 0x59, 0xd8, /* remote udp port (23000) */ - 192, 168, 100, 11, /* remote ip address */ - 0x59, 0xd8, /* local udp port (23000) */ -}; - -static void patch_16(uint8_t *data, const uint16_t val) -{ - memcpy(data, &val, sizeof(val)); -} - -static void patch_32(uint8_t *data, const uint32_t val) -{ - memcpy(data, &val, sizeof(val)); -} - -/* - * Patch the various SYSTEM INFORMATION tables to update - * the LAI - */ -static void patch_nm_tables(struct gsm_bts *bts) -{ - uint8_t arfcn_low = bts->c0->arfcn & 0xff; - uint8_t arfcn_high = (bts->c0->arfcn >> 8) & 0x0f; - - /* patch ARFCN into BTS Attributes */ - nanobts_attr_bts[42] &= 0xf0; - nanobts_attr_bts[42] |= arfcn_high; - nanobts_attr_bts[43] = arfcn_low; - - /* patch the RACH attributes */ - if (bts->rach_b_thresh != -1) { - nanobts_attr_bts[33] = bts->rach_b_thresh & 0xff; - } - - if (bts->rach_ldavg_slots != -1) { - uint8_t avg_high = bts->rach_ldavg_slots & 0xff; - uint8_t avg_low = (bts->rach_ldavg_slots >> 8) & 0x0f; - - nanobts_attr_bts[35] = avg_high; - nanobts_attr_bts[36] = avg_low; - } - - /* patch BSIC */ - nanobts_attr_bts[sizeof(nanobts_attr_bts)-11] = bts->bsic; - - /* patch CGI */ - abis_nm_ipaccess_cgi(nanobts_attr_bts+sizeof(nanobts_attr_bts)-7, bts); - - /* patch CON_FAIL_CRIT */ - nanobts_attr_bts[13] = - get_radio_link_timeout(&bts->si_common.cell_options); - - /* patch the power reduction */ - nanobts_attr_radio[1] = bts->c0->max_power_red / 2; - - /* patch NSEI */ - nanobts_attr_nse[3] = bts->gprs.nse.nsei >> 8; - nanobts_attr_nse[4] = bts->gprs.nse.nsei & 0xff; - memcpy(nanobts_attr_nse+8, bts->gprs.nse.timer, - ARRAY_SIZE(bts->gprs.nse.timer)); - memcpy(nanobts_attr_nse+18, bts->gprs.cell.timer, - ARRAY_SIZE(bts->gprs.cell.timer)); - - /* patch NSVCI */ - nanobts_attr_nsvc0[3] = bts->gprs.nsvc[0].nsvci >> 8; - nanobts_attr_nsvc0[4] = bts->gprs.nsvc[0].nsvci & 0xff; - - /* patch IP address as SGSN IP */ - patch_16(nanobts_attr_nsvc0 + 8, - htons(bts->gprs.nsvc[0].remote_port)); - patch_32(nanobts_attr_nsvc0 + 10, - htonl(bts->gprs.nsvc[0].remote_ip)); - patch_16(nanobts_attr_nsvc0 + 14, - htons(bts->gprs.nsvc[0].local_port)); - - /* patch BVCI */ - nanobts_attr_cell[12] = bts->gprs.cell.bvci >> 8; - nanobts_attr_cell[13] = bts->gprs.cell.bvci & 0xff; - /* patch RAC */ - nanobts_attr_cell[3] = bts->gprs.rac; - - if (bts->gprs.mode == BTS_GPRS_EGPRS) { - /* patch EGPRS coding schemes MCS 1..9 */ - nanobts_attr_cell[29] = 0x8f; - nanobts_attr_cell[30] = 0xff; - } -} - -static uint8_t *nanobts_attr_bts_get(struct gsm_bts *bts, size_t *data_len) -{ - patch_nm_tables(bts); - *data_len = sizeof(nanobts_attr_bts); - return nanobts_attr_bts; -} - -static uint8_t *nanobts_attr_nse_get(struct gsm_bts *bts, size_t *data_len) -{ - patch_nm_tables(bts); - *data_len = sizeof(nanobts_attr_nse); - return nanobts_attr_nse; -} - -static uint8_t *nanobts_attr_cell_get(struct gsm_bts *bts, size_t *data_len) -{ - patch_nm_tables(bts); - *data_len = sizeof(nanobts_attr_cell); - return nanobts_attr_cell; -} - -static uint8_t *nanobts_attr_nscv_get(struct gsm_bts *bts, size_t *data_len) -{ - patch_nm_tables(bts); - *data_len = sizeof(nanobts_attr_nsvc0); - return nanobts_attr_nsvc0; -} - -static uint8_t *nanobts_attr_radio_get(struct gsm_bts *bts, size_t *data_len) -{ - patch_nm_tables(bts); - *data_len = sizeof(nanobts_attr_radio); - return nanobts_attr_radio; -} /* Callback function to be called whenever we get a GSM 12.21 state change event */ static int nm_statechg_event(int evt, struct nm_statechg_signal_data *nsd) @@ -318,8 +114,7 @@ struct gsm_bts_trx_ts *ts; struct gsm_bts_gprs_nsvc *nsvc; - uint8_t *data; - size_t data_len; + struct msgb *msgb; if (!is_ipaccess_bts(nsd->bts)) return 0; @@ -343,8 +138,9 @@ case NM_OC_BTS: bts = obj; if (new_state->availability == NM_AVSTATE_DEPENDENCY) { - data = nanobts_attr_bts_get(bts, &data_len); - abis_nm_set_bts_attr(bts, data, data_len); + msgb = nanobts_attr_bts_get(bts); + abis_nm_set_bts_attr(bts, msgb->data, msgb->len); + msgb_free(msgb); abis_nm_chg_adm_state(bts, obj_class, bts->bts_nr, 0xff, 0xff, NM_STATE_UNLOCKED); @@ -385,9 +181,11 @@ if (bts->gprs.mode == BTS_GPRS_NONE) break; if (new_state->availability == NM_AVSTATE_DEPENDENCY) { - data = nanobts_attr_nse_get(bts, &data_len); + msgb = nanobts_attr_nse_get(bts); abis_nm_ipaccess_set_attr(bts, obj_class, bts->bts_nr, - 0xff, 0xff, data, data_len); + 0xff, 0xff, msgb->data, + msgb->len); + msgb_free(msgb); abis_nm_opstart(bts, obj_class, bts->bts_nr, 0xff, 0xff); } @@ -397,9 +195,11 @@ if (bts->gprs.mode == BTS_GPRS_NONE) break; if (new_state->availability == NM_AVSTATE_DEPENDENCY) { - data = nanobts_attr_cell_get(bts, &data_len); + msgb = nanobts_attr_cell_get(bts); abis_nm_ipaccess_set_attr(bts, obj_class, bts->bts_nr, - 0, 0xff, data, data_len); + 0, 0xff, msgb->data, + msgb->len); + msgb_free(msgb); abis_nm_opstart(bts, obj_class, bts->bts_nr, 0, 0xff); abis_nm_chg_adm_state(bts, obj_class, bts->bts_nr, @@ -418,10 +218,11 @@ break; if ((new_state->availability == NM_AVSTATE_OFF_LINE) || (new_state->availability == NM_AVSTATE_DEPENDENCY)) { - data = nanobts_attr_nscv_get(bts, &data_len); + msgb = nanobts_attr_nscv_get(bts); abis_nm_ipaccess_set_attr(bts, obj_class, bts->bts_nr, nsvc->id, 0xff, - data, data_len); + msgb->data, msgb->len); + msgb_free(msgb); abis_nm_opstart(bts, obj_class, bts->bts_nr, nsvc->id, 0xff); abis_nm_chg_adm_state(bts, obj_class, bts->bts_nr, @@ -471,12 +272,9 @@ */ int rc_state = trx->mo.nm_state.administrative; /* Patch ARFCN into radio attribute */ - size_t data_len; - uint8_t *data = nanobts_attr_radio_get(trx->bts, &data_len); - data[5] &= 0xf0; - data[5] |= trx->arfcn >> 8; - data[6] = trx->arfcn & 0xff; - abis_nm_set_radio_attr(trx, data, data_len); + struct msgb *msgb = nanobts_attr_radio_get(trx->bts, trx); + abis_nm_set_radio_attr(trx, msgb->data, msgb->len); + msgb_free(msgb); abis_nm_chg_adm_state(trx->bts, foh->obj_class, trx->bts->bts_nr, trx->nr, 0xff, rc_state); diff --git a/openbsc/src/libbsc/bts_ipaccess_nanobts_omlattr.c b/openbsc/src/libbsc/bts_ipaccess_nanobts_omlattr.c new file mode 100644 index 0000000..7c0ae86 --- /dev/null +++ b/openbsc/src/libbsc/bts_ipaccess_nanobts_omlattr.c @@ -0,0 +1,232 @@ +/* ip.access nanoBTS specific code, OML attribute table generator */ + +/* (C) 2009-2010 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 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 + +static void patch_16(uint8_t *data, const uint16_t val) +{ + memcpy(data, &val, sizeof(val)); +} + +static void patch_32(uint8_t *data, const uint32_t val) +{ + memcpy(data, &val, sizeof(val)); +} + +struct msgb *nanobts_attr_bts_get(struct gsm_bts *bts) +{ + struct msgb *msgb; + uint8_t buf[256]; + msgb = msgb_alloc(1024, "nanobts_attr_bts"); + + memcpy(buf, "\x55\x5b\x61\x67\x6d\x73", 6); + msgb_tv_fixed_put(msgb, NM_ATT_INTERF_BOUND, 6, buf); + + /* interference avg. period in numbers of SACCH multifr */ + msgb_tv_put(msgb, NM_ATT_INTAVE_PARAM, 0x06); + + /* conn fail based on SACCH error rate */ + buf[0] = 0x01; + buf[1] = get_radio_link_timeout(&bts->si_common.cell_options); + msgb_tl16v_put(msgb, NM_ATT_CONN_FAIL_CRIT, 2, buf); + + memcpy(buf, "\x1e\x24\x24\xa8\x34\x21\xa8", 7); + msgb_tv_fixed_put(msgb, NM_ATT_T200, 7, buf); + + msgb_tv_put(msgb, NM_ATT_MAX_TA, 0x3f); + + /* seconds */ + memcpy(buf, "\x00\x01\x0a", 3); + msgb_tv_fixed_put(msgb, NM_ATT_OVERL_PERIOD, 3, buf); + + /* percent */ + msgb_tv_put(msgb, NM_ATT_CCCH_L_T, 10); + + /* seconds */ + msgb_tv_put(msgb, NM_ATT_CCCH_L_I_P, 1); + + /* busy threshold in - dBm */ + buf[0] = 10; + if (bts->rach_b_thresh != -1) + buf[0] = bts->rach_b_thresh & 0xff; + msgb_tv_put(msgb, NM_ATT_RACH_B_THRESH, buf[0]); + + /* rach load averaging 1000 slots */ + buf[0] = 0x03; + buf[1] = 0xe8; + if (bts->rach_ldavg_slots != -1) { + buf[0] = (bts->rach_ldavg_slots >> 8) & 0x0f; + buf[1] = bts->rach_ldavg_slots & 0xff; + } + msgb_tv_fixed_put(msgb, NM_ATT_LDAVG_SLOTS, 2, buf); + + /* miliseconds */ + msgb_tv_put(msgb, NM_ATT_BTS_AIR_TIMER, 128); + + /* 10 retransmissions of physical config */ + msgb_tv_put(msgb, NM_ATT_NY1, 10); + + buf[0] = (bts->c0->arfcn >> 8) & 0x0f; + buf[1] = bts->c0->arfcn & 0xff; + msgb_tv_fixed_put(msgb, NM_ATT_BCCH_ARFCN, 2, buf); + + msgb_tv_put(msgb, NM_ATT_BSIC, bts->bsic); + + abis_nm_ipaccess_cgi(buf, bts); + msgb_tl16v_put(msgb, NM_ATT_IPACC_CGI, 7, buf); + + return msgb; +} + +struct msgb *nanobts_attr_nse_get(struct gsm_bts *bts) +{ + struct msgb *msgb; + uint8_t buf[256]; + msgb = msgb_alloc(1024, "nanobts_attr_bts"); + + /* NSEI 925 */ + buf[0] = bts->gprs.nse.nsei >> 8; + buf[1] = bts->gprs.nse.nsei & 0xff; + msgb_tl16v_put(msgb, NM_ATT_IPACC_NSEI, 2, buf); + + /* all timers in seconds */ + OSMO_ASSERT(ARRAY_SIZE(bts->gprs.nse.timer) < sizeof(buf)); + memcpy(buf, bts->gprs.nse.timer, ARRAY_SIZE(bts->gprs.nse.timer)); + msgb_tl16v_put(msgb, NM_ATT_IPACC_NS_CFG, 7, buf); + + /* all timers in seconds */ + buf[0] = 3; /* blockimg timer (T1) */ + buf[1] = 3; /* blocking retries */ + buf[2] = 3; /* unblocking retries */ + buf[3] = 3; /* reset timer (T2) */ + buf[4] = 3; /* reset retries */ + buf[5] = 10; /* suspend timer (T3) in 100ms */ + buf[6] = 3; /* suspend retries */ + buf[7] = 10; /* resume timer (T4) in 100ms */ + buf[8] = 3; /* resume retries */ + buf[9] = 10; /* capability update timer (T5) */ + buf[10] = 3; /* capability update retries */ + + OSMO_ASSERT(ARRAY_SIZE(bts->gprs.cell.timer) < sizeof(buf)); + memcpy(buf, bts->gprs.cell.timer, ARRAY_SIZE(bts->gprs.cell.timer)); + msgb_tl16v_put(msgb, NM_ATT_IPACC_BSSGP_CFG, 11, buf); + + return msgb; +} + +struct msgb *nanobts_attr_cell_get(struct gsm_bts *bts) +{ + struct msgb *msgb; + uint8_t buf[256]; + msgb = msgb_alloc(1024, "nanobts_attr_bts"); + + /* routing area code */ + buf[0] = bts->gprs.rac; + msgb_tl16v_put(msgb, NM_ATT_IPACC_RAC, 1, buf); + + buf[0] = 5; /* repeat time (50ms) */ + buf[1] = 3; /* repeat count */ + msgb_tl16v_put(msgb, NM_ATT_IPACC_GPRS_PAGING_CFG, 2, buf); + + /* BVCI 925 */ + buf[0] = bts->gprs.cell.bvci >> 8; + buf[1] = bts->gprs.cell.bvci & 0xff; + msgb_tl16v_put(msgb, NM_ATT_IPACC_BVCI, 2, buf); + + /* all timers in seconds, unless otherwise stated */ + buf[0] = 20; /* T3142 */ + buf[1] = 5; /* T3169 */ + buf[2] = 5; /* T3191 */ + buf[3] = 160; /* T3193 (units of 10ms) */ + buf[4] = 5; /* T3195 */ + buf[5] = 10; /* N3101 */ + buf[6] = 4; /* N3103 */ + buf[7] = 8; /* N3105 */ + buf[8] = 15; /* RLC CV countdown */ + msgb_tl16v_put(msgb, NM_ATT_IPACC_RLC_CFG, 9, buf); + + if (bts->gprs.mode == BTS_GPRS_EGPRS) { + buf[0] = 0x8f; + buf[1] = 0xff; + } else { + buf[0] = 0x0f; + buf[1] = 0x00; + } + msgb_tl16v_put(msgb, NM_ATT_IPACC_CODING_SCHEMES, 2, buf); + + buf[0] = 0; /* T downlink TBF extension (0..500, high byte) */ + buf[1] = 250; /* T downlink TBF extension (0..500, low byte) */ + buf[2] = 0; /* T uplink TBF extension (0..500, high byte) */ + buf[3] = 250; /* T uplink TBF extension (0..500, low byte) */ + buf[4] = 2; /* CS2 */ + msgb_tl16v_put(msgb, NM_ATT_IPACC_RLC_CFG_2, 5, buf); + +#if 0 + /* EDGE model only, breaks older models. + * Should inquire the BTS capabilities */ + buf[0] = 2; /* MCS2 */ + msgb_tl16v_put(msgb, NM_ATT_IPACC_RLC_CFG_3, 1, buf); +#endif + + return msgb; +} + +struct msgb *nanobts_attr_nscv_get(struct gsm_bts *bts) +{ + struct msgb *msgb; + uint8_t buf[256]; + msgb = msgb_alloc(1024, "nanobts_attr_bts"); + + /* 925 */ + buf[0] = bts->gprs.nsvc[0].nsvci >> 8; + buf[1] = bts->gprs.nsvc[0].nsvci & 0xff; + msgb_tl16v_put(msgb, NM_ATT_IPACC_NSVCI, 2, buf); + + /* remote udp port */ + patch_16(&buf[0], htons(bts->gprs.nsvc[0].remote_port)); + /* remote ip address */ + patch_32(&buf[2], htonl(bts->gprs.nsvc[0].remote_ip)); + /* local udp port */ + patch_16(&buf[6], htons(bts->gprs.nsvc[0].local_port)); + msgb_tl16v_put(msgb, NM_ATT_IPACC_NS_LINK_CFG, 8, buf); + + return msgb; +} + +struct msgb *nanobts_attr_radio_get(struct gsm_bts *bts, + struct gsm_bts_trx *trx) +{ + struct msgb *msgb; + uint8_t buf[256]; + msgb = msgb_alloc(1024, "nanobts_attr_bts"); + + /* number of -2dB reduction steps / Pn */ + msgb_tv_put(msgb, NM_ATT_RF_MAXPOWR_R, bts->c0->max_power_red / 2); + + buf[0] = trx->arfcn >> 8; + buf[1] = trx->arfcn & 0xff; + msgb_tl16v_put(msgb, NM_ATT_ARFCN_LIST, 2, buf); + + return msgb; +} diff --git a/openbsc/tests/Makefile.am b/openbsc/tests/Makefile.am index 0ebd2e2..399eb48 100644 --- a/openbsc/tests/Makefile.am +++ b/openbsc/tests/Makefile.am @@ -13,6 +13,7 @@ sndcp_xid \ slhc \ v42bis \ + nanobts_omlattr \ $(NULL) if BUILD_NAT diff --git a/openbsc/tests/nanobts_omlattr/Makefile.am b/openbsc/tests/nanobts_omlattr/Makefile.am new file mode 100644 index 0000000..b03d50c --- /dev/null +++ b/openbsc/tests/nanobts_omlattr/Makefile.am @@ -0,0 +1,34 @@ +AM_CPPFLAGS = \ + $(all_includes) \ + -I$(top_srcdir)/include \ + $(NULL) + +AM_CFLAGS = \ + -Wall \ + $(LIBOSMOCORE_CFLAGS) \ + $(LIBOSMOGSM_CFLAGS) \ + $(LIBOSMOABIS_CFLAGS) \ + $(NULL) + +noinst_PROGRAMS = \ + nanobts_omlattr_test \ + $(NULL) + +EXTRA_DIST = \ + nanobts_omlattr_test.ok \ + $(NULL) + +nanobts_omlattr_test_SOURCES = \ + nanobts_omlattr_test.c \ + $(NULL) + +nanobts_omlattr_test_LDADD = \ + $(top_builddir)/src/libbsc/libbsc.a \ + $(top_builddir)/src/libmsc/libmsc.a \ + $(top_builddir)/src/libtrau/libtrau.a \ + $(top_builddir)/src/libcommon/libcommon.a \ + $(LIBOSMOCORE_LIBS) \ + $(LIBOSMOGSM_LIBS) \ + $(LIBOSMOABIS_LIBS) \ + -ldbi \ + $(NULL) diff --git a/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c b/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c new file mode 100644 index 0000000..c394b8f --- /dev/null +++ b/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c @@ -0,0 +1,283 @@ +/* Test OML attribute generator */ + +/* (C) 2016 by sysmocom s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * 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 + +#include +#include + +struct gsm_bts_model bts_model_nanobts = { + .type = GSM_BTS_TYPE_NANOBTS, + .name = "nanobts", + .start = NULL, + .oml_rcvmsg = NULL, + .e1line_bind_ops = NULL, + .nm_att_tlvdef = { + .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 void test_nanobts_attr_bts_get(struct gsm_bts *bts, uint8_t *expected) +{ + struct msgb *msgb; + + printf("Testing nanobts_attr_bts_get()...\n"); + + msgb = nanobts_attr_bts_get(bts); + printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len)); + printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len)); + OSMO_ASSERT(memcmp(msgb->data, expected, msgb->len) == 0); + msgb_free(msgb); + + printf("ok.\n"); + printf("\n"); +} + +static void test_nanobts_attr_nse_get(struct gsm_bts *bts, uint8_t *expected) +{ + struct msgb *msgb; + + printf("Testing nanobts_attr_nse_get()...\n"); + + msgb = nanobts_attr_nse_get(bts); + printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len)); + printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len)); + OSMO_ASSERT(memcmp(msgb->data, expected, msgb->len) == 0); + msgb_free(msgb); + + printf("ok.\n"); + printf("\n"); +} + +static void test_nanobts_attr_cell_get(struct gsm_bts *bts, uint8_t *expected) +{ + struct msgb *msgb; + + printf("Testing nanobts_attr_cell_get()...\n"); + + msgb = nanobts_attr_cell_get(bts); + printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len)); + printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len)); + OSMO_ASSERT(memcmp(msgb->data, expected, msgb->len) == 0); + msgb_free(msgb); + + printf("ok.\n"); + printf("\n"); +} + +static void test_nanobts_attr_nscv_get(struct gsm_bts *bts, uint8_t *expected) +{ + struct msgb *msgb; + + printf("Testing nanobts_attr_nscv_get()...\n"); + + msgb = nanobts_attr_nscv_get(bts); + printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len)); + printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len)); + OSMO_ASSERT(memcmp(msgb->data, expected, msgb->len) == 0); + msgb_free(msgb); + + printf("ok.\n"); + printf("\n"); +} + +static void test_nanobts_attr_radio_get(struct gsm_bts *bts, + struct gsm_bts_trx *trx, + uint8_t *expected) +{ + struct msgb *msgb; + + printf("Testing nanobts_attr_nscv_get()...\n"); + + msgb = nanobts_attr_radio_get(bts, trx); + printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len)); + printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len)); + OSMO_ASSERT(memcmp(msgb->data, expected, msgb->len) == 0); + msgb_free(msgb); + + printf("ok.\n"); + printf("\n"); +} + +int main(int argc, char **argv) +{ + void *ctx; + + struct gsm_bts *bts; + struct gsm_network *net; + struct gsm_bts_trx *trx; + + ctx = talloc_named_const(NULL, 0, "ctx"); + + /* Allocate environmental structs (bts, net, trx) */ + net = talloc_zero(ctx, struct gsm_network); + INIT_LLIST_HEAD(&net->bts_list); + gsm_bts_model_register(&bts_model_nanobts); + bts = gsm_bts_alloc_register(net, GSM_BTS_TYPE_NANOBTS, 63); + OSMO_ASSERT(bts); + trx = talloc_zero(ctx, struct gsm_bts_trx); + + /* Parameters needed by nanobts_attr_bts_get() */ + bts->rach_b_thresh = -1; + bts->rach_ldavg_slots = -1; + bts->c0->arfcn = 866; + bts->cell_identity = 1337; + bts->network->country_code = 1; + bts->network->network_code = 1; + bts->location_area_code = 1; + bts->gprs.rac = 0; + uint8_t attr_bts_expected[] = + { 0x19, 0x55, 0x5b, 0x61, 0x67, 0x6d, 0x73, 0x18, 0x06, 0x0e, 0x00, + 0x02, 0x01, 0x20, 0x33, 0x1e, 0x24, 0x24, 0xa8, 0x34, 0x21, + 0xa8, 0x1f, 0x3f, 0x25, + 0x00, 0x01, 0x0a, 0x0c, 0x0a, 0x0b, 0x01, 0x2a, 0x0a, 0x2b, + 0x03, 0xe8, 0x0a, 0x80, + 0x23, 0x0a, 0x08, 0x03, 0x62, 0x09, 0x3f, 0x99, 0x00, 0x07, + 0x00, 0xf1, 0x10, 0x00, + 0x01, 0x05, 0x39 + }; + + /* Parameters needed to test nanobts_attr_nse_get() */ + bts->gprs.nse.nsei = 101; + uint8_t attr_nse_expected[] = + { 0x9d, 0x00, 0x02, 0x00, 0x65, 0xa0, 0x00, 0x07, 0x03, 0x03, 0x03, + 0x03, 0x1e, 0x03, 0x0a, 0xa1, 0x00, 0x0b, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x0a, 0x03, + 0x0a, 0x03, 0x0a, 0x03 + }; + + /* Parameters needed to test nanobts_attr_cell_get() */ + bts->gprs.rac = 0x00; + bts->gprs.cell.bvci = 2; + bts->gprs.mode = BTS_GPRS_GPRS; + uint8_t attr_cell_expected[] = + { 0x9a, 0x00, 0x01, 0x00, 0x9c, 0x00, 0x02, 0x05, 0x03, 0x9e, 0x00, + 0x02, 0x00, 0x02, 0xa3, 0x00, 0x09, 0x14, 0x05, 0x05, 0xa0, + 0x05, 0x0a, 0x04, 0x08, + 0x0f, 0xa8, 0x00, 0x02, 0x0f, 0x00, 0xa9, 0x00, 0x05, 0x00, + 0xfa, 0x00, 0xfa, 0x02 + }; + + /* Parameters needed to test nanobts_attr_nscv_get() */ + bts->gprs.nsvc[0].nsvci = 0x65; + bts->gprs.nsvc[0].remote_port = 0x59d8; + bts->gprs.nsvc[0].remote_ip = 0x0a090165; + bts->gprs.nsvc[0].local_port = 0x5a3c; + uint8_t attr_nscv_expected[] = + { 0x9f, 0x00, 0x02, 0x00, 0x65, 0xa2, 0x00, 0x08, 0x59, 0xd8, 0x0a, + 0x09, 0x01, 0x65, 0x5a, 0x3c + }; + + /* Parameters needed to test nanobts_attr_radio_get() */ + trx->arfcn = 866; + bts->c0->max_power_red = 22; + uint8_t attr_radio_expected[] = + { 0x2d, 0x0b, 0x05, 0x00, 0x02, 0x03, 0x62 }; + + /* Run tests */ + test_nanobts_attr_bts_get(bts, attr_bts_expected); + test_nanobts_attr_nse_get(bts, attr_nse_expected); + test_nanobts_attr_cell_get(bts, attr_cell_expected); + test_nanobts_attr_nscv_get(bts, attr_nscv_expected); + test_nanobts_attr_radio_get(bts, trx, attr_radio_expected); + + printf("Done\n"); + talloc_free(bts); + talloc_free(net); + talloc_free(trx); + talloc_report_full(ctx, stderr); + OSMO_ASSERT(talloc_total_blocks(ctx) == 1); + return 0; +} + +/* stubs */ +struct osmo_prim_hdr; +int bssgp_prim_cb(struct osmo_prim_hdr *oph, void *ctx) +{ + abort(); +} diff --git a/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.ok b/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.ok new file mode 100644 index 0000000..91b655f --- /dev/null +++ b/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.ok @@ -0,0 +1,26 @@ +Testing nanobts_attr_bts_get()... +result= 19555b61676d7318060e00020120331e2424a83421a81f3f2500010a0c0a0b012a0a2b03e80a80230a080362093f99000700f11000010539 +expected=19555b61676d7318060e00020120331e2424a83421a81f3f2500010a0c0a0b012a0a2b03e80a80230a080362093f99000700f11000010539 +ok. + +Testing nanobts_attr_nse_get()... +result= 9d00020065a00007030303031e030aa1000b03030303030a030a030a03 +expected=9d00020065a00007030303031e030aa1000b03030303030a030a030a03 +ok. + +Testing nanobts_attr_cell_get()... +result= 9a0001009c000205039e00020002a30009140505a0050a04080fa800020f00a9000500fa00fa02 +expected=9a0001009c000205039e00020002a30009140505a0050a04080fa800020f00a9000500fa00fa02 +ok. + +Testing nanobts_attr_nscv_get()... +result= 9f00020065a2000859d80a0901655a3c +expected=9f00020065a2000859d80a0901655a3c +ok. + +Testing nanobts_attr_nscv_get()... +result= 2d0b0500020362 +expected=2d0b0500020362 +ok. + +Done diff --git a/openbsc/tests/testsuite.at b/openbsc/tests/testsuite.at index f18b734..c2b8725 100644 --- a/openbsc/tests/testsuite.at +++ b/openbsc/tests/testsuite.at @@ -147,3 +147,9 @@ cat $abs_srcdir/v42bis/v42bis_test.ok > expout AT_CHECK([$abs_top_builddir/tests/v42bis/v42bis_test], [], [expout], [ignore]) AT_CLEANUP + +AT_SETUP([nanobts_omlattr]) +AT_KEYWORDS([nanobts_omlattr]) +cat $abs_srcdir/nanobts_omlattr/nanobts_omlattr_test.ok > expout +AT_CHECK([$abs_top_builddir/tests/nanobts_omlattr/nanobts_omlattr_test], [], [expout], [ignore]) +AT_CLEANUP -- To view, visit https://gerrit.osmocom.org/973 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibeb34a84912d6cf695f553a34c69320fca7d08fa Gerrit-PatchSet: 2 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 Thu Oct 6 13:58:55 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 6 Oct 2016 13:58:55 +0000 Subject: [PATCH] libosmo-abis[master]: Really fix order of set_connected_mode and set_remote_addr Message-ID: Review at https://gerrit.osmocom.org/1011 Really fix order of set_connected_mode and set_remote_addr This reverts commit c77c2a6aa13accbc558888ab788d1148eb9aeb1a, and explicitly sets connected mode to zero for set_remote_addr to work around internal libortp problems. See https://osmocom.org/issues/1661#note-15. Related: OS#1661 Change-Id: I9d146c3bd76e02685b09278167b56029152221a0 --- M src/trau/osmo_ortp.c 1 file changed, 12 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/11/1011/1 diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index 5441337..6ce70d2 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -389,17 +389,23 @@ return 0; } + /* We don't want the connected mode enabled during + * rtp_session_set_remote_addr(), because that will already setup a + * connection and updating the remote address will no longer have an + * effect. Contrary to what one may expect, this must be 0 at first, + * and we're setting to 1 further down to establish a connection once + * the first RTP packet is received (OS#1661). */ + rtp_session_set_connected_mode(rs->sess, 0); + + rc = rtp_session_set_remote_addr(rs->sess, ip, port); + if (rc < 0) + return rc; + /* enable the use of connect() so later getsockname() will * actually return the IP address that was chosen for the local * sid of the connection */ rtp_session_set_connected_mode(rs->sess, 1); rs->flags &= ~OSMO_RTP_F_DISABLED; - - /* This call attempts to connect to the remote address, so make sure to - * set all other rtp session configuration before this call. */ - rc = rtp_session_set_remote_addr(rs->sess, ip, port); - if (rc < 0) - return rc; if (rs->flags & OSMO_RTP_F_POLL) return rc; -- To view, visit https://gerrit.osmocom.org/1011 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9d146c3bd76e02685b09278167b56029152221a0 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 6 14:03:43 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 6 Oct 2016 14:03:43 +0000 Subject: [PATCH] osmo-bts[master]: octphy: prevent mismatch between dsp-firmware and octphy hea... Message-ID: Review at https://gerrit.osmocom.org/1012 octphy: prevent mismatch between dsp-firmware and octphy headers in its current statue l1_oml.c does not check if the version number in the header files (octvc1_main_version.h) matches up the version that is reported from the DSP during startip. This patch ads a check to make sure that the currently loaded firmware and the headers used during compile time match. If a mismatch is detected, osmo-bts exits immediately. Change-Id: Icba5756517d632d53b129c5ce1a1dab4936dab91 --- M src/osmo-bts-octphy/l1_oml.c 1 file changed, 20 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/12/1012/1 diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c index 88dc041..41acaaf 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -50,6 +50,7 @@ #include #include #include +#include int trx_locked = 0; @@ -1209,28 +1210,41 @@ return l1if_req_compl(fl1h, msg, app_info_sys_compl_cb, 0); } -static int app_info_compl_cb(struct octphy_hdl *fl1h, struct msgb *resp, void *data) +static int app_info_compl_cb(struct octphy_hdl *fl1h, struct msgb *resp, + void *data) { + char ver_hdr[32]; + tOCTVC1_MAIN_MSG_APPLICATION_INFO_RSP *air = (tOCTVC1_MAIN_MSG_APPLICATION_INFO_RSP *) resp->l2h; - /* in a completion call-back, we take msgb ownership and must - * release it before returning */ + sprintf(ver_hdr, "%02i.%02i.%02i-B%i", cOCTVC1_MAIN_VERSION_MAJOR, + cOCTVC1_MAIN_VERSION_MINOR, cOCTVC1_MAIN_VERSION_MAINTENANCE, + cOCTVC1_MAIN_VERSION_BUILD); mOCTVC1_MAIN_MSG_APPLICATION_INFO_RSP_SWAP(air); - LOGP(DL1C, LOGL_INFO, "Rx APP-INFO.resp (name='%s', desc='%s', ver='%s')\n", - air->szName, air->szDescription, air->szVersion); + LOGP(DL1C, LOGL_INFO, + "Rx APP-INFO.resp (name='%s', desc='%s', ver='%s', ver_hdr='%s')\n", + air->szName, air->szDescription, air->szVersion, ver_hdr); + + /* Bail if dsp firmware does not match up the header version info */ + if (strcmp(air->szVersion, ver_hdr) != 0) { + LOGP(DL1C, LOGL_ERROR, + "Invalid header-file / dsp-firmware combination, exiting...\n"); + exit(1); + } talloc_replace(fl1h->info.app.name, fl1h, air->szName); talloc_replace(fl1h->info.app.description, fl1h, air->szDescription); talloc_replace(fl1h->info.app.version, fl1h, air->szVersion); + /* in a completion call-back, we take msgb ownership and must + * release it before returning */ msgb_free(resp); return 0; } - int l1if_check_app_version(struct gsm_bts_trx *trx) { -- To view, visit https://gerrit.osmocom.org/1012 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icba5756517d632d53b129c5ce1a1dab4936dab91 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Thu Oct 6 14:13:57 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 6 Oct 2016 14:13:57 +0000 Subject: libosmo-abis[master]: Really fix order of set_connected_mode and set_remote_addr In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1011 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9d146c3bd76e02685b09278167b56029152221a0 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 Thu Oct 6 17:31:01 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 6 Oct 2016 17:31:01 +0000 Subject: [PATCH] openggsn[master]: fix gsn_restart file buffer overflow and missing path sep Message-ID: Review at https://gerrit.osmocom.org/1013 fix gsn_restart file buffer overflow and missing path sep Fix errors during gsn_restart file path composition: - possible buffer overflow because the wrong remaining length was fed to strncat(). - missing path separator: put restart file in dir/gsn_restart instead of ../dirgsn_restart. This assumes that the path separator is '/'. Use talloc_asprintf() to fix all filename length problems and shorten the code. In order to free the allocated path, add a free_filename label, and jump there instead of returning from the fopen("w") failure branch. Also don't return from "fclose failed" branch in order to free the path, remove the if {} braces. Remove the NAMESIZE constant that is now unused. Change-Id: Idf0a64ff45720aa818f2f9de1e8ba2fe2c82631b --- M gtp/gtp.c M gtp/gtp.h 2 files changed, 8 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openggsn refs/changes/13/1013/1 diff --git a/gtp/gtp.c b/gtp/gtp.c index 12cb492..161a6f0 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -646,13 +646,11 @@ FILE *f; int i, rc; int counter = 0; - char filename[NAMESIZE]; - - filename[NAMESIZE - 1] = 0; /* No null term. guarantee by strncpy */ - strncpy(filename, gsn->statedir, NAMESIZE - 1); - strncat(filename, RESTART_FILE, NAMESIZE - 1 - sizeof(RESTART_FILE)); - + char *filename; + i = umask(022); + filename = talloc_asprintf(NULL, "%s/%s", gsn->statedir, RESTART_FILE); + OSMO_ASSERT(filename); /* We try to open file. On failure we will later try to create file */ if (!(f = fopen(filename, "r"))) { @@ -680,17 +678,17 @@ LOGP(DLGTP, LOGL_ERROR, "fopen(path=%s, mode=%s) failed: Error = %s\n", filename, "w", strerror(errno)); - return; + goto free_filename; } umask(i); fprintf(f, "%d\n", gsn->restart_counter); close_file: - if (fclose(f)) { + if (fclose(f)) LOGP(DLGTP, LOGL_ERROR, "fclose failed: Error = %s\n", strerror(errno)); - return; - } +free_filename: + talloc_free(filename); } int gtp_new(struct gsn_t **gsn, char *statedir, struct in_addr *listen, diff --git a/gtp/gtp.h b/gtp/gtp.h index 539e255..1434e1e 100644 --- a/gtp/gtp.h +++ b/gtp/gtp.h @@ -29,7 +29,6 @@ #define ERRMSG_SIZE 255 #define RESTART_FILE "gsn_restart" -#define NAMESIZE 1024 /* GTP version 1 extension header type definitions. */ #define GTP_EXT_PDCP_PDU 0xC0 /* PDCP PDU Number */ -- To view, visit https://gerrit.osmocom.org/1013 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idf0a64ff45720aa818f2f9de1e8ba2fe2c82631b Gerrit-PatchSet: 1 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 6 17:31:01 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 6 Oct 2016 17:31:01 +0000 Subject: [PATCH] openggsn[master]: gsn_restart file: set umask back to original after write fai... Message-ID: Review at https://gerrit.osmocom.org/1014 gsn_restart file: set umask back to original after write failure An fopen("w") error used to omit the umask() call to reinstate the previous umask. Move the final umask() call to the bottom so that it is called in all code paths. Change-Id: If7d948e2f2ba47ecebba5614f18235a53b273d14 --- M gtp/gtp.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openggsn refs/changes/14/1014/1 diff --git a/gtp/gtp.c b/gtp/gtp.c index 161a6f0..a46a76f 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -681,7 +681,6 @@ goto free_filename; } - umask(i); fprintf(f, "%d\n", gsn->restart_counter); close_file: if (fclose(f)) @@ -689,6 +688,7 @@ "fclose failed: Error = %s\n", strerror(errno)); free_filename: talloc_free(filename); + umask(i); } int gtp_new(struct gsn_t **gsn, char *statedir, struct in_addr *listen, -- To view, visit https://gerrit.osmocom.org/1014 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If7d948e2f2ba47ecebba5614f18235a53b273d14 Gerrit-PatchSet: 1 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 6 17:33:05 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 6 Oct 2016 17:33:05 +0000 Subject: [PATCH] openggsn[master]: build: be robust against install-sh files above the root dir Message-ID: Review at https://gerrit.osmocom.org/1015 build: be robust against install-sh files above the root dir Explicitly set AC_CONFIG_AUX_DIR. To reproduce the error avoided by this patch: rm install-sh # in case it was already generated. touch ../install-sh # yes, outside this source tree autoreconf -fi This will produce an error like ... configure.ac:16: error: required file '../ltmain.sh' not found configure.ac:5: installing '../missing' src/Makefile.am: installing '../depcomp' autoreconf: automake failed with exit status: 1 See also automake (vim `which automake`) and look for 'sub locate_aux_dir'. Change-Id: I4aef311d7a475800e09f48110a499c3759c69f5d --- M configure.ac 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openggsn refs/changes/15/1015/1 diff --git a/configure.ac b/configure.ac index 9b8d988..d0593fb 100644 --- a/configure.ac +++ b/configure.ac @@ -4,6 +4,9 @@ AM_CONFIG_HEADER([config.h]) #AC_CONFIG_HEADER([config.h]) +dnl *This* is the root dir, even if an install-sh exists in ../ or ../../ +AC_CONFIG_AUX_DIR([.]) + AC_CANONICAL_SYSTEM dnl kernel style compile messages -- To view, visit https://gerrit.osmocom.org/1015 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4aef311d7a475800e09f48110a499c3759c69f5d Gerrit-PatchSet: 1 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 6 17:33:05 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 6 Oct 2016 17:33:05 +0000 Subject: [PATCH] openggsn[master]: configure: check for pkg-config presence Message-ID: Review at https://gerrit.osmocom.org/1016 configure: check for pkg-config presence Change-Id: I658152eb24fd783fce9ceac35872ab918c80209a --- M configure.ac 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openggsn refs/changes/16/1016/1 diff --git a/configure.ac b/configure.ac index d0593fb..ae8dca3 100644 --- a/configure.ac +++ b/configure.ac @@ -20,6 +20,13 @@ AC_PROG_CXX LT_INIT +dnl check for pkg-config (explained in detail in libosmocore/configure.ac) +AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no) +if test "x$PKG_CONFIG_INSTALLED" = "xno"; then + AC_MSG_WARN([You need to install pkg-config]) +fi +PKG_PROG_PKG_CONFIG([0.20]) + AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_LIBOBJ_DIR([lib]) -- To view, visit https://gerrit.osmocom.org/1016 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I658152eb24fd783fce9ceac35872ab918c80209a Gerrit-PatchSet: 1 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 6 21:23:51 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 6 Oct 2016 21:23:51 +0000 Subject: [PATCH] libosmo-abis[master]: jenkins.sh: cosmetic: export instead of inlining PATH env Message-ID: Review at https://gerrit.osmocom.org/1017 jenkins.sh: cosmetic: export instead of inlining PATH env Change-Id: I24a383140f2f84e90ab743691bcbf041de7b034d --- M contrib/jenkins.sh 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/17/1017/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 772b85d..e315b4f 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -14,6 +14,8 @@ cd ../../ autoreconf --install --force -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH ./configure -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH $MAKE $PARALLEL_MAKE -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE distcheck +export PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH +export LD_LIBRARY_PATH=$PWD/deps/install/lib +./configure +$MAKE $PARALLEL_MAKE +$MAKE distcheck -- To view, visit https://gerrit.osmocom.org/1017 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I24a383140f2f84e90ab743691bcbf041de7b034d Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 6 21:23:51 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 6 Oct 2016 21:23:51 +0000 Subject: [PATCH] libosmo-abis[master]: jenkins.sh: use osmo-build-dep.sh, print separator Message-ID: Review at https://gerrit.osmocom.org/1018 jenkins.sh: use osmo-build-dep.sh, print separator Change-Id: I36ce41c669ffb123ec0741061e357a94baee6460 --- M contrib/jenkins.sh 1 file changed, 13 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/18/1018/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index e315b4f..7f3901f 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -2,17 +2,21 @@ set -ex -rm -rf deps/install -mkdir deps || true -cd deps -osmo-deps.sh libosmocore +base="$PWD" +deps="$base/deps" +inst="$deps/install" -cd libosmocore -autoreconf --install --force -./configure --prefix=$PWD/../install -$MAKE $PARALLEL_MAKE install +mkdir "$deps" || true +rm -rf "$inst" -cd ../../ +osmo-build-dep.sh libosmocore + +echo +echo +echo +echo " =============================== libosmo-abis ===============================" +echo + autoreconf --install --force export PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH export LD_LIBRARY_PATH=$PWD/deps/install/lib -- To view, visit https://gerrit.osmocom.org/1018 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I36ce41c669ffb123ec0741061e357a94baee6460 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 6 21:24:44 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 6 Oct 2016 21:24:44 +0000 Subject: [PATCH] libosmo-abis[master]: jenkins.sh: call cat-testlogs.sh on check failure Message-ID: Review at https://gerrit.osmocom.org/1019 jenkins.sh: call cat-testlogs.sh on check failure Change-Id: I60e70d290c41633528b39401219746ccf0f93784 --- M contrib/jenkins.sh 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/19/1019/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 7f3901f..f4d31dd 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -22,4 +22,5 @@ export LD_LIBRARY_PATH=$PWD/deps/install/lib ./configure $MAKE $PARALLEL_MAKE -$MAKE distcheck +$MAKE distcheck \ + || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/1019 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I60e70d290c41633528b39401219746ccf0f93784 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 6 21:30:57 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 6 Oct 2016 21:30:57 +0000 Subject: [PATCH] libosmo-abis[master]: jenkins.sh: use osmo-build-dep.sh, print separator In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1018 to look at the new patch set (#2). jenkins.sh: use osmo-build-dep.sh, print separator Change-Id: I36ce41c669ffb123ec0741061e357a94baee6460 --- M contrib/jenkins.sh 1 file changed, 14 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/18/1018/2 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index e315b4f..6f67243 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -2,17 +2,22 @@ set -ex -rm -rf deps/install -mkdir deps || true -cd deps -osmo-deps.sh libosmocore +base="$PWD" +deps="$base/deps" +inst="$deps/install" +export deps inst -cd libosmocore -autoreconf --install --force -./configure --prefix=$PWD/../install -$MAKE $PARALLEL_MAKE install +mkdir "$deps" || true +rm -rf "$inst" -cd ../../ +osmo-build-dep.sh libosmocore + +echo +echo +echo +echo " =============================== libosmo-abis ===============================" +echo + autoreconf --install --force export PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH export LD_LIBRARY_PATH=$PWD/deps/install/lib -- To view, visit https://gerrit.osmocom.org/1018 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I36ce41c669ffb123ec0741061e357a94baee6460 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Oct 6 21:46:47 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 6 Oct 2016 21:46:47 +0000 Subject: [PATCH] libosmo-abis[master]: jenkins.sh: use osmo-build-dep.sh, print separator In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1018 to look at the new patch set (#3). jenkins.sh: use osmo-build-dep.sh, print separator Change-Id: I36ce41c669ffb123ec0741061e357a94baee6460 --- M contrib/jenkins.sh 1 file changed, 16 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/18/1018/3 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index e315b4f..1500cab 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -2,17 +2,24 @@ set -ex -rm -rf deps/install -mkdir deps || true -cd deps -osmo-deps.sh libosmocore +base="$PWD" +deps="$base/deps" +inst="$deps/install" +export deps inst -cd libosmocore -autoreconf --install --force -./configure --prefix=$PWD/../install -$MAKE $PARALLEL_MAKE install +mkdir "$deps" || true +rm -rf "$inst" -cd ../../ +osmo-build-dep.sh libosmocore + +set +x +echo +echo +echo +echo " =============================== libosmo-abis ===============================" +echo +set -x + autoreconf --install --force export PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH export LD_LIBRARY_PATH=$PWD/deps/install/lib -- To view, visit https://gerrit.osmocom.org/1018 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I36ce41c669ffb123ec0741061e357a94baee6460 Gerrit-PatchSet: 3 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Oct 6 22:44:09 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 6 Oct 2016 22:44:09 +0000 Subject: [PATCH] libosmocore[master]: jenkins.sh: drop unecessary PATH, now in slave config Message-ID: Review at https://gerrit.osmocom.org/1020 jenkins.sh: drop unecessary PATH, now in slave config Change-Id: Ifaff3e5e13c920eb716a5609bfec2f96e10f17b0 --- M contrib/jenkins.sh 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/20/1020/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index e9f63e4..e5e17c8 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash -export PATH="$PATH:$HOME/osmo-ci/scripts" set -ex -- To view, visit https://gerrit.osmocom.org/1020 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifaff3e5e13c920eb716a5609bfec2f96e10f17b0 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 6 22:47:57 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 6 Oct 2016 22:47:57 +0000 Subject: [PATCH] libosmo-abis[master]: jenkins.sh: use osmo-build-dep.sh, print separator In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1018 to look at the new patch set (#4). jenkins.sh: use osmo-build-dep.sh, print separator Change-Id: I36ce41c669ffb123ec0741061e357a94baee6460 --- M contrib/jenkins.sh 1 file changed, 19 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/18/1018/4 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index e315b4f..50628fc 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -2,20 +2,28 @@ set -ex -rm -rf deps/install -mkdir deps || true -cd deps -osmo-deps.sh libosmocore +base="$PWD" +deps="$base/deps" +inst="$deps/install" +export deps inst -cd libosmocore -autoreconf --install --force -./configure --prefix=$PWD/../install -$MAKE $PARALLEL_MAKE install +mkdir "$deps" || true +rm -rf "$inst" -cd ../../ +osmo-build-dep.sh libosmocore + +export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" +export LD_LIBRARY_PATH="$inst/lib" + +set +x +echo +echo +echo +echo " =============================== libosmo-abis ===============================" +echo +set -x + autoreconf --install --force -export PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH -export LD_LIBRARY_PATH=$PWD/deps/install/lib ./configure $MAKE $PARALLEL_MAKE $MAKE distcheck -- To view, visit https://gerrit.osmocom.org/1018 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I36ce41c669ffb123ec0741061e357a94baee6460 Gerrit-PatchSet: 4 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Oct 6 22:49:29 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 6 Oct 2016 22:49:29 +0000 Subject: [PATCH] libosmo-netif[master]: jenkins.sh: use osmo-build-dep.sh, log test failures Message-ID: Review at https://gerrit.osmocom.org/1021 jenkins.sh: use osmo-build-dep.sh, log test failures Like in libosmo-abis' jenkins.sh Change-Id: I022fbaaa1d211f68b38f18cfaf338ece51198c34 --- M contrib/jenkins.sh 1 file changed, 24 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/21/1021/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index a347e3c..9a37ca5 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -2,25 +2,31 @@ set -ex -rm -rf deps/install -mkdir deps || true -cd deps -osmo-deps.sh libosmocore +base="$PWD" +deps="$base/deps" +inst="$deps/install" +export deps inst -cd libosmocore -autoreconf --install --force -./configure --prefix=$PWD/../install -$MAKE $PARALLEL_MAKE install +mkdir "$deps" || true +rm -rf "$inst" -cd ../ -osmo-deps.sh libosmo-abis -cd libosmo-abis -autoreconf --install --force -PKG_CONFIG_PATH=$PWD/../install/lib/pkgconfig:$PKG_CONFIG_PATH ./configure --prefix=$PWD/../install -PKG_CONFIG_PATH=$PWD/..//install/lib/pkgconfig:$PKG_CONFIG_PATH $MAKE $PARALLEL_MAKE install +osmo-build-dep.sh libosmocore -cd ../../ +export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" +export LD_LIBRARY_PATH="$inst/lib" + +osmo-build-dep.sh libosmo-abis + +set +x +echo +echo +echo +echo " =============================== libosmo-netif ===============================" +echo +set -x + autoreconf --install --force -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH ./configure -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH $MAKE $PARALLEL_MAKE -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE distcheck +./configure +$MAKE $PARALLEL_MAKE +$MAKE distcheck \ + || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/1021 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I022fbaaa1d211f68b38f18cfaf338ece51198c34 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 6 22:54:09 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 6 Oct 2016 22:54:09 +0000 Subject: [PATCH] libosmo-sccp[master]: jenkins.sh: use osmo-build-dep.sh, log test failures Message-ID: Review at https://gerrit.osmocom.org/1022 jenkins.sh: use osmo-build-dep.sh, log test failures Like in libosmo-abis' jenkins.sh Change-Id: I4e462e2c92db14b6c2e18b212779761f2e1829af --- M contrib/jenkins.sh 1 file changed, 24 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/22/1022/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 463f3d8..33045d8 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -2,32 +2,32 @@ set -ex -rm -rf deps/install -mkdir deps || true -cd deps -osmo-deps.sh libosmocore +base="$PWD" +deps="$base/deps" +inst="$deps/install" +export deps inst -cd libosmocore -autoreconf --install --force -./configure --prefix=$PWD/../install -$MAKE $PARALLEL_MAKE install +mkdir "$deps" || true +rm -rf "$inst" -cd ../ -osmo-deps.sh libosmo-abis -cd libosmo-abis -autoreconf --install --force -PKG_CONFIG_PATH=$PWD/../install/lib/pkgconfig:$PKG_CONFIG_PATH ./configure --prefix=$PWD/../install -PKG_CONFIG_PATH=$PWD/..//install/lib/pkgconfig:$PKG_CONFIG_PATH $MAKE $PARALLEL_MAKE install +osmo-build-dep.sh libosmocore -cd ../ -osmo-deps.sh libosmo-netif -cd libosmo-netif -autoreconf --install --force -PKG_CONFIG_PATH=$PWD/../install/lib/pkgconfig:$PKG_CONFIG_PATH ./configure --prefix=$PWD/../install -PKG_CONFIG_PATH=$PWD/..//install/lib/pkgconfig:$PKG_CONFIG_PATH $MAKE $PARALLEL_MAKE install +export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" +export LD_LIBRARY_PATH="$inst/lib" -cd ../../ +osmo-build-dep.sh libosmo-abis +osmo-build-dep.sh libosmo-netif + +set +x +echo +echo +echo +echo " =============================== libosmo-sccp ===============================" +echo +set -x + autoreconf --install --force -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH ./configure -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH $MAKE $PARALLEL_MAKE -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE distcheck +./configure +$MAKE $PARALLEL_MAKE +$MAKE distcheck \ + || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/1022 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4e462e2c92db14b6c2e18b212779761f2e1829af Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 6 22:58:39 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 6 Oct 2016 22:58:39 +0000 Subject: [PATCH] openbsc[master]: jenkins.sh: use osmo-build-dep.sh, log test failures Message-ID: Review at https://gerrit.osmocom.org/1023 jenkins.sh: use osmo-build-dep.sh, log test failures Like in libosmo-abis' jenkins.sh Change-Id: I4d6ffd5b230dd095650cc2231678b66056a8e4b5 --- M contrib/jenkins.sh 1 file changed, 22 insertions(+), 40 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/23/1023/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 3c60996..ad8cb3b 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -9,60 +9,42 @@ mkdir "$deps" || true rm -rf "$inst" -build_dep() { - project="$1" - branch="$2" - cfg="$3" - set +x - echo - echo - echo - echo " =============================== $project ===============================" - echo - set -x - if [ -z "$project" ]; then - echo "internal failure" - exit 1 - fi - cd "$deps" - rm -rf "$project" - osmo-deps.sh "$project" - cd "$project" - if [ -n "$branch" ]; then - git checkout "$branch" - fi - git rev-parse HEAD - autoreconf --install --force - ./configure --prefix="$inst" $cfg - $MAKE $PARALLEL_MAKE install -} +osmo-build-dep.sh libosmocore "" ac_cv_path_DOXYGEN=false -build_dep libosmocore "" ac_cv_path_DOXYGEN=false - -# All below builds want this PKG_CONFIG_PATH export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" +export LD_LIBRARY_PATH="$inst/lib" if [ "x$IU" = "x--enable-iu" ]; then netif_branch="sysmocom/sctp" sccp_branch="sysmocom/iu" fi -build_dep libosmo-abis -build_dep libosmo-netif $netif_branch -build_dep libosmo-sccp $sccp_branch -PARALLEL_MAKE="" build_dep libsmpp34 -build_dep openggsn +osmo-build-dep.sh libosmo-abis +osmo-build-dep.sh libosmo-netif $netif_branch +osmo-build-dep.sh libosmo-sccp $sccp_branch +PARALLEL_MAKE="" osmo-build-dep.sh libsmpp34 +osmo-build-dep.sh openggsn if [ "x$IU" = "x--enable-iu" ]; then - build_dep libasn1c - #build_dep asn1c aper-prefix # only needed for make regen in osmo-iuh - build_dep osmo-iuh + osmo-build-dep.sh libasn1c + #osmo-build-dep.sh asn1c aper-prefix # only needed for make regen in osmo-iuh + osmo-build-dep.sh osmo-iuh fi + +set +x +echo +echo +echo +echo " =============================== openbsc ===============================" +echo +set -x cd "$base" cd openbsc autoreconf --install --force ./configure --enable-osmo-bsc --enable-nat $SMPP $MGCP $IU --enable-vty-tests --enable-external-tests $MAKE $PARALLEL_MAKE -LD_LIBRARY_PATH="$inst/lib" $MAKE check -LD_LIBRARY_PATH="$inst/lib" $MAKE distcheck +LD_LIBRARY_PATH="$inst/lib" $MAKE check \ + || cat-testlogs.sh +LD_LIBRARY_PATH="$inst/lib" $MAKE distcheck \ + || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/1023 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4d6ffd5b230dd095650cc2231678b66056a8e4b5 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 6 23:13:00 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 6 Oct 2016 23:13:00 +0000 Subject: [PATCH] osmo-bts[master]: jenkins.sh: use osmo-build-dep.sh, log test failures Message-ID: Review at https://gerrit.osmocom.org/1024 jenkins.sh: use osmo-build-dep.sh, log test failures Like in libosmo-abis' and other jenkins.sh Change-Id: I6ad88bce18677b148af63ae8f6e0ab7e3b38b5a2 --- M contrib/jenkins_oct.sh M contrib/jenkins_sysmobts.sh 2 files changed, 63 insertions(+), 52 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/24/1024/1 diff --git a/contrib/jenkins_oct.sh b/contrib/jenkins_oct.sh index 32b1407..7920224 100755 --- a/contrib/jenkins_oct.sh +++ b/contrib/jenkins_oct.sh @@ -2,33 +2,29 @@ set -ex -rm -rf deps/install -mkdir deps || true -cd deps +base="$PWD" +deps="$base/deps" +inst="$deps/install" +export deps inst + +mkdir "$deps" || true +rm -rf "$inst" # Get the headers.. +cd "$deps" git clone git://git.osmocom.org/openbsc || true cd openbsc git pull --rebase +cd "$base" +osmo-build-dep.sh libosmocore -# Build the dependency -cd ../ +export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" +export LD_LIBRARY_PATH="$inst/lib" -osmo-deps.sh libosmocore -cd libosmocore -autoreconf --install --force -./configure --prefix=$PWD/../install -$MAKE $PARALLEL_MAKE install +osmo-build-dep.sh libosmo-abis -cd ../ -osmo-deps.sh libosmo-abis -cd libosmo-abis -autoreconf --install --force -PKG_CONFIG_PATH=$PWD/../install/lib/pkgconfig ./configure --prefix=$PWD/../install -PKG_CONFIG_PATH=$PWD/../install/lib/pkgconfig $MAKE $PARALLEL_MAKE install - -cd ../ +cd "$deps" if ! test -d layer1-api; then git clone git://git.osmocom.org/octphy-2g-headers layer1-api @@ -43,11 +39,21 @@ git reset --hard $FIRMWARE_VERSION fi +cd "$base" -# Build osmo-bts -cd ../../ +set +x +echo +echo +echo +echo " =============================== osmo-bts-octphy ===============================" +echo +set -x + autoreconf --install --force -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig ./configure --with-openbsc=$PWD/deps/openbsc/openbsc/include --with-octsdr-2g=$PWD/deps/layer1-api/ --enable-octphy -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig $MAKE $PARALLEL_MAKE -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE check -DISTCHECK_CONFIGURE_FLAGS="--with-octsdr-2g=$PWD/deps/layer1-api/ --with-openbsc=$PWD/deps/openbsc/openbsc/include --enable-octphy" PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE distcheck +./configure --with-openbsc="$deps/openbsc/openbsc/include" --with-octsdr-2g="$deps/deps/layer1-api/" --enable-octphy +$MAKE $PARALLEL_MAKE +$MAKE check \ + || cat-testlogs.sh +DISTCHECK_CONFIGURE_FLAGS="--with-octsdr-2g=$deps/layer1-api/ --with-openbsc=$deps/openbsc/openbsc/include --enable-octphy" \ + $MAKE distcheck \ + || cat-testlogs.sh diff --git a/contrib/jenkins_sysmobts.sh b/contrib/jenkins_sysmobts.sh index 051c8e0..be544a7 100755 --- a/contrib/jenkins_sysmobts.sh +++ b/contrib/jenkins_sysmobts.sh @@ -2,33 +2,29 @@ set -ex -rm -rf deps/install -mkdir deps || true -cd deps +base="$PWD" +deps="$base/deps" +inst="$deps/install" +export deps inst + +mkdir "$deps" || true +rm -rf "$inst" # Get the headers.. +cd "$deps" git clone git://git.osmocom.org/openbsc || true cd openbsc git pull --rebase +cd "$base" +osmo-build-dep.sh libosmocore -# Build the dependency -cd ../ +export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" +export LD_LIBRARY_PATH="$inst/lib" -osmo-deps.sh libosmocore -cd libosmocore -autoreconf --install --force -./configure --prefix=$PWD/../install -$MAKE $PARALLEL_MAKE install +osmo-build-dep.sh libosmo-abis -cd ../ -osmo-deps.sh libosmo-abis -cd libosmo-abis -autoreconf --install --force -PKG_CONFIG_PATH=$PWD/../install/lib/pkgconfig ./configure --prefix=$PWD/../install -PKG_CONFIG_PATH=$PWD/../install/lib/pkgconfig $MAKE $PARALLEL_MAKE install - -cd ../ +cd "$deps" if ! test -d layer1-api; then git clone git://git.sysmocom.de/sysmo-bts/layer1-api.git layer1-api @@ -42,20 +38,29 @@ else git reset --hard $FIRMWARE_VERSION fi -mkdir -p $PWD/../install/include/sysmocom/femtobts/ -cp include/*.h ../install/include/sysmocom/femtobts/ +mkdir -p "$inst/include/sysmocom/femtobts" +cp include/*.h "$inst/include/sysmocom/femtobts/" +cd "$base" -# Build osmo-bts -cd ../../ +set +x +echo +echo +echo +echo " =============================== osmo-bts-sysmo ===============================" +echo +set -x + autoreconf --install --force -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig ./configure --enable-sysmocom-bts --with-openbsc=$PWD/deps/openbsc/openbsc/include -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig $MAKE $PARALLEL_MAKE -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE check -DISTCHECK_CONFIGURE_FLAGS="--enable-sysmocom-bts --with-openbsc=$PWD/deps/openbsc/openbsc/include" PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE distcheck - +./configure --enable-sysmocom-bts --with-openbsc="$deps/openbsc/openbsc/include" +$MAKE $PARALLEL_MAKE +$MAKE check \ + || cat-testlogs.sh +DISTCHECK_CONFIGURE_FLAGS="--enable-sysmocom-bts --with-openbsc=$deps/openbsc/openbsc/include" \ + $MAKE distcheck \ + || cat-testlogs.sh # This will not work for the femtobts if [ $FIRMWARE_VERSION != "femtobts_v2.7" ]; then - PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig $MAKE -C contrib/sysmobts-calib + $MAKE -C contrib/sysmobts-calib fi -- To view, visit https://gerrit.osmocom.org/1024 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6ad88bce18677b148af63ae8f6e0ab7e3b38b5a2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 6 23:17:37 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 6 Oct 2016 23:17:37 +0000 Subject: [PATCH] osmo-iuh[master]: jenkins.sh: use osmo-build-dep.sh Message-ID: Review at https://gerrit.osmocom.org/1025 jenkins.sh: use osmo-build-dep.sh Like in libosmo-abis' and other jenkins.sh Change-Id: I24f5a04abdf986eee4358bb3327b8d8b9b27e8f2 --- M contrib/jenkins.sh 1 file changed, 17 insertions(+), 43 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/25/1025/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index b19f0c6..770575e 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,61 +1,35 @@ #!/usr/bin/env bash -export PATH="$PATH:$HOME/osmo-ci/scripts" set -ex base="$PWD" deps="$base/deps" inst="$deps/install" +export deps inst mkdir "$deps" || true rm -rf "$inst" -marker() { - set +x - echo - echo - echo - echo " =============================== $@ ===============================" - echo - set -x -} +osmo-build-dep.sh libosmocore -build_dep() { - project="$1" - branch="$2" - marker $project - if [ -z "$project" ]; then - echo "internal failure" - exit 1 - fi - cd "$deps" - rm -rf "$project" - osmo-deps.sh "$project" - cd "$project" - if [ -n "$branch" ]; then - git checkout "$branch" - fi - git rev-parse HEAD - autoreconf --install --force - ./configure --prefix="$inst" - $MAKE $PARALLEL_MAKE install -} - -build_dep libosmocore - -# All below builds want this PKG_CONFIG_PATH export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" +export LD_LIBRARY_PATH="$inst/lib" -build_dep libosmo-abis -build_dep libosmo-netif sysmocom/sctp -build_dep libosmo-sccp sysmocom/iu -build_dep libasn1c +osmo-build-dep.sh libosmo-abis +osmo-build-dep.sh libosmo-netif sysmocom/sctp +osmo-build-dep.sh libosmo-sccp sysmocom/iu +osmo-build-dep.sh libasn1c # the asn1c binary is used by the 'regen' target below -build_dep asn1c aper-prefix +osmo-build-dep.sh asn1c aper-prefix -marker osmo-iuh -cd "$base" +set +x +echo +echo +echo +echo " =============================== osmo-iuh ===============================" +echo +set -x autoreconf --install --force ./configure @@ -75,7 +49,7 @@ fi $MAKE $PARALLEL_MAKE -LD_LIBRARY_PATH="$inst/lib" $MAKE check \ +$MAKE check \ || cat-testlogs.sh -LD_LIBRARY_PATH="$inst/lib" $MAKE distcheck \ +$MAKE distcheck \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/1025 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I24f5a04abdf986eee4358bb3327b8d8b9b27e8f2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 6 23:34:26 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 6 Oct 2016 23:34:26 +0000 Subject: [PATCH] openbsc[master]: NOT FOR MERGE -- jenkins.sh: use osmo-build-dep.sh, log test... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1023 to look at the new patch set (#2). NOT FOR MERGE -- jenkins.sh: use osmo-build-dep.sh, log test failures Like in libosmo-abis' jenkins.sh Change-Id: I4d6ffd5b230dd095650cc2231678b66056a8e4b5 --- M contrib/jenkins.sh 1 file changed, 27 insertions(+), 40 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/23/1023/2 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 3c60996..3c7127d 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,4 +1,9 @@ #!/usr/bin/env bash +set -x +env | grep PATH +env | grep HOME +ls -l "$HOME/bin/" +ls -l "/home/osmocom-build/bin/" set -ex @@ -9,60 +14,42 @@ mkdir "$deps" || true rm -rf "$inst" -build_dep() { - project="$1" - branch="$2" - cfg="$3" - set +x - echo - echo - echo - echo " =============================== $project ===============================" - echo - set -x - if [ -z "$project" ]; then - echo "internal failure" - exit 1 - fi - cd "$deps" - rm -rf "$project" - osmo-deps.sh "$project" - cd "$project" - if [ -n "$branch" ]; then - git checkout "$branch" - fi - git rev-parse HEAD - autoreconf --install --force - ./configure --prefix="$inst" $cfg - $MAKE $PARALLEL_MAKE install -} +osmo-build-dep.sh libosmocore "" ac_cv_path_DOXYGEN=false -build_dep libosmocore "" ac_cv_path_DOXYGEN=false - -# All below builds want this PKG_CONFIG_PATH export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" +export LD_LIBRARY_PATH="$inst/lib" if [ "x$IU" = "x--enable-iu" ]; then netif_branch="sysmocom/sctp" sccp_branch="sysmocom/iu" fi -build_dep libosmo-abis -build_dep libosmo-netif $netif_branch -build_dep libosmo-sccp $sccp_branch -PARALLEL_MAKE="" build_dep libsmpp34 -build_dep openggsn +osmo-build-dep.sh libosmo-abis +osmo-build-dep.sh libosmo-netif $netif_branch +osmo-build-dep.sh libosmo-sccp $sccp_branch +PARALLEL_MAKE="" osmo-build-dep.sh libsmpp34 +osmo-build-dep.sh openggsn if [ "x$IU" = "x--enable-iu" ]; then - build_dep libasn1c - #build_dep asn1c aper-prefix # only needed for make regen in osmo-iuh - build_dep osmo-iuh + osmo-build-dep.sh libasn1c + #osmo-build-dep.sh asn1c aper-prefix # only needed for make regen in osmo-iuh + osmo-build-dep.sh osmo-iuh fi + +set +x +echo +echo +echo +echo " =============================== openbsc ===============================" +echo +set -x cd "$base" cd openbsc autoreconf --install --force ./configure --enable-osmo-bsc --enable-nat $SMPP $MGCP $IU --enable-vty-tests --enable-external-tests $MAKE $PARALLEL_MAKE -LD_LIBRARY_PATH="$inst/lib" $MAKE check -LD_LIBRARY_PATH="$inst/lib" $MAKE distcheck +LD_LIBRARY_PATH="$inst/lib" $MAKE check \ + || cat-testlogs.sh +LD_LIBRARY_PATH="$inst/lib" $MAKE distcheck \ + || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/1023 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4d6ffd5b230dd095650cc2231678b66056a8e4b5 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 Thu Oct 6 23:45:14 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 6 Oct 2016 23:45:14 +0000 Subject: [PATCH] openbsc[master]: jenkins.sh: use osmo-build-dep.sh, log test failures In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1023 to look at the new patch set (#3). jenkins.sh: use osmo-build-dep.sh, log test failures Like in libosmo-abis' jenkins.sh Change-Id: I4d6ffd5b230dd095650cc2231678b66056a8e4b5 --- M contrib/jenkins.sh 1 file changed, 23 insertions(+), 40 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/23/1023/3 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 3c60996..7ad4ee6 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -5,64 +5,47 @@ base="$PWD" deps="$base/deps" inst="$deps/install" +export deps inst mkdir "$deps" || true rm -rf "$inst" -build_dep() { - project="$1" - branch="$2" - cfg="$3" - set +x - echo - echo - echo - echo " =============================== $project ===============================" - echo - set -x - if [ -z "$project" ]; then - echo "internal failure" - exit 1 - fi - cd "$deps" - rm -rf "$project" - osmo-deps.sh "$project" - cd "$project" - if [ -n "$branch" ]; then - git checkout "$branch" - fi - git rev-parse HEAD - autoreconf --install --force - ./configure --prefix="$inst" $cfg - $MAKE $PARALLEL_MAKE install -} +osmo-build-dep.sh libosmocore "" ac_cv_path_DOXYGEN=false -build_dep libosmocore "" ac_cv_path_DOXYGEN=false - -# All below builds want this PKG_CONFIG_PATH export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" +export LD_LIBRARY_PATH="$inst/lib" if [ "x$IU" = "x--enable-iu" ]; then netif_branch="sysmocom/sctp" sccp_branch="sysmocom/iu" fi -build_dep libosmo-abis -build_dep libosmo-netif $netif_branch -build_dep libosmo-sccp $sccp_branch -PARALLEL_MAKE="" build_dep libsmpp34 -build_dep openggsn +osmo-build-dep.sh libosmo-abis +osmo-build-dep.sh libosmo-netif $netif_branch +osmo-build-dep.sh libosmo-sccp $sccp_branch +PARALLEL_MAKE="" osmo-build-dep.sh libsmpp34 +osmo-build-dep.sh openggsn if [ "x$IU" = "x--enable-iu" ]; then - build_dep libasn1c - #build_dep asn1c aper-prefix # only needed for make regen in osmo-iuh - build_dep osmo-iuh + osmo-build-dep.sh libasn1c + #osmo-build-dep.sh asn1c aper-prefix # only needed for make regen in osmo-iuh + osmo-build-dep.sh osmo-iuh fi + +set +x +echo +echo +echo +echo " =============================== openbsc ===============================" +echo +set -x cd "$base" cd openbsc autoreconf --install --force ./configure --enable-osmo-bsc --enable-nat $SMPP $MGCP $IU --enable-vty-tests --enable-external-tests $MAKE $PARALLEL_MAKE -LD_LIBRARY_PATH="$inst/lib" $MAKE check -LD_LIBRARY_PATH="$inst/lib" $MAKE distcheck +LD_LIBRARY_PATH="$inst/lib" $MAKE check \ + || cat-testlogs.sh +LD_LIBRARY_PATH="$inst/lib" $MAKE distcheck \ + || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/1023 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4d6ffd5b230dd095650cc2231678b66056a8e4b5 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 Thu Oct 6 23:54:46 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 6 Oct 2016 23:54:46 +0000 Subject: [PATCH] osmo-sip-connector[master]: jenkins.sh: use osmo-build-dep.sh, log test failures Message-ID: Review at https://gerrit.osmocom.org/1026 jenkins.sh: use osmo-build-dep.sh, log test failures Like in libosmo-abis' and other jenkins.sh Change-Id: I1b03786069cc4373dec73711e3a31ec05dfac2e3 --- M contrib/jenkins.sh 1 file changed, 26 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector refs/changes/26/1026/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index fb4e2f2..588634e 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -2,20 +2,31 @@ set -ex -rm -rf deps/install -mkdir deps || true -cd deps -osmo-deps.sh libosmocore +base="$PWD" +deps="$base/deps" +inst="$deps/install" +export deps inst -cd libosmocore +mkdir "$deps" || true +rm -rf "$inst" + +osmo-build-dep.sh libosmocore + +export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" +export LD_LIBRARY_PATH="$inst/lib" + +set +x +echo +echo +echo +echo " =============================== osmo-sip-connector ===============================" +echo +set -x + autoreconf --install --force -./configure --prefix=$PWD/../install -$MAKE $PARALLEL_MAKE install - -cd ../../ -autoreconf --install --force -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig ./configure --enable-vty-tests --enable-external-tests -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig $MAKE $PARALLEL_MAKE -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE check -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE distcheck - +./configure --enable-vty-tests --enable-external-tests +$MAKE $PARALLEL_MAKE +$MAKE check \ + || cat-testlogs.sh +$MAKE distcheck \ + || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/1026 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1b03786069cc4373dec73711e3a31ec05dfac2e3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 6 23:56:28 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 6 Oct 2016 23:56:28 +0000 Subject: libosmo-abis[master]: Really fix order of set_connected_mode and set_remote_addr In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1011 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9d146c3bd76e02685b09278167b56029152221a0 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis 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 Thu Oct 6 23:56:31 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 6 Oct 2016 23:56:31 +0000 Subject: [MERGED] libosmo-abis[master]: Really fix order of set_connected_mode and set_remote_addr In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: Really fix order of set_connected_mode and set_remote_addr ...................................................................... Really fix order of set_connected_mode and set_remote_addr This reverts commit c77c2a6aa13accbc558888ab788d1148eb9aeb1a, and explicitly sets connected mode to zero for set_remote_addr to work around internal libortp problems. See https://osmocom.org/issues/1661#note-15. Related: OS#1661 Change-Id: I9d146c3bd76e02685b09278167b56029152221a0 --- M src/trau/osmo_ortp.c 1 file changed, 12 insertions(+), 6 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/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index 5441337..6ce70d2 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -389,17 +389,23 @@ return 0; } + /* We don't want the connected mode enabled during + * rtp_session_set_remote_addr(), because that will already setup a + * connection and updating the remote address will no longer have an + * effect. Contrary to what one may expect, this must be 0 at first, + * and we're setting to 1 further down to establish a connection once + * the first RTP packet is received (OS#1661). */ + rtp_session_set_connected_mode(rs->sess, 0); + + rc = rtp_session_set_remote_addr(rs->sess, ip, port); + if (rc < 0) + return rc; + /* enable the use of connect() so later getsockname() will * actually return the IP address that was chosen for the local * sid of the connection */ rtp_session_set_connected_mode(rs->sess, 1); rs->flags &= ~OSMO_RTP_F_DISABLED; - - /* This call attempts to connect to the remote address, so make sure to - * set all other rtp session configuration before this call. */ - rc = rtp_session_set_remote_addr(rs->sess, ip, port); - if (rc < 0) - return rc; if (rs->flags & OSMO_RTP_F_POLL) return rc; -- To view, visit https://gerrit.osmocom.org/1011 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9d146c3bd76e02685b09278167b56029152221a0 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis 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 Thu Oct 6 23:59:23 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 6 Oct 2016 23:59:23 +0000 Subject: [ABANDON] libosmocore[master]: jenkins.sh: add sanitize options to jenkins run In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: jenkins.sh: add sanitize options to jenkins run ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/976 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I9911e6b189a0d5f2d739e81d196cc323a9b85e7d Gerrit-PatchSet: 2 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 Thu Oct 6 23:59:28 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 6 Oct 2016 23:59:28 +0000 Subject: [ABANDON] libosmocore[master]: NOT FOR MERGE: introduce ASAN failure to test jenkins.sh In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: NOT FOR MERGE: introduce ASAN failure to test jenkins.sh ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/977 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ib1b5892d4eebecb4786da294307824cbdbfa523a Gerrit-PatchSet: 2 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 Thu Oct 6 23:59:37 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 6 Oct 2016 23:59:37 +0000 Subject: [ABANDON] libosmocore[master]: jenkins.sh: add -fsanitize flags, add 'make check' In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: jenkins.sh: add -fsanitize flags, add 'make check' ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/978 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I1692a4730e83b71f2976651993e94de0fe060b8e Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 6 23:59:44 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 6 Oct 2016 23:59:44 +0000 Subject: [ABANDON] libosmocore[master]: NOT FOR MERGE: introduce ASAN failure to test jenkins.sh In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: NOT FOR MERGE: introduce ASAN failure to test jenkins.sh ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/979 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I8ecaeec67474dd0e8acb0ffc1b1594d0c4b9911d Gerrit-PatchSet: 2 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 Fri Oct 7 08:02:21 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 7 Oct 2016 08:02:21 +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 (#4). 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 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 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 23 files changed, 8,052 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/33/933/4 -- 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: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Oct 7 10:04:26 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 7 Oct 2016 10:04:26 +0000 Subject: [PATCH] osmo-bts[master]: rsl: improving the log output 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/902 to look at the new patch set (#6). rsl: improving the log output to show more details about the payload type and the connection Change-Id: Ifaa253e5baed5ca364dfbc046a7cb559f106bfbd --- M src/common/rsl.c 1 file changed, 20 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/02/902/6 diff --git a/src/common/rsl.c b/src/common/rsl.c index 493ff3b..7846bf5 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1584,21 +1584,34 @@ return tx_ipac_XXcx_nack(lchan, RSL_ERR_MAND_IE_ERROR, 0, dch->c.msg_type); - /* any of these can be NULL!! */ - speech_mode = TLVP_VAL(&tp, RSL_IE_IPAC_SPEECH_MODE); - payload_type = TLVP_VAL(&tp, RSL_IE_IPAC_RTP_PAYLOAD); - payload_type2 = TLVP_VAL(&tp, RSL_IE_IPAC_RTP_PAYLOAD2); - - if (TLVP_PRESENT(&tp, RSL_IE_IPAC_REMOTE_IP)) + if (TLVP_PRESENT(&tp, RSL_IE_IPAC_REMOTE_IP)) { connect_ip = tlvp_val32_unal(&tp, RSL_IE_IPAC_REMOTE_IP); + LOGP(DRSL, LOGL_NOTICE, "connect_ip %d \n", connect_ip ); + } else LOGP(DRSL, LOGL_NOTICE, "CRCX does not specify a remote IP\n"); - if (TLVP_PRESENT(&tp, RSL_IE_IPAC_REMOTE_PORT)) + if (TLVP_PRESENT(&tp, RSL_IE_IPAC_REMOTE_PORT)) { connect_port = tlvp_val16_unal(&tp, RSL_IE_IPAC_REMOTE_PORT); + LOGP(DRSL, LOGL_NOTICE, "connect_port %d \n", connect_port ); + } else LOGP(DRSL, LOGL_NOTICE, "CRCX does not specify a remote port\n"); + speech_mode = TLVP_VAL(&tp, RSL_IE_IPAC_SPEECH_MODE); + if (speech_mode) + LOGP(DRSL, LOGL_NOTICE, "speech mode: %d\n", *speech_mode); + else + LOGP(DRSL, LOGL_NOTICE, "speech mode: none\n"); + + payload_type = TLVP_VAL(&tp, RSL_IE_IPAC_RTP_PAYLOAD); + if (payload_type) + LOGP(DRSL, LOGL_NOTICE, "payload type: %d\n",*payload_type); + else + LOGP(DRSL, LOGL_NOTICE, "payload type: none\n"); + + payload_type2 = TLVP_VAL(&tp, RSL_IE_IPAC_RTP_PAYLOAD2); + if (dch->c.msg_type == RSL_MT_IPAC_CRCX && connect_ip && connect_port) inc_ip_port = 1; -- To view, visit https://gerrit.osmocom.org/902 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ifaa253e5baed5ca364dfbc046a7cb559f106bfbd Gerrit-PatchSet: 6 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 Oct 7 10:57:20 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 7 Oct 2016 10:57:20 +0000 Subject: [PATCH] osmo-bts[master]: octphy: set tx attenuation via VTY 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/905 to look at the new patch set (#9). 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, 20 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/05/905/9 diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h index 6b2f21e..d06aa55 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; + uint32_t 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 1b74fd4..ff332d5 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -1359,7 +1359,14 @@ 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 == 1) { + 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..a094b32 100644 --- a/src/osmo-bts-octphy/octphy_vty.c +++ b/src/osmo-bts-octphy/octphy_vty.c @@ -136,9 +136,9 @@ } 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 "use either oml attribute value or specified tx-attenuation (quarter-dB)\n" + "oml or tx-attenuation in quarter-dB\n") { struct phy_link *plink = vty->index; @@ -148,7 +148,12 @@ return CMD_WARNING; } - plink->u.octphy.tx_atten_db = atoi(argv[0]); + if (argv[0][0] == 'o') { + plink->u.octphy.tx_atten_flag = 0; + } else { + plink->u.octphy.tx_atten_db = atoi(argv[0]); + plink->u.octphy.tx_atten_flag = 1; + } return CMD_SUCCESS; } @@ -202,6 +207,8 @@ VTY_NEWLINE); vty_out(vty, " rx-gain %u%s", plink->u.octphy.rx_gain_db, VTY_NEWLINE); + vty_out(vty, " tx-attenuation-flag %u%s", plink->u.octphy.tx_atten_flag, + VTY_NEWLINE); vty_out(vty, " tx-attenuation %u%s", plink->u.octphy.tx_atten_db, VTY_NEWLINE); vty_out(vty, " rf-port-index %u%s", plink->u.octphy.rf_port_index, -- 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: 9 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 Oct 7 12:06:51 2016 From: gerrit-no-reply at lists.osmocom.org (pravin) Date: Fri, 7 Oct 2016 12:06:51 +0000 Subject: osmo-pcu[master]: EGPRS: Add EPDAN CRBB Tree based decoding In-Reply-To: References: Message-ID: Patch Set 26: I have addressed all the comments raised. please let me know the status. -- To view, visit https://gerrit.osmocom.org/416 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieae1992ed4b02bb1e09eec2d3de1a030eabd16ce Gerrit-PatchSet: 26 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: pravin Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: pravin Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Oct 7 14:25:09 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 7 Oct 2016 14:25:09 +0000 Subject: [PATCH] osmo-bts[master]: DTX: fix 1st RTP packet drop Message-ID: Review at https://gerrit.osmocom.org/1027 DTX: fix 1st RTP packet drop Use "impossible" dummy value to initialize last_fn to prevent dropping of 1st RTP frame due to timestamp jump. Change-Id: I485af21f6761048d12dc7f5552fcdd46daf786ed --- M include/osmo-bts/rsl.h M src/common/l1sap.c M src/common/rsl.c 3 files changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/27/1027/1 diff --git a/include/osmo-bts/rsl.h b/include/osmo-bts/rsl.h index 093e9cb..4311ffd 100644 --- a/include/osmo-bts/rsl.h +++ b/include/osmo-bts/rsl.h @@ -11,6 +11,8 @@ LCHAN_REL_ACT_OML, }; +#define LCHAN_FN_DUMMY 0xFFFFFFFF + int msgb_queue_flush(struct llist_head *list); int down_rsl(struct gsm_bts_trx *trx, struct msgb *msg); diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 943bdfe..04cc800 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -72,7 +72,7 @@ static uint32_t fn_ms_adj(uint32_t fn, uint32_t last_fn) { - if (last_fn) { + if (last_fn != LCHAN_FN_DUMMY) { uint32_t ms_passed = GSM_FN_TO_MS(fn - last_fn), samples_passed = GSM_MS_TO_SAMPLES(ms_passed); /* round number of samples to the nearest multiple of diff --git a/src/common/rsl.c b/src/common/rsl.c index 493ff3b..0f16f7d 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1621,6 +1621,7 @@ } /* FIXME: select default value depending on speech_mode */ //if (!payload_type) + lchan->tch.last_fn = LCHAN_FN_DUMMY; lchan->abis_ip.rtp_socket = osmo_rtp_socket_create(lchan->ts->trx, OSMO_RTP_F_POLL); if (!lchan->abis_ip.rtp_socket) { -- To view, visit https://gerrit.osmocom.org/1027 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I485af21f6761048d12dc7f5552fcdd46daf786ed Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Oct 7 14:28:57 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 7 Oct 2016 14:28:57 +0000 Subject: [PATCH] libosmo-abis[master]: Resync RTP session in case of timestamp jump Message-ID: Review at https://gerrit.osmocom.org/1028 Resync RTP session in case of timestamp jump Change-Id: Iae5da832218dbd1ede7a9451102074f2a5eb66df --- M src/trau/osmo_ortp.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/28/1028/1 diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index 5441337..68db5da 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -139,7 +139,8 @@ uint32_t ts = rtp_session_get_current_recv_ts(rs); LOGP(DLMIB, LOGL_NOTICE, - "osmo-ortp(%d): timestamp_jump, new TS %d\n", port, ts); + "osmo-ortp(%d): timestamp_jump, new TS %d, resyncing\n", port, ts); + rtp_session_resync(rs); } -- To view, visit https://gerrit.osmocom.org/1028 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iae5da832218dbd1ede7a9451102074f2a5eb66df Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Oct 7 14:48:35 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 7 Oct 2016 14:48:35 +0000 Subject: [PATCH] osmo-bts[master]: DTX: fix conversion from fn to ms Message-ID: Review at https://gerrit.osmocom.org/1029 DTX: fix conversion from fn to ms Change-Id: I9cc70cacabde98621aa892cee74f4ac461645093 --- M src/common/l1sap.c 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/29/1029/1 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 04cc800..dd34d80 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -73,8 +73,10 @@ static uint32_t fn_ms_adj(uint32_t fn, uint32_t last_fn) { if (last_fn != LCHAN_FN_DUMMY) { - uint32_t ms_passed = GSM_FN_TO_MS(fn - last_fn), - samples_passed = GSM_MS_TO_SAMPLES(ms_passed); + /* 12/13 frames usable for audio in TCH, + 160 samples per RTP packet, + 1 RTP packet per 4 frames */ + uint32_t samples_passed = (fn - last_fn) * 12 * 160 / (13 * 4); /* round number of samples to the nearest multiple of GSM_RTP_DURATION */ uint32_t r = samples_passed + GSM_RTP_DURATION / 2; -- To view, visit https://gerrit.osmocom.org/1029 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9cc70cacabde98621aa892cee74f4ac461645093 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Oct 7 18:43:39 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 7 Oct 2016 18:43:39 +0000 Subject: [PATCH] osmo-bts[master]: DTX DL: use FSM for AMR Message-ID: Review at https://gerrit.osmocom.org/1030 DTX DL: use FSM for AMR Use dedicated FSM to handle all DTX DL related events. This affects both lc15 and sysmobts and requires corresponding change in OpenBSC. Change-Id: I74a0b42cb34d525b8a70d264135e82994ca70d31 --- M include/osmo-bts/Makefile.am A include/osmo-bts/dtx_dl_amr_fsm.h M include/osmo-bts/msg_utils.h M src/common/Makefile.am A 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/l1_if.h M src/osmo-bts-litecell15/tch.c M src/osmo-bts-sysmo/l1_if.c M src/osmo-bts-sysmo/l1_if.h M src/osmo-bts-sysmo/tch.c 13 files changed, 636 insertions(+), 126 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/30/1030/1 diff --git a/include/osmo-bts/Makefile.am b/include/osmo-bts/Makefile.am index d0b55ff..ef4165f 100644 --- a/include/osmo-bts/Makefile.am +++ b/include/osmo-bts/Makefile.am @@ -1,4 +1,5 @@ noinst_HEADERS = abis.h bts.h bts_model.h gsm_data.h logging.h measurement.h \ oml.h paging.h rsl.h signal.h vty.h amr.h pcu_if.h pcuif_proto.h \ handover.h msg_utils.h tx_power.h control_if.h cbch.h l1sap.h \ - power_control.h scheduler.h scheduler_backend.h phy_link.h + power_control.h scheduler.h scheduler_backend.h phy_link.h \ + dtx_dl_amr_fsm.h diff --git a/include/osmo-bts/dtx_dl_amr_fsm.h b/include/osmo-bts/dtx_dl_amr_fsm.h new file mode 100644 index 0000000..8b19595 --- /dev/null +++ b/include/osmo-bts/dtx_dl_amr_fsm.h @@ -0,0 +1,35 @@ +#pragma once + +#include +#include +#include + +/* DTX DL AMR FSM */ + +#define X(s) (1 << (s)) + +enum dtx_dl_amr_fsm_states { + ST_VOICE, + ST_SID_F1, + ST_SID_F2, + ST_F1_INH, + ST_U_INH, + ST_SID_U, + ST_ONSET_V, + ST_ONSET_F, + ST_FACCH_V, + ST_FACCH, +}; + +enum dtx_dl_amr_fsm_events { + E_VOICE, + E_ONSET, + E_FACCH, + E_COMPL, + E_INHIB, + E_SID_F, + E_SID_U, +}; + +extern const struct value_string dtx_dl_amr_fsm_event_names[]; +extern struct osmo_fsm dtx_dl_amr_fsm; diff --git a/include/osmo-bts/msg_utils.h b/include/osmo-bts/msg_utils.h index f99f3c4..31bd172 100644 --- a/include/osmo-bts/msg_utils.h +++ b/include/osmo-bts/msg_utils.h @@ -26,12 +26,11 @@ }; void lchan_set_marker(bool t, struct gsm_lchan *lchan); -void save_last_sid(struct gsm_lchan *lchan, const uint8_t *l1_payload, - size_t length, uint32_t fn, int update, uint8_t cmr, - int8_t cmi); -int dtx_amr_check_onset(struct gsm_lchan *lchan, const uint8_t *rtp_pl, +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, size_t rtp_pl_len, uint32_t fn, uint8_t *l1_payload, - uint8_t *ft_out); + bool marker, uint8_t *len, uint8_t *ft_out); uint8_t repeat_last_sid(struct gsm_lchan *lchan, uint8_t *dst, uint32_t fn); int msg_verify_ipa_structure(struct msgb *msg); int msg_verify_oml_structure(struct msgb *msg); diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 856f741..dd368d0 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -7,6 +7,7 @@ rsl.c vty.c paging.c measurement.c amr.c lchan.c \ load_indication.c pcu_sock.c handover.c msg_utils.c \ tx_power.c bts_ctrl_commands.c bts_ctrl_lookup.c \ - l1sap.c cbch.c power_control.c main.c phy_link.c + l1sap.c cbch.c power_control.c main.c phy_link.c \ + dtx_dl_amr_fsm.c libl1sched_a_SOURCES = scheduler.c diff --git a/src/common/dtx_dl_amr_fsm.c b/src/common/dtx_dl_amr_fsm.c new file mode 100644 index 0000000..7677624 --- /dev/null +++ b/src/common/dtx_dl_amr_fsm.c @@ -0,0 +1,304 @@ +/* DTX DL AMR FSM */ + +/* (C) 2016 by 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 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 . + * + */ + +#include +#include + +void dtx_fsm_voice(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_VOICE: + case E_FACCH: + break; + case E_SID_F: + case E_SID_U: + osmo_fsm_inst_state_chg(fi, ST_SID_F1, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Inexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_sid_f1(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_F: +/* FIXME: what shall we do if we get SID-FIRST _again_ (twice in a row)? + 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); + 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); + break; + case E_COMPL: + 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); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_sid_f2(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_U: + 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); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_f1_inh(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_u_inh(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 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) { + 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_INHIB: + osmo_fsm_inst_state_chg(fi, ST_U_INH, 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_onset_v(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_U: + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_FACCH_V, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_onset_f(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_U: + 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_FACCH, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_facch_v(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_FACCH: + break; + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); + break; + case E_SID_U: + break; + case E_SID_F: + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_facch(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_FACCH: + break; + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); + break; + case E_SID_U: + case E_SID_F: + osmo_fsm_inst_state_chg(fi, ST_SID_F1, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +static struct osmo_fsm_state dtx_dl_amr_fsm_states[] = { + [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), + .name = "Voice", + .action = dtx_fsm_voice, + }, + [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), + .name = "SID-FIRST (P1)", + .action = dtx_fsm_sid_f1, + }, + [ST_SID_F2]= { + .in_event_mask = X(E_SID_U) | X(E_VOICE) | X(E_FACCH), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_ONSET_F), + .name = "SID-FIRST (P2)", + .action = dtx_fsm_sid_f2, + }, + [ST_F1_INH]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), + .name = "SID-FIRST (Inh)", + .action = dtx_fsm_f1_inh, + }, + [ST_U_INH]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), + .name = "SID-UPDATE (Inh)", + .action = dtx_fsm_u_inh, + }, + [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", + .action = dtx_fsm_sid_upd, + }, + [ST_ONSET_V]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), + .name = "ONSET (Voice)", + .action = dtx_fsm_onset_v, + }, + [ST_ONSET_F]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH) | X(E_SID_U), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH), + .name = "ONSET (FACCH)", + .action = dtx_fsm_onset_f, + }, + [ST_FACCH_V]= { + .in_event_mask = X(E_FACCH) | X(E_VOICE) | X(E_SID_U) | X(E_SID_F), + .out_state_mask = X(ST_FACCH_V) | X(ST_VOICE) | X(ST_SID_F1), + .name = "FACCH (Voice)", + .action = dtx_fsm_facch_v, + }, + [ST_FACCH]= { + .in_event_mask = X(E_FACCH) | X(E_VOICE) | X(E_SID_U) | X(E_SID_F), + .out_state_mask = X(ST_FACCH_V) | X(ST_VOICE) | X(ST_SID_F1), + .name = "FACCH", + .action = dtx_fsm_facch, + }, +}; + +const struct value_string dtx_dl_amr_fsm_event_names[] = { + { E_VOICE, "Voice" }, + { E_FACCH, "FACCH" }, + { E_COMPL, "Complete P1 -> P2" }, + { E_INHIB, "Inhibit" }, + { E_SID_F, "SID-FIRST" }, + { E_SID_U, "SID-UPDATE" }, + { 0, NULL } +}; + +struct osmo_fsm dtx_dl_amr_fsm = { + .name = "DTX DL AMR FSM", + .states = dtx_dl_amr_fsm_states, + .num_states = ARRAY_SIZE(dtx_dl_amr_fsm_states), + .event_names = dtx_dl_amr_fsm_event_names, + .log_subsys = DL1C, +}; diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 943bdfe..40e8d52 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -33,12 +33,12 @@ #include #include #include - #include #include #include #include +#include #include #include #include @@ -528,6 +528,7 @@ uint8_t *p, *si; struct lapdm_entity *le; struct osmo_phsap_prim pp; + bool dtxd_facch = false; int rc; chan_nr = rts_ind->chan_nr; @@ -582,8 +583,11 @@ p[0] = lchan->ms_power_ctrl.current; p[1] = lchan->rqd_ta; le = &lchan->lapdm_ch.lapdm_acch; - } else + } else { + if (lchan->ts->trx->bts->dtxd) + dtxd_facch = true; le = &lchan->lapdm_ch.lapdm_dcch; + } rc = lapdm_phsap_dequeue_prim(le, &pp); if (rc < 0) { if (L1SAP_IS_LINK_SACCH(link_id)) { @@ -609,6 +613,10 @@ memcpy(p, pp.oph.msg->data, GSM_MACBLOCK_LEN); /* check if it is a RR CIPH MODE CMD. if yes, enable RX ciphering */ check_for_ciph_cmd(pp.oph.msg, lchan, chan_nr); + if (dtxd_facch) + osmo_fsm_inst_dispatch(lchan->tch.dtx_dl_amr_fsm, + E_FACCH, + (void *)lchan); } msgb_free(pp.oph.msg); } @@ -1136,6 +1144,13 @@ rc = l1sap_chan_act_dact_modify(trx, chan_nr, PRIM_INFO_ACTIVATE, 0); if (rc) return -RSL_ERR_EQUIPMENT_FAIL; + + /* Init DTX DL FSM if necessary */ + //FIXME: only do it for AMR TCH/* + osmo_fsm_register(&dtx_dl_amr_fsm); //FIXME: unreg and dealloc on lchan teradown + lchan->tch.dtx_dl_amr_fsm = osmo_fsm_inst_alloc(&dtx_dl_amr_fsm, + tall_bts_ctx, lchan, + LOGL_ERROR, lchan->name); return 0; } diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 99a211f..92410b7 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -17,6 +17,7 @@ * */ +#include #include #include #include @@ -26,6 +27,7 @@ #include #include #include +#include #include #include @@ -99,19 +101,15 @@ } } - /*! \brief Store the last SID frame in lchan context * \param[in] lchan Logical channel on which we check scheduling * \param[in] l1_payload buffer with SID data * \param[in] length length of l1_payload * \param[in] fn Frame Number for which we check scheduling * \param[in] update 0 if SID_FIRST, 1 if SID_UPDATE, -1 if not AMR SID - * \param[in] cmr Codec Mode Request (AMR-specific, ignored otherwise) - * \param[in] cmi Codec Mode Indication (AMR-specific, ignored otherwise) */ -void save_last_sid(struct gsm_lchan *lchan, const uint8_t *l1_payload, - size_t length, uint32_t fn, int update, uint8_t cmr, - int8_t cmi) +void dtx_cache_payload(struct gsm_lchan *lchan, const uint8_t *l1_payload, + size_t length, uint32_t fn, int update) { size_t amr = (update < 0) ? 0 : 2, copy_len = OSMO_MIN(length + 1, ARRAY_SIZE(lchan->tch.last_sid.buf)); @@ -120,62 +118,91 @@ lchan->tch.last_sid.fn = fn; lchan->tch.last_sid.is_update = update; - if (amr) - amr_set_mode_pref(lchan->tch.last_sid.buf, &lchan->tch.amr_mr, - cmi, cmr); memcpy(lchan->tch.last_sid.buf + amr, l1_payload, copy_len); } -/*! \brief Check current and cached SID to decide if talkspurt takes place +/*! \brief Check current state of DTX DL AMR FSM and dispatch necessary events * \param[in] lchan Logical channel on which we check scheduling * \param[in] rtp_pl buffer with RTP data * \param[in] rtp_pl_len length of rtp_pl * \param[in] fn Frame Number for which we check scheduling * \param[in] l1_payload buffer where CMR and CMI prefix should be added + * \param[out] len Length of expected L1 payload * \param[out] ft_out Frame Type to be populated after decoding - * \returns 0 if frame should be send immediately (2 byte CMR,CMI prefix added: - * caller must adjust length as necessary), - * 1 if ONSET event is detected - * negative if no sending is necessary (either error or cached SID - * UPDATE) + * \returns 0 in case of success; negative on error */ -int dtx_amr_check_onset(struct gsm_lchan *lchan, const uint8_t *rtp_pl, +int dtx_dl_amr_fsm_step(struct gsm_lchan *lchan, const uint8_t *rtp_pl, size_t rtp_pl_len, uint32_t fn, uint8_t *l1_payload, - uint8_t *ft_out) + bool marker, uint8_t *len, uint8_t *ft_out) { uint8_t cmr; enum osmo_amr_type ft; enum osmo_amr_quality bfi; int8_t sti, cmi; - osmo_amr_rtp_dec(rtp_pl, rtp_pl_len, &cmr, &cmi, &ft, &bfi, &sti); - *ft_out = ft; /* only needed for old sysmo firmware */ + int rc; - if (ft == AMR_SID) { - save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, sti, cmr, cmi); - if (sti) /* SID_UPDATE should be cached and send later */ - return -EAGAIN; - else { /* SID_FIRST - cached and send right away */ - amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi, - cmr); - return 0; - } + if (rtp_pl == NULL) { /* SID-FIRST P1 -> P2 */ + *len = 3; + memcpy(l1_payload, lchan->tch.last_sid.buf, 2); + osmo_fsm_inst_dispatch(lchan->tch.dtx_dl_amr_fsm, E_COMPL, + (void *)lchan); + return 0; } - if (ft != AMR_NO_DATA && !osmo_amr_is_speech(ft)) { + 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); + return rc; + } + + /* only needed for old sysmo firmware: */ + *ft_out = ft; + + /* populate L1 payload with CMR/CMI - might be ignored by caller: */ + amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi == -1 ? 0 : cmi, + cmr); + /* populate DTX cache with CMR/CMI - overwrite cache which will be + either updated or invalidated by caller anyway: */ + amr_set_mode_pref(lchan->tch.last_sid.buf, &lchan->tch.amr_mr, + cmi == -1 ? 0 : cmi, cmr); + *len = 3 + rtp_pl_len; + + /* DTX DL is not enabled, move along */ + if (!lchan->ts->trx->bts->dtxd) + return 0; + + if (osmo_amr_is_speech(ft)) { + if (lchan->tch.dtx_dl_amr_fsm->state == ST_SID_F1 || + lchan->tch.dtx_dl_amr_fsm->state == ST_SID_U) /* AMR HR */ + if (lchan->type == GSM_LCHAN_TCH_H && marker) + return osmo_fsm_inst_dispatch(lchan->tch.dtx_dl_amr_fsm, + E_INHIB, + (void *)lchan); + /* AMR FR */ + if (marker && lchan->tch.dtx_dl_amr_fsm->state == ST_SID_U) + 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 (ft == AMR_SID) { + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, sti); + return osmo_fsm_inst_dispatch(lchan->tch.dtx_dl_amr_fsm, + sti ? E_SID_U : E_SID_F, + (void *)lchan); + } + + if (ft != AMR_NO_DATA) { LOGP(DRTP, LOGL_ERROR, "unsupported AMR FT 0x%02x\n", ft); return -ENOTSUP; } - if (osmo_amr_is_speech(ft)) { - if (lchan->tch.last_sid.len) { /* force ONSET */ - lchan->tch.last_sid.len = 0; - return 1; - } - /* We received AMR SPEECH frame - invalidate saved SID */ - lchan->tch.last_sid.len = 0; - amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi, cmr); - } - + if (marker) + osmo_fsm_inst_dispatch(lchan->tch.dtx_dl_amr_fsm, E_VOICE, + (void *)lchan); + *len = 0; return 0; } diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index a4378c1..de0e6c9 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -432,7 +432,7 @@ } static int ph_tch_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache, bool marker) { struct lc15l1_hdl *fl1 = trx_lc15l1_hdl(trx); struct gsm_lchan *lchan; @@ -468,7 +468,7 @@ rc = l1if_tch_encode(lchan, l1p->u.phDataReq.msgUnitParam.u8Buffer, &l1p->u.phDataReq.msgUnitParam.u8Size, - msg->data, msg->len, u32Fn, + msg->data, msg->len, u32Fn, use_cache, l1sap->u.tch.marker); if (rc < 0) { /* no data encoded for L1: smth will be generated below */ @@ -506,10 +506,8 @@ /* send message to DSP's queue */ osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], nmsg); - if (l1sap->u.tch.marker) { /* DTX: send voice after ONSET was sent */ - l1sap->u.tch.marker = 0; - return ph_tch_req(trx, l1sap->oph.msg, l1sap); - } + if (rc > 0 && trx->bts->dtxd) /* DTX: send voice after ONSET was sent */ + return ph_tch_req(trx, l1sap->oph.msg, l1sap, true, false); return 0; } @@ -577,7 +575,7 @@ rc = ph_data_req(trx, msg, l1sap); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): - rc = ph_tch_req(trx, msg, l1sap); + rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); break; case OSMO_PRIM(PRIM_MPH_INFO, PRIM_OP_REQUEST): rc = mph_info_req(trx, msg, l1sap); diff --git a/src/osmo-bts-litecell15/l1_if.h b/src/osmo-bts-litecell15/l1_if.h index adb197d..7feee56 100644 --- a/src/osmo-bts-litecell15/l1_if.h +++ b/src/osmo-bts-litecell15/l1_if.h @@ -90,8 +90,8 @@ /* tch.c */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, - bool marker); + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker); int l1if_tch_rx(struct gsm_bts_trx *trx, uint8_t chan_nr, struct msgb *l1p_msg); int l1if_tch_fill(struct gsm_lchan *lchan, uint8_t *l1_buffer); struct msgb *gen_empty_tch_msg(struct gsm_lchan *lchan, uint32_t fn); diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index e246ffb..fb16d07 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -198,8 +199,7 @@ * \returns number of \a l1_payload bytes filled */ static int rtppayload_to_l1_amr(uint8_t *l1_payload, const uint8_t *rtp_payload, - uint8_t payload_len, - struct gsm_lchan *lchan, uint8_t ft) + uint8_t payload_len, uint8_t ft) { memcpy(l1_payload, rtp_payload, payload_len); return payload_len; @@ -210,10 +210,11 @@ /*! \brief function for incoming RTP via TCH.req * \param[in] rtp_pl buffer containing RTP payload * \param[in] rtp_pl_len length of \a rtp_pl + * \param[in] use_cache Use cached payload instead of parsing RTP * \param[in] marker RTP header Marker bit (indicates speech onset) * \returns 0 if encoding result can be sent further to L1 without extra actions * positive value if data is ready AND extra actions are required - * negative value otherwise + * negative value otherwise (no data for L1 encoded) * * This function prepares a msgb with a L1 PH-DATA.req primitive and * queues it into lchan->dl_tch_queue. @@ -223,7 +224,8 @@ * pre-fill the primtive. */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, bool marker) + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker) { uint8_t *payload_type; uint8_t *l1_payload, ft; @@ -252,7 +254,7 @@ is_sid = osmo_hr_check_sid(rtp_pl, rtp_pl_len); } if (is_sid) - save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, -1, 0, 0); + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, -1); break; case GSM48_CMODE_SPEECH_EFR: *payload_type = GsmL1_TchPlType_Efr; @@ -261,25 +263,75 @@ /* FIXME: detect and save EFR SID */ break; case GSM48_CMODE_SPEECH_AMR: - rc = dtx_amr_check_onset(lchan, rtp_pl, rtp_pl_len, fn, - l1_payload, &ft); - - if (marker || rc > 0) { - *payload_type = GsmL1_TchPlType_Amr_Onset; - *len = 1; - if (rc != 0) { - LOGP(DRTP, LOGL_NOTICE, "%s SPEECH frame without" - " Marker: ONSET forced\n", - get_value_string(osmo_amr_type_names, ft)); - return rc; - } - LOGP(DRTP, LOGL_DEBUG, "%s SPEECH frame with Marker\n", - get_value_string(osmo_amr_type_names, ft)); - } - else { + if (use_cache) { *payload_type = GsmL1_TchPlType_Amr; - rc = 2 + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, - rtp_pl_len, lchan, ft); + rtppayload_to_l1_amr(l1_payload, lchan->tch.last_sid.buf, + lchan->tch.last_sid.len, ft); + *len = lchan->tch.last_sid.len + 1; + return 0; + } + + rc = dtx_dl_amr_fsm_step(lchan, rtp_pl, rtp_pl_len, fn, + l1_payload, marker, len, &ft); + if (rc < 0) + return rc; + if (!lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + } + + /* DTX DL-specific logic below: */ + switch (lchan->tch.dtx_dl_amr_fsm->state) { + case ST_ONSET_V: + case ST_ONSET_F: + *payload_type = GsmL1_TchPlType_Amr_Onset; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + *len = 1; + return 1; + case ST_VOICE: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F1: + if (lchan->type == GSM_LCHAN_TCH_H) { /* AMR HR */ + *payload_type = GsmL1_TchPlType_Amr_SidFirstP1; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, + rtp_pl_len, ft); + return 0; + } + /* AMR FR */ + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F2: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_F1_INH: + *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: + *payload_type = GsmL1_TchPlType_Amr_SidUpdateInH; + *len = 3; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + return 1; + case ST_SID_U: + return -EAGAIN; + case ST_FACCH_V: + case ST_FACCH: + /* FIXME: if this possible at all? */ + return 0; + default: + LOGP(DRTP, LOGL_ERROR, "Unhandled DTX DL AMR FSM state " + "%d\n", lchan->tch.dtx_dl_amr_fsm->state); + return -EINVAL; } break; default: @@ -442,7 +494,20 @@ switch (lchan->tch_mode) { case GSM48_CMODE_SPEECH_AMR: - *payload_type = GsmL1_TchPlType_Amr; + if (lchan->type == GSM_LCHAN_TCH_H && + lchan->tch.dtx_dl_amr_fsm->state == ST_SID_F1 && + lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr_SidFirstP2; + rc = dtx_dl_amr_fsm_step(lchan, NULL, 0, fn, l1_payload, + false, &(msu_param->u8Size), + NULL); + if (rc < 0) { + msgb_free(msg); + return NULL; + } + return msg; + } else + *payload_type = GsmL1_TchPlType_Amr; break; case GSM48_CMODE_SPEECH_V1: if (lchan->type == GSM_LCHAN_TCH_F) @@ -458,12 +523,13 @@ return NULL; } - rc = repeat_last_sid(lchan, l1_payload, fn); - if (!rc) { - msgb_free(msg); - return NULL; + if (lchan->ts->trx->bts->dtxd) { + rc = repeat_last_sid(lchan, l1_payload, fn); + if (!rc) { + msgb_free(msg); + return NULL; + } + msu_param->u8Size = rc; } - msu_param->u8Size = rc; - return msg; } diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 09627af..a03a133 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -427,7 +427,7 @@ } static int ph_tch_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache, bool marker) { struct femtol1_hdl *fl1 = trx_femtol1_hdl(trx); struct gsm_lchan *lchan; @@ -463,7 +463,7 @@ rc = l1if_tch_encode(lchan, l1p->u.phDataReq.msgUnitParam.u8Buffer, &l1p->u.phDataReq.msgUnitParam.u8Size, - msg->data, msg->len, u32Fn, + msg->data, msg->len, u32Fn, use_cache, l1sap->u.tch.marker); if (rc < 0) { /* no data encoded for L1: smth will be generated below */ @@ -501,10 +501,8 @@ /* send message to DSP's queue */ osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], nmsg); - if (l1sap->u.tch.marker) { /* DTX: send voice after ONSET was sent */ - l1sap->u.tch.marker = 0; - return ph_tch_req(trx, l1sap->oph.msg, l1sap); - } + if (rc > 0 && trx->bts->dtxd) /* DTX: send voice after ONSET was sent */ + return ph_tch_req(trx, l1sap->oph.msg, l1sap, true, false); return 0; } @@ -572,7 +570,7 @@ rc = ph_data_req(trx, msg, l1sap); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): - rc = ph_tch_req(trx, msg, l1sap); + rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); break; case OSMO_PRIM(PRIM_MPH_INFO, PRIM_OP_REQUEST): rc = mph_info_req(trx, msg, l1sap); diff --git a/src/osmo-bts-sysmo/l1_if.h b/src/osmo-bts-sysmo/l1_if.h index ece7a01..0dc919b 100644 --- a/src/osmo-bts-sysmo/l1_if.h +++ b/src/osmo-bts-sysmo/l1_if.h @@ -110,8 +110,8 @@ /* tch.c */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, - bool marker); + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker); int l1if_tch_rx(struct gsm_bts_trx *trx, uint8_t chan_nr, struct msgb *l1p_msg); int l1if_tch_fill(struct gsm_lchan *lchan, uint8_t *l1_buffer); struct msgb *gen_empty_tch_msg(struct gsm_lchan *lchan, uint32_t fn); diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index ca9045e..bacaeda 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -281,8 +282,7 @@ * \returns number of \a l1_payload bytes filled */ static int rtppayload_to_l1_amr(uint8_t *l1_payload, const uint8_t *rtp_payload, - uint8_t payload_len, - struct gsm_lchan *lchan, uint8_t ft) + uint8_t payload_len, uint8_t ft) { #ifdef USE_L1_RTP_MODE memcpy(l1_payload, rtp_payload, payload_len); @@ -306,10 +306,11 @@ /*! \brief function for incoming RTP via TCH.req * \param[in] rtp_pl buffer containing RTP payload * \param[in] rtp_pl_len length of \a rtp_pl + * \param[in] use_cache Use cached payload instead of parsing RTP * \param[in] marker RTP header Marker bit (indicates speech onset) * \returns 0 if encoding result can be sent further to L1 without extra actions * positive value if data is ready AND extra actions are required - * negative value otherwise + * negative value otherwise (no data for L1 encoded) * * This function prepares a msgb with a L1 PH-DATA.req primitive and * queues it into lchan->dl_tch_queue. @@ -319,7 +320,8 @@ * pre-fill the primtive. */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, bool marker) + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker) { uint8_t *payload_type; uint8_t *l1_payload, ft; @@ -348,7 +350,7 @@ is_sid = osmo_hr_check_sid(rtp_pl, rtp_pl_len); } if (is_sid) - save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, -1, 0, 0); + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, -1); break; #if defined(L1_HAS_EFR) && defined(USE_L1_RTP_MODE) case GSM48_CMODE_SPEECH_EFR: @@ -359,25 +361,75 @@ break; #endif case GSM48_CMODE_SPEECH_AMR: - rc = dtx_amr_check_onset(lchan, rtp_pl, rtp_pl_len, fn, - l1_payload, &ft); - - if (marker || rc > 0) { - *payload_type = GsmL1_TchPlType_Amr_Onset; - *len = 1; - if (rc != 0) { - LOGP(DRTP, LOGL_NOTICE, "%s SPEECH frame without" - " Marker: ONSET forced\n", - get_value_string(osmo_amr_type_names, ft)); - return rc; - } - LOGP(DRTP, LOGL_DEBUG, "%s SPEECH frame with Marker\n", - get_value_string(osmo_amr_type_names, ft)); - } - else { + if (use_cache) { *payload_type = GsmL1_TchPlType_Amr; - rc = 2 + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, - rtp_pl_len, lchan, ft); + rtppayload_to_l1_amr(l1_payload, lchan->tch.last_sid.buf, + lchan->tch.last_sid.len, ft); + *len = lchan->tch.last_sid.len + 1; + return 0; + } + + rc = dtx_dl_amr_fsm_step(lchan, rtp_pl, rtp_pl_len, fn, + l1_payload, marker, len, &ft); + if (rc < 0) + return rc; + if (!lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + } + + /* DTX DL-specific logic below: */ + switch (lchan->tch.dtx_dl_amr_fsm->state) { + case ST_ONSET_V: + case ST_ONSET_F: + *payload_type = GsmL1_TchPlType_Amr_Onset; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + *len = 1; + return 1; + case ST_VOICE: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F1: + if (lchan->type == GSM_LCHAN_TCH_H) { /* AMR HR */ + *payload_type = GsmL1_TchPlType_Amr_SidFirstP1; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, + rtp_pl_len, ft); + return 0; + } + /* AMR FR */ + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F2: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_F1_INH: + *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: + *payload_type = GsmL1_TchPlType_Amr_SidUpdateInH; + *len = 3; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + return 1; + case ST_SID_U: + return -EAGAIN; + case ST_FACCH_V: + case ST_FACCH: + /* FIXME: if this possible at all? */ + return 0; + default: + LOGP(DRTP, LOGL_ERROR, "Unhandled DTX DL AMR FSM state " + "%d\n", lchan->tch.dtx_dl_amr_fsm->state); + return -EINVAL; } break; default: @@ -544,7 +596,20 @@ switch (lchan->tch_mode) { case GSM48_CMODE_SPEECH_AMR: - *payload_type = GsmL1_TchPlType_Amr; + if (lchan->type == GSM_LCHAN_TCH_H && + lchan->tch.dtx_dl_amr_fsm->state == ST_SID_F1 && + lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr_SidFirstP2; + rc = dtx_dl_amr_fsm_step(lchan, NULL, 0, fn, l1_payload, + false, &(msu_param->u8Size), + NULL); + if (rc < 0) { + msgb_free(msg); + return NULL; + } + return msg; + } else + *payload_type = GsmL1_TchPlType_Amr; break; case GSM48_CMODE_SPEECH_V1: if (lchan->type == GSM_LCHAN_TCH_F) @@ -560,12 +625,13 @@ return NULL; } - rc = repeat_last_sid(lchan, l1_payload, fn); - if (!rc) { - msgb_free(msg); - return NULL; + if (lchan->ts->trx->bts->dtxd) { + rc = repeat_last_sid(lchan, l1_payload, fn); + if (!rc) { + msgb_free(msg); + return NULL; + } + msu_param->u8Size = rc; } - msu_param->u8Size = rc; - return msg; } -- To view, visit https://gerrit.osmocom.org/1030 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I74a0b42cb34d525b8a70d264135e82994ca70d31 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Oct 7 18:52:33 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 7 Oct 2016 18:52:33 +0000 Subject: [PATCH] openbsc[master]: DTX DL: use FSM for AMR Message-ID: Review at https://gerrit.osmocom.org/1031 DTX DL: use FSM for AMR - add pointer to DL FSM for AMR - remove unused flag - expand buffer to hold cached payload alongsdie with CMR/CMI Change-Id: Idac8609faf9b5ced818fde899ccfc6ed0c42e8fd --- M openbsc/include/openbsc/gsm_data_shared.h 1 file changed, 2 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/31/1031/1 diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index 1e3855f..34509bf 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -294,20 +294,16 @@ } meas; struct { struct amr_multirate_conf amr_mr; + struct osmo_fsm_inst *dtx_dl_amr_fsm; struct { - uint8_t buf[18]; + uint8_t buf[20]; uint8_t len; uint32_t fn; bool is_update; } last_sid; - /* FIXME: 2 flags below are mutually exclusive - is it worth it - to merge them? */ /* set for each SID frame to detect talkspurt for codecs without explicit ONSET event */ bool ul_sid; - /* set for each SID_FIRST_P1 sent to L1 but not followed by - either of _P2 or InH */ - bool dl_fst; uint8_t last_cmr; uint32_t last_fn; /* indicates if DTXd was active during DL measurement period */ -- To view, visit https://gerrit.osmocom.org/1031 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idac8609faf9b5ced818fde899ccfc6ed0c42e8fd Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Oct 7 19:21:23 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 7 Oct 2016 19:21:23 +0000 Subject: [PATCH] osmo-bts[master]: DTX DL: use FSM for AMR In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1030 to look at the new patch set (#2). DTX DL: use FSM for AMR Use dedicated FSM to handle all DTX DL related events. This affects both lc15 and sysmobts and requires corresponding change in OpenBSC (Change-Id: Idac8609faf9b5ced818fde899ccfc6ed0c42e8fd). Change-Id: I74a0b42cb34d525b8a70d264135e82994ca70d31 --- M include/osmo-bts/Makefile.am A include/osmo-bts/dtx_dl_amr_fsm.h M include/osmo-bts/msg_utils.h M src/common/Makefile.am A 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/l1_if.h M src/osmo-bts-litecell15/tch.c M src/osmo-bts-sysmo/l1_if.c M src/osmo-bts-sysmo/l1_if.h M src/osmo-bts-sysmo/tch.c 13 files changed, 636 insertions(+), 125 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/30/1030/2 diff --git a/include/osmo-bts/Makefile.am b/include/osmo-bts/Makefile.am index d0b55ff..ef4165f 100644 --- a/include/osmo-bts/Makefile.am +++ b/include/osmo-bts/Makefile.am @@ -1,4 +1,5 @@ noinst_HEADERS = abis.h bts.h bts_model.h gsm_data.h logging.h measurement.h \ oml.h paging.h rsl.h signal.h vty.h amr.h pcu_if.h pcuif_proto.h \ handover.h msg_utils.h tx_power.h control_if.h cbch.h l1sap.h \ - power_control.h scheduler.h scheduler_backend.h phy_link.h + power_control.h scheduler.h scheduler_backend.h phy_link.h \ + dtx_dl_amr_fsm.h diff --git a/include/osmo-bts/dtx_dl_amr_fsm.h b/include/osmo-bts/dtx_dl_amr_fsm.h new file mode 100644 index 0000000..8b19595 --- /dev/null +++ b/include/osmo-bts/dtx_dl_amr_fsm.h @@ -0,0 +1,35 @@ +#pragma once + +#include +#include +#include + +/* DTX DL AMR FSM */ + +#define X(s) (1 << (s)) + +enum dtx_dl_amr_fsm_states { + ST_VOICE, + ST_SID_F1, + ST_SID_F2, + ST_F1_INH, + ST_U_INH, + ST_SID_U, + ST_ONSET_V, + ST_ONSET_F, + ST_FACCH_V, + ST_FACCH, +}; + +enum dtx_dl_amr_fsm_events { + E_VOICE, + E_ONSET, + E_FACCH, + E_COMPL, + E_INHIB, + E_SID_F, + E_SID_U, +}; + +extern const struct value_string dtx_dl_amr_fsm_event_names[]; +extern struct osmo_fsm dtx_dl_amr_fsm; diff --git a/include/osmo-bts/msg_utils.h b/include/osmo-bts/msg_utils.h index f99f3c4..31bd172 100644 --- a/include/osmo-bts/msg_utils.h +++ b/include/osmo-bts/msg_utils.h @@ -26,12 +26,11 @@ }; void lchan_set_marker(bool t, struct gsm_lchan *lchan); -void save_last_sid(struct gsm_lchan *lchan, const uint8_t *l1_payload, - size_t length, uint32_t fn, int update, uint8_t cmr, - int8_t cmi); -int dtx_amr_check_onset(struct gsm_lchan *lchan, const uint8_t *rtp_pl, +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, size_t rtp_pl_len, uint32_t fn, uint8_t *l1_payload, - uint8_t *ft_out); + bool marker, uint8_t *len, uint8_t *ft_out); uint8_t repeat_last_sid(struct gsm_lchan *lchan, uint8_t *dst, uint32_t fn); int msg_verify_ipa_structure(struct msgb *msg); int msg_verify_oml_structure(struct msgb *msg); diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 856f741..dd368d0 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -7,6 +7,7 @@ rsl.c vty.c paging.c measurement.c amr.c lchan.c \ load_indication.c pcu_sock.c handover.c msg_utils.c \ tx_power.c bts_ctrl_commands.c bts_ctrl_lookup.c \ - l1sap.c cbch.c power_control.c main.c phy_link.c + l1sap.c cbch.c power_control.c main.c phy_link.c \ + dtx_dl_amr_fsm.c libl1sched_a_SOURCES = scheduler.c diff --git a/src/common/dtx_dl_amr_fsm.c b/src/common/dtx_dl_amr_fsm.c new file mode 100644 index 0000000..7677624 --- /dev/null +++ b/src/common/dtx_dl_amr_fsm.c @@ -0,0 +1,304 @@ +/* DTX DL AMR FSM */ + +/* (C) 2016 by 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 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 . + * + */ + +#include +#include + +void dtx_fsm_voice(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_VOICE: + case E_FACCH: + break; + case E_SID_F: + case E_SID_U: + osmo_fsm_inst_state_chg(fi, ST_SID_F1, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Inexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_sid_f1(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_F: +/* FIXME: what shall we do if we get SID-FIRST _again_ (twice in a row)? + 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); + 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); + break; + case E_COMPL: + 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); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_sid_f2(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_U: + 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); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_f1_inh(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_u_inh(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 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) { + 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_INHIB: + osmo_fsm_inst_state_chg(fi, ST_U_INH, 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_onset_v(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_U: + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_FACCH_V, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_onset_f(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_U: + 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_FACCH, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_facch_v(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_FACCH: + break; + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); + break; + case E_SID_U: + break; + case E_SID_F: + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_facch(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_FACCH: + break; + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); + break; + case E_SID_U: + case E_SID_F: + osmo_fsm_inst_state_chg(fi, ST_SID_F1, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +static struct osmo_fsm_state dtx_dl_amr_fsm_states[] = { + [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), + .name = "Voice", + .action = dtx_fsm_voice, + }, + [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), + .name = "SID-FIRST (P1)", + .action = dtx_fsm_sid_f1, + }, + [ST_SID_F2]= { + .in_event_mask = X(E_SID_U) | X(E_VOICE) | X(E_FACCH), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_ONSET_F), + .name = "SID-FIRST (P2)", + .action = dtx_fsm_sid_f2, + }, + [ST_F1_INH]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), + .name = "SID-FIRST (Inh)", + .action = dtx_fsm_f1_inh, + }, + [ST_U_INH]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), + .name = "SID-UPDATE (Inh)", + .action = dtx_fsm_u_inh, + }, + [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", + .action = dtx_fsm_sid_upd, + }, + [ST_ONSET_V]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), + .name = "ONSET (Voice)", + .action = dtx_fsm_onset_v, + }, + [ST_ONSET_F]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH) | X(E_SID_U), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH), + .name = "ONSET (FACCH)", + .action = dtx_fsm_onset_f, + }, + [ST_FACCH_V]= { + .in_event_mask = X(E_FACCH) | X(E_VOICE) | X(E_SID_U) | X(E_SID_F), + .out_state_mask = X(ST_FACCH_V) | X(ST_VOICE) | X(ST_SID_F1), + .name = "FACCH (Voice)", + .action = dtx_fsm_facch_v, + }, + [ST_FACCH]= { + .in_event_mask = X(E_FACCH) | X(E_VOICE) | X(E_SID_U) | X(E_SID_F), + .out_state_mask = X(ST_FACCH_V) | X(ST_VOICE) | X(ST_SID_F1), + .name = "FACCH", + .action = dtx_fsm_facch, + }, +}; + +const struct value_string dtx_dl_amr_fsm_event_names[] = { + { E_VOICE, "Voice" }, + { E_FACCH, "FACCH" }, + { E_COMPL, "Complete P1 -> P2" }, + { E_INHIB, "Inhibit" }, + { E_SID_F, "SID-FIRST" }, + { E_SID_U, "SID-UPDATE" }, + { 0, NULL } +}; + +struct osmo_fsm dtx_dl_amr_fsm = { + .name = "DTX DL AMR FSM", + .states = dtx_dl_amr_fsm_states, + .num_states = ARRAY_SIZE(dtx_dl_amr_fsm_states), + .event_names = dtx_dl_amr_fsm_event_names, + .log_subsys = DL1C, +}; diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 943bdfe..0d87aee 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -528,6 +529,7 @@ uint8_t *p, *si; struct lapdm_entity *le; struct osmo_phsap_prim pp; + bool dtxd_facch = false; int rc; chan_nr = rts_ind->chan_nr; @@ -582,8 +584,11 @@ p[0] = lchan->ms_power_ctrl.current; p[1] = lchan->rqd_ta; le = &lchan->lapdm_ch.lapdm_acch; - } else + } else { + if (lchan->ts->trx->bts->dtxd) + dtxd_facch = true; le = &lchan->lapdm_ch.lapdm_dcch; + } rc = lapdm_phsap_dequeue_prim(le, &pp); if (rc < 0) { if (L1SAP_IS_LINK_SACCH(link_id)) { @@ -609,6 +614,10 @@ memcpy(p, pp.oph.msg->data, GSM_MACBLOCK_LEN); /* check if it is a RR CIPH MODE CMD. if yes, enable RX ciphering */ check_for_ciph_cmd(pp.oph.msg, lchan, chan_nr); + if (dtxd_facch) + osmo_fsm_inst_dispatch(lchan->tch.dtx_dl_amr_fsm, + E_FACCH, + (void *)lchan); } msgb_free(pp.oph.msg); } @@ -1136,6 +1145,13 @@ rc = l1sap_chan_act_dact_modify(trx, chan_nr, PRIM_INFO_ACTIVATE, 0); if (rc) return -RSL_ERR_EQUIPMENT_FAIL; + + /* Init DTX DL FSM if necessary */ + //FIXME: only do it for AMR TCH/* + osmo_fsm_register(&dtx_dl_amr_fsm); //FIXME: unreg and dealloc on lchan teradown + lchan->tch.dtx_dl_amr_fsm = osmo_fsm_inst_alloc(&dtx_dl_amr_fsm, + tall_bts_ctx, lchan, + LOGL_ERROR, lchan->name); return 0; } diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 99a211f..92410b7 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -17,6 +17,7 @@ * */ +#include #include #include #include @@ -26,6 +27,7 @@ #include #include #include +#include #include #include @@ -99,19 +101,15 @@ } } - /*! \brief Store the last SID frame in lchan context * \param[in] lchan Logical channel on which we check scheduling * \param[in] l1_payload buffer with SID data * \param[in] length length of l1_payload * \param[in] fn Frame Number for which we check scheduling * \param[in] update 0 if SID_FIRST, 1 if SID_UPDATE, -1 if not AMR SID - * \param[in] cmr Codec Mode Request (AMR-specific, ignored otherwise) - * \param[in] cmi Codec Mode Indication (AMR-specific, ignored otherwise) */ -void save_last_sid(struct gsm_lchan *lchan, const uint8_t *l1_payload, - size_t length, uint32_t fn, int update, uint8_t cmr, - int8_t cmi) +void dtx_cache_payload(struct gsm_lchan *lchan, const uint8_t *l1_payload, + size_t length, uint32_t fn, int update) { size_t amr = (update < 0) ? 0 : 2, copy_len = OSMO_MIN(length + 1, ARRAY_SIZE(lchan->tch.last_sid.buf)); @@ -120,62 +118,91 @@ lchan->tch.last_sid.fn = fn; lchan->tch.last_sid.is_update = update; - if (amr) - amr_set_mode_pref(lchan->tch.last_sid.buf, &lchan->tch.amr_mr, - cmi, cmr); memcpy(lchan->tch.last_sid.buf + amr, l1_payload, copy_len); } -/*! \brief Check current and cached SID to decide if talkspurt takes place +/*! \brief Check current state of DTX DL AMR FSM and dispatch necessary events * \param[in] lchan Logical channel on which we check scheduling * \param[in] rtp_pl buffer with RTP data * \param[in] rtp_pl_len length of rtp_pl * \param[in] fn Frame Number for which we check scheduling * \param[in] l1_payload buffer where CMR and CMI prefix should be added + * \param[out] len Length of expected L1 payload * \param[out] ft_out Frame Type to be populated after decoding - * \returns 0 if frame should be send immediately (2 byte CMR,CMI prefix added: - * caller must adjust length as necessary), - * 1 if ONSET event is detected - * negative if no sending is necessary (either error or cached SID - * UPDATE) + * \returns 0 in case of success; negative on error */ -int dtx_amr_check_onset(struct gsm_lchan *lchan, const uint8_t *rtp_pl, +int dtx_dl_amr_fsm_step(struct gsm_lchan *lchan, const uint8_t *rtp_pl, size_t rtp_pl_len, uint32_t fn, uint8_t *l1_payload, - uint8_t *ft_out) + bool marker, uint8_t *len, uint8_t *ft_out) { uint8_t cmr; enum osmo_amr_type ft; enum osmo_amr_quality bfi; int8_t sti, cmi; - osmo_amr_rtp_dec(rtp_pl, rtp_pl_len, &cmr, &cmi, &ft, &bfi, &sti); - *ft_out = ft; /* only needed for old sysmo firmware */ + int rc; - if (ft == AMR_SID) { - save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, sti, cmr, cmi); - if (sti) /* SID_UPDATE should be cached and send later */ - return -EAGAIN; - else { /* SID_FIRST - cached and send right away */ - amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi, - cmr); - return 0; - } + if (rtp_pl == NULL) { /* SID-FIRST P1 -> P2 */ + *len = 3; + memcpy(l1_payload, lchan->tch.last_sid.buf, 2); + osmo_fsm_inst_dispatch(lchan->tch.dtx_dl_amr_fsm, E_COMPL, + (void *)lchan); + return 0; } - if (ft != AMR_NO_DATA && !osmo_amr_is_speech(ft)) { + 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); + return rc; + } + + /* only needed for old sysmo firmware: */ + *ft_out = ft; + + /* populate L1 payload with CMR/CMI - might be ignored by caller: */ + amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi == -1 ? 0 : cmi, + cmr); + /* populate DTX cache with CMR/CMI - overwrite cache which will be + either updated or invalidated by caller anyway: */ + amr_set_mode_pref(lchan->tch.last_sid.buf, &lchan->tch.amr_mr, + cmi == -1 ? 0 : cmi, cmr); + *len = 3 + rtp_pl_len; + + /* DTX DL is not enabled, move along */ + if (!lchan->ts->trx->bts->dtxd) + return 0; + + if (osmo_amr_is_speech(ft)) { + if (lchan->tch.dtx_dl_amr_fsm->state == ST_SID_F1 || + lchan->tch.dtx_dl_amr_fsm->state == ST_SID_U) /* AMR HR */ + if (lchan->type == GSM_LCHAN_TCH_H && marker) + return osmo_fsm_inst_dispatch(lchan->tch.dtx_dl_amr_fsm, + E_INHIB, + (void *)lchan); + /* AMR FR */ + if (marker && lchan->tch.dtx_dl_amr_fsm->state == ST_SID_U) + 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 (ft == AMR_SID) { + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, sti); + return osmo_fsm_inst_dispatch(lchan->tch.dtx_dl_amr_fsm, + sti ? E_SID_U : E_SID_F, + (void *)lchan); + } + + if (ft != AMR_NO_DATA) { LOGP(DRTP, LOGL_ERROR, "unsupported AMR FT 0x%02x\n", ft); return -ENOTSUP; } - if (osmo_amr_is_speech(ft)) { - if (lchan->tch.last_sid.len) { /* force ONSET */ - lchan->tch.last_sid.len = 0; - return 1; - } - /* We received AMR SPEECH frame - invalidate saved SID */ - lchan->tch.last_sid.len = 0; - amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi, cmr); - } - + if (marker) + osmo_fsm_inst_dispatch(lchan->tch.dtx_dl_amr_fsm, E_VOICE, + (void *)lchan); + *len = 0; return 0; } diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index a4378c1..de0e6c9 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -432,7 +432,7 @@ } static int ph_tch_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache, bool marker) { struct lc15l1_hdl *fl1 = trx_lc15l1_hdl(trx); struct gsm_lchan *lchan; @@ -468,7 +468,7 @@ rc = l1if_tch_encode(lchan, l1p->u.phDataReq.msgUnitParam.u8Buffer, &l1p->u.phDataReq.msgUnitParam.u8Size, - msg->data, msg->len, u32Fn, + msg->data, msg->len, u32Fn, use_cache, l1sap->u.tch.marker); if (rc < 0) { /* no data encoded for L1: smth will be generated below */ @@ -506,10 +506,8 @@ /* send message to DSP's queue */ osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], nmsg); - if (l1sap->u.tch.marker) { /* DTX: send voice after ONSET was sent */ - l1sap->u.tch.marker = 0; - return ph_tch_req(trx, l1sap->oph.msg, l1sap); - } + if (rc > 0 && trx->bts->dtxd) /* DTX: send voice after ONSET was sent */ + return ph_tch_req(trx, l1sap->oph.msg, l1sap, true, false); return 0; } @@ -577,7 +575,7 @@ rc = ph_data_req(trx, msg, l1sap); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): - rc = ph_tch_req(trx, msg, l1sap); + rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); break; case OSMO_PRIM(PRIM_MPH_INFO, PRIM_OP_REQUEST): rc = mph_info_req(trx, msg, l1sap); diff --git a/src/osmo-bts-litecell15/l1_if.h b/src/osmo-bts-litecell15/l1_if.h index adb197d..7feee56 100644 --- a/src/osmo-bts-litecell15/l1_if.h +++ b/src/osmo-bts-litecell15/l1_if.h @@ -90,8 +90,8 @@ /* tch.c */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, - bool marker); + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker); int l1if_tch_rx(struct gsm_bts_trx *trx, uint8_t chan_nr, struct msgb *l1p_msg); int l1if_tch_fill(struct gsm_lchan *lchan, uint8_t *l1_buffer); struct msgb *gen_empty_tch_msg(struct gsm_lchan *lchan, uint32_t fn); diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index e246ffb..fb16d07 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -198,8 +199,7 @@ * \returns number of \a l1_payload bytes filled */ static int rtppayload_to_l1_amr(uint8_t *l1_payload, const uint8_t *rtp_payload, - uint8_t payload_len, - struct gsm_lchan *lchan, uint8_t ft) + uint8_t payload_len, uint8_t ft) { memcpy(l1_payload, rtp_payload, payload_len); return payload_len; @@ -210,10 +210,11 @@ /*! \brief function for incoming RTP via TCH.req * \param[in] rtp_pl buffer containing RTP payload * \param[in] rtp_pl_len length of \a rtp_pl + * \param[in] use_cache Use cached payload instead of parsing RTP * \param[in] marker RTP header Marker bit (indicates speech onset) * \returns 0 if encoding result can be sent further to L1 without extra actions * positive value if data is ready AND extra actions are required - * negative value otherwise + * negative value otherwise (no data for L1 encoded) * * This function prepares a msgb with a L1 PH-DATA.req primitive and * queues it into lchan->dl_tch_queue. @@ -223,7 +224,8 @@ * pre-fill the primtive. */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, bool marker) + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker) { uint8_t *payload_type; uint8_t *l1_payload, ft; @@ -252,7 +254,7 @@ is_sid = osmo_hr_check_sid(rtp_pl, rtp_pl_len); } if (is_sid) - save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, -1, 0, 0); + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, -1); break; case GSM48_CMODE_SPEECH_EFR: *payload_type = GsmL1_TchPlType_Efr; @@ -261,25 +263,75 @@ /* FIXME: detect and save EFR SID */ break; case GSM48_CMODE_SPEECH_AMR: - rc = dtx_amr_check_onset(lchan, rtp_pl, rtp_pl_len, fn, - l1_payload, &ft); - - if (marker || rc > 0) { - *payload_type = GsmL1_TchPlType_Amr_Onset; - *len = 1; - if (rc != 0) { - LOGP(DRTP, LOGL_NOTICE, "%s SPEECH frame without" - " Marker: ONSET forced\n", - get_value_string(osmo_amr_type_names, ft)); - return rc; - } - LOGP(DRTP, LOGL_DEBUG, "%s SPEECH frame with Marker\n", - get_value_string(osmo_amr_type_names, ft)); - } - else { + if (use_cache) { *payload_type = GsmL1_TchPlType_Amr; - rc = 2 + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, - rtp_pl_len, lchan, ft); + rtppayload_to_l1_amr(l1_payload, lchan->tch.last_sid.buf, + lchan->tch.last_sid.len, ft); + *len = lchan->tch.last_sid.len + 1; + return 0; + } + + rc = dtx_dl_amr_fsm_step(lchan, rtp_pl, rtp_pl_len, fn, + l1_payload, marker, len, &ft); + if (rc < 0) + return rc; + if (!lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + } + + /* DTX DL-specific logic below: */ + switch (lchan->tch.dtx_dl_amr_fsm->state) { + case ST_ONSET_V: + case ST_ONSET_F: + *payload_type = GsmL1_TchPlType_Amr_Onset; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + *len = 1; + return 1; + case ST_VOICE: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F1: + if (lchan->type == GSM_LCHAN_TCH_H) { /* AMR HR */ + *payload_type = GsmL1_TchPlType_Amr_SidFirstP1; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, + rtp_pl_len, ft); + return 0; + } + /* AMR FR */ + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F2: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_F1_INH: + *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: + *payload_type = GsmL1_TchPlType_Amr_SidUpdateInH; + *len = 3; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + return 1; + case ST_SID_U: + return -EAGAIN; + case ST_FACCH_V: + case ST_FACCH: + /* FIXME: if this possible at all? */ + return 0; + default: + LOGP(DRTP, LOGL_ERROR, "Unhandled DTX DL AMR FSM state " + "%d\n", lchan->tch.dtx_dl_amr_fsm->state); + return -EINVAL; } break; default: @@ -442,7 +494,20 @@ switch (lchan->tch_mode) { case GSM48_CMODE_SPEECH_AMR: - *payload_type = GsmL1_TchPlType_Amr; + if (lchan->type == GSM_LCHAN_TCH_H && + lchan->tch.dtx_dl_amr_fsm->state == ST_SID_F1 && + lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr_SidFirstP2; + rc = dtx_dl_amr_fsm_step(lchan, NULL, 0, fn, l1_payload, + false, &(msu_param->u8Size), + NULL); + if (rc < 0) { + msgb_free(msg); + return NULL; + } + return msg; + } else + *payload_type = GsmL1_TchPlType_Amr; break; case GSM48_CMODE_SPEECH_V1: if (lchan->type == GSM_LCHAN_TCH_F) @@ -458,12 +523,13 @@ return NULL; } - rc = repeat_last_sid(lchan, l1_payload, fn); - if (!rc) { - msgb_free(msg); - return NULL; + if (lchan->ts->trx->bts->dtxd) { + rc = repeat_last_sid(lchan, l1_payload, fn); + if (!rc) { + msgb_free(msg); + return NULL; + } + msu_param->u8Size = rc; } - msu_param->u8Size = rc; - return msg; } diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 09627af..a03a133 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -427,7 +427,7 @@ } static int ph_tch_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache, bool marker) { struct femtol1_hdl *fl1 = trx_femtol1_hdl(trx); struct gsm_lchan *lchan; @@ -463,7 +463,7 @@ rc = l1if_tch_encode(lchan, l1p->u.phDataReq.msgUnitParam.u8Buffer, &l1p->u.phDataReq.msgUnitParam.u8Size, - msg->data, msg->len, u32Fn, + msg->data, msg->len, u32Fn, use_cache, l1sap->u.tch.marker); if (rc < 0) { /* no data encoded for L1: smth will be generated below */ @@ -501,10 +501,8 @@ /* send message to DSP's queue */ osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], nmsg); - if (l1sap->u.tch.marker) { /* DTX: send voice after ONSET was sent */ - l1sap->u.tch.marker = 0; - return ph_tch_req(trx, l1sap->oph.msg, l1sap); - } + if (rc > 0 && trx->bts->dtxd) /* DTX: send voice after ONSET was sent */ + return ph_tch_req(trx, l1sap->oph.msg, l1sap, true, false); return 0; } @@ -572,7 +570,7 @@ rc = ph_data_req(trx, msg, l1sap); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): - rc = ph_tch_req(trx, msg, l1sap); + rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); break; case OSMO_PRIM(PRIM_MPH_INFO, PRIM_OP_REQUEST): rc = mph_info_req(trx, msg, l1sap); diff --git a/src/osmo-bts-sysmo/l1_if.h b/src/osmo-bts-sysmo/l1_if.h index ece7a01..0dc919b 100644 --- a/src/osmo-bts-sysmo/l1_if.h +++ b/src/osmo-bts-sysmo/l1_if.h @@ -110,8 +110,8 @@ /* tch.c */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, - bool marker); + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker); int l1if_tch_rx(struct gsm_bts_trx *trx, uint8_t chan_nr, struct msgb *l1p_msg); int l1if_tch_fill(struct gsm_lchan *lchan, uint8_t *l1_buffer); struct msgb *gen_empty_tch_msg(struct gsm_lchan *lchan, uint32_t fn); diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index ca9045e..bacaeda 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -281,8 +282,7 @@ * \returns number of \a l1_payload bytes filled */ static int rtppayload_to_l1_amr(uint8_t *l1_payload, const uint8_t *rtp_payload, - uint8_t payload_len, - struct gsm_lchan *lchan, uint8_t ft) + uint8_t payload_len, uint8_t ft) { #ifdef USE_L1_RTP_MODE memcpy(l1_payload, rtp_payload, payload_len); @@ -306,10 +306,11 @@ /*! \brief function for incoming RTP via TCH.req * \param[in] rtp_pl buffer containing RTP payload * \param[in] rtp_pl_len length of \a rtp_pl + * \param[in] use_cache Use cached payload instead of parsing RTP * \param[in] marker RTP header Marker bit (indicates speech onset) * \returns 0 if encoding result can be sent further to L1 without extra actions * positive value if data is ready AND extra actions are required - * negative value otherwise + * negative value otherwise (no data for L1 encoded) * * This function prepares a msgb with a L1 PH-DATA.req primitive and * queues it into lchan->dl_tch_queue. @@ -319,7 +320,8 @@ * pre-fill the primtive. */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, bool marker) + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker) { uint8_t *payload_type; uint8_t *l1_payload, ft; @@ -348,7 +350,7 @@ is_sid = osmo_hr_check_sid(rtp_pl, rtp_pl_len); } if (is_sid) - save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, -1, 0, 0); + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, -1); break; #if defined(L1_HAS_EFR) && defined(USE_L1_RTP_MODE) case GSM48_CMODE_SPEECH_EFR: @@ -359,25 +361,75 @@ break; #endif case GSM48_CMODE_SPEECH_AMR: - rc = dtx_amr_check_onset(lchan, rtp_pl, rtp_pl_len, fn, - l1_payload, &ft); - - if (marker || rc > 0) { - *payload_type = GsmL1_TchPlType_Amr_Onset; - *len = 1; - if (rc != 0) { - LOGP(DRTP, LOGL_NOTICE, "%s SPEECH frame without" - " Marker: ONSET forced\n", - get_value_string(osmo_amr_type_names, ft)); - return rc; - } - LOGP(DRTP, LOGL_DEBUG, "%s SPEECH frame with Marker\n", - get_value_string(osmo_amr_type_names, ft)); - } - else { + if (use_cache) { *payload_type = GsmL1_TchPlType_Amr; - rc = 2 + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, - rtp_pl_len, lchan, ft); + rtppayload_to_l1_amr(l1_payload, lchan->tch.last_sid.buf, + lchan->tch.last_sid.len, ft); + *len = lchan->tch.last_sid.len + 1; + return 0; + } + + rc = dtx_dl_amr_fsm_step(lchan, rtp_pl, rtp_pl_len, fn, + l1_payload, marker, len, &ft); + if (rc < 0) + return rc; + if (!lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + } + + /* DTX DL-specific logic below: */ + switch (lchan->tch.dtx_dl_amr_fsm->state) { + case ST_ONSET_V: + case ST_ONSET_F: + *payload_type = GsmL1_TchPlType_Amr_Onset; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + *len = 1; + return 1; + case ST_VOICE: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F1: + if (lchan->type == GSM_LCHAN_TCH_H) { /* AMR HR */ + *payload_type = GsmL1_TchPlType_Amr_SidFirstP1; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, + rtp_pl_len, ft); + return 0; + } + /* AMR FR */ + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F2: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_F1_INH: + *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: + *payload_type = GsmL1_TchPlType_Amr_SidUpdateInH; + *len = 3; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + return 1; + case ST_SID_U: + return -EAGAIN; + case ST_FACCH_V: + case ST_FACCH: + /* FIXME: if this possible at all? */ + return 0; + default: + LOGP(DRTP, LOGL_ERROR, "Unhandled DTX DL AMR FSM state " + "%d\n", lchan->tch.dtx_dl_amr_fsm->state); + return -EINVAL; } break; default: @@ -544,7 +596,20 @@ switch (lchan->tch_mode) { case GSM48_CMODE_SPEECH_AMR: - *payload_type = GsmL1_TchPlType_Amr; + if (lchan->type == GSM_LCHAN_TCH_H && + lchan->tch.dtx_dl_amr_fsm->state == ST_SID_F1 && + lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr_SidFirstP2; + rc = dtx_dl_amr_fsm_step(lchan, NULL, 0, fn, l1_payload, + false, &(msu_param->u8Size), + NULL); + if (rc < 0) { + msgb_free(msg); + return NULL; + } + return msg; + } else + *payload_type = GsmL1_TchPlType_Amr; break; case GSM48_CMODE_SPEECH_V1: if (lchan->type == GSM_LCHAN_TCH_F) @@ -560,12 +625,13 @@ return NULL; } - rc = repeat_last_sid(lchan, l1_payload, fn); - if (!rc) { - msgb_free(msg); - return NULL; + if (lchan->ts->trx->bts->dtxd) { + rc = repeat_last_sid(lchan, l1_payload, fn); + if (!rc) { + msgb_free(msg); + return NULL; + } + msu_param->u8Size = rc; } - msu_param->u8Size = rc; - return msg; } -- To view, visit https://gerrit.osmocom.org/1030 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I74a0b42cb34d525b8a70d264135e82994ca70d31 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 Oct 10 00:57:36 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 10 Oct 2016 00:57:36 +0000 Subject: osmo-bts[master]: DTX DL: use FSM for AMR In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 Verified+1 I can confirm that this fixes voice for sysmoBTS using SDK 1.5.4, so adding my V+1. But your commit log is too sparse for this size of patch, and given the situation: You should include a hint at the fact that a regression introduced by DTX is fixed by this, and do also explain at least briefly what was wrong before. I'd also welcome a summary of what the patch does in the files it touches. (The jenkins build failure is only due to the commit needed on openbsc, that's why I can V+1 despite jenkins's V-1.) -- To view, visit https://gerrit.osmocom.org/1030 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I74a0b42cb34d525b8a70d264135e82994ca70d31 Gerrit-PatchSet: 2 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 Mon Oct 10 01:04:32 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 10 Oct 2016 01:04:32 +0000 Subject: openbsc[master]: DTX DL: use FSM for AMR In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 (2 comments) minor cosmetics... https://gerrit.osmocom.org/#/c/1031/1//COMMIT_MSG Commit Message: Line 10: - remove unused flag dl_fst was never used, so technically this change is unrelated. Line 11: - expand buffer to hold cached payload alongsdie with CMR/CMI is this directly related to "use FSM for AMR"? (also: 'alongside' typo) -- To view, visit https://gerrit.osmocom.org/1031 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idac8609faf9b5ced818fde899ccfc6ed0c42e8fd Gerrit-PatchSet: 1 Gerrit-Project: openbsc 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 Mon Oct 10 01:27:46 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 10 Oct 2016 01:27:46 +0000 Subject: [PATCH] openbsc[master]: abis_rsl_rx_dchan(): guard against lchan_lookup() returning ... Message-ID: Review at https://gerrit.osmocom.org/1032 abis_rsl_rx_dchan(): guard against lchan_lookup() returning NULL Found this by coincidence, no actual failure case was observed. lchan_lookup() does have a return NULL code path, so we should not blindly use its returned pointer. Change-Id: I34ce126d36420b8194c88c0faa865294334a6658 --- M openbsc/src/libbsc/abis_rsl.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/32/1032/1 diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c index dc4ede2..316fc3f 100644 --- a/openbsc/src/libbsc/abis_rsl.c +++ b/openbsc/src/libbsc/abis_rsl.c @@ -1456,6 +1456,8 @@ msg->lchan = lchan_lookup(sign_link->trx, rslh->chan_nr, "Abis RSL rx DCHAN: "); + if (!msg->lchan) + return -1; ts_name = gsm_lchan_name(msg->lchan); switch (rslh->c.msg_type) { -- To view, visit https://gerrit.osmocom.org/1032 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I34ce126d36420b8194c88c0faa865294334a6658 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 10 01:27:46 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 10 Oct 2016 01:27:46 +0000 Subject: [PATCH] openbsc[master]: gsm_trx_name(): don't break if trx is NULL Message-ID: Review at https://gerrit.osmocom.org/1033 gsm_trx_name(): don't break if trx is NULL Just as a general precaution deemed to fit such a convenience function that lives in libcommon, no actual failure observed. Change-Id: I8e77fe1abc402469fd037e2fde2f46e2c8114f59 --- M openbsc/src/libcommon/gsm_data_shared.c 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/33/1033/1 diff --git a/openbsc/src/libcommon/gsm_data_shared.c b/openbsc/src/libcommon/gsm_data_shared.c index 4eea21e..b8853ad 100644 --- a/openbsc/src/libcommon/gsm_data_shared.c +++ b/openbsc/src/libcommon/gsm_data_shared.c @@ -328,8 +328,11 @@ char *gsm_trx_name(const struct gsm_bts_trx *trx) { - snprintf(ts2str, sizeof(ts2str), "(bts=%d,trx=%d)", - trx->bts->nr, trx->nr); + if (!trx) + snprintf(ts2str, sizeof(ts2str), "(trx=NULL)"); + else + snprintf(ts2str, sizeof(ts2str), "(bts=%d,trx=%d)", + trx->bts->nr, trx->nr); return ts2str; } -- To view, visit https://gerrit.osmocom.org/1033 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8e77fe1abc402469fd037e2fde2f46e2c8114f59 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 10 11:17:30 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 10 Oct 2016 11:17:30 +0000 Subject: [PATCH] osmo-bts[master]: Move copy-pasted array into shared header Message-ID: Review at https://gerrit.osmocom.org/1034 Move copy-pasted array into shared header Change-Id: I377ece2845830e3defab2d515f44b629ce5aed8e --- M include/osmo-bts/l1sap.h M src/common/l1sap.c M src/osmo-bts-litecell15/l1_if.c M src/osmo-bts-sysmo/l1_if.c 4 files changed, 8 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/34/1034/1 diff --git a/include/osmo-bts/l1sap.h b/include/osmo-bts/l1sap.h index 981cd75..77bfbaa 100644 --- a/include/osmo-bts/l1sap.h +++ b/include/osmo-bts/l1sap.h @@ -1,6 +1,8 @@ #ifndef L1SAP_H #define L1SAP_H +#include + /* timeslot and subslot from chan_nr */ #define L1SAP_CHAN2TS(chan_nr) (chan_nr & 7) #define L1SAP_CHAN2SS_TCHH(chan_nr) ((chan_nr >> 3) & 1) @@ -28,6 +30,12 @@ #define L1SAP_FN2PTCCHBLOCK(fn) ((fn / 104) & 3) #define L1SAP_IS_PTCCH(fn) ((fn % 52) == 12) +static const uint8_t fill_frame[GSM_MACBLOCK_LEN] = { + 0x03, 0x03, 0x01, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, + 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, + 0x2B, 0x2B, 0x2B +}; + /* subslot from any chan_nr */ static inline uint8_t l1sap_chan2ss(uint8_t chan_nr) { diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 943bdfe..53677f4 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -84,12 +84,6 @@ return GSM_RTP_DURATION; } -static const uint8_t fill_frame[GSM_MACBLOCK_LEN] = { - 0x03, 0x03, 0x01, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, - 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, - 0x2B, 0x2B, 0x2B -}; - /* allocate a msgb containing a osmo_phsap_prim + optional l2 data * in order to wrap femtobts header arround l2 data, there must be enough space * in front and behind data pointer */ diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index a4378c1..1c98951 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -286,12 +286,6 @@ return empty_req; } -static const uint8_t fill_frame[GSM_MACBLOCK_LEN] = { - 0x03, 0x03, 0x01, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, - 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, - 0x2B, 0x2B, 0x2B -}; - /* fill PH-DATA.req from l1sap primitive */ static GsmL1_PhDataReq_t * data_req_from_l1sap(GsmL1_Prim_t *l1p, struct lc15l1_hdl *fl1, diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 09627af..11a5729 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -281,12 +281,6 @@ return empty_req; } -static const uint8_t fill_frame[GSM_MACBLOCK_LEN] = { - 0x03, 0x03, 0x01, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, - 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, - 0x2B, 0x2B, 0x2B -}; - /* fill PH-DATA.req from l1sap primitive */ static GsmL1_PhDataReq_t * data_req_from_l1sap(GsmL1_Prim_t *l1p, struct femtol1_hdl *fl1, -- To view, visit https://gerrit.osmocom.org/1034 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I377ece2845830e3defab2d515f44b629ce5aed8e Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Oct 10 11:35:39 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 10 Oct 2016 11:35:39 +0000 Subject: [PATCH] osmo-iuh[master]: fix build: look for generated sources in builddir, not srcdir Message-ID: Review at https://gerrit.osmocom.org/1035 fix build: look for generated sources in builddir, not srcdir Fixes 'make check' from a different dir than the source tree. Change-Id: I97606dadef3c2184f9538b0198029047cc3af71c --- M src/tests/Makefile.am 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/35/1035/1 diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am index 5b51262..e2bea07 100644 --- a/src/tests/Makefile.am +++ b/src/tests/Makefile.am @@ -9,13 +9,13 @@ noinst_HEADERS = test_common.h hnb-test.h hnb-test-layers.h -HNBAP_FILES = $(top_srcdir)/src/hnbap_common.c $(top_srcdir)/src/hnbap_decoder.c $(top_srcdir)/src/hnbap_encoder.c -RUA_FILES = $(top_srcdir)/src/rua_common.c $(top_srcdir)/src/rua_decoder.c $(top_srcdir)/src/rua_encoder.c $(top_srcdir)/src/rua_msg_factory.c +HNBAP_FILES = $(top_srcdir)/src/hnbap_common.c $(top_builddir)/src/hnbap_decoder.c $(top_builddir)/src/hnbap_encoder.c +RUA_FILES = $(top_srcdir)/src/rua_common.c $(top_builddir)/src/rua_decoder.c $(top_builddir)/src/rua_encoder.c $(top_srcdir)/src/rua_msg_factory.c test_helpers_SOURCES = test-helpers.c test_common.c test_helpers_LDADD = $(COMMON_LIBS) $(top_builddir)/src/libosmo-ranap.la -test_hnbap_SOURCES = $(top_srcdir)/src/hnbap_common.c $(top_srcdir)/src/hnbap_decoder.c test-hnbap.c test_common.c +test_hnbap_SOURCES = $(top_srcdir)/src/hnbap_common.c $(top_builddir)/src/hnbap_decoder.c test-hnbap.c test_common.c test_hnbap_LDADD = $(COMMON_LIBS) $(top_builddir)/src/hnbap/libosmo-asn1-hnbap.a $(top_builddir)/src/libosmo-ranap.la hnb_test_SOURCES = $(HNBAP_FILES) $(RUA_FILES) hnb-test.c test_common.c hnb-test-ranap.c hnb-test-rua.c -- To view, visit https://gerrit.osmocom.org/1035 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I97606dadef3c2184f9538b0198029047cc3af71c Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 10 11:37:08 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 10 Oct 2016 11:37:08 +0000 Subject: openbsc[master]: bsc: count the usage of codec by setting the lchan active In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/794/3/openbsc/src/libbsc/abis_rsl.c File openbsc/src/libbsc/abis_rsl.c: Line 1206: count_codecs(msg->trx->bts, lchan); yeah. better to access the bts through the lchan.. e.g. lchan->trx->ts should work too. -- To view, visit https://gerrit.osmocom.org/794 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifc8a406a11dce16b9e7f3310841e470545550a2c Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Oct 10 12:19:52 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 10 Oct 2016 12:19:52 +0000 Subject: [PATCH] openbsc[master]: OML: Fixing static OML attribute tables 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/973 to look at the new patch set (#3). OML: Fixing static OML attribute tables - the OML attribute tables are hardcoded. To set variable parameters, the hardcoded data structure (tlv) is patched on byte level during runtime. This patch replaces that mechanism by setting up the TLV structures on runtime using mesage buffers (struct msgb) Change-Id: Ibeb34a84912d6cf695f553a34c69320fca7d08fa --- M openbsc/.gitignore M openbsc/configure.ac M openbsc/include/openbsc/Makefile.am A openbsc/include/openbsc/bts_ipaccess_nanobts_omlattr.h M openbsc/src/libbsc/Makefile.am M openbsc/src/libbsc/bts_ipaccess_nanobts.c A openbsc/src/libbsc/bts_ipaccess_nanobts_omlattr.c M openbsc/tests/Makefile.am A openbsc/tests/nanobts_omlattr/Makefile.am A openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c A openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.ok M openbsc/tests/testsuite.at 12 files changed, 638 insertions(+), 221 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/73/973/3 diff --git a/openbsc/.gitignore b/openbsc/.gitignore index 6fbd463..3324069 100644 --- a/openbsc/.gitignore +++ b/openbsc/.gitignore @@ -85,6 +85,7 @@ tests/sndcp_xid/sndcp_xid_test tests/slhc/slhc_test tests/v42bis/v42bis_test +tests/nanobts_omlattr/nanobts_omlattr_test tests/atconfig tests/atlocal diff --git a/openbsc/configure.ac b/openbsc/configure.ac index e2575c1..b18ecc1 100644 --- a/openbsc/configure.ac +++ b/openbsc/configure.ac @@ -244,6 +244,7 @@ tests/sndcp_xid/Makefile tests/slhc/Makefile tests/v42bis/Makefile + tests/nanobts_omlattr/Makefile doc/Makefile doc/examples/Makefile Makefile) diff --git a/openbsc/include/openbsc/Makefile.am b/openbsc/include/openbsc/Makefile.am index c6a0149..86bb981 100644 --- a/openbsc/include/openbsc/Makefile.am +++ b/openbsc/include/openbsc/Makefile.am @@ -81,6 +81,7 @@ vty.h \ v42bis.h \ v42bis_private.h \ + bts_ipaccess_nanobts_omlattr.h \ $(NULL) openbsc_HEADERS = \ diff --git a/openbsc/include/openbsc/bts_ipaccess_nanobts_omlattr.h b/openbsc/include/openbsc/bts_ipaccess_nanobts_omlattr.h new file mode 100644 index 0000000..bc7860b --- /dev/null +++ b/openbsc/include/openbsc/bts_ipaccess_nanobts_omlattr.h @@ -0,0 +1,32 @@ +/* OML attribute table generator for ipaccess nanobts */ + +/* (C) 2016 by sysmocom s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * 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 + +struct msgb *nanobts_attr_bts_get(struct gsm_bts *bts); +struct msgb *nanobts_attr_nse_get(struct gsm_bts *bts); +struct msgb *nanobts_attr_cell_get(struct gsm_bts *bts); +struct msgb *nanobts_attr_nscv_get(struct gsm_bts *bts); +struct msgb *nanobts_attr_radio_get(struct gsm_bts *bts, + struct gsm_bts_trx *trx); diff --git a/openbsc/src/libbsc/Makefile.am b/openbsc/src/libbsc/Makefile.am index 4728e23..8c53817 100644 --- a/openbsc/src/libbsc/Makefile.am +++ b/openbsc/src/libbsc/Makefile.am @@ -49,5 +49,6 @@ bsc_ctrl_lookup.c \ net_init.c \ bsc_dyn_ts.c \ + bts_ipaccess_nanobts_omlattr.c \ $(NULL) diff --git a/openbsc/src/libbsc/bts_ipaccess_nanobts.c b/openbsc/src/libbsc/bts_ipaccess_nanobts.c index a6c8e29..a1bde77 100644 --- a/openbsc/src/libbsc/bts_ipaccess_nanobts.c +++ b/openbsc/src/libbsc/bts_ipaccess_nanobts.c @@ -39,6 +39,7 @@ #include #include #include +#include extern struct gsm_network *bsc_gsmnet; @@ -100,211 +101,6 @@ }, }; -static unsigned char nanobts_attr_bts[] = { - NM_ATT_INTERF_BOUND, 0x55, 0x5b, 0x61, 0x67, 0x6d, 0x73, - /* interference avg. period in numbers of SACCH multifr */ - NM_ATT_INTAVE_PARAM, 0x06, - /* conn fail based on SACCH error rate */ - NM_ATT_CONN_FAIL_CRIT, 0x00, 0x02, 0x01, 0x10, - NM_ATT_T200, 0x1e, 0x24, 0x24, 0xa8, 0x34, 0x21, 0xa8, - NM_ATT_MAX_TA, 0x3f, - NM_ATT_OVERL_PERIOD, 0x00, 0x01, 10, /* seconds */ - NM_ATT_CCCH_L_T, 10, /* percent */ - NM_ATT_CCCH_L_I_P, 1, /* seconds */ - NM_ATT_RACH_B_THRESH, 10, /* busy threshold in - dBm */ - NM_ATT_LDAVG_SLOTS, 0x03, 0xe8, /* rach load averaging 1000 slots */ - NM_ATT_BTS_AIR_TIMER, 128, /* miliseconds */ - NM_ATT_NY1, 10, /* 10 retransmissions of physical config */ - NM_ATT_BCCH_ARFCN, HARDCODED_ARFCN >> 8, HARDCODED_ARFCN & 0xff, - NM_ATT_BSIC, HARDCODED_BSIC, - NM_ATT_IPACC_CGI, 0, 7, 0x00, 0xf1, 0x10, 0x00, 0x01, 0x00, 0x00, -}; - -static unsigned char nanobts_attr_radio[] = { - NM_ATT_RF_MAXPOWR_R, 0x0c, /* number of -2dB reduction steps / Pn */ - NM_ATT_ARFCN_LIST, 0x00, 0x02, HARDCODED_ARFCN >> 8, HARDCODED_ARFCN & 0xff, -}; - -static unsigned char nanobts_attr_nse[] = { - NM_ATT_IPACC_NSEI, 0, 2, 0x03, 0x9d, /* NSEI 925 */ - /* all timers in seconds */ - NM_ATT_IPACC_NS_CFG, 0, 7, 3, /* (un)blocking timer (Tns-block) */ - 3, /* (un)blocking retries */ - 3, /* reset timer (Tns-reset) */ - 3, /* reset retries */ - 30, /* test timer (Tns-test) */ - 3, /* alive timer (Tns-alive) */ - 10, /* alive retrires */ - /* all timers in seconds, unless otherwise stated */ - NM_ATT_IPACC_BSSGP_CFG, 0, 11, - 3, /* blockimg timer (T1) */ - 3, /* blocking retries */ - 3, /* unblocking retries */ - 3, /* reset timer (T2) */ - 3, /* reset retries */ - 10, /* suspend timer (T3) in 100ms */ - 3, /* suspend retries */ - 10, /* resume timer (T4) in 100ms */ - 3, /* resume retries */ - 10, /* capability update timer (T5) */ - 3, /* capability update retries */ -}; - -static unsigned char nanobts_attr_cell[] = { - NM_ATT_IPACC_RAC, 0, 1, 1, /* routing area code */ - NM_ATT_IPACC_GPRS_PAGING_CFG, 0, 2, - 5, /* repeat time (50ms) */ - 3, /* repeat count */ - NM_ATT_IPACC_BVCI, 0, 2, 0x03, 0x9d, /* BVCI 925 */ - /* all timers in seconds, unless otherwise stated */ - NM_ATT_IPACC_RLC_CFG, 0, 9, - 20, /* T3142 */ - 5, /* T3169 */ - 5, /* T3191 */ - 160, /* T3193 (units of 10ms) */ - 5, /* T3195 */ - 10, /* N3101 */ - 4, /* N3103 */ - 8, /* N3105 */ - 15, /* RLC CV countdown */ - NM_ATT_IPACC_CODING_SCHEMES, 0, 2, 0x0f, 0x00, /* CS1..CS4 */ - NM_ATT_IPACC_RLC_CFG_2, 0, 5, - 0x00, 250, /* T downlink TBF extension (0..500) */ - 0x00, 250, /* T uplink TBF extension (0..500) */ - 2, /* CS2 */ -#if 0 - /* EDGE model only, breaks older models. - * Should inquire the BTS capabilities */ - NM_ATT_IPACC_RLC_CFG_3, 0, 1, - 2, /* MCS2 */ -#endif -}; - -static unsigned char nanobts_attr_nsvc0[] = { - NM_ATT_IPACC_NSVCI, 0, 2, 0x03, 0x9d, /* 925 */ - NM_ATT_IPACC_NS_LINK_CFG, 0, 8, - 0x59, 0xd8, /* remote udp port (23000) */ - 192, 168, 100, 11, /* remote ip address */ - 0x59, 0xd8, /* local udp port (23000) */ -}; - -static void patch_16(uint8_t *data, const uint16_t val) -{ - memcpy(data, &val, sizeof(val)); -} - -static void patch_32(uint8_t *data, const uint32_t val) -{ - memcpy(data, &val, sizeof(val)); -} - -/* - * Patch the various SYSTEM INFORMATION tables to update - * the LAI - */ -static void patch_nm_tables(struct gsm_bts *bts) -{ - uint8_t arfcn_low = bts->c0->arfcn & 0xff; - uint8_t arfcn_high = (bts->c0->arfcn >> 8) & 0x0f; - - /* patch ARFCN into BTS Attributes */ - nanobts_attr_bts[42] &= 0xf0; - nanobts_attr_bts[42] |= arfcn_high; - nanobts_attr_bts[43] = arfcn_low; - - /* patch the RACH attributes */ - if (bts->rach_b_thresh != -1) { - nanobts_attr_bts[33] = bts->rach_b_thresh & 0xff; - } - - if (bts->rach_ldavg_slots != -1) { - uint8_t avg_high = bts->rach_ldavg_slots & 0xff; - uint8_t avg_low = (bts->rach_ldavg_slots >> 8) & 0x0f; - - nanobts_attr_bts[35] = avg_high; - nanobts_attr_bts[36] = avg_low; - } - - /* patch BSIC */ - nanobts_attr_bts[sizeof(nanobts_attr_bts)-11] = bts->bsic; - - /* patch CGI */ - abis_nm_ipaccess_cgi(nanobts_attr_bts+sizeof(nanobts_attr_bts)-7, bts); - - /* patch CON_FAIL_CRIT */ - nanobts_attr_bts[13] = - get_radio_link_timeout(&bts->si_common.cell_options); - - /* patch the power reduction */ - nanobts_attr_radio[1] = bts->c0->max_power_red / 2; - - /* patch NSEI */ - nanobts_attr_nse[3] = bts->gprs.nse.nsei >> 8; - nanobts_attr_nse[4] = bts->gprs.nse.nsei & 0xff; - memcpy(nanobts_attr_nse+8, bts->gprs.nse.timer, - ARRAY_SIZE(bts->gprs.nse.timer)); - memcpy(nanobts_attr_nse+18, bts->gprs.cell.timer, - ARRAY_SIZE(bts->gprs.cell.timer)); - - /* patch NSVCI */ - nanobts_attr_nsvc0[3] = bts->gprs.nsvc[0].nsvci >> 8; - nanobts_attr_nsvc0[4] = bts->gprs.nsvc[0].nsvci & 0xff; - - /* patch IP address as SGSN IP */ - patch_16(nanobts_attr_nsvc0 + 8, - htons(bts->gprs.nsvc[0].remote_port)); - patch_32(nanobts_attr_nsvc0 + 10, - htonl(bts->gprs.nsvc[0].remote_ip)); - patch_16(nanobts_attr_nsvc0 + 14, - htons(bts->gprs.nsvc[0].local_port)); - - /* patch BVCI */ - nanobts_attr_cell[12] = bts->gprs.cell.bvci >> 8; - nanobts_attr_cell[13] = bts->gprs.cell.bvci & 0xff; - /* patch RAC */ - nanobts_attr_cell[3] = bts->gprs.rac; - - if (bts->gprs.mode == BTS_GPRS_EGPRS) { - /* patch EGPRS coding schemes MCS 1..9 */ - nanobts_attr_cell[29] = 0x8f; - nanobts_attr_cell[30] = 0xff; - } -} - -static uint8_t *nanobts_attr_bts_get(struct gsm_bts *bts, size_t *data_len) -{ - patch_nm_tables(bts); - *data_len = sizeof(nanobts_attr_bts); - return nanobts_attr_bts; -} - -static uint8_t *nanobts_attr_nse_get(struct gsm_bts *bts, size_t *data_len) -{ - patch_nm_tables(bts); - *data_len = sizeof(nanobts_attr_nse); - return nanobts_attr_nse; -} - -static uint8_t *nanobts_attr_cell_get(struct gsm_bts *bts, size_t *data_len) -{ - patch_nm_tables(bts); - *data_len = sizeof(nanobts_attr_cell); - return nanobts_attr_cell; -} - -static uint8_t *nanobts_attr_nscv_get(struct gsm_bts *bts, size_t *data_len) -{ - patch_nm_tables(bts); - *data_len = sizeof(nanobts_attr_nsvc0); - return nanobts_attr_nsvc0; -} - -static uint8_t *nanobts_attr_radio_get(struct gsm_bts *bts, size_t *data_len) -{ - patch_nm_tables(bts); - *data_len = sizeof(nanobts_attr_radio); - return nanobts_attr_radio; -} /* Callback function to be called whenever we get a GSM 12.21 state change event */ static int nm_statechg_event(int evt, struct nm_statechg_signal_data *nsd) @@ -318,8 +114,7 @@ struct gsm_bts_trx_ts *ts; struct gsm_bts_gprs_nsvc *nsvc; - uint8_t *data; - size_t data_len; + struct msgb *msgb; if (!is_ipaccess_bts(nsd->bts)) return 0; @@ -343,8 +138,9 @@ case NM_OC_BTS: bts = obj; if (new_state->availability == NM_AVSTATE_DEPENDENCY) { - data = nanobts_attr_bts_get(bts, &data_len); - abis_nm_set_bts_attr(bts, data, data_len); + msgb = nanobts_attr_bts_get(bts); + abis_nm_set_bts_attr(bts, msgb->data, msgb->len); + msgb_free(msgb); abis_nm_chg_adm_state(bts, obj_class, bts->bts_nr, 0xff, 0xff, NM_STATE_UNLOCKED); @@ -385,9 +181,11 @@ if (bts->gprs.mode == BTS_GPRS_NONE) break; if (new_state->availability == NM_AVSTATE_DEPENDENCY) { - data = nanobts_attr_nse_get(bts, &data_len); + msgb = nanobts_attr_nse_get(bts); abis_nm_ipaccess_set_attr(bts, obj_class, bts->bts_nr, - 0xff, 0xff, data, data_len); + 0xff, 0xff, msgb->data, + msgb->len); + msgb_free(msgb); abis_nm_opstart(bts, obj_class, bts->bts_nr, 0xff, 0xff); } @@ -397,9 +195,11 @@ if (bts->gprs.mode == BTS_GPRS_NONE) break; if (new_state->availability == NM_AVSTATE_DEPENDENCY) { - data = nanobts_attr_cell_get(bts, &data_len); + msgb = nanobts_attr_cell_get(bts); abis_nm_ipaccess_set_attr(bts, obj_class, bts->bts_nr, - 0, 0xff, data, data_len); + 0, 0xff, msgb->data, + msgb->len); + msgb_free(msgb); abis_nm_opstart(bts, obj_class, bts->bts_nr, 0, 0xff); abis_nm_chg_adm_state(bts, obj_class, bts->bts_nr, @@ -418,10 +218,11 @@ break; if ((new_state->availability == NM_AVSTATE_OFF_LINE) || (new_state->availability == NM_AVSTATE_DEPENDENCY)) { - data = nanobts_attr_nscv_get(bts, &data_len); + msgb = nanobts_attr_nscv_get(bts); abis_nm_ipaccess_set_attr(bts, obj_class, bts->bts_nr, nsvc->id, 0xff, - data, data_len); + msgb->data, msgb->len); + msgb_free(msgb); abis_nm_opstart(bts, obj_class, bts->bts_nr, nsvc->id, 0xff); abis_nm_chg_adm_state(bts, obj_class, bts->bts_nr, @@ -471,12 +272,9 @@ */ int rc_state = trx->mo.nm_state.administrative; /* Patch ARFCN into radio attribute */ - size_t data_len; - uint8_t *data = nanobts_attr_radio_get(trx->bts, &data_len); - data[5] &= 0xf0; - data[5] |= trx->arfcn >> 8; - data[6] = trx->arfcn & 0xff; - abis_nm_set_radio_attr(trx, data, data_len); + struct msgb *msgb = nanobts_attr_radio_get(trx->bts, trx); + abis_nm_set_radio_attr(trx, msgb->data, msgb->len); + msgb_free(msgb); abis_nm_chg_adm_state(trx->bts, foh->obj_class, trx->bts->bts_nr, trx->nr, 0xff, rc_state); diff --git a/openbsc/src/libbsc/bts_ipaccess_nanobts_omlattr.c b/openbsc/src/libbsc/bts_ipaccess_nanobts_omlattr.c new file mode 100644 index 0000000..1f5e767 --- /dev/null +++ b/openbsc/src/libbsc/bts_ipaccess_nanobts_omlattr.c @@ -0,0 +1,232 @@ +/* ip.access nanoBTS specific code, OML attribute table generator */ + +/* (C) 2009-2010 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 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 + +static void patch_16(uint8_t *data, const uint16_t val) +{ + memcpy(data, &val, sizeof(val)); +} + +static void patch_32(uint8_t *data, const uint32_t val) +{ + memcpy(data, &val, sizeof(val)); +} + +struct msgb *nanobts_attr_bts_get(struct gsm_bts *bts) +{ + struct msgb *msgb; + uint8_t buf[256]; + msgb = msgb_alloc(1024, "nanobts_attr_bts"); + + memcpy(buf, "\x55\x5b\x61\x67\x6d\x73", 6); + msgb_tv_fixed_put(msgb, NM_ATT_INTERF_BOUND, 6, buf); + + /* interference avg. period in numbers of SACCH multifr */ + msgb_tv_put(msgb, NM_ATT_INTAVE_PARAM, 0x06); + + /* conn fail based on SACCH error rate */ + buf[0] = 0x01; + buf[1] = get_radio_link_timeout(&bts->si_common.cell_options); + msgb_tl16v_put(msgb, NM_ATT_CONN_FAIL_CRIT, 2, buf); + + memcpy(buf, "\x1e\x24\x24\xa8\x34\x21\xa8", 7); + msgb_tv_fixed_put(msgb, NM_ATT_T200, 7, buf); + + msgb_tv_put(msgb, NM_ATT_MAX_TA, 0x3f); + + /* seconds */ + memcpy(buf, "\x00\x01\x0a", 3); + msgb_tv_fixed_put(msgb, NM_ATT_OVERL_PERIOD, 3, buf); + + /* percent */ + msgb_tv_put(msgb, NM_ATT_CCCH_L_T, 10); + + /* seconds */ + msgb_tv_put(msgb, NM_ATT_CCCH_L_I_P, 1); + + /* busy threshold in - dBm */ + buf[0] = 10; + if (bts->rach_b_thresh != -1) + buf[0] = bts->rach_b_thresh & 0xff; + msgb_tv_put(msgb, NM_ATT_RACH_B_THRESH, buf[0]); + + /* rach load averaging 1000 slots */ + buf[0] = 0x03; + buf[1] = 0xe8; + if (bts->rach_ldavg_slots != -1) { + buf[0] = (bts->rach_ldavg_slots >> 8) & 0x0f; + buf[1] = bts->rach_ldavg_slots & 0xff; + } + msgb_tv_fixed_put(msgb, NM_ATT_LDAVG_SLOTS, 2, buf); + + /* miliseconds */ + msgb_tv_put(msgb, NM_ATT_BTS_AIR_TIMER, 128); + + /* 10 retransmissions of physical config */ + msgb_tv_put(msgb, NM_ATT_NY1, 10); + + buf[0] = (bts->c0->arfcn >> 8) & 0x0f; + buf[1] = bts->c0->arfcn & 0xff; + msgb_tv_fixed_put(msgb, NM_ATT_BCCH_ARFCN, 2, buf); + + msgb_tv_put(msgb, NM_ATT_BSIC, bts->bsic); + + abis_nm_ipaccess_cgi(buf, bts); + msgb_tl16v_put(msgb, NM_ATT_IPACC_CGI, 7, buf); + + return msgb; +} + +struct msgb *nanobts_attr_nse_get(struct gsm_bts *bts) +{ + struct msgb *msgb; + uint8_t buf[256]; + msgb = msgb_alloc(1024, "nanobts_attr_bts"); + + /* NSEI 925 */ + buf[0] = bts->gprs.nse.nsei >> 8; + buf[1] = bts->gprs.nse.nsei & 0xff; + msgb_tl16v_put(msgb, NM_ATT_IPACC_NSEI, 2, buf); + + /* all timers in seconds */ + OSMO_ASSERT(ARRAY_SIZE(bts->gprs.nse.timer) < sizeof(buf)); + memcpy(buf, bts->gprs.nse.timer, ARRAY_SIZE(bts->gprs.nse.timer)); + msgb_tl16v_put(msgb, NM_ATT_IPACC_NS_CFG, 7, buf); + + /* all timers in seconds */ + buf[0] = 3; /* blockimg timer (T1) */ + buf[1] = 3; /* blocking retries */ + buf[2] = 3; /* unblocking retries */ + buf[3] = 3; /* reset timer (T2) */ + buf[4] = 3; /* reset retries */ + buf[5] = 10; /* suspend timer (T3) in 100ms */ + buf[6] = 3; /* suspend retries */ + buf[7] = 10; /* resume timer (T4) in 100ms */ + buf[8] = 3; /* resume retries */ + buf[9] = 10; /* capability update timer (T5) */ + buf[10] = 3; /* capability update retries */ + + OSMO_ASSERT(ARRAY_SIZE(bts->gprs.cell.timer) < sizeof(buf)); + memcpy(buf, bts->gprs.cell.timer, ARRAY_SIZE(bts->gprs.cell.timer)); + msgb_tl16v_put(msgb, NM_ATT_IPACC_BSSGP_CFG, 11, buf); + + return msgb; +} + +struct msgb *nanobts_attr_cell_get(struct gsm_bts *bts) +{ + struct msgb *msgb; + uint8_t buf[256]; + msgb = msgb_alloc(1024, "nanobts_attr_bts"); + + /* routing area code */ + buf[0] = bts->gprs.rac; + msgb_tl16v_put(msgb, NM_ATT_IPACC_RAC, 1, buf); + + buf[0] = 5; /* repeat time (50ms) */ + buf[1] = 3; /* repeat count */ + msgb_tl16v_put(msgb, NM_ATT_IPACC_GPRS_PAGING_CFG, 2, buf); + + /* BVCI 925 */ + buf[0] = bts->gprs.cell.bvci >> 8; + buf[1] = bts->gprs.cell.bvci & 0xff; + msgb_tl16v_put(msgb, NM_ATT_IPACC_BVCI, 2, buf); + + /* all timers in seconds, unless otherwise stated */ + buf[0] = 20; /* T3142 */ + buf[1] = 5; /* T3169 */ + buf[2] = 5; /* T3191 */ + buf[3] = 160; /* T3193 (units of 10ms) */ + buf[4] = 5; /* T3195 */ + buf[5] = 10; /* N3101 */ + buf[6] = 4; /* N3103 */ + buf[7] = 8; /* N3105 */ + buf[8] = 15; /* RLC CV countdown */ + msgb_tl16v_put(msgb, NM_ATT_IPACC_RLC_CFG, 9, buf); + + if (bts->gprs.mode == BTS_GPRS_EGPRS) { + buf[0] = 0x8f; + buf[1] = 0xff; + } else { + buf[0] = 0x0f; + buf[1] = 0x00; + } + msgb_tl16v_put(msgb, NM_ATT_IPACC_CODING_SCHEMES, 2, buf); + + buf[0] = 0; /* T downlink TBF extension (0..500, high byte) */ + buf[1] = 250; /* T downlink TBF extension (0..500, low byte) */ + buf[2] = 0; /* T uplink TBF extension (0..500, high byte) */ + buf[3] = 250; /* T uplink TBF extension (0..500, low byte) */ + buf[4] = 2; /* CS2 */ + msgb_tl16v_put(msgb, NM_ATT_IPACC_RLC_CFG_2, 5, buf); + +#if 0 + /* EDGE model only, breaks older models. + * Should inquire the BTS capabilities */ + buf[0] = 2; /* MCS2 */ + msgb_tl16v_put(msgb, NM_ATT_IPACC_RLC_CFG_3, 1, buf); +#endif + + return msgb; +} + +struct msgb *nanobts_attr_nscv_get(struct gsm_bts *bts) +{ + struct msgb *msgb; + uint8_t buf[256]; + msgb = msgb_alloc(1024, "nanobts_attr_bts"); + + /* 925 */ + buf[0] = bts->gprs.nsvc[0].nsvci >> 8; + buf[1] = bts->gprs.nsvc[0].nsvci & 0xff; + msgb_tl16v_put(msgb, NM_ATT_IPACC_NSVCI, 2, buf); + + /* remote udp port */ + patch_16(&buf[0], htons(bts->gprs.nsvc[0].remote_port)); + /* remote ip address */ + patch_32(&buf[2], htonl(bts->gprs.nsvc[0].remote_ip)); + /* local udp port */ + patch_16(&buf[6], htons(bts->gprs.nsvc[0].local_port)); + msgb_tl16v_put(msgb, NM_ATT_IPACC_NS_LINK_CFG, 8, buf); + + return msgb; +} + +struct msgb *nanobts_attr_radio_get(struct gsm_bts *bts, + struct gsm_bts_trx *trx) +{ + struct msgb *msgb; + uint8_t buf[256]; + msgb = msgb_alloc(1024, "nanobts_attr_bts"); + + /* number of -2dB reduction steps / Pn */ + msgb_tv_put(msgb, NM_ATT_RF_MAXPOWR_R, trx->max_power_red / 2); + + buf[0] = trx->arfcn >> 8; + buf[1] = trx->arfcn & 0xff; + msgb_tl16v_put(msgb, NM_ATT_ARFCN_LIST, 2, buf); + + return msgb; +} diff --git a/openbsc/tests/Makefile.am b/openbsc/tests/Makefile.am index 468edd2..9cbc1c1 100644 --- a/openbsc/tests/Makefile.am +++ b/openbsc/tests/Makefile.am @@ -9,6 +9,7 @@ trau \ subscr \ mm_auth \ + nanobts_omlattr \ $(NULL) if BUILD_NAT diff --git a/openbsc/tests/nanobts_omlattr/Makefile.am b/openbsc/tests/nanobts_omlattr/Makefile.am new file mode 100644 index 0000000..b03d50c --- /dev/null +++ b/openbsc/tests/nanobts_omlattr/Makefile.am @@ -0,0 +1,34 @@ +AM_CPPFLAGS = \ + $(all_includes) \ + -I$(top_srcdir)/include \ + $(NULL) + +AM_CFLAGS = \ + -Wall \ + $(LIBOSMOCORE_CFLAGS) \ + $(LIBOSMOGSM_CFLAGS) \ + $(LIBOSMOABIS_CFLAGS) \ + $(NULL) + +noinst_PROGRAMS = \ + nanobts_omlattr_test \ + $(NULL) + +EXTRA_DIST = \ + nanobts_omlattr_test.ok \ + $(NULL) + +nanobts_omlattr_test_SOURCES = \ + nanobts_omlattr_test.c \ + $(NULL) + +nanobts_omlattr_test_LDADD = \ + $(top_builddir)/src/libbsc/libbsc.a \ + $(top_builddir)/src/libmsc/libmsc.a \ + $(top_builddir)/src/libtrau/libtrau.a \ + $(top_builddir)/src/libcommon/libcommon.a \ + $(LIBOSMOCORE_LIBS) \ + $(LIBOSMOGSM_LIBS) \ + $(LIBOSMOABIS_LIBS) \ + -ldbi \ + $(NULL) diff --git a/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c b/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c new file mode 100644 index 0000000..ee138b8 --- /dev/null +++ b/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c @@ -0,0 +1,284 @@ +/* Test OML attribute generator */ + +/* (C) 2016 by sysmocom s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * 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 + +#include +#include + +struct gsm_bts_model bts_model_nanobts = { + .type = GSM_BTS_TYPE_NANOBTS, + .name = "nanobts", + .start = NULL, + .oml_rcvmsg = NULL, + .e1line_bind_ops = NULL, + .nm_att_tlvdef = { + .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 void test_nanobts_attr_bts_get(struct gsm_bts *bts, uint8_t *expected) +{ + struct msgb *msgb; + + printf("Testing nanobts_attr_bts_get()...\n"); + + msgb = nanobts_attr_bts_get(bts); + printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len)); + printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len)); + OSMO_ASSERT(memcmp(msgb->data, expected, msgb->len) == 0); + msgb_free(msgb); + + printf("ok.\n"); + printf("\n"); +} + +static void test_nanobts_attr_nse_get(struct gsm_bts *bts, uint8_t *expected) +{ + struct msgb *msgb; + + printf("Testing nanobts_attr_nse_get()...\n"); + + msgb = nanobts_attr_nse_get(bts); + printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len)); + printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len)); + OSMO_ASSERT(memcmp(msgb->data, expected, msgb->len) == 0); + msgb_free(msgb); + + printf("ok.\n"); + printf("\n"); +} + +static void test_nanobts_attr_cell_get(struct gsm_bts *bts, uint8_t *expected) +{ + struct msgb *msgb; + + printf("Testing nanobts_attr_cell_get()...\n"); + + msgb = nanobts_attr_cell_get(bts); + printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len)); + printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len)); + OSMO_ASSERT(memcmp(msgb->data, expected, msgb->len) == 0); + msgb_free(msgb); + + printf("ok.\n"); + printf("\n"); +} + +static void test_nanobts_attr_nscv_get(struct gsm_bts *bts, uint8_t *expected) +{ + struct msgb *msgb; + + printf("Testing nanobts_attr_nscv_get()...\n"); + + msgb = nanobts_attr_nscv_get(bts); + printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len)); + printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len)); + OSMO_ASSERT(memcmp(msgb->data, expected, msgb->len) == 0); + msgb_free(msgb); + + printf("ok.\n"); + printf("\n"); +} + +static void test_nanobts_attr_radio_get(struct gsm_bts *bts, + struct gsm_bts_trx *trx, + uint8_t *expected) +{ + struct msgb *msgb; + + printf("Testing nanobts_attr_nscv_get()...\n"); + + msgb = nanobts_attr_radio_get(bts, trx); + printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len)); + printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len)); + OSMO_ASSERT(memcmp(msgb->data, expected, msgb->len) == 0); + msgb_free(msgb); + + printf("ok.\n"); + printf("\n"); +} + +int main(int argc, char **argv) +{ + void *ctx; + + struct gsm_bts *bts; + struct gsm_network *net; + struct gsm_bts_trx *trx; + + ctx = talloc_named_const(NULL, 0, "ctx"); + + /* Allocate environmental structs (bts, net, trx) */ + net = talloc_zero(ctx, struct gsm_network); + INIT_LLIST_HEAD(&net->bts_list); + gsm_bts_model_register(&bts_model_nanobts); + bts = gsm_bts_alloc_register(net, GSM_BTS_TYPE_NANOBTS, 63); + OSMO_ASSERT(bts); + trx = talloc_zero(ctx, struct gsm_bts_trx); + + /* Parameters needed by nanobts_attr_bts_get() */ + bts->rach_b_thresh = -1; + bts->rach_ldavg_slots = -1; + bts->c0->arfcn = 866; + bts->cell_identity = 1337; + bts->network->country_code = 1; + bts->network->network_code = 1; + bts->location_area_code = 1; + bts->gprs.rac = 0; + uint8_t attr_bts_expected[] = + { 0x19, 0x55, 0x5b, 0x61, 0x67, 0x6d, 0x73, 0x18, 0x06, 0x0e, 0x00, + 0x02, 0x01, 0x20, 0x33, 0x1e, 0x24, 0x24, 0xa8, 0x34, 0x21, + 0xa8, 0x1f, 0x3f, 0x25, + 0x00, 0x01, 0x0a, 0x0c, 0x0a, 0x0b, 0x01, 0x2a, 0x0a, 0x2b, + 0x03, 0xe8, 0x0a, 0x80, + 0x23, 0x0a, 0x08, 0x03, 0x62, 0x09, 0x3f, 0x99, 0x00, 0x07, + 0x00, 0xf1, 0x10, 0x00, + 0x01, 0x05, 0x39 + }; + + /* Parameters needed to test nanobts_attr_nse_get() */ + bts->gprs.nse.nsei = 101; + uint8_t attr_nse_expected[] = + { 0x9d, 0x00, 0x02, 0x00, 0x65, 0xa0, 0x00, 0x07, 0x03, 0x03, 0x03, + 0x03, 0x1e, 0x03, 0x0a, 0xa1, 0x00, 0x0b, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x0a, 0x03, + 0x0a, 0x03, 0x0a, 0x03 + }; + + /* Parameters needed to test nanobts_attr_cell_get() */ + bts->gprs.rac = 0x00; + bts->gprs.cell.bvci = 2; + bts->gprs.mode = BTS_GPRS_GPRS; + uint8_t attr_cell_expected[] = + { 0x9a, 0x00, 0x01, 0x00, 0x9c, 0x00, 0x02, 0x05, 0x03, 0x9e, 0x00, + 0x02, 0x00, 0x02, 0xa3, 0x00, 0x09, 0x14, 0x05, 0x05, 0xa0, + 0x05, 0x0a, 0x04, 0x08, + 0x0f, 0xa8, 0x00, 0x02, 0x0f, 0x00, 0xa9, 0x00, 0x05, 0x00, + 0xfa, 0x00, 0xfa, 0x02 + }; + + /* Parameters needed to test nanobts_attr_nscv_get() */ + bts->gprs.nsvc[0].nsvci = 0x65; + bts->gprs.nsvc[0].remote_port = 0x59d8; + bts->gprs.nsvc[0].remote_ip = 0x0a090165; + bts->gprs.nsvc[0].local_port = 0x5a3c; + uint8_t attr_nscv_expected[] = + { 0x9f, 0x00, 0x02, 0x00, 0x65, 0xa2, 0x00, 0x08, 0x59, 0xd8, 0x0a, + 0x09, 0x01, 0x65, 0x5a, 0x3c + }; + + /* Parameters needed to test nanobts_attr_radio_get() */ + trx->arfcn = 866; + trx->max_power_red = 22; + bts->c0->max_power_red = 22; + uint8_t attr_radio_expected[] = + { 0x2d, 0x0b, 0x05, 0x00, 0x02, 0x03, 0x62 }; + + /* Run tests */ + test_nanobts_attr_bts_get(bts, attr_bts_expected); + test_nanobts_attr_nse_get(bts, attr_nse_expected); + test_nanobts_attr_cell_get(bts, attr_cell_expected); + test_nanobts_attr_nscv_get(bts, attr_nscv_expected); + test_nanobts_attr_radio_get(bts, trx, attr_radio_expected); + + printf("Done\n"); + talloc_free(bts); + talloc_free(net); + talloc_free(trx); + talloc_report_full(ctx, stderr); + OSMO_ASSERT(talloc_total_blocks(ctx) == 1); + return 0; +} + +/* stubs */ +struct osmo_prim_hdr; +int bssgp_prim_cb(struct osmo_prim_hdr *oph, void *ctx) +{ + abort(); +} diff --git a/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.ok b/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.ok new file mode 100644 index 0000000..91b655f --- /dev/null +++ b/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.ok @@ -0,0 +1,26 @@ +Testing nanobts_attr_bts_get()... +result= 19555b61676d7318060e00020120331e2424a83421a81f3f2500010a0c0a0b012a0a2b03e80a80230a080362093f99000700f11000010539 +expected=19555b61676d7318060e00020120331e2424a83421a81f3f2500010a0c0a0b012a0a2b03e80a80230a080362093f99000700f11000010539 +ok. + +Testing nanobts_attr_nse_get()... +result= 9d00020065a00007030303031e030aa1000b03030303030a030a030a03 +expected=9d00020065a00007030303031e030aa1000b03030303030a030a030a03 +ok. + +Testing nanobts_attr_cell_get()... +result= 9a0001009c000205039e00020002a30009140505a0050a04080fa800020f00a9000500fa00fa02 +expected=9a0001009c000205039e00020002a30009140505a0050a04080fa800020f00a9000500fa00fa02 +ok. + +Testing nanobts_attr_nscv_get()... +result= 9f00020065a2000859d80a0901655a3c +expected=9f00020065a2000859d80a0901655a3c +ok. + +Testing nanobts_attr_nscv_get()... +result= 2d0b0500020362 +expected=2d0b0500020362 +ok. + +Done diff --git a/openbsc/tests/testsuite.at b/openbsc/tests/testsuite.at index 4905cd1..b44d595 100644 --- a/openbsc/tests/testsuite.at +++ b/openbsc/tests/testsuite.at @@ -151,3 +151,9 @@ cat $abs_srcdir/v42bis/v42bis_test.ok > expout AT_CHECK([$abs_top_builddir/tests/v42bis/v42bis_test], [], [expout], [ignore]) AT_CLEANUP + +AT_SETUP([nanobts_omlattr]) +AT_KEYWORDS([nanobts_omlattr]) +cat $abs_srcdir/nanobts_omlattr/nanobts_omlattr_test.ok > expout +AT_CHECK([$abs_top_builddir/tests/nanobts_omlattr/nanobts_omlattr_test], [], [expout], [ignore]) +AT_CLEANUP -- To view, visit https://gerrit.osmocom.org/973 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibeb34a84912d6cf695f553a34c69320fca7d08fa Gerrit-PatchSet: 3 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 Oct 10 13:11:21 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 10 Oct 2016 13:11:21 +0000 Subject: [PATCH] libosmocore[master]: gsm0408: Adding 3g spcific RR message types Message-ID: Review at https://gerrit.osmocom.org/1036 gsm0408: Adding 3g spcific RR message types GSM 04.18, which is the successor of GSM 04.08, describes additional RR 3g specific message types. This commit adds four new message types related to paging and notifiction See also 3GPP TS 04.18, section 10.4, table 10.4.1 Change-Id: I071cc9ecac342b5221fa0ec0b782b04b51b40e93 --- M include/osmocom/gsm/protocol/gsm_04_08.h 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/36/1036/1 diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index 885ac8a..fa2bb06 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -1052,6 +1052,11 @@ #define GSM48_MT_RR_NOTIF_FACCH 0x25 #define GSM48_MT_RR_NOTIF_RESP 0x26 +#define GSM48_MT_RR_UTRAN_CLSM_CHG 0x60 +#define GSM48_MT_RR_CDMA2K_CLSM_CHG 0x62 +#define GSM48_MT_RR_IS_TO_UTRAN_HANDO 0x63 +#define GSM48_MT_RR_IS_TO_CDMA2K_HANDO 0x64 + #define GSM48_MT_RR_SYSINFO_8 0x18 #define GSM48_MT_RR_SYSINFO_1 0x19 #define GSM48_MT_RR_SYSINFO_2 0x1a -- To view, visit https://gerrit.osmocom.org/1036 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I071cc9ecac342b5221fa0ec0b782b04b51b40e93 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Mon Oct 10 13:15:12 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 10 Oct 2016 13:15:12 +0000 Subject: [PATCH] openbsc[master]: gsm0408: Adding log output for 3g specific RR messages Message-ID: Review at https://gerrit.osmocom.org/1037 gsm0408: Adding log output for 3g specific RR messages GSM 04.18, which is the successor of GSM 04.08, describes additional RR 3g specific message types. This commit adds adds log output for those messages. The behaviour is not changed, all affected message types are still forwared to the MSC as they were before. See also 3GPP TS 04.18, section 10.4, table 10.4.1 Change-Id: I41f2242fdf59c3eb4b3f8f7f003c17f7e0df01aa --- M openbsc/src/libbsc/bsc_api.c 1 file changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/37/1037/1 diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c index cc12e9f..0e12733 100644 --- a/openbsc/src/libbsc/bsc_api.c +++ b/openbsc/src/libbsc/bsc_api.c @@ -639,6 +639,30 @@ if (api->dtap) api->dtap(conn, link_id, msg); break; + case GSM48_MT_RR_UTRAN_CLSM_CHG: + LOGP(DRR, LOGL_NOTICE, + "BSC: Passing RR UTRAN Classmark Change to MSC\n"); + if (api->dtap) + api->dtap(conn, link_id, msg); + break; + case GSM48_MT_RR_CDMA2K_CLSM_CHG: + LOGP(DRR, LOGL_NOTICE, + "BSC: Passing RR cdma 2000 Classmark Change to MSC\n"); + if (api->dtap) + api->dtap(conn, link_id, msg); + break; + case GSM48_MT_RR_IS_TO_UTRAN_HANDO: + LOGP(DRR, LOGL_NOTICE, + "BSC: Passing RR Inter System to UTRAN Handover Command to MSC\n"); + if (api->dtap) + api->dtap(conn, link_id, msg); + break; + case GSM48_MT_RR_IS_TO_CDMA2K_HANDO: + LOGP(DRR, LOGL_NOTICE, + "BSC: Inter System to cdma2000 Handover Command to MSC\n"); + if (api->dtap) + api->dtap(conn, link_id, msg); + break; default: /* Normally, a MSC should never receive RR * messages, but we'd rather forward what we -- To view, visit https://gerrit.osmocom.org/1037 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I41f2242fdf59c3eb4b3f8f7f003c17f7e0df01aa Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Mon Oct 10 14:06:47 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 10 Oct 2016 14:06:47 +0000 Subject: [PATCH] osmo-bts[master]: DTX DL: use FSM for AMR 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/1030 to look at the new patch set (#3). DTX DL: use FSM for AMR Use dedicated FSM to handle all DTX DL related events: - add explicit checks if DTX DL is enabled (fixes regression for non-DTX setup introduced in 654175f33bd412671e3ef8cdd65c0689d10f278c) - fix handling of AMR CMI for SPEECH frames - add FSM for DTX DL - handle FACCH-related DTX ONSET events This affects both lc15 and sysmobts and requires corresponding change in OpenBSC (Change-Id: Idac8609faf9b5ced818fde899ccfc6ed0c42e8fd). Change-Id: I74a0b42cb34d525b8a70d264135e82994ca70d31 --- M include/osmo-bts/Makefile.am A include/osmo-bts/dtx_dl_amr_fsm.h M include/osmo-bts/msg_utils.h M src/common/Makefile.am A 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/l1_if.h M src/osmo-bts-litecell15/tch.c M src/osmo-bts-sysmo/l1_if.c M src/osmo-bts-sysmo/l1_if.h M src/osmo-bts-sysmo/tch.c 13 files changed, 642 insertions(+), 127 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/30/1030/3 diff --git a/include/osmo-bts/Makefile.am b/include/osmo-bts/Makefile.am index d0b55ff..ef4165f 100644 --- a/include/osmo-bts/Makefile.am +++ b/include/osmo-bts/Makefile.am @@ -1,4 +1,5 @@ noinst_HEADERS = abis.h bts.h bts_model.h gsm_data.h logging.h measurement.h \ oml.h paging.h rsl.h signal.h vty.h amr.h pcu_if.h pcuif_proto.h \ handover.h msg_utils.h tx_power.h control_if.h cbch.h l1sap.h \ - power_control.h scheduler.h scheduler_backend.h phy_link.h + power_control.h scheduler.h scheduler_backend.h phy_link.h \ + dtx_dl_amr_fsm.h diff --git a/include/osmo-bts/dtx_dl_amr_fsm.h b/include/osmo-bts/dtx_dl_amr_fsm.h new file mode 100644 index 0000000..8b19595 --- /dev/null +++ b/include/osmo-bts/dtx_dl_amr_fsm.h @@ -0,0 +1,35 @@ +#pragma once + +#include +#include +#include + +/* DTX DL AMR FSM */ + +#define X(s) (1 << (s)) + +enum dtx_dl_amr_fsm_states { + ST_VOICE, + ST_SID_F1, + ST_SID_F2, + ST_F1_INH, + ST_U_INH, + ST_SID_U, + ST_ONSET_V, + ST_ONSET_F, + ST_FACCH_V, + ST_FACCH, +}; + +enum dtx_dl_amr_fsm_events { + E_VOICE, + E_ONSET, + E_FACCH, + E_COMPL, + E_INHIB, + E_SID_F, + E_SID_U, +}; + +extern const struct value_string dtx_dl_amr_fsm_event_names[]; +extern struct osmo_fsm dtx_dl_amr_fsm; diff --git a/include/osmo-bts/msg_utils.h b/include/osmo-bts/msg_utils.h index f99f3c4..31bd172 100644 --- a/include/osmo-bts/msg_utils.h +++ b/include/osmo-bts/msg_utils.h @@ -26,12 +26,11 @@ }; void lchan_set_marker(bool t, struct gsm_lchan *lchan); -void save_last_sid(struct gsm_lchan *lchan, const uint8_t *l1_payload, - size_t length, uint32_t fn, int update, uint8_t cmr, - int8_t cmi); -int dtx_amr_check_onset(struct gsm_lchan *lchan, const uint8_t *rtp_pl, +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, size_t rtp_pl_len, uint32_t fn, uint8_t *l1_payload, - uint8_t *ft_out); + bool marker, uint8_t *len, uint8_t *ft_out); uint8_t repeat_last_sid(struct gsm_lchan *lchan, uint8_t *dst, uint32_t fn); int msg_verify_ipa_structure(struct msgb *msg); int msg_verify_oml_structure(struct msgb *msg); diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 856f741..dd368d0 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -7,6 +7,7 @@ rsl.c vty.c paging.c measurement.c amr.c lchan.c \ load_indication.c pcu_sock.c handover.c msg_utils.c \ tx_power.c bts_ctrl_commands.c bts_ctrl_lookup.c \ - l1sap.c cbch.c power_control.c main.c phy_link.c + l1sap.c cbch.c power_control.c main.c phy_link.c \ + dtx_dl_amr_fsm.c libl1sched_a_SOURCES = scheduler.c diff --git a/src/common/dtx_dl_amr_fsm.c b/src/common/dtx_dl_amr_fsm.c new file mode 100644 index 0000000..7677624 --- /dev/null +++ b/src/common/dtx_dl_amr_fsm.c @@ -0,0 +1,304 @@ +/* DTX DL AMR FSM */ + +/* (C) 2016 by 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 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 . + * + */ + +#include +#include + +void dtx_fsm_voice(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_VOICE: + case E_FACCH: + break; + case E_SID_F: + case E_SID_U: + osmo_fsm_inst_state_chg(fi, ST_SID_F1, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Inexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_sid_f1(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_F: +/* FIXME: what shall we do if we get SID-FIRST _again_ (twice in a row)? + 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); + 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); + break; + case E_COMPL: + 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); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_sid_f2(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_U: + 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); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_f1_inh(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_u_inh(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 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) { + 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_INHIB: + osmo_fsm_inst_state_chg(fi, ST_U_INH, 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_onset_v(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_U: + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_FACCH_V, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_onset_f(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_U: + 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_FACCH, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_facch_v(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_FACCH: + break; + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); + break; + case E_SID_U: + break; + case E_SID_F: + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_facch(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_FACCH: + break; + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); + break; + case E_SID_U: + case E_SID_F: + osmo_fsm_inst_state_chg(fi, ST_SID_F1, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +static struct osmo_fsm_state dtx_dl_amr_fsm_states[] = { + [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), + .name = "Voice", + .action = dtx_fsm_voice, + }, + [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), + .name = "SID-FIRST (P1)", + .action = dtx_fsm_sid_f1, + }, + [ST_SID_F2]= { + .in_event_mask = X(E_SID_U) | X(E_VOICE) | X(E_FACCH), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_ONSET_F), + .name = "SID-FIRST (P2)", + .action = dtx_fsm_sid_f2, + }, + [ST_F1_INH]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), + .name = "SID-FIRST (Inh)", + .action = dtx_fsm_f1_inh, + }, + [ST_U_INH]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), + .name = "SID-UPDATE (Inh)", + .action = dtx_fsm_u_inh, + }, + [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", + .action = dtx_fsm_sid_upd, + }, + [ST_ONSET_V]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), + .name = "ONSET (Voice)", + .action = dtx_fsm_onset_v, + }, + [ST_ONSET_F]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH) | X(E_SID_U), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH), + .name = "ONSET (FACCH)", + .action = dtx_fsm_onset_f, + }, + [ST_FACCH_V]= { + .in_event_mask = X(E_FACCH) | X(E_VOICE) | X(E_SID_U) | X(E_SID_F), + .out_state_mask = X(ST_FACCH_V) | X(ST_VOICE) | X(ST_SID_F1), + .name = "FACCH (Voice)", + .action = dtx_fsm_facch_v, + }, + [ST_FACCH]= { + .in_event_mask = X(E_FACCH) | X(E_VOICE) | X(E_SID_U) | X(E_SID_F), + .out_state_mask = X(ST_FACCH_V) | X(ST_VOICE) | X(ST_SID_F1), + .name = "FACCH", + .action = dtx_fsm_facch, + }, +}; + +const struct value_string dtx_dl_amr_fsm_event_names[] = { + { E_VOICE, "Voice" }, + { E_FACCH, "FACCH" }, + { E_COMPL, "Complete P1 -> P2" }, + { E_INHIB, "Inhibit" }, + { E_SID_F, "SID-FIRST" }, + { E_SID_U, "SID-UPDATE" }, + { 0, NULL } +}; + +struct osmo_fsm dtx_dl_amr_fsm = { + .name = "DTX DL AMR FSM", + .states = dtx_dl_amr_fsm_states, + .num_states = ARRAY_SIZE(dtx_dl_amr_fsm_states), + .event_names = dtx_dl_amr_fsm_event_names, + .log_subsys = DL1C, +}; diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 943bdfe..0d87aee 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -528,6 +529,7 @@ uint8_t *p, *si; struct lapdm_entity *le; struct osmo_phsap_prim pp; + bool dtxd_facch = false; int rc; chan_nr = rts_ind->chan_nr; @@ -582,8 +584,11 @@ p[0] = lchan->ms_power_ctrl.current; p[1] = lchan->rqd_ta; le = &lchan->lapdm_ch.lapdm_acch; - } else + } else { + if (lchan->ts->trx->bts->dtxd) + dtxd_facch = true; le = &lchan->lapdm_ch.lapdm_dcch; + } rc = lapdm_phsap_dequeue_prim(le, &pp); if (rc < 0) { if (L1SAP_IS_LINK_SACCH(link_id)) { @@ -609,6 +614,10 @@ memcpy(p, pp.oph.msg->data, GSM_MACBLOCK_LEN); /* check if it is a RR CIPH MODE CMD. if yes, enable RX ciphering */ check_for_ciph_cmd(pp.oph.msg, lchan, chan_nr); + if (dtxd_facch) + osmo_fsm_inst_dispatch(lchan->tch.dtx_dl_amr_fsm, + E_FACCH, + (void *)lchan); } msgb_free(pp.oph.msg); } @@ -1136,6 +1145,13 @@ rc = l1sap_chan_act_dact_modify(trx, chan_nr, PRIM_INFO_ACTIVATE, 0); if (rc) return -RSL_ERR_EQUIPMENT_FAIL; + + /* Init DTX DL FSM if necessary */ + //FIXME: only do it for AMR TCH/* + osmo_fsm_register(&dtx_dl_amr_fsm); //FIXME: unreg and dealloc on lchan teradown + lchan->tch.dtx_dl_amr_fsm = osmo_fsm_inst_alloc(&dtx_dl_amr_fsm, + tall_bts_ctx, lchan, + LOGL_ERROR, lchan->name); return 0; } diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 99a211f..dfb8899 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -17,6 +17,7 @@ * */ +#include #include #include #include @@ -26,6 +27,7 @@ #include #include #include +#include #include #include @@ -99,19 +101,15 @@ } } - /*! \brief Store the last SID frame in lchan context * \param[in] lchan Logical channel on which we check scheduling * \param[in] l1_payload buffer with SID data * \param[in] length length of l1_payload * \param[in] fn Frame Number for which we check scheduling * \param[in] update 0 if SID_FIRST, 1 if SID_UPDATE, -1 if not AMR SID - * \param[in] cmr Codec Mode Request (AMR-specific, ignored otherwise) - * \param[in] cmi Codec Mode Indication (AMR-specific, ignored otherwise) */ -void save_last_sid(struct gsm_lchan *lchan, const uint8_t *l1_payload, - size_t length, uint32_t fn, int update, uint8_t cmr, - int8_t cmi) +void dtx_cache_payload(struct gsm_lchan *lchan, const uint8_t *l1_payload, + size_t length, uint32_t fn, int update) { size_t amr = (update < 0) ? 0 : 2, copy_len = OSMO_MIN(length + 1, ARRAY_SIZE(lchan->tch.last_sid.buf)); @@ -120,62 +118,95 @@ lchan->tch.last_sid.fn = fn; lchan->tch.last_sid.is_update = update; - if (amr) - amr_set_mode_pref(lchan->tch.last_sid.buf, &lchan->tch.amr_mr, - cmi, cmr); memcpy(lchan->tch.last_sid.buf + amr, l1_payload, copy_len); } -/*! \brief Check current and cached SID to decide if talkspurt takes place +/*! \brief Check current state of DTX DL AMR FSM and dispatch necessary events * \param[in] lchan Logical channel on which we check scheduling * \param[in] rtp_pl buffer with RTP data * \param[in] rtp_pl_len length of rtp_pl * \param[in] fn Frame Number for which we check scheduling * \param[in] l1_payload buffer where CMR and CMI prefix should be added + * \param[out] len Length of expected L1 payload * \param[out] ft_out Frame Type to be populated after decoding - * \returns 0 if frame should be send immediately (2 byte CMR,CMI prefix added: - * caller must adjust length as necessary), - * 1 if ONSET event is detected - * negative if no sending is necessary (either error or cached SID - * UPDATE) + * \returns 0 in case of success; negative on error */ -int dtx_amr_check_onset(struct gsm_lchan *lchan, const uint8_t *rtp_pl, +int dtx_dl_amr_fsm_step(struct gsm_lchan *lchan, const uint8_t *rtp_pl, size_t rtp_pl_len, uint32_t fn, uint8_t *l1_payload, - uint8_t *ft_out) + bool marker, uint8_t *len, uint8_t *ft_out) { uint8_t cmr; enum osmo_amr_type ft; enum osmo_amr_quality bfi; int8_t sti, cmi; - osmo_amr_rtp_dec(rtp_pl, rtp_pl_len, &cmr, &cmi, &ft, &bfi, &sti); - *ft_out = ft; /* only needed for old sysmo firmware */ + int rc; - if (ft == AMR_SID) { - save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, sti, cmr, cmi); - if (sti) /* SID_UPDATE should be cached and send later */ - return -EAGAIN; - else { /* SID_FIRST - cached and send right away */ - amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi, - cmr); - return 0; - } + if (rtp_pl == NULL) { /* SID-FIRST P1 -> P2 */ + *len = 3; + memcpy(l1_payload, lchan->tch.last_sid.buf, 2); + osmo_fsm_inst_dispatch(lchan->tch.dtx_dl_amr_fsm, E_COMPL, + (void *)lchan); + return 0; } - if (ft != AMR_NO_DATA && !osmo_amr_is_speech(ft)) { + 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); + return rc; + } + + /* only needed for old sysmo firmware: */ + *ft_out = ft; + + /* CMI in downlink tells the L1 encoder which encoding function + * it will use, so we have to use the frame type */ + if (osmo_amr_is_speech(ft)) + cmi = ft; + + /* populate L1 payload with CMR/CMI - might be ignored by caller: */ + amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi, cmr); + + /* populate DTX cache with CMR/CMI - overwrite cache which will be + either updated or invalidated by caller anyway: */ + amr_set_mode_pref(lchan->tch.last_sid.buf, &lchan->tch.amr_mr, cmi, cmr); + *len = 3 + rtp_pl_len; + + /* DTX DL is not enabled, move along */ + if (!lchan->ts->trx->bts->dtxd) + return 0; + + if (osmo_amr_is_speech(ft)) { + if (lchan->tch.dtx_dl_amr_fsm->state == ST_SID_F1 || + lchan->tch.dtx_dl_amr_fsm->state == ST_SID_U) /* AMR HR */ + if (lchan->type == GSM_LCHAN_TCH_H && marker) + return osmo_fsm_inst_dispatch(lchan->tch.dtx_dl_amr_fsm, + E_INHIB, + (void *)lchan); + /* AMR FR */ + if (marker && lchan->tch.dtx_dl_amr_fsm->state == ST_SID_U) + 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 (ft == AMR_SID) { + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, sti); + return osmo_fsm_inst_dispatch(lchan->tch.dtx_dl_amr_fsm, + sti ? E_SID_U : E_SID_F, + (void *)lchan); + } + + if (ft != AMR_NO_DATA) { LOGP(DRTP, LOGL_ERROR, "unsupported AMR FT 0x%02x\n", ft); return -ENOTSUP; } - if (osmo_amr_is_speech(ft)) { - if (lchan->tch.last_sid.len) { /* force ONSET */ - lchan->tch.last_sid.len = 0; - return 1; - } - /* We received AMR SPEECH frame - invalidate saved SID */ - lchan->tch.last_sid.len = 0; - amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi, cmr); - } - + if (marker) + osmo_fsm_inst_dispatch(lchan->tch.dtx_dl_amr_fsm, E_VOICE, + (void *)lchan); + *len = 0; return 0; } diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index a4378c1..de0e6c9 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -432,7 +432,7 @@ } static int ph_tch_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache, bool marker) { struct lc15l1_hdl *fl1 = trx_lc15l1_hdl(trx); struct gsm_lchan *lchan; @@ -468,7 +468,7 @@ rc = l1if_tch_encode(lchan, l1p->u.phDataReq.msgUnitParam.u8Buffer, &l1p->u.phDataReq.msgUnitParam.u8Size, - msg->data, msg->len, u32Fn, + msg->data, msg->len, u32Fn, use_cache, l1sap->u.tch.marker); if (rc < 0) { /* no data encoded for L1: smth will be generated below */ @@ -506,10 +506,8 @@ /* send message to DSP's queue */ osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], nmsg); - if (l1sap->u.tch.marker) { /* DTX: send voice after ONSET was sent */ - l1sap->u.tch.marker = 0; - return ph_tch_req(trx, l1sap->oph.msg, l1sap); - } + if (rc > 0 && trx->bts->dtxd) /* DTX: send voice after ONSET was sent */ + return ph_tch_req(trx, l1sap->oph.msg, l1sap, true, false); return 0; } @@ -577,7 +575,7 @@ rc = ph_data_req(trx, msg, l1sap); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): - rc = ph_tch_req(trx, msg, l1sap); + rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); break; case OSMO_PRIM(PRIM_MPH_INFO, PRIM_OP_REQUEST): rc = mph_info_req(trx, msg, l1sap); diff --git a/src/osmo-bts-litecell15/l1_if.h b/src/osmo-bts-litecell15/l1_if.h index adb197d..7feee56 100644 --- a/src/osmo-bts-litecell15/l1_if.h +++ b/src/osmo-bts-litecell15/l1_if.h @@ -90,8 +90,8 @@ /* tch.c */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, - bool marker); + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker); int l1if_tch_rx(struct gsm_bts_trx *trx, uint8_t chan_nr, struct msgb *l1p_msg); int l1if_tch_fill(struct gsm_lchan *lchan, uint8_t *l1_buffer); struct msgb *gen_empty_tch_msg(struct gsm_lchan *lchan, uint32_t fn); diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index e246ffb..73074a0 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -198,8 +199,7 @@ * \returns number of \a l1_payload bytes filled */ static int rtppayload_to_l1_amr(uint8_t *l1_payload, const uint8_t *rtp_payload, - uint8_t payload_len, - struct gsm_lchan *lchan, uint8_t ft) + uint8_t payload_len, uint8_t ft) { memcpy(l1_payload, rtp_payload, payload_len); return payload_len; @@ -210,10 +210,11 @@ /*! \brief function for incoming RTP via TCH.req * \param[in] rtp_pl buffer containing RTP payload * \param[in] rtp_pl_len length of \a rtp_pl + * \param[in] use_cache Use cached payload instead of parsing RTP * \param[in] marker RTP header Marker bit (indicates speech onset) * \returns 0 if encoding result can be sent further to L1 without extra actions * positive value if data is ready AND extra actions are required - * negative value otherwise + * negative value otherwise (no data for L1 encoded) * * This function prepares a msgb with a L1 PH-DATA.req primitive and * queues it into lchan->dl_tch_queue. @@ -223,7 +224,8 @@ * pre-fill the primtive. */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, bool marker) + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker) { uint8_t *payload_type; uint8_t *l1_payload, ft; @@ -242,17 +244,17 @@ *payload_type = GsmL1_TchPlType_Fr; rc = rtppayload_to_l1_fr(l1_payload, rtp_pl, rtp_pl_len); - if (rc) + if (rc && lchan->ts->trx->bts->dtxd) is_sid = osmo_fr_check_sid(rtp_pl, rtp_pl_len); } else{ *payload_type = GsmL1_TchPlType_Hr; rc = rtppayload_to_l1_hr(l1_payload, rtp_pl, rtp_pl_len); - if (rc) + if (rc && lchan->ts->trx->bts->dtxd) is_sid = osmo_hr_check_sid(rtp_pl, rtp_pl_len); } if (is_sid) - save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, -1, 0, 0); + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, -1); break; case GSM48_CMODE_SPEECH_EFR: *payload_type = GsmL1_TchPlType_Efr; @@ -261,25 +263,75 @@ /* FIXME: detect and save EFR SID */ break; case GSM48_CMODE_SPEECH_AMR: - rc = dtx_amr_check_onset(lchan, rtp_pl, rtp_pl_len, fn, - l1_payload, &ft); - - if (marker || rc > 0) { - *payload_type = GsmL1_TchPlType_Amr_Onset; - *len = 1; - if (rc != 0) { - LOGP(DRTP, LOGL_NOTICE, "%s SPEECH frame without" - " Marker: ONSET forced\n", - get_value_string(osmo_amr_type_names, ft)); - return rc; - } - LOGP(DRTP, LOGL_DEBUG, "%s SPEECH frame with Marker\n", - get_value_string(osmo_amr_type_names, ft)); - } - else { + if (use_cache) { *payload_type = GsmL1_TchPlType_Amr; - rc = 2 + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, - rtp_pl_len, lchan, ft); + rtppayload_to_l1_amr(l1_payload, lchan->tch.last_sid.buf, + lchan->tch.last_sid.len, ft); + *len = lchan->tch.last_sid.len + 1; + return 0; + } + + rc = dtx_dl_amr_fsm_step(lchan, rtp_pl, rtp_pl_len, fn, + l1_payload, marker, len, &ft); + if (rc < 0) + return rc; + if (!lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + } + + /* DTX DL-specific logic below: */ + switch (lchan->tch.dtx_dl_amr_fsm->state) { + case ST_ONSET_V: + case ST_ONSET_F: + *payload_type = GsmL1_TchPlType_Amr_Onset; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + *len = 1; + return 1; + case ST_VOICE: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F1: + if (lchan->type == GSM_LCHAN_TCH_H) { /* AMR HR */ + *payload_type = GsmL1_TchPlType_Amr_SidFirstP1; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, + rtp_pl_len, ft); + return 0; + } + /* AMR FR */ + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F2: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_F1_INH: + *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: + *payload_type = GsmL1_TchPlType_Amr_SidUpdateInH; + *len = 3; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + return 1; + case ST_SID_U: + return -EAGAIN; + case ST_FACCH_V: + case ST_FACCH: + /* FIXME: if this possible at all? */ + return 0; + default: + LOGP(DRTP, LOGL_ERROR, "Unhandled DTX DL AMR FSM state " + "%d\n", lchan->tch.dtx_dl_amr_fsm->state); + return -EINVAL; } break; default: @@ -442,7 +494,20 @@ switch (lchan->tch_mode) { case GSM48_CMODE_SPEECH_AMR: - *payload_type = GsmL1_TchPlType_Amr; + if (lchan->type == GSM_LCHAN_TCH_H && + lchan->tch.dtx_dl_amr_fsm->state == ST_SID_F1 && + lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr_SidFirstP2; + rc = dtx_dl_amr_fsm_step(lchan, NULL, 0, fn, l1_payload, + false, &(msu_param->u8Size), + NULL); + if (rc < 0) { + msgb_free(msg); + return NULL; + } + return msg; + } else + *payload_type = GsmL1_TchPlType_Amr; break; case GSM48_CMODE_SPEECH_V1: if (lchan->type == GSM_LCHAN_TCH_F) @@ -458,12 +523,13 @@ return NULL; } - rc = repeat_last_sid(lchan, l1_payload, fn); - if (!rc) { - msgb_free(msg); - return NULL; + if (lchan->ts->trx->bts->dtxd) { + rc = repeat_last_sid(lchan, l1_payload, fn); + if (!rc) { + msgb_free(msg); + return NULL; + } + msu_param->u8Size = rc; } - msu_param->u8Size = rc; - return msg; } diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 09627af..a03a133 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -427,7 +427,7 @@ } static int ph_tch_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache, bool marker) { struct femtol1_hdl *fl1 = trx_femtol1_hdl(trx); struct gsm_lchan *lchan; @@ -463,7 +463,7 @@ rc = l1if_tch_encode(lchan, l1p->u.phDataReq.msgUnitParam.u8Buffer, &l1p->u.phDataReq.msgUnitParam.u8Size, - msg->data, msg->len, u32Fn, + msg->data, msg->len, u32Fn, use_cache, l1sap->u.tch.marker); if (rc < 0) { /* no data encoded for L1: smth will be generated below */ @@ -501,10 +501,8 @@ /* send message to DSP's queue */ osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], nmsg); - if (l1sap->u.tch.marker) { /* DTX: send voice after ONSET was sent */ - l1sap->u.tch.marker = 0; - return ph_tch_req(trx, l1sap->oph.msg, l1sap); - } + if (rc > 0 && trx->bts->dtxd) /* DTX: send voice after ONSET was sent */ + return ph_tch_req(trx, l1sap->oph.msg, l1sap, true, false); return 0; } @@ -572,7 +570,7 @@ rc = ph_data_req(trx, msg, l1sap); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): - rc = ph_tch_req(trx, msg, l1sap); + rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); break; case OSMO_PRIM(PRIM_MPH_INFO, PRIM_OP_REQUEST): rc = mph_info_req(trx, msg, l1sap); diff --git a/src/osmo-bts-sysmo/l1_if.h b/src/osmo-bts-sysmo/l1_if.h index ece7a01..0dc919b 100644 --- a/src/osmo-bts-sysmo/l1_if.h +++ b/src/osmo-bts-sysmo/l1_if.h @@ -110,8 +110,8 @@ /* tch.c */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, - bool marker); + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker); int l1if_tch_rx(struct gsm_bts_trx *trx, uint8_t chan_nr, struct msgb *l1p_msg); int l1if_tch_fill(struct gsm_lchan *lchan, uint8_t *l1_buffer); struct msgb *gen_empty_tch_msg(struct gsm_lchan *lchan, uint32_t fn); diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index ca9045e..bacaeda 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -281,8 +282,7 @@ * \returns number of \a l1_payload bytes filled */ static int rtppayload_to_l1_amr(uint8_t *l1_payload, const uint8_t *rtp_payload, - uint8_t payload_len, - struct gsm_lchan *lchan, uint8_t ft) + uint8_t payload_len, uint8_t ft) { #ifdef USE_L1_RTP_MODE memcpy(l1_payload, rtp_payload, payload_len); @@ -306,10 +306,11 @@ /*! \brief function for incoming RTP via TCH.req * \param[in] rtp_pl buffer containing RTP payload * \param[in] rtp_pl_len length of \a rtp_pl + * \param[in] use_cache Use cached payload instead of parsing RTP * \param[in] marker RTP header Marker bit (indicates speech onset) * \returns 0 if encoding result can be sent further to L1 without extra actions * positive value if data is ready AND extra actions are required - * negative value otherwise + * negative value otherwise (no data for L1 encoded) * * This function prepares a msgb with a L1 PH-DATA.req primitive and * queues it into lchan->dl_tch_queue. @@ -319,7 +320,8 @@ * pre-fill the primtive. */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, bool marker) + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker) { uint8_t *payload_type; uint8_t *l1_payload, ft; @@ -348,7 +350,7 @@ is_sid = osmo_hr_check_sid(rtp_pl, rtp_pl_len); } if (is_sid) - save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, -1, 0, 0); + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, -1); break; #if defined(L1_HAS_EFR) && defined(USE_L1_RTP_MODE) case GSM48_CMODE_SPEECH_EFR: @@ -359,25 +361,75 @@ break; #endif case GSM48_CMODE_SPEECH_AMR: - rc = dtx_amr_check_onset(lchan, rtp_pl, rtp_pl_len, fn, - l1_payload, &ft); - - if (marker || rc > 0) { - *payload_type = GsmL1_TchPlType_Amr_Onset; - *len = 1; - if (rc != 0) { - LOGP(DRTP, LOGL_NOTICE, "%s SPEECH frame without" - " Marker: ONSET forced\n", - get_value_string(osmo_amr_type_names, ft)); - return rc; - } - LOGP(DRTP, LOGL_DEBUG, "%s SPEECH frame with Marker\n", - get_value_string(osmo_amr_type_names, ft)); - } - else { + if (use_cache) { *payload_type = GsmL1_TchPlType_Amr; - rc = 2 + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, - rtp_pl_len, lchan, ft); + rtppayload_to_l1_amr(l1_payload, lchan->tch.last_sid.buf, + lchan->tch.last_sid.len, ft); + *len = lchan->tch.last_sid.len + 1; + return 0; + } + + rc = dtx_dl_amr_fsm_step(lchan, rtp_pl, rtp_pl_len, fn, + l1_payload, marker, len, &ft); + if (rc < 0) + return rc; + if (!lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + } + + /* DTX DL-specific logic below: */ + switch (lchan->tch.dtx_dl_amr_fsm->state) { + case ST_ONSET_V: + case ST_ONSET_F: + *payload_type = GsmL1_TchPlType_Amr_Onset; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + *len = 1; + return 1; + case ST_VOICE: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F1: + if (lchan->type == GSM_LCHAN_TCH_H) { /* AMR HR */ + *payload_type = GsmL1_TchPlType_Amr_SidFirstP1; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, + rtp_pl_len, ft); + return 0; + } + /* AMR FR */ + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F2: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_F1_INH: + *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: + *payload_type = GsmL1_TchPlType_Amr_SidUpdateInH; + *len = 3; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + return 1; + case ST_SID_U: + return -EAGAIN; + case ST_FACCH_V: + case ST_FACCH: + /* FIXME: if this possible at all? */ + return 0; + default: + LOGP(DRTP, LOGL_ERROR, "Unhandled DTX DL AMR FSM state " + "%d\n", lchan->tch.dtx_dl_amr_fsm->state); + return -EINVAL; } break; default: @@ -544,7 +596,20 @@ switch (lchan->tch_mode) { case GSM48_CMODE_SPEECH_AMR: - *payload_type = GsmL1_TchPlType_Amr; + if (lchan->type == GSM_LCHAN_TCH_H && + lchan->tch.dtx_dl_amr_fsm->state == ST_SID_F1 && + lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr_SidFirstP2; + rc = dtx_dl_amr_fsm_step(lchan, NULL, 0, fn, l1_payload, + false, &(msu_param->u8Size), + NULL); + if (rc < 0) { + msgb_free(msg); + return NULL; + } + return msg; + } else + *payload_type = GsmL1_TchPlType_Amr; break; case GSM48_CMODE_SPEECH_V1: if (lchan->type == GSM_LCHAN_TCH_F) @@ -560,12 +625,13 @@ return NULL; } - rc = repeat_last_sid(lchan, l1_payload, fn); - if (!rc) { - msgb_free(msg); - return NULL; + if (lchan->ts->trx->bts->dtxd) { + rc = repeat_last_sid(lchan, l1_payload, fn); + if (!rc) { + msgb_free(msg); + return NULL; + } + msu_param->u8Size = rc; } - msu_param->u8Size = rc; - return msg; } -- To view, visit https://gerrit.osmocom.org/1030 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I74a0b42cb34d525b8a70d264135e82994ca70d31 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 Mon Oct 10 15:27:32 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 10 Oct 2016 15:27:32 +0000 Subject: [PATCH] osmo-bts[master]: DTX DL: use FSM for AMR 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/1030 to look at the new patch set (#4). DTX DL: use FSM for AMR Use dedicated FSM to handle all DTX DL related events: - add explicit checks if DTX DL is enabled (fixes regression for non-DTX setup introduced in 654175f33bd412671e3ef8cdd65c0689d10f278c) - fix handling of AMR CMI for SPEECH frames - add FSM for DTX DL - handle FACCH-related DTX ONSET events This affects both lc15 and sysmobts and requires corresponding change in OpenBSC (Change-Id: Idac8609faf9b5ced818fde899ccfc6ed0c42e8fd). Change-Id: I74a0b42cb34d525b8a70d264135e82994ca70d31 --- M include/osmo-bts/Makefile.am A include/osmo-bts/dtx_dl_amr_fsm.h M include/osmo-bts/msg_utils.h M src/common/Makefile.am A 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/l1_if.h M src/osmo-bts-litecell15/tch.c M src/osmo-bts-sysmo/l1_if.c M src/osmo-bts-sysmo/l1_if.h M src/osmo-bts-sysmo/tch.c 13 files changed, 648 insertions(+), 127 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/30/1030/4 diff --git a/include/osmo-bts/Makefile.am b/include/osmo-bts/Makefile.am index d0b55ff..ef4165f 100644 --- a/include/osmo-bts/Makefile.am +++ b/include/osmo-bts/Makefile.am @@ -1,4 +1,5 @@ noinst_HEADERS = abis.h bts.h bts_model.h gsm_data.h logging.h measurement.h \ oml.h paging.h rsl.h signal.h vty.h amr.h pcu_if.h pcuif_proto.h \ handover.h msg_utils.h tx_power.h control_if.h cbch.h l1sap.h \ - power_control.h scheduler.h scheduler_backend.h phy_link.h + power_control.h scheduler.h scheduler_backend.h phy_link.h \ + dtx_dl_amr_fsm.h diff --git a/include/osmo-bts/dtx_dl_amr_fsm.h b/include/osmo-bts/dtx_dl_amr_fsm.h new file mode 100644 index 0000000..8b19595 --- /dev/null +++ b/include/osmo-bts/dtx_dl_amr_fsm.h @@ -0,0 +1,35 @@ +#pragma once + +#include +#include +#include + +/* DTX DL AMR FSM */ + +#define X(s) (1 << (s)) + +enum dtx_dl_amr_fsm_states { + ST_VOICE, + ST_SID_F1, + ST_SID_F2, + ST_F1_INH, + ST_U_INH, + ST_SID_U, + ST_ONSET_V, + ST_ONSET_F, + ST_FACCH_V, + ST_FACCH, +}; + +enum dtx_dl_amr_fsm_events { + E_VOICE, + E_ONSET, + E_FACCH, + E_COMPL, + E_INHIB, + E_SID_F, + E_SID_U, +}; + +extern const struct value_string dtx_dl_amr_fsm_event_names[]; +extern struct osmo_fsm dtx_dl_amr_fsm; diff --git a/include/osmo-bts/msg_utils.h b/include/osmo-bts/msg_utils.h index f99f3c4..31bd172 100644 --- a/include/osmo-bts/msg_utils.h +++ b/include/osmo-bts/msg_utils.h @@ -26,12 +26,11 @@ }; void lchan_set_marker(bool t, struct gsm_lchan *lchan); -void save_last_sid(struct gsm_lchan *lchan, const uint8_t *l1_payload, - size_t length, uint32_t fn, int update, uint8_t cmr, - int8_t cmi); -int dtx_amr_check_onset(struct gsm_lchan *lchan, const uint8_t *rtp_pl, +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, size_t rtp_pl_len, uint32_t fn, uint8_t *l1_payload, - uint8_t *ft_out); + bool marker, uint8_t *len, uint8_t *ft_out); uint8_t repeat_last_sid(struct gsm_lchan *lchan, uint8_t *dst, uint32_t fn); int msg_verify_ipa_structure(struct msgb *msg); int msg_verify_oml_structure(struct msgb *msg); diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 856f741..dd368d0 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -7,6 +7,7 @@ rsl.c vty.c paging.c measurement.c amr.c lchan.c \ load_indication.c pcu_sock.c handover.c msg_utils.c \ tx_power.c bts_ctrl_commands.c bts_ctrl_lookup.c \ - l1sap.c cbch.c power_control.c main.c phy_link.c + l1sap.c cbch.c power_control.c main.c phy_link.c \ + dtx_dl_amr_fsm.c libl1sched_a_SOURCES = scheduler.c diff --git a/src/common/dtx_dl_amr_fsm.c b/src/common/dtx_dl_amr_fsm.c new file mode 100644 index 0000000..7677624 --- /dev/null +++ b/src/common/dtx_dl_amr_fsm.c @@ -0,0 +1,304 @@ +/* DTX DL AMR FSM */ + +/* (C) 2016 by 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 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 . + * + */ + +#include +#include + +void dtx_fsm_voice(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_VOICE: + case E_FACCH: + break; + case E_SID_F: + case E_SID_U: + osmo_fsm_inst_state_chg(fi, ST_SID_F1, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Inexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_sid_f1(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_F: +/* FIXME: what shall we do if we get SID-FIRST _again_ (twice in a row)? + 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); + 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); + break; + case E_COMPL: + 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); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_sid_f2(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_U: + 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); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_f1_inh(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_u_inh(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 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) { + 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_INHIB: + osmo_fsm_inst_state_chg(fi, ST_U_INH, 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_onset_v(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_U: + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_FACCH_V, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_onset_f(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_U: + 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_FACCH, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_facch_v(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_FACCH: + break; + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); + break; + case E_SID_U: + break; + case E_SID_F: + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_facch(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_FACCH: + break; + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); + break; + case E_SID_U: + case E_SID_F: + osmo_fsm_inst_state_chg(fi, ST_SID_F1, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +static struct osmo_fsm_state dtx_dl_amr_fsm_states[] = { + [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), + .name = "Voice", + .action = dtx_fsm_voice, + }, + [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), + .name = "SID-FIRST (P1)", + .action = dtx_fsm_sid_f1, + }, + [ST_SID_F2]= { + .in_event_mask = X(E_SID_U) | X(E_VOICE) | X(E_FACCH), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_ONSET_F), + .name = "SID-FIRST (P2)", + .action = dtx_fsm_sid_f2, + }, + [ST_F1_INH]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), + .name = "SID-FIRST (Inh)", + .action = dtx_fsm_f1_inh, + }, + [ST_U_INH]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), + .name = "SID-UPDATE (Inh)", + .action = dtx_fsm_u_inh, + }, + [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", + .action = dtx_fsm_sid_upd, + }, + [ST_ONSET_V]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), + .name = "ONSET (Voice)", + .action = dtx_fsm_onset_v, + }, + [ST_ONSET_F]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH) | X(E_SID_U), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH), + .name = "ONSET (FACCH)", + .action = dtx_fsm_onset_f, + }, + [ST_FACCH_V]= { + .in_event_mask = X(E_FACCH) | X(E_VOICE) | X(E_SID_U) | X(E_SID_F), + .out_state_mask = X(ST_FACCH_V) | X(ST_VOICE) | X(ST_SID_F1), + .name = "FACCH (Voice)", + .action = dtx_fsm_facch_v, + }, + [ST_FACCH]= { + .in_event_mask = X(E_FACCH) | X(E_VOICE) | X(E_SID_U) | X(E_SID_F), + .out_state_mask = X(ST_FACCH_V) | X(ST_VOICE) | X(ST_SID_F1), + .name = "FACCH", + .action = dtx_fsm_facch, + }, +}; + +const struct value_string dtx_dl_amr_fsm_event_names[] = { + { E_VOICE, "Voice" }, + { E_FACCH, "FACCH" }, + { E_COMPL, "Complete P1 -> P2" }, + { E_INHIB, "Inhibit" }, + { E_SID_F, "SID-FIRST" }, + { E_SID_U, "SID-UPDATE" }, + { 0, NULL } +}; + +struct osmo_fsm dtx_dl_amr_fsm = { + .name = "DTX DL AMR FSM", + .states = dtx_dl_amr_fsm_states, + .num_states = ARRAY_SIZE(dtx_dl_amr_fsm_states), + .event_names = dtx_dl_amr_fsm_event_names, + .log_subsys = DL1C, +}; diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 943bdfe..536790d 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -528,6 +529,7 @@ uint8_t *p, *si; struct lapdm_entity *le; struct osmo_phsap_prim pp; + bool dtxd_facch = false; int rc; chan_nr = rts_ind->chan_nr; @@ -582,8 +584,11 @@ p[0] = lchan->ms_power_ctrl.current; p[1] = lchan->rqd_ta; le = &lchan->lapdm_ch.lapdm_acch; - } else + } else { + if (lchan->ts->trx->bts->dtxd) + dtxd_facch = true; le = &lchan->lapdm_ch.lapdm_dcch; + } rc = lapdm_phsap_dequeue_prim(le, &pp); if (rc < 0) { if (L1SAP_IS_LINK_SACCH(link_id)) { @@ -609,6 +614,10 @@ memcpy(p, pp.oph.msg->data, GSM_MACBLOCK_LEN); /* check if it is a RR CIPH MODE CMD. if yes, enable RX ciphering */ check_for_ciph_cmd(pp.oph.msg, lchan, chan_nr); + if (dtxd_facch && lchan->tch.dtx_dl_amr_fsm) + osmo_fsm_inst_dispatch(lchan->tch.dtx_dl_amr_fsm, + E_FACCH, + (void *)lchan); } msgb_free(pp.oph.msg); } @@ -1136,14 +1145,27 @@ rc = l1sap_chan_act_dact_modify(trx, chan_nr, PRIM_INFO_ACTIVATE, 0); if (rc) return -RSL_ERR_EQUIPMENT_FAIL; + + /* Init DTX DL FSM if necessary */ + //FIXME: only do it for AMR TCH/* + osmo_fsm_register(&dtx_dl_amr_fsm); + lchan->tch.dtx_dl_amr_fsm = osmo_fsm_inst_alloc(&dtx_dl_amr_fsm, + tall_bts_ctx, lchan, + LOGL_DEBUG, lchan->name); return 0; } int l1sap_chan_rel(struct gsm_bts_trx *trx, uint8_t chan_nr) { + struct gsm_lchan *lchan = get_lchan_by_chan_nr(trx, chan_nr); LOGP(DL1P, LOGL_INFO, "deactivating channel chan_nr=0x%02x trx=%d\n", chan_nr, trx->nr); + if (lchan->tch.dtx_dl_amr_fsm) { + osmo_fsm_inst_free(lchan->tch.dtx_dl_amr_fsm); + lchan->tch.dtx_dl_amr_fsm = NULL; + } + return l1sap_chan_act_dact_modify(trx, chan_nr, PRIM_INFO_DEACTIVATE, 0); } diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 99a211f..dfb8899 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -17,6 +17,7 @@ * */ +#include #include #include #include @@ -26,6 +27,7 @@ #include #include #include +#include #include #include @@ -99,19 +101,15 @@ } } - /*! \brief Store the last SID frame in lchan context * \param[in] lchan Logical channel on which we check scheduling * \param[in] l1_payload buffer with SID data * \param[in] length length of l1_payload * \param[in] fn Frame Number for which we check scheduling * \param[in] update 0 if SID_FIRST, 1 if SID_UPDATE, -1 if not AMR SID - * \param[in] cmr Codec Mode Request (AMR-specific, ignored otherwise) - * \param[in] cmi Codec Mode Indication (AMR-specific, ignored otherwise) */ -void save_last_sid(struct gsm_lchan *lchan, const uint8_t *l1_payload, - size_t length, uint32_t fn, int update, uint8_t cmr, - int8_t cmi) +void dtx_cache_payload(struct gsm_lchan *lchan, const uint8_t *l1_payload, + size_t length, uint32_t fn, int update) { size_t amr = (update < 0) ? 0 : 2, copy_len = OSMO_MIN(length + 1, ARRAY_SIZE(lchan->tch.last_sid.buf)); @@ -120,62 +118,95 @@ lchan->tch.last_sid.fn = fn; lchan->tch.last_sid.is_update = update; - if (amr) - amr_set_mode_pref(lchan->tch.last_sid.buf, &lchan->tch.amr_mr, - cmi, cmr); memcpy(lchan->tch.last_sid.buf + amr, l1_payload, copy_len); } -/*! \brief Check current and cached SID to decide if talkspurt takes place +/*! \brief Check current state of DTX DL AMR FSM and dispatch necessary events * \param[in] lchan Logical channel on which we check scheduling * \param[in] rtp_pl buffer with RTP data * \param[in] rtp_pl_len length of rtp_pl * \param[in] fn Frame Number for which we check scheduling * \param[in] l1_payload buffer where CMR and CMI prefix should be added + * \param[out] len Length of expected L1 payload * \param[out] ft_out Frame Type to be populated after decoding - * \returns 0 if frame should be send immediately (2 byte CMR,CMI prefix added: - * caller must adjust length as necessary), - * 1 if ONSET event is detected - * negative if no sending is necessary (either error or cached SID - * UPDATE) + * \returns 0 in case of success; negative on error */ -int dtx_amr_check_onset(struct gsm_lchan *lchan, const uint8_t *rtp_pl, +int dtx_dl_amr_fsm_step(struct gsm_lchan *lchan, const uint8_t *rtp_pl, size_t rtp_pl_len, uint32_t fn, uint8_t *l1_payload, - uint8_t *ft_out) + bool marker, uint8_t *len, uint8_t *ft_out) { uint8_t cmr; enum osmo_amr_type ft; enum osmo_amr_quality bfi; int8_t sti, cmi; - osmo_amr_rtp_dec(rtp_pl, rtp_pl_len, &cmr, &cmi, &ft, &bfi, &sti); - *ft_out = ft; /* only needed for old sysmo firmware */ + int rc; - if (ft == AMR_SID) { - save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, sti, cmr, cmi); - if (sti) /* SID_UPDATE should be cached and send later */ - return -EAGAIN; - else { /* SID_FIRST - cached and send right away */ - amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi, - cmr); - return 0; - } + if (rtp_pl == NULL) { /* SID-FIRST P1 -> P2 */ + *len = 3; + memcpy(l1_payload, lchan->tch.last_sid.buf, 2); + osmo_fsm_inst_dispatch(lchan->tch.dtx_dl_amr_fsm, E_COMPL, + (void *)lchan); + return 0; } - if (ft != AMR_NO_DATA && !osmo_amr_is_speech(ft)) { + 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); + return rc; + } + + /* only needed for old sysmo firmware: */ + *ft_out = ft; + + /* CMI in downlink tells the L1 encoder which encoding function + * it will use, so we have to use the frame type */ + if (osmo_amr_is_speech(ft)) + cmi = ft; + + /* populate L1 payload with CMR/CMI - might be ignored by caller: */ + amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi, cmr); + + /* populate DTX cache with CMR/CMI - overwrite cache which will be + either updated or invalidated by caller anyway: */ + amr_set_mode_pref(lchan->tch.last_sid.buf, &lchan->tch.amr_mr, cmi, cmr); + *len = 3 + rtp_pl_len; + + /* DTX DL is not enabled, move along */ + if (!lchan->ts->trx->bts->dtxd) + return 0; + + if (osmo_amr_is_speech(ft)) { + if (lchan->tch.dtx_dl_amr_fsm->state == ST_SID_F1 || + lchan->tch.dtx_dl_amr_fsm->state == ST_SID_U) /* AMR HR */ + if (lchan->type == GSM_LCHAN_TCH_H && marker) + return osmo_fsm_inst_dispatch(lchan->tch.dtx_dl_amr_fsm, + E_INHIB, + (void *)lchan); + /* AMR FR */ + if (marker && lchan->tch.dtx_dl_amr_fsm->state == ST_SID_U) + 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 (ft == AMR_SID) { + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, sti); + return osmo_fsm_inst_dispatch(lchan->tch.dtx_dl_amr_fsm, + sti ? E_SID_U : E_SID_F, + (void *)lchan); + } + + if (ft != AMR_NO_DATA) { LOGP(DRTP, LOGL_ERROR, "unsupported AMR FT 0x%02x\n", ft); return -ENOTSUP; } - if (osmo_amr_is_speech(ft)) { - if (lchan->tch.last_sid.len) { /* force ONSET */ - lchan->tch.last_sid.len = 0; - return 1; - } - /* We received AMR SPEECH frame - invalidate saved SID */ - lchan->tch.last_sid.len = 0; - amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi, cmr); - } - + if (marker) + osmo_fsm_inst_dispatch(lchan->tch.dtx_dl_amr_fsm, E_VOICE, + (void *)lchan); + *len = 0; return 0; } diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index a4378c1..de0e6c9 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -432,7 +432,7 @@ } static int ph_tch_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache, bool marker) { struct lc15l1_hdl *fl1 = trx_lc15l1_hdl(trx); struct gsm_lchan *lchan; @@ -468,7 +468,7 @@ rc = l1if_tch_encode(lchan, l1p->u.phDataReq.msgUnitParam.u8Buffer, &l1p->u.phDataReq.msgUnitParam.u8Size, - msg->data, msg->len, u32Fn, + msg->data, msg->len, u32Fn, use_cache, l1sap->u.tch.marker); if (rc < 0) { /* no data encoded for L1: smth will be generated below */ @@ -506,10 +506,8 @@ /* send message to DSP's queue */ osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], nmsg); - if (l1sap->u.tch.marker) { /* DTX: send voice after ONSET was sent */ - l1sap->u.tch.marker = 0; - return ph_tch_req(trx, l1sap->oph.msg, l1sap); - } + if (rc > 0 && trx->bts->dtxd) /* DTX: send voice after ONSET was sent */ + return ph_tch_req(trx, l1sap->oph.msg, l1sap, true, false); return 0; } @@ -577,7 +575,7 @@ rc = ph_data_req(trx, msg, l1sap); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): - rc = ph_tch_req(trx, msg, l1sap); + rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); break; case OSMO_PRIM(PRIM_MPH_INFO, PRIM_OP_REQUEST): rc = mph_info_req(trx, msg, l1sap); diff --git a/src/osmo-bts-litecell15/l1_if.h b/src/osmo-bts-litecell15/l1_if.h index adb197d..7feee56 100644 --- a/src/osmo-bts-litecell15/l1_if.h +++ b/src/osmo-bts-litecell15/l1_if.h @@ -90,8 +90,8 @@ /* tch.c */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, - bool marker); + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker); int l1if_tch_rx(struct gsm_bts_trx *trx, uint8_t chan_nr, struct msgb *l1p_msg); int l1if_tch_fill(struct gsm_lchan *lchan, uint8_t *l1_buffer); struct msgb *gen_empty_tch_msg(struct gsm_lchan *lchan, uint32_t fn); diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index e246ffb..73074a0 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -198,8 +199,7 @@ * \returns number of \a l1_payload bytes filled */ static int rtppayload_to_l1_amr(uint8_t *l1_payload, const uint8_t *rtp_payload, - uint8_t payload_len, - struct gsm_lchan *lchan, uint8_t ft) + uint8_t payload_len, uint8_t ft) { memcpy(l1_payload, rtp_payload, payload_len); return payload_len; @@ -210,10 +210,11 @@ /*! \brief function for incoming RTP via TCH.req * \param[in] rtp_pl buffer containing RTP payload * \param[in] rtp_pl_len length of \a rtp_pl + * \param[in] use_cache Use cached payload instead of parsing RTP * \param[in] marker RTP header Marker bit (indicates speech onset) * \returns 0 if encoding result can be sent further to L1 without extra actions * positive value if data is ready AND extra actions are required - * negative value otherwise + * negative value otherwise (no data for L1 encoded) * * This function prepares a msgb with a L1 PH-DATA.req primitive and * queues it into lchan->dl_tch_queue. @@ -223,7 +224,8 @@ * pre-fill the primtive. */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, bool marker) + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker) { uint8_t *payload_type; uint8_t *l1_payload, ft; @@ -242,17 +244,17 @@ *payload_type = GsmL1_TchPlType_Fr; rc = rtppayload_to_l1_fr(l1_payload, rtp_pl, rtp_pl_len); - if (rc) + if (rc && lchan->ts->trx->bts->dtxd) is_sid = osmo_fr_check_sid(rtp_pl, rtp_pl_len); } else{ *payload_type = GsmL1_TchPlType_Hr; rc = rtppayload_to_l1_hr(l1_payload, rtp_pl, rtp_pl_len); - if (rc) + if (rc && lchan->ts->trx->bts->dtxd) is_sid = osmo_hr_check_sid(rtp_pl, rtp_pl_len); } if (is_sid) - save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, -1, 0, 0); + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, -1); break; case GSM48_CMODE_SPEECH_EFR: *payload_type = GsmL1_TchPlType_Efr; @@ -261,25 +263,75 @@ /* FIXME: detect and save EFR SID */ break; case GSM48_CMODE_SPEECH_AMR: - rc = dtx_amr_check_onset(lchan, rtp_pl, rtp_pl_len, fn, - l1_payload, &ft); - - if (marker || rc > 0) { - *payload_type = GsmL1_TchPlType_Amr_Onset; - *len = 1; - if (rc != 0) { - LOGP(DRTP, LOGL_NOTICE, "%s SPEECH frame without" - " Marker: ONSET forced\n", - get_value_string(osmo_amr_type_names, ft)); - return rc; - } - LOGP(DRTP, LOGL_DEBUG, "%s SPEECH frame with Marker\n", - get_value_string(osmo_amr_type_names, ft)); - } - else { + if (use_cache) { *payload_type = GsmL1_TchPlType_Amr; - rc = 2 + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, - rtp_pl_len, lchan, ft); + rtppayload_to_l1_amr(l1_payload, lchan->tch.last_sid.buf, + lchan->tch.last_sid.len, ft); + *len = lchan->tch.last_sid.len + 1; + return 0; + } + + rc = dtx_dl_amr_fsm_step(lchan, rtp_pl, rtp_pl_len, fn, + l1_payload, marker, len, &ft); + if (rc < 0) + return rc; + if (!lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + } + + /* DTX DL-specific logic below: */ + switch (lchan->tch.dtx_dl_amr_fsm->state) { + case ST_ONSET_V: + case ST_ONSET_F: + *payload_type = GsmL1_TchPlType_Amr_Onset; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + *len = 1; + return 1; + case ST_VOICE: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F1: + if (lchan->type == GSM_LCHAN_TCH_H) { /* AMR HR */ + *payload_type = GsmL1_TchPlType_Amr_SidFirstP1; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, + rtp_pl_len, ft); + return 0; + } + /* AMR FR */ + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F2: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_F1_INH: + *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: + *payload_type = GsmL1_TchPlType_Amr_SidUpdateInH; + *len = 3; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + return 1; + case ST_SID_U: + return -EAGAIN; + case ST_FACCH_V: + case ST_FACCH: + /* FIXME: if this possible at all? */ + return 0; + default: + LOGP(DRTP, LOGL_ERROR, "Unhandled DTX DL AMR FSM state " + "%d\n", lchan->tch.dtx_dl_amr_fsm->state); + return -EINVAL; } break; default: @@ -442,7 +494,20 @@ switch (lchan->tch_mode) { case GSM48_CMODE_SPEECH_AMR: - *payload_type = GsmL1_TchPlType_Amr; + if (lchan->type == GSM_LCHAN_TCH_H && + lchan->tch.dtx_dl_amr_fsm->state == ST_SID_F1 && + lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr_SidFirstP2; + rc = dtx_dl_amr_fsm_step(lchan, NULL, 0, fn, l1_payload, + false, &(msu_param->u8Size), + NULL); + if (rc < 0) { + msgb_free(msg); + return NULL; + } + return msg; + } else + *payload_type = GsmL1_TchPlType_Amr; break; case GSM48_CMODE_SPEECH_V1: if (lchan->type == GSM_LCHAN_TCH_F) @@ -458,12 +523,13 @@ return NULL; } - rc = repeat_last_sid(lchan, l1_payload, fn); - if (!rc) { - msgb_free(msg); - return NULL; + if (lchan->ts->trx->bts->dtxd) { + rc = repeat_last_sid(lchan, l1_payload, fn); + if (!rc) { + msgb_free(msg); + return NULL; + } + msu_param->u8Size = rc; } - msu_param->u8Size = rc; - return msg; } diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 09627af..a03a133 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -427,7 +427,7 @@ } static int ph_tch_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache, bool marker) { struct femtol1_hdl *fl1 = trx_femtol1_hdl(trx); struct gsm_lchan *lchan; @@ -463,7 +463,7 @@ rc = l1if_tch_encode(lchan, l1p->u.phDataReq.msgUnitParam.u8Buffer, &l1p->u.phDataReq.msgUnitParam.u8Size, - msg->data, msg->len, u32Fn, + msg->data, msg->len, u32Fn, use_cache, l1sap->u.tch.marker); if (rc < 0) { /* no data encoded for L1: smth will be generated below */ @@ -501,10 +501,8 @@ /* send message to DSP's queue */ osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], nmsg); - if (l1sap->u.tch.marker) { /* DTX: send voice after ONSET was sent */ - l1sap->u.tch.marker = 0; - return ph_tch_req(trx, l1sap->oph.msg, l1sap); - } + if (rc > 0 && trx->bts->dtxd) /* DTX: send voice after ONSET was sent */ + return ph_tch_req(trx, l1sap->oph.msg, l1sap, true, false); return 0; } @@ -572,7 +570,7 @@ rc = ph_data_req(trx, msg, l1sap); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): - rc = ph_tch_req(trx, msg, l1sap); + rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); break; case OSMO_PRIM(PRIM_MPH_INFO, PRIM_OP_REQUEST): rc = mph_info_req(trx, msg, l1sap); diff --git a/src/osmo-bts-sysmo/l1_if.h b/src/osmo-bts-sysmo/l1_if.h index ece7a01..0dc919b 100644 --- a/src/osmo-bts-sysmo/l1_if.h +++ b/src/osmo-bts-sysmo/l1_if.h @@ -110,8 +110,8 @@ /* tch.c */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, - bool marker); + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker); int l1if_tch_rx(struct gsm_bts_trx *trx, uint8_t chan_nr, struct msgb *l1p_msg); int l1if_tch_fill(struct gsm_lchan *lchan, uint8_t *l1_buffer); struct msgb *gen_empty_tch_msg(struct gsm_lchan *lchan, uint32_t fn); diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index ca9045e..bacaeda 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -281,8 +282,7 @@ * \returns number of \a l1_payload bytes filled */ static int rtppayload_to_l1_amr(uint8_t *l1_payload, const uint8_t *rtp_payload, - uint8_t payload_len, - struct gsm_lchan *lchan, uint8_t ft) + uint8_t payload_len, uint8_t ft) { #ifdef USE_L1_RTP_MODE memcpy(l1_payload, rtp_payload, payload_len); @@ -306,10 +306,11 @@ /*! \brief function for incoming RTP via TCH.req * \param[in] rtp_pl buffer containing RTP payload * \param[in] rtp_pl_len length of \a rtp_pl + * \param[in] use_cache Use cached payload instead of parsing RTP * \param[in] marker RTP header Marker bit (indicates speech onset) * \returns 0 if encoding result can be sent further to L1 without extra actions * positive value if data is ready AND extra actions are required - * negative value otherwise + * negative value otherwise (no data for L1 encoded) * * This function prepares a msgb with a L1 PH-DATA.req primitive and * queues it into lchan->dl_tch_queue. @@ -319,7 +320,8 @@ * pre-fill the primtive. */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, bool marker) + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker) { uint8_t *payload_type; uint8_t *l1_payload, ft; @@ -348,7 +350,7 @@ is_sid = osmo_hr_check_sid(rtp_pl, rtp_pl_len); } if (is_sid) - save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, -1, 0, 0); + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, -1); break; #if defined(L1_HAS_EFR) && defined(USE_L1_RTP_MODE) case GSM48_CMODE_SPEECH_EFR: @@ -359,25 +361,75 @@ break; #endif case GSM48_CMODE_SPEECH_AMR: - rc = dtx_amr_check_onset(lchan, rtp_pl, rtp_pl_len, fn, - l1_payload, &ft); - - if (marker || rc > 0) { - *payload_type = GsmL1_TchPlType_Amr_Onset; - *len = 1; - if (rc != 0) { - LOGP(DRTP, LOGL_NOTICE, "%s SPEECH frame without" - " Marker: ONSET forced\n", - get_value_string(osmo_amr_type_names, ft)); - return rc; - } - LOGP(DRTP, LOGL_DEBUG, "%s SPEECH frame with Marker\n", - get_value_string(osmo_amr_type_names, ft)); - } - else { + if (use_cache) { *payload_type = GsmL1_TchPlType_Amr; - rc = 2 + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, - rtp_pl_len, lchan, ft); + rtppayload_to_l1_amr(l1_payload, lchan->tch.last_sid.buf, + lchan->tch.last_sid.len, ft); + *len = lchan->tch.last_sid.len + 1; + return 0; + } + + rc = dtx_dl_amr_fsm_step(lchan, rtp_pl, rtp_pl_len, fn, + l1_payload, marker, len, &ft); + if (rc < 0) + return rc; + if (!lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + } + + /* DTX DL-specific logic below: */ + switch (lchan->tch.dtx_dl_amr_fsm->state) { + case ST_ONSET_V: + case ST_ONSET_F: + *payload_type = GsmL1_TchPlType_Amr_Onset; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + *len = 1; + return 1; + case ST_VOICE: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F1: + if (lchan->type == GSM_LCHAN_TCH_H) { /* AMR HR */ + *payload_type = GsmL1_TchPlType_Amr_SidFirstP1; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, + rtp_pl_len, ft); + return 0; + } + /* AMR FR */ + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F2: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_F1_INH: + *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: + *payload_type = GsmL1_TchPlType_Amr_SidUpdateInH; + *len = 3; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + return 1; + case ST_SID_U: + return -EAGAIN; + case ST_FACCH_V: + case ST_FACCH: + /* FIXME: if this possible at all? */ + return 0; + default: + LOGP(DRTP, LOGL_ERROR, "Unhandled DTX DL AMR FSM state " + "%d\n", lchan->tch.dtx_dl_amr_fsm->state); + return -EINVAL; } break; default: @@ -544,7 +596,20 @@ switch (lchan->tch_mode) { case GSM48_CMODE_SPEECH_AMR: - *payload_type = GsmL1_TchPlType_Amr; + if (lchan->type == GSM_LCHAN_TCH_H && + lchan->tch.dtx_dl_amr_fsm->state == ST_SID_F1 && + lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr_SidFirstP2; + rc = dtx_dl_amr_fsm_step(lchan, NULL, 0, fn, l1_payload, + false, &(msu_param->u8Size), + NULL); + if (rc < 0) { + msgb_free(msg); + return NULL; + } + return msg; + } else + *payload_type = GsmL1_TchPlType_Amr; break; case GSM48_CMODE_SPEECH_V1: if (lchan->type == GSM_LCHAN_TCH_F) @@ -560,12 +625,13 @@ return NULL; } - rc = repeat_last_sid(lchan, l1_payload, fn); - if (!rc) { - msgb_free(msg); - return NULL; + if (lchan->ts->trx->bts->dtxd) { + rc = repeat_last_sid(lchan, l1_payload, fn); + if (!rc) { + msgb_free(msg); + return NULL; + } + msu_param->u8Size = rc; } - msu_param->u8Size = rc; - return msg; } -- To view, visit https://gerrit.osmocom.org/1030 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I74a0b42cb34d525b8a70d264135e82994ca70d31 Gerrit-PatchSet: 4 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 Mon Oct 10 19:58:39 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 10 Oct 2016 19:58:39 +0000 Subject: osmo-iuh[master]: fix build: look for generated sources in builddir, not srcdir In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1035 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I97606dadef3c2184f9538b0198029047cc3af71c 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 Mon Oct 10 19:58:41 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 10 Oct 2016 19:58:41 +0000 Subject: [MERGED] osmo-iuh[master]: fix build: look for generated sources in builddir, not srcdir In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: fix build: look for generated sources in builddir, not srcdir ...................................................................... fix build: look for generated sources in builddir, not srcdir Fixes 'make check' from a different dir than the source tree. Change-Id: I97606dadef3c2184f9538b0198029047cc3af71c --- M src/tests/Makefile.am 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am index 5b51262..e2bea07 100644 --- a/src/tests/Makefile.am +++ b/src/tests/Makefile.am @@ -9,13 +9,13 @@ noinst_HEADERS = test_common.h hnb-test.h hnb-test-layers.h -HNBAP_FILES = $(top_srcdir)/src/hnbap_common.c $(top_srcdir)/src/hnbap_decoder.c $(top_srcdir)/src/hnbap_encoder.c -RUA_FILES = $(top_srcdir)/src/rua_common.c $(top_srcdir)/src/rua_decoder.c $(top_srcdir)/src/rua_encoder.c $(top_srcdir)/src/rua_msg_factory.c +HNBAP_FILES = $(top_srcdir)/src/hnbap_common.c $(top_builddir)/src/hnbap_decoder.c $(top_builddir)/src/hnbap_encoder.c +RUA_FILES = $(top_srcdir)/src/rua_common.c $(top_builddir)/src/rua_decoder.c $(top_builddir)/src/rua_encoder.c $(top_srcdir)/src/rua_msg_factory.c test_helpers_SOURCES = test-helpers.c test_common.c test_helpers_LDADD = $(COMMON_LIBS) $(top_builddir)/src/libosmo-ranap.la -test_hnbap_SOURCES = $(top_srcdir)/src/hnbap_common.c $(top_srcdir)/src/hnbap_decoder.c test-hnbap.c test_common.c +test_hnbap_SOURCES = $(top_srcdir)/src/hnbap_common.c $(top_builddir)/src/hnbap_decoder.c test-hnbap.c test_common.c test_hnbap_LDADD = $(COMMON_LIBS) $(top_builddir)/src/hnbap/libosmo-asn1-hnbap.a $(top_builddir)/src/libosmo-ranap.la hnb_test_SOURCES = $(HNBAP_FILES) $(RUA_FILES) hnb-test.c test_common.c hnb-test-ranap.c hnb-test-rua.c -- To view, visit https://gerrit.osmocom.org/1035 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I97606dadef3c2184f9538b0198029047cc3af71c Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 10 21:02:36 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 10 Oct 2016 21:02:36 +0000 Subject: [PATCH] libosmocore[master]: fix USSD: SS message type mask should be 0x3f, not 0xbf Message-ID: Review at https://gerrit.osmocom.org/1038 fix USSD: SS message type mask should be 0x3f, not 0xbf See 04.80[1], section 3.4: the highest two bits are used as counter or ignored and do not contribute to the SS "Miscellaneous message group". Previous mask of 0xbf included the highest bit, fix to 0x3f. Observed a value of 0xbb that should mean 0x3b="Register" during testing of 3G USSD requests, which seem to be the first to send a nonzero highest bit to our code. The erratic mask of 0xbf lead to an unhandled message type of 0xbb. [1] 3GPP TS 24.080 version 7.2.0 Release 7 / ETSI TS 124 080 V7.2.0 (2006-09) Change-Id: I299001a9e36c16f55622a0acd5d4a55ca49d0055 --- M src/gsm/gsm0480.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/38/1038/1 diff --git a/src/gsm/gsm0480.c b/src/gsm/gsm0480.c index 8963b78..d628d92 100644 --- a/src/gsm/gsm0480.c +++ b/src/gsm/gsm0480.c @@ -268,7 +268,7 @@ static int parse_ss(const struct gsm48_hdr *hdr, uint16_t len, struct ss_request *req) { int rc = 1; - uint8_t msg_type = hdr->msg_type & 0xBF; /* message-type - section 3.4 */ + uint8_t msg_type = hdr->msg_type & 0x3F; /* message-type - section 3.4 */ switch (msg_type) { case GSM0480_MTYPE_RELEASE_COMPLETE: -- To view, visit https://gerrit.osmocom.org/1038 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I299001a9e36c16f55622a0acd5d4a55ca49d0055 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Oct 11 09:59:41 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 11 Oct 2016 09:59:41 +0000 Subject: [PATCH] openbsc[master]: DTX DL: use FSM for AMR 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/1031 to look at the new patch set (#2). DTX DL: use FSM for AMR - consolidate all DTX-specific things in a separate struct - rename struct fields to better reflect meaning - add pointer to DL FSM for AMR - remove unused flag - expand buffer to hold cached payload alongside with CMR/CMI Change-Id: Idac8609faf9b5ced818fde899ccfc6ed0c42e8fd --- M openbsc/include/openbsc/gsm_data_shared.h 1 file changed, 9 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/31/1031/2 diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index 1e3855f..d889959 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -295,23 +295,20 @@ struct { struct amr_multirate_conf amr_mr; struct { - uint8_t buf[18]; + struct osmo_fsm_inst *dl_amr_fsm; + uint8_t cache[20]; uint8_t len; uint32_t fn; bool is_update; - } last_sid; - /* FIXME: 2 flags below are mutually exclusive - is it worth it - to merge them? */ - /* set for each SID frame to detect talkspurt for codecs without - explicit ONSET event */ - bool ul_sid; - /* set for each SID_FIRST_P1 sent to L1 but not followed by - either of _P2 or InH */ - bool dl_fst; + /* set for each SID frame to detect talkspurt for codecs + without explicit ONSET event */ + bool ul_sid; + /* indicates if DTXd was active during DL measurement + period */ + bool dl_active; + } dtx; uint8_t last_cmr; uint32_t last_fn; - /* indicates if DTXd was active during DL measurement period */ - bool dtxd_active; } tch; /* BTS-side ciphering state (rx only, bi-directional, ...) */ uint8_t ciph_state; -- To view, visit https://gerrit.osmocom.org/1031 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Idac8609faf9b5ced818fde899ccfc6ed0c42e8fd 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 Tue Oct 11 12:53:43 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 11 Oct 2016 12:53:43 +0000 Subject: openbsc[master]: OML: Fixing static OML attribute tables In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/973 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibeb34a84912d6cf695f553a34c69320fca7d08fa Gerrit-PatchSet: 3 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 Tue Oct 11 13:12:46 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 11 Oct 2016 13:12:46 +0000 Subject: [PATCH] openggsn[master]: Add .gitreview to simplify gerrit integration Message-ID: Review at https://gerrit.osmocom.org/1039 Add .gitreview to simplify gerrit integration Change-Id: Ib141dc9ae03c2b10b8925e30a2782bf2d932e192 --- A .gitreview 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openggsn refs/changes/39/1039/1 diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..cc02ff2 --- /dev/null +++ b/.gitreview @@ -0,0 +1,3 @@ +[gerrit] +host=gerrit.osmocom.org +project=openggsn -- To view, visit https://gerrit.osmocom.org/1039 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib141dc9ae03c2b10b8925e30a2782bf2d932e192 Gerrit-PatchSet: 1 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Oct 11 13:23:55 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 11 Oct 2016 13:23:55 +0000 Subject: [PATCH] libosmocore[master]: Add function to send TRAP over Control Interface 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/649 to look at the new patch set (#3). Add function to send TRAP over Control Interface Change-Id: Ic0b8d88c4f5c4d42c3f8fb754f8eabf049c9e388 Related: OS#1646 --- M include/osmocom/ctrl/control_if.h M src/ctrl/control_if.c 2 files changed, 22 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/49/649/3 diff --git a/include/osmocom/ctrl/control_if.h b/include/osmocom/ctrl/control_if.h index 181c60a..512ae10 100644 --- a/include/osmocom/ctrl/control_if.h +++ b/include/osmocom/ctrl/control_if.h @@ -20,6 +20,7 @@ int ctrl_cmd_send(struct osmo_wqueue *queue, struct ctrl_cmd *cmd); +int ctrl_cmd_send_trap(struct ctrl_handle *ctrl, const char *name, char *value); struct ctrl_handle *ctrl_interface_setup(void *data, uint16_t port, ctrl_cmd_lookup lookup); struct ctrl_handle *ctrl_interface_setup_dynip(void *data, diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 2ffc251..df39486 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -117,6 +117,27 @@ return ret; } +/*! \brief Send TRAP over given Control Interface + * \param[in] ctrl Control Interface over which TRAP will be sent + * \param[in] name Name of the TRAP variable + * \param[in] value Value of the TRAP variable + * \return Negative value on error, result of ctrl_cmd_send_to_all() otherwise + */ +int ctrl_cmd_send_trap(struct ctrl_handle *ctrl, const char *name, char *value) +{ + int r; + struct ctrl_cmd *cmd = ctrl_cmd_create(NULL, CTRL_TYPE_TRAP); + if (!cmd) + return -ENOMEM; + + cmd->id = "0"; /* It's a TRAP! */ + cmd->variable = name; + cmd->reply = value; + r = ctrl_cmd_send_to_all(ctrl, cmd); + talloc_free(cmd); + return r; +} + struct ctrl_cmd *ctrl_cmd_trap(struct ctrl_cmd *cmd) { struct ctrl_cmd *trap; -- To view, visit https://gerrit.osmocom.org/649 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic0b8d88c4f5c4d42c3f8fb754f8eabf049c9e388 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 Tue Oct 11 13:23:55 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 11 Oct 2016 13:23:55 +0000 Subject: [PATCH] libosmocore[master]: Constify ctrl_cmd struct fields where appropriate Message-ID: Review at https://gerrit.osmocom.org/1040 Constify ctrl_cmd struct fields where appropriate Change-Id: I3f55c1d4b965d215dc9b16f4b284b7fea4bde9e9 --- M include/osmocom/ctrl/control_cmd.h 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/40/1040/1 diff --git a/include/osmocom/ctrl/control_cmd.h b/include/osmocom/ctrl/control_cmd.h index 8f2eaa2..cd96038 100644 --- a/include/osmocom/ctrl/control_cmd.h +++ b/include/osmocom/ctrl/control_cmd.h @@ -53,10 +53,10 @@ struct ctrl_cmd { struct ctrl_connection *ccon; enum ctrl_type type; - char *id; + const char *id; void *node; - char *variable; - char *value; + const char *variable; + const char *value; char *reply; }; -- To view, visit https://gerrit.osmocom.org/1040 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f55c1d4b965d215dc9b16f4b284b7fea4bde9e9 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Oct 11 13:32:24 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 11 Oct 2016 13:32:24 +0000 Subject: [PATCH] openggsn[master]: Remove unused function Message-ID: Review at https://gerrit.osmocom.org/1041 Remove unused function Change-Id: Iff0f1499660b12a47277b16a435efecb42fab038 --- M ggsn/ggsn.c M gtp/pdp.c M gtp/pdp.h 3 files changed, 0 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openggsn refs/changes/41/1041/1 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 7725016..6866901 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -154,7 +154,6 @@ pdp->eua.l = 0; /* TODO: Indicates dynamic IP */ - /* ulcpy(&pdp->qos_neg, &pdp->qos_req, sizeof(pdp->qos_req.v)); */ memcpy(pdp->qos_neg0, pdp->qos_req0, sizeof(pdp->qos_req0)); memcpy(&pdp->pco_neg, &pco, sizeof(pdp->pco_neg)); diff --git a/gtp/pdp.c b/gtp/pdp.c index f0d6adf..f297af9 100644 --- a/gtp/pdp.c +++ b/gtp/pdp.c @@ -370,14 +370,3 @@ pdp->imsi = teid & 0x0fffffffffffffffull; pdp->nsapi = (teid & 0xf000000000000000ull) >> 60; } - -int ulcpy(void *dst, void *src, size_t size) -{ - if (((struct ul255_t *)src)->l <= size) { - ((struct ul255_t *)dst)->l = ((struct ul255_t *)src)->l; - memcpy(((struct ul255_t *)dst)->v, ((struct ul255_t *)src)->v, - ((struct ul255_t *)dst)->l); - return 0; - } else - return EOF; -} diff --git a/gtp/pdp.h b/gtp/pdp.h index 57af8b3..217b1d6 100644 --- a/gtp/pdp.h +++ b/gtp/pdp.h @@ -252,6 +252,5 @@ int pdp_ntoeua(struct in_addr *src, struct ul66_t *eua); int pdp_euaton(struct ul66_t *eua, struct in_addr *dst); uint64_t pdp_gettid(uint64_t imsi, uint8_t nsapi); -int ulcpy(void *dst, void *src, size_t size); #endif /* !_PDP_H */ -- To view, visit https://gerrit.osmocom.org/1041 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iff0f1499660b12a47277b16a435efecb42fab038 Gerrit-PatchSet: 1 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Oct 11 13:32:24 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 11 Oct 2016 13:32:24 +0000 Subject: [PATCH] openggsn[master]: Add control interface Message-ID: Review at https://gerrit.osmocom.org/1042 Add control interface Only generation of TRAP messages over Control Interface is supported so far. Note: requires corresponding version of libosmoctrl. Change-Id: Ia76f841d2c9cd14394e9316fcd39f4060e23c898 Related: OS#1646 --- M configure.ac M ggsn/Makefile.am M ggsn/ggsn.c M gtp/gtp.h 4 files changed, 34 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openggsn refs/changes/42/1042/1 diff --git a/configure.ac b/configure.ac index 9b8d988..b11730b 100644 --- a/configure.ac +++ b/configure.ac @@ -117,6 +117,7 @@ PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.6.4) PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.3.0) +PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl) AC_CONFIG_FILES([Makefile doc/Makefile diff --git a/ggsn/Makefile.am b/ggsn/Makefile.am index c8868c1..3ad3a6e 100644 --- a/ggsn/Makefile.am +++ b/ggsn/Makefile.am @@ -2,13 +2,13 @@ AM_LDFLAGS = @EXEC_LDFLAGS@ -AM_CFLAGS = -O2 -D_GNU_SOURCE -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' -ggdb $(LIBOSMOCORE_CFLAGS) +AM_CFLAGS = -O2 -D_GNU_SOURCE -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' -ggdb $(LIBOSMOCORE_CFLAGS) $(LIBOSMOCTRL_CFLAGS) if ENABLE_GTP_KERNEL AM_CFLAGS += -DGTP_KERNEL -ggsn_LDADD = @EXEC_LDADD@ -lgtp -lgtpnl -L../gtp ../lib/libmisc.a $(LIBOSMOCORE_LIBS) +ggsn_LDADD = @EXEC_LDADD@ -lgtp -lgtpnl -L../gtp ../lib/libmisc.a $(LIBOSMOCORE_LIBS) $(LIBOSMOCTRL_LIBS) else -ggsn_LDADD = @EXEC_LDADD@ -lgtp -L../gtp ../lib/libmisc.a $(LIBOSMOCORE_LIBS) +ggsn_LDADD = @EXEC_LDADD@ -lgtp -L../gtp ../lib/libmisc.a $(LIBOSMOCORE_LIBS) $(LIBOSMOCTRL_LIBS) endif ggsn_DEPENDENCIES = ../gtp/libgtp.la ../lib/libmisc.a diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 6866901..9609d52 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -39,7 +39,7 @@ #include #include #include - +#include #include #include #include @@ -47,6 +47,11 @@ #include #include + +#include +#include +#include +#include #include "../lib/tun.h" #include "../lib/ippool.h" @@ -131,6 +136,9 @@ int delete_context(struct pdp_t *pdp) { DEBUGP(DGGSN, "Deleting PDP context\n"); + struct ippoolm_t *member = pdp->peer; + char v[NAMESIZE]; + snprintf(v, sizeof(v), "%" PRIu64 ",%s", pdp->imsi, inet_ntoa(member->addr)); if (pdp->peer) ippool_freeip(ippool, (struct ippoolm_t *)pdp->peer); else @@ -141,6 +149,9 @@ "Cannot delete tunnel from kernel: %s\n", strerror(errno)); } +/* FIXME: naming? */ + if (ctrl_cmd_send_trap(gsn->ctrl, "imsi-rem-ip", v) < 0) + LOGP(DGGSN, LOGL_ERROR, "Trap creation failed.\n"); return 0; } @@ -149,6 +160,7 @@ { struct in_addr addr; struct ippoolm_t *member; + char v[NAMESIZE]; DEBUGP(DGGSN, "Received create PDP context request\n"); @@ -177,6 +189,13 @@ if (gtp_kernel_tunnel_add(pdp) < 0) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "Cannot add tunnel to kernel: %s\n", strerror(errno)); + } +/* FIXME: naming? */ + snprintf(v, sizeof(v), "%" PRIu64 ",%s", pdp->imsi, inet_ntoa(member->addr)); + if (ctrl_cmd_send_trap(gsn->ctrl, "imsi-ass-ip", v) < 0) { + LOGP(DGGSN, LOGL_ERROR, "Trap creation failed.\n"); + gtp_create_context_resp(gsn, pdp, GTPCAUSE_NO_RESOURCES); + return 0; } gtp_create_context_resp(gsn, pdp, GTPCAUSE_ACC_REQ); @@ -526,6 +545,12 @@ gtp_set_cb_delete_context(gsn, delete_context); gtp_set_cb_create_context_ind(gsn, create_context_ind); + gsn->ctrl = ctrl_interface_setup(NULL, OSMO_CTRL_PORT_GGSN, NULL); + if (!gsn->ctrl) { + LOGP(DGGSN, LOGL_ERROR, "Failed to create CTRL interface.\n"); + exit(1); + } + /* skip the configuration of the tun0 if we're using the gtp0 device */ if (gtp_kernel_enabled()) goto skip_tun; @@ -597,6 +622,7 @@ if (FD_ISSET(gsn->fd1u, &fds)) gtp_decaps1u(gsn); + osmo_select_main(1); } err: gtp_kernel_stop(); diff --git a/gtp/gtp.h b/gtp/gtp.h index 539e255..fd138cc 100644 --- a/gtp/gtp.h +++ b/gtp/gtp.h @@ -12,6 +12,8 @@ #ifndef _GTP_H #define _GTP_H +#include + #define GTP_MODE_GGSN 1 #define GTP_MODE_SGSN 2 @@ -245,7 +247,7 @@ unsigned char restart_counter; /* Increment on restart. Stored on disk */ char *statedir; /* Disk location for permanent storage */ - + struct ctrl_handle *ctrl; /* Control Interface */ struct queue_t *queue_req; /* Request queue */ struct queue_t *queue_resp; /* Response queue */ -- To view, visit https://gerrit.osmocom.org/1042 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia76f841d2c9cd14394e9316fcd39f4060e23c898 Gerrit-PatchSet: 1 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Oct 11 13:47:43 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 11 Oct 2016 13:47:43 +0000 Subject: [PATCH] osmo-bts[master]: DTX: fix 1st RTP packet drop In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1027 to look at the new patch set (#2). DTX: fix 1st RTP packet drop Use "impossible" dummy value to initialize last_fn to prevent dropping of 1st RTP frame due to timestamp jump. Fixes: OS#1803 Change-Id: I485af21f6761048d12dc7f5552fcdd46daf786ed --- M include/osmo-bts/rsl.h M src/common/l1sap.c M src/common/rsl.c 3 files changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/27/1027/2 diff --git a/include/osmo-bts/rsl.h b/include/osmo-bts/rsl.h index 093e9cb..4311ffd 100644 --- a/include/osmo-bts/rsl.h +++ b/include/osmo-bts/rsl.h @@ -11,6 +11,8 @@ LCHAN_REL_ACT_OML, }; +#define LCHAN_FN_DUMMY 0xFFFFFFFF + int msgb_queue_flush(struct llist_head *list); int down_rsl(struct gsm_bts_trx *trx, struct msgb *msg); diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 943bdfe..04cc800 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -72,7 +72,7 @@ static uint32_t fn_ms_adj(uint32_t fn, uint32_t last_fn) { - if (last_fn) { + if (last_fn != LCHAN_FN_DUMMY) { uint32_t ms_passed = GSM_FN_TO_MS(fn - last_fn), samples_passed = GSM_MS_TO_SAMPLES(ms_passed); /* round number of samples to the nearest multiple of diff --git a/src/common/rsl.c b/src/common/rsl.c index 493ff3b..0f16f7d 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1621,6 +1621,7 @@ } /* FIXME: select default value depending on speech_mode */ //if (!payload_type) + lchan->tch.last_fn = LCHAN_FN_DUMMY; lchan->abis_ip.rtp_socket = osmo_rtp_socket_create(lchan->ts->trx, OSMO_RTP_F_POLL); if (!lchan->abis_ip.rtp_socket) { -- To view, visit https://gerrit.osmocom.org/1027 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I485af21f6761048d12dc7f5552fcdd46daf786ed 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 Tue Oct 11 13:47:43 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 11 Oct 2016 13:47:43 +0000 Subject: [PATCH] osmo-bts[master]: DTX: fix conversion from fn to ms In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1029 to look at the new patch set (#2). DTX: fix conversion from fn to ms Fixes: OS#1801 Change-Id: I9cc70cacabde98621aa892cee74f4ac461645093 --- M src/common/l1sap.c 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/29/1029/2 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 04cc800..dd34d80 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -73,8 +73,10 @@ static uint32_t fn_ms_adj(uint32_t fn, uint32_t last_fn) { if (last_fn != LCHAN_FN_DUMMY) { - uint32_t ms_passed = GSM_FN_TO_MS(fn - last_fn), - samples_passed = GSM_MS_TO_SAMPLES(ms_passed); + /* 12/13 frames usable for audio in TCH, + 160 samples per RTP packet, + 1 RTP packet per 4 frames */ + uint32_t samples_passed = (fn - last_fn) * 12 * 160 / (13 * 4); /* round number of samples to the nearest multiple of GSM_RTP_DURATION */ uint32_t r = samples_passed + GSM_RTP_DURATION / 2; -- To view, visit https://gerrit.osmocom.org/1029 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9cc70cacabde98621aa892cee74f4ac461645093 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 Tue Oct 11 13:49:29 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 11 Oct 2016 13:49:29 +0000 Subject: [PATCH] libosmo-abis[master]: Resync RTP session in case of timestamp jump In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1028 to look at the new patch set (#2). Resync RTP session in case of timestamp jump Fixes: OS#1803 Change-Id: Iae5da832218dbd1ede7a9451102074f2a5eb66df --- M src/trau/osmo_ortp.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/28/1028/2 diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index 5441337..68db5da 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -139,7 +139,8 @@ uint32_t ts = rtp_session_get_current_recv_ts(rs); LOGP(DLMIB, LOGL_NOTICE, - "osmo-ortp(%d): timestamp_jump, new TS %d\n", port, ts); + "osmo-ortp(%d): timestamp_jump, new TS %d, resyncing\n", port, ts); + rtp_session_resync(rs); } -- To view, visit https://gerrit.osmocom.org/1028 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iae5da832218dbd1ede7a9451102074f2a5eb66df Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 11 15:47:41 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 11 Oct 2016 15:47:41 +0000 Subject: openbsc[master]: gsm0408: Adding log output for 3g specific RR messages In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/1037/1//COMMIT_MSG Commit Message: PS1, Line 9: 8 doesn't this patch depend on a similar change in libosmocore? Then please state it in the commit message and indicate the required Change-Id of the libosmocore patch. -- To view, visit https://gerrit.osmocom.org/1037 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I41f2242fdf59c3eb4b3f8f7f003c17f7e0df01aa Gerrit-PatchSet: 1 Gerrit-Project: openbsc 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 Tue Oct 11 15:48:55 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 11 Oct 2016 15:48:55 +0000 Subject: libosmo-abis[master]: Resync RTP session in case of timestamp jump In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 the commit message could benefit a lot from being more verbose in describing the problem it fixes. -- To view, visit https://gerrit.osmocom.org/1028 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae5da832218dbd1ede7a9451102074f2a5eb66df Gerrit-PatchSet: 2 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 Oct 11 15:48:57 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 11 Oct 2016 15:48:57 +0000 Subject: libosmo-abis[master]: Resync RTP session in case of timestamp jump In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1028 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae5da832218dbd1ede7a9451102074f2a5eb66df Gerrit-PatchSet: 2 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 Oct 11 15:49:04 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 11 Oct 2016 15:49:04 +0000 Subject: libosmo-abis[master]: Resync RTP session in case of timestamp jump In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 -- To view, visit https://gerrit.osmocom.org/1028 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae5da832218dbd1ede7a9451102074f2a5eb66df Gerrit-PatchSet: 2 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 Oct 11 15:49:48 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 11 Oct 2016 15:49:48 +0000 Subject: osmo-bts[master]: DTX: fix conversion from fn to ms In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 there was a verbose explanation of this in a private e-mail thread, please add it to the commit message or as a comment to the code. -- To view, visit https://gerrit.osmocom.org/1029 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9cc70cacabde98621aa892cee74f4ac461645093 Gerrit-PatchSet: 2 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 Oct 11 15:50:27 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 11 Oct 2016 15:50:27 +0000 Subject: osmo-bts[master]: DTX: fix 1st RTP packet drop In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1027 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I485af21f6761048d12dc7f5552fcdd46daf786ed Gerrit-PatchSet: 2 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 Oct 11 15:50:29 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 11 Oct 2016 15:50:29 +0000 Subject: [MERGED] osmo-bts[master]: DTX: fix 1st RTP packet drop In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: DTX: fix 1st RTP packet drop ...................................................................... DTX: fix 1st RTP packet drop Use "impossible" dummy value to initialize last_fn to prevent dropping of 1st RTP frame due to timestamp jump. Fixes: OS#1803 Change-Id: I485af21f6761048d12dc7f5552fcdd46daf786ed --- M include/osmo-bts/rsl.h M src/common/l1sap.c M src/common/rsl.c 3 files changed, 4 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmo-bts/rsl.h b/include/osmo-bts/rsl.h index 093e9cb..4311ffd 100644 --- a/include/osmo-bts/rsl.h +++ b/include/osmo-bts/rsl.h @@ -11,6 +11,8 @@ LCHAN_REL_ACT_OML, }; +#define LCHAN_FN_DUMMY 0xFFFFFFFF + int msgb_queue_flush(struct llist_head *list); int down_rsl(struct gsm_bts_trx *trx, struct msgb *msg); diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 943bdfe..04cc800 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -72,7 +72,7 @@ static uint32_t fn_ms_adj(uint32_t fn, uint32_t last_fn) { - if (last_fn) { + if (last_fn != LCHAN_FN_DUMMY) { uint32_t ms_passed = GSM_FN_TO_MS(fn - last_fn), samples_passed = GSM_MS_TO_SAMPLES(ms_passed); /* round number of samples to the nearest multiple of diff --git a/src/common/rsl.c b/src/common/rsl.c index 493ff3b..0f16f7d 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1621,6 +1621,7 @@ } /* FIXME: select default value depending on speech_mode */ //if (!payload_type) + lchan->tch.last_fn = LCHAN_FN_DUMMY; lchan->abis_ip.rtp_socket = osmo_rtp_socket_create(lchan->ts->trx, OSMO_RTP_F_POLL); if (!lchan->abis_ip.rtp_socket) { -- To view, visit https://gerrit.osmocom.org/1027 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I485af21f6761048d12dc7f5552fcdd46daf786ed Gerrit-PatchSet: 3 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 Oct 11 15:51:14 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 11 Oct 2016 15:51:14 +0000 Subject: openggsn[master]: Remove unused function In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1041 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iff0f1499660b12a47277b16a435efecb42fab038 Gerrit-PatchSet: 1 Gerrit-Project: openggsn 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 Oct 11 15:51:16 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 11 Oct 2016 15:51:16 +0000 Subject: [MERGED] openggsn[master]: Remove unused function In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Remove unused function ...................................................................... Remove unused function Change-Id: Iff0f1499660b12a47277b16a435efecb42fab038 --- M ggsn/ggsn.c M gtp/pdp.c M gtp/pdp.h 3 files changed, 0 insertions(+), 13 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 7725016..6866901 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -154,7 +154,6 @@ pdp->eua.l = 0; /* TODO: Indicates dynamic IP */ - /* ulcpy(&pdp->qos_neg, &pdp->qos_req, sizeof(pdp->qos_req.v)); */ memcpy(pdp->qos_neg0, pdp->qos_req0, sizeof(pdp->qos_req0)); memcpy(&pdp->pco_neg, &pco, sizeof(pdp->pco_neg)); diff --git a/gtp/pdp.c b/gtp/pdp.c index f0d6adf..f297af9 100644 --- a/gtp/pdp.c +++ b/gtp/pdp.c @@ -370,14 +370,3 @@ pdp->imsi = teid & 0x0fffffffffffffffull; pdp->nsapi = (teid & 0xf000000000000000ull) >> 60; } - -int ulcpy(void *dst, void *src, size_t size) -{ - if (((struct ul255_t *)src)->l <= size) { - ((struct ul255_t *)dst)->l = ((struct ul255_t *)src)->l; - memcpy(((struct ul255_t *)dst)->v, ((struct ul255_t *)src)->v, - ((struct ul255_t *)dst)->l); - return 0; - } else - return EOF; -} diff --git a/gtp/pdp.h b/gtp/pdp.h index 57af8b3..217b1d6 100644 --- a/gtp/pdp.h +++ b/gtp/pdp.h @@ -252,6 +252,5 @@ int pdp_ntoeua(struct in_addr *src, struct ul66_t *eua); int pdp_euaton(struct ul66_t *eua, struct in_addr *dst); uint64_t pdp_gettid(uint64_t imsi, uint8_t nsapi); -int ulcpy(void *dst, void *src, size_t size); #endif /* !_PDP_H */ -- To view, visit https://gerrit.osmocom.org/1041 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iff0f1499660b12a47277b16a435efecb42fab038 Gerrit-PatchSet: 1 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 11 15:51:39 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 11 Oct 2016 15:51:39 +0000 Subject: libosmocore[master]: Constify ctrl_cmd struct fields where appropriate In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1040 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3f55c1d4b965d215dc9b16f4b284b7fea4bde9e9 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 Oct 11 15:52:09 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 11 Oct 2016 15:52:09 +0000 Subject: libosmocore[master]: Constify ctrl_cmd struct fields where appropriate In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 should'nt we update TODO-RELEASE? -- To view, visit https://gerrit.osmocom.org/1040 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3f55c1d4b965d215dc9b16f4b284b7fea4bde9e9 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 Oct 11 15:52:41 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 11 Oct 2016 15:52:41 +0000 Subject: libosmocore[master]: Add function to send TRAP over Control Interface In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/649 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic0b8d88c4f5c4d42c3f8fb754f8eabf049c9e388 Gerrit-PatchSet: 3 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-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Oct 11 16:20:57 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 11 Oct 2016 16:20:57 +0000 Subject: [PATCH] osmo-bts[master]: DTX: fix conversion from fn to ms 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/1029 to look at the new patch set (#3). DTX: fix conversion from fn to ms Previously FN was converted to millisecondss incorrectly due to wrong conversion between FN and a number of voice samples. The conversion should be based on following: * there are 12/13 useful frames for audio in TCH * there is 1 RTP packet per 4 frame * there are 160 samples per RTP packet Fixes: OS#1801 Change-Id: I9cc70cacabde98621aa892cee74f4ac461645093 --- M src/common/l1sap.c 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/29/1029/3 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 04cc800..dd34d80 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -73,8 +73,10 @@ static uint32_t fn_ms_adj(uint32_t fn, uint32_t last_fn) { if (last_fn != LCHAN_FN_DUMMY) { - uint32_t ms_passed = GSM_FN_TO_MS(fn - last_fn), - samples_passed = GSM_MS_TO_SAMPLES(ms_passed); + /* 12/13 frames usable for audio in TCH, + 160 samples per RTP packet, + 1 RTP packet per 4 frames */ + uint32_t samples_passed = (fn - last_fn) * 12 * 160 / (13 * 4); /* round number of samples to the nearest multiple of GSM_RTP_DURATION */ uint32_t r = samples_passed + GSM_RTP_DURATION / 2; -- To view, visit https://gerrit.osmocom.org/1029 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9cc70cacabde98621aa892cee74f4ac461645093 Gerrit-PatchSet: 3 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 Oct 11 16:27:43 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 11 Oct 2016 16:27:43 +0000 Subject: [PATCH] libosmocore[master]: Constify ctrl_cmd struct fields where appropriate 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/1040 to look at the new patch set (#2). Constify ctrl_cmd struct fields where appropriate Change-Id: I3f55c1d4b965d215dc9b16f4b284b7fea4bde9e9 --- M TODO-RELEASE M include/osmocom/ctrl/control_cmd.h 2 files changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/40/1040/2 diff --git a/TODO-RELEASE b/TODO-RELEASE index 648b6a6..b67d6dd 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -4,3 +4,4 @@ libosmocore change major size of ph_data_param struct changed / Extend L1SAP PH-DATA with presence information libosmocore change major size of ph_data_param struct changed / Extend L1SAP PH-DATA with measurement information libosmocore change major size of ph_tch_param struct changed / Extend with RTP Marker +libosmocore change minor mark as const id, variable & value fields of ctrl_cmd struct diff --git a/include/osmocom/ctrl/control_cmd.h b/include/osmocom/ctrl/control_cmd.h index 8f2eaa2..cd96038 100644 --- a/include/osmocom/ctrl/control_cmd.h +++ b/include/osmocom/ctrl/control_cmd.h @@ -53,10 +53,10 @@ struct ctrl_cmd { struct ctrl_connection *ccon; enum ctrl_type type; - char *id; + const char *id; void *node; - char *variable; - char *value; + const char *variable; + const char *value; char *reply; }; -- To view, visit https://gerrit.osmocom.org/1040 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3f55c1d4b965d215dc9b16f4b284b7fea4bde9e9 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 Oct 11 16:43:34 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 11 Oct 2016 16:43:34 +0000 Subject: [PATCH] libosmo-abis[master]: Resync RTP session in case of timestamp jump 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/1028 to look at the new patch set (#3). Resync RTP session in case of timestamp jump This will prevent the timestamp jump to occur between each call for DTX if something goes wrong. It's handy as oRTP does not manage well timestamp jump if it is not resynced. Fixes: OS#1803 Change-Id: Iae5da832218dbd1ede7a9451102074f2a5eb66df --- M src/trau/osmo_ortp.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/28/1028/3 diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index 5441337..68db5da 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -139,7 +139,8 @@ uint32_t ts = rtp_session_get_current_recv_ts(rs); LOGP(DLMIB, LOGL_NOTICE, - "osmo-ortp(%d): timestamp_jump, new TS %d\n", port, ts); + "osmo-ortp(%d): timestamp_jump, new TS %d, resyncing\n", port, ts); + rtp_session_resync(rs); } -- To view, visit https://gerrit.osmocom.org/1028 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iae5da832218dbd1ede7a9451102074f2a5eb66df Gerrit-PatchSet: 3 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 Wed Oct 12 09:05:38 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 12 Oct 2016 09:05:38 +0000 Subject: [PATCH] openbsc[master]: gsm0408: Adding log output for 3g specific RR messages In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1037 to look at the new patch set (#2). gsm0408: Adding log output for 3g specific RR messages GSM 04.18, which is the successor of GSM 04.08, describes additional RR 3g specific message types. This commit adds adds log output for those messages. The behaviour is not changed, all affected message types are still forwared to the MSC as they were before. See also 3GPP TS 04.18, section 10.4, table 10.4.1 The change requires to update libosmocore as well, see also commit d26acf3a0352f7341774a32fc407c8ed7a98c0d2 in libosmocore.git for details. Change-Id: I41f2242fdf59c3eb4b3f8f7f003c17f7e0df01aa --- M openbsc/src/libbsc/bsc_api.c 1 file changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/37/1037/2 diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c index cc12e9f..0e12733 100644 --- a/openbsc/src/libbsc/bsc_api.c +++ b/openbsc/src/libbsc/bsc_api.c @@ -639,6 +639,30 @@ if (api->dtap) api->dtap(conn, link_id, msg); break; + case GSM48_MT_RR_UTRAN_CLSM_CHG: + LOGP(DRR, LOGL_NOTICE, + "BSC: Passing RR UTRAN Classmark Change to MSC\n"); + if (api->dtap) + api->dtap(conn, link_id, msg); + break; + case GSM48_MT_RR_CDMA2K_CLSM_CHG: + LOGP(DRR, LOGL_NOTICE, + "BSC: Passing RR cdma 2000 Classmark Change to MSC\n"); + if (api->dtap) + api->dtap(conn, link_id, msg); + break; + case GSM48_MT_RR_IS_TO_UTRAN_HANDO: + LOGP(DRR, LOGL_NOTICE, + "BSC: Passing RR Inter System to UTRAN Handover Command to MSC\n"); + if (api->dtap) + api->dtap(conn, link_id, msg); + break; + case GSM48_MT_RR_IS_TO_CDMA2K_HANDO: + LOGP(DRR, LOGL_NOTICE, + "BSC: Inter System to cdma2000 Handover Command to MSC\n"); + if (api->dtap) + api->dtap(conn, link_id, msg); + break; default: /* Normally, a MSC should never receive RR * messages, but we'd rather forward what we -- To view, visit https://gerrit.osmocom.org/1037 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I41f2242fdf59c3eb4b3f8f7f003c17f7e0df01aa Gerrit-PatchSet: 2 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 Wed Oct 12 09:22:17 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 09:22:17 +0000 Subject: openbsc[master]: gsm0408: Adding log output for 3g specific RR messages In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/1037/2/openbsc/src/libbsc/bsc_api.c File openbsc/src/libbsc/bsc_api.c: Line 642: case GSM48_MT_RR_UTRAN_CLSM_CHG: We don't generally write this kind of copy+paste code. There should be one block of LOGP and api->dtap sending. And the actual message name can be handled via a get_value_string() function call. Also, all L3 message names are always written in upper case in all log output, please don't break that consistency. Finally, the RR layer normally terminates at the BSC, only MM/CC/SMS are passed to the MSC. Did you find anything in the specs about this particular RR messages being excempt from the general rule? -- To view, visit https://gerrit.osmocom.org/1037 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I41f2242fdf59c3eb4b3f8f7f003c17f7e0df01aa Gerrit-PatchSet: 2 Gerrit-Project: openbsc 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 Oct 12 09:22:49 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 09:22:49 +0000 Subject: libosmo-abis[master]: Resync RTP session in case of timestamp jump In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1028 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae5da832218dbd1ede7a9451102074f2a5eb66df Gerrit-PatchSet: 3 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 Wed Oct 12 09:23:20 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 09:23:20 +0000 Subject: libosmocore[master]: Constify ctrl_cmd struct fields where appropriate In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1040 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3f55c1d4b965d215dc9b16f4b284b7fea4bde9e9 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 Wed Oct 12 09:23:26 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 09:23:26 +0000 Subject: [MERGED] libosmocore[master]: Constify ctrl_cmd struct fields where appropriate In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Constify ctrl_cmd struct fields where appropriate ...................................................................... Constify ctrl_cmd struct fields where appropriate Change-Id: I3f55c1d4b965d215dc9b16f4b284b7fea4bde9e9 --- M TODO-RELEASE M include/osmocom/ctrl/control_cmd.h 2 files changed, 4 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/TODO-RELEASE b/TODO-RELEASE index 648b6a6..b67d6dd 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -4,3 +4,4 @@ libosmocore change major size of ph_data_param struct changed / Extend L1SAP PH-DATA with presence information libosmocore change major size of ph_data_param struct changed / Extend L1SAP PH-DATA with measurement information libosmocore change major size of ph_tch_param struct changed / Extend with RTP Marker +libosmocore change minor mark as const id, variable & value fields of ctrl_cmd struct diff --git a/include/osmocom/ctrl/control_cmd.h b/include/osmocom/ctrl/control_cmd.h index 8f2eaa2..cd96038 100644 --- a/include/osmocom/ctrl/control_cmd.h +++ b/include/osmocom/ctrl/control_cmd.h @@ -53,10 +53,10 @@ struct ctrl_cmd { struct ctrl_connection *ccon; enum ctrl_type type; - char *id; + const char *id; void *node; - char *variable; - char *value; + const char *variable; + const char *value; char *reply; }; -- To view, visit https://gerrit.osmocom.org/1040 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3f55c1d4b965d215dc9b16f4b284b7fea4bde9e9 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 Oct 12 09:23:39 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 09:23:39 +0000 Subject: osmo-bts[master]: DTX: fix conversion from fn to ms In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1029 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9cc70cacabde98621aa892cee74f4ac461645093 Gerrit-PatchSet: 3 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 Oct 12 09:23:43 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 09:23:43 +0000 Subject: [MERGED] osmo-bts[master]: DTX: fix conversion from fn to ms In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: DTX: fix conversion from fn to ms ...................................................................... DTX: fix conversion from fn to ms Previously FN was converted to millisecondss incorrectly due to wrong conversion between FN and a number of voice samples. The conversion should be based on following: * there are 12/13 useful frames for audio in TCH * there is 1 RTP packet per 4 frame * there are 160 samples per RTP packet Fixes: OS#1801 Change-Id: I9cc70cacabde98621aa892cee74f4ac461645093 --- M src/common/l1sap.c 1 file changed, 4 insertions(+), 2 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 04cc800..dd34d80 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -73,8 +73,10 @@ static uint32_t fn_ms_adj(uint32_t fn, uint32_t last_fn) { if (last_fn != LCHAN_FN_DUMMY) { - uint32_t ms_passed = GSM_FN_TO_MS(fn - last_fn), - samples_passed = GSM_MS_TO_SAMPLES(ms_passed); + /* 12/13 frames usable for audio in TCH, + 160 samples per RTP packet, + 1 RTP packet per 4 frames */ + uint32_t samples_passed = (fn - last_fn) * 12 * 160 / (13 * 4); /* round number of samples to the nearest multiple of GSM_RTP_DURATION */ uint32_t r = samples_passed + GSM_RTP_DURATION / 2; -- To view, visit https://gerrit.osmocom.org/1029 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9cc70cacabde98621aa892cee74f4ac461645093 Gerrit-PatchSet: 3 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 Oct 12 09:25:36 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 09:25:36 +0000 Subject: openbsc[master]: gsm0408: Adding log output for 3g specific RR messages In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/1037/2/openbsc/src/libbsc/bsc_api.c File openbsc/src/libbsc/bsc_api.c: Line 642: case GSM48_MT_RR_UTRAN_CLSM_CHG: > We don't generally write this kind of copy+paste code. There should be one ok, so the old code also passes them along, sorry. then let's keep that. However, we should simply have one block of the code, including the "unknown" case. get_value_string() for an unknown/undefined value will automatically return an "unknown 0x%x" string. So all the newly-introduced cases and the AP_INFO and the default case can all be fall-through and handled by one block. -- To view, visit https://gerrit.osmocom.org/1037 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I41f2242fdf59c3eb4b3f8f7f003c17f7e0df01aa Gerrit-PatchSet: 2 Gerrit-Project: openbsc 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 Oct 12 09:25:48 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 09:25:48 +0000 Subject: openggsn[master]: Add .gitreview to simplify gerrit integration In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1039 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib141dc9ae03c2b10b8925e30a2782bf2d932e192 Gerrit-PatchSet: 1 Gerrit-Project: openggsn 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 Oct 12 09:25:49 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 09:25:49 +0000 Subject: [MERGED] openggsn[master]: Add .gitreview to simplify gerrit integration In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add .gitreview to simplify gerrit integration ...................................................................... Add .gitreview to simplify gerrit integration Change-Id: Ib141dc9ae03c2b10b8925e30a2782bf2d932e192 --- 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..cc02ff2 --- /dev/null +++ b/.gitreview @@ -0,0 +1,3 @@ +[gerrit] +host=gerrit.osmocom.org +project=openggsn -- To view, visit https://gerrit.osmocom.org/1039 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib141dc9ae03c2b10b8925e30a2782bf2d932e192 Gerrit-PatchSet: 2 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Oct 12 09:26:01 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 09:26:01 +0000 Subject: [MERGED] libosmo-abis[master]: Resync RTP session in case of timestamp jump In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Resync RTP session in case of timestamp jump ...................................................................... Resync RTP session in case of timestamp jump This will prevent the timestamp jump to occur between each call for DTX if something goes wrong. It's handy as oRTP does not manage well timestamp jump if it is not resynced. Fixes: OS#1803 Change-Id: Iae5da832218dbd1ede7a9451102074f2a5eb66df --- M src/trau/osmo_ortp.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index 6ce70d2..e3c6234 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -139,7 +139,8 @@ uint32_t ts = rtp_session_get_current_recv_ts(rs); LOGP(DLMIB, LOGL_NOTICE, - "osmo-ortp(%d): timestamp_jump, new TS %d\n", port, ts); + "osmo-ortp(%d): timestamp_jump, new TS %d, resyncing\n", port, ts); + rtp_session_resync(rs); } -- To view, visit https://gerrit.osmocom.org/1028 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iae5da832218dbd1ede7a9451102074f2a5eb66df Gerrit-PatchSet: 4 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 Wed Oct 12 09:26:50 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 09:26:50 +0000 Subject: libosmocore[master]: fix USSD: SS message type mask should be 0x3f, not 0xbf In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1038 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I299001a9e36c16f55622a0acd5d4a55ca49d0055 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 Wed Oct 12 09:26:52 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 09:26:52 +0000 Subject: [MERGED] libosmocore[master]: fix USSD: SS message type mask should be 0x3f, not 0xbf In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: fix USSD: SS message type mask should be 0x3f, not 0xbf ...................................................................... fix USSD: SS message type mask should be 0x3f, not 0xbf See 04.80[1], section 3.4: the highest two bits are used as counter or ignored and do not contribute to the SS "Miscellaneous message group". Previous mask of 0xbf included the highest bit, fix to 0x3f. Observed a value of 0xbb that should mean 0x3b="Register" during testing of 3G USSD requests, which seem to be the first to send a nonzero highest bit to our code. The erratic mask of 0xbf lead to an unhandled message type of 0xbb. [1] 3GPP TS 24.080 version 7.2.0 Release 7 / ETSI TS 124 080 V7.2.0 (2006-09) Change-Id: I299001a9e36c16f55622a0acd5d4a55ca49d0055 --- M src/gsm/gsm0480.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gsm/gsm0480.c b/src/gsm/gsm0480.c index 8963b78..d628d92 100644 --- a/src/gsm/gsm0480.c +++ b/src/gsm/gsm0480.c @@ -268,7 +268,7 @@ static int parse_ss(const struct gsm48_hdr *hdr, uint16_t len, struct ss_request *req) { int rc = 1; - uint8_t msg_type = hdr->msg_type & 0xBF; /* message-type - section 3.4 */ + uint8_t msg_type = hdr->msg_type & 0x3F; /* message-type - section 3.4 */ switch (msg_type) { case GSM0480_MTYPE_RELEASE_COMPLETE: -- To view, visit https://gerrit.osmocom.org/1038 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I299001a9e36c16f55622a0acd5d4a55ca49d0055 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 Wed Oct 12 09:29:33 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 09:29:33 +0000 Subject: libosmocore[master]: gsm0408: Adding 3g spcific RR message types In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/1036/1/include/osmocom/gsm/protocol/gsm_04_08.h File include/osmocom/gsm/protocol/gsm_04_08.h: Line 1055: #define GSM48_MT_RR_UTRAN_CLSM_CHG 0x60 it seems we are missing this, pleaes also add a value_string table for all RR message types, similar to cc_msg_names and gsm48_cc_msg_name() in gsm48.c. This should be an additional patch. That new API can then be used from openbsc for printing the RR message type -- To view, visit https://gerrit.osmocom.org/1036 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I071cc9ecac342b5221fa0ec0b782b04b51b40e93 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore 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 Oct 12 09:29:36 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 09:29:36 +0000 Subject: [MERGED] libosmocore[master]: gsm0408: Adding 3g spcific RR message types In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gsm0408: Adding 3g spcific RR message types ...................................................................... gsm0408: Adding 3g spcific RR message types GSM 04.18, which is the successor of GSM 04.08, describes additional RR 3g specific message types. This commit adds four new message types related to paging and notifiction See also 3GPP TS 04.18, section 10.4, table 10.4.1 Change-Id: I071cc9ecac342b5221fa0ec0b782b04b51b40e93 --- M include/osmocom/gsm/protocol/gsm_04_08.h 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index 885ac8a..fa2bb06 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -1052,6 +1052,11 @@ #define GSM48_MT_RR_NOTIF_FACCH 0x25 #define GSM48_MT_RR_NOTIF_RESP 0x26 +#define GSM48_MT_RR_UTRAN_CLSM_CHG 0x60 +#define GSM48_MT_RR_CDMA2K_CLSM_CHG 0x62 +#define GSM48_MT_RR_IS_TO_UTRAN_HANDO 0x63 +#define GSM48_MT_RR_IS_TO_CDMA2K_HANDO 0x64 + #define GSM48_MT_RR_SYSINFO_8 0x18 #define GSM48_MT_RR_SYSINFO_1 0x19 #define GSM48_MT_RR_SYSINFO_2 0x1a -- To view, visit https://gerrit.osmocom.org/1036 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I071cc9ecac342b5221fa0ec0b782b04b51b40e93 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Oct 12 09:30:04 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 09:30:04 +0000 Subject: osmo-bts[master]: Move copy-pasted array into shared header In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1034 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I377ece2845830e3defab2d515f44b629ce5aed8e 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 Wed Oct 12 09:30:07 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 09:30:07 +0000 Subject: [MERGED] osmo-bts[master]: Move copy-pasted array into shared header In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Move copy-pasted array into shared header ...................................................................... Move copy-pasted array into shared header Change-Id: I377ece2845830e3defab2d515f44b629ce5aed8e --- M include/osmo-bts/l1sap.h M src/common/l1sap.c M src/osmo-bts-litecell15/l1_if.c M src/osmo-bts-sysmo/l1_if.c 4 files changed, 8 insertions(+), 18 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmo-bts/l1sap.h b/include/osmo-bts/l1sap.h index 981cd75..77bfbaa 100644 --- a/include/osmo-bts/l1sap.h +++ b/include/osmo-bts/l1sap.h @@ -1,6 +1,8 @@ #ifndef L1SAP_H #define L1SAP_H +#include + /* timeslot and subslot from chan_nr */ #define L1SAP_CHAN2TS(chan_nr) (chan_nr & 7) #define L1SAP_CHAN2SS_TCHH(chan_nr) ((chan_nr >> 3) & 1) @@ -28,6 +30,12 @@ #define L1SAP_FN2PTCCHBLOCK(fn) ((fn / 104) & 3) #define L1SAP_IS_PTCCH(fn) ((fn % 52) == 12) +static const uint8_t fill_frame[GSM_MACBLOCK_LEN] = { + 0x03, 0x03, 0x01, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, + 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, + 0x2B, 0x2B, 0x2B +}; + /* subslot from any chan_nr */ static inline uint8_t l1sap_chan2ss(uint8_t chan_nr) { diff --git a/src/common/l1sap.c b/src/common/l1sap.c index dd34d80..dd234ee 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -86,12 +86,6 @@ return GSM_RTP_DURATION; } -static const uint8_t fill_frame[GSM_MACBLOCK_LEN] = { - 0x03, 0x03, 0x01, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, - 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, - 0x2B, 0x2B, 0x2B -}; - /* allocate a msgb containing a osmo_phsap_prim + optional l2 data * in order to wrap femtobts header arround l2 data, there must be enough space * in front and behind data pointer */ diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index a4378c1..1c98951 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -286,12 +286,6 @@ return empty_req; } -static const uint8_t fill_frame[GSM_MACBLOCK_LEN] = { - 0x03, 0x03, 0x01, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, - 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, - 0x2B, 0x2B, 0x2B -}; - /* fill PH-DATA.req from l1sap primitive */ static GsmL1_PhDataReq_t * data_req_from_l1sap(GsmL1_Prim_t *l1p, struct lc15l1_hdl *fl1, diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 09627af..11a5729 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -281,12 +281,6 @@ return empty_req; } -static const uint8_t fill_frame[GSM_MACBLOCK_LEN] = { - 0x03, 0x03, 0x01, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, - 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, - 0x2B, 0x2B, 0x2B -}; - /* fill PH-DATA.req from l1sap primitive */ static GsmL1_PhDataReq_t * data_req_from_l1sap(GsmL1_Prim_t *l1p, struct femtol1_hdl *fl1, -- To view, visit https://gerrit.osmocom.org/1034 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I377ece2845830e3defab2d515f44b629ce5aed8e 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 Wed Oct 12 09:31:03 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 09:31:03 +0000 Subject: openbsc[master]: gsm_trx_name(): don't break if trx is NULL In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1033 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8e77fe1abc402469fd037e2fde2f46e2c8114f59 Gerrit-PatchSet: 1 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 Wed Oct 12 09:31:20 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 09:31:20 +0000 Subject: openbsc[master]: abis_rsl_rx_dchan(): guard against lchan_lookup() returning ... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1032 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I34ce126d36420b8194c88c0faa865294334a6658 Gerrit-PatchSet: 1 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 Wed Oct 12 09:31:27 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 09:31:27 +0000 Subject: [MERGED] openbsc[master]: abis_rsl_rx_dchan(): guard against lchan_lookup() returning ... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: abis_rsl_rx_dchan(): guard against lchan_lookup() returning NULL ...................................................................... abis_rsl_rx_dchan(): guard against lchan_lookup() returning NULL Found this by coincidence, no actual failure case was observed. lchan_lookup() does have a return NULL code path, so we should not blindly use its returned pointer. Change-Id: I34ce126d36420b8194c88c0faa865294334a6658 --- M openbsc/src/libbsc/abis_rsl.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c index dc4ede2..316fc3f 100644 --- a/openbsc/src/libbsc/abis_rsl.c +++ b/openbsc/src/libbsc/abis_rsl.c @@ -1456,6 +1456,8 @@ msg->lchan = lchan_lookup(sign_link->trx, rslh->chan_nr, "Abis RSL rx DCHAN: "); + if (!msg->lchan) + return -1; ts_name = gsm_lchan_name(msg->lchan); switch (rslh->c.msg_type) { -- To view, visit https://gerrit.osmocom.org/1032 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I34ce126d36420b8194c88c0faa865294334a6658 Gerrit-PatchSet: 1 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 Wed Oct 12 09:31:31 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 09:31:31 +0000 Subject: [MERGED] openbsc[master]: gsm_trx_name(): don't break if trx is NULL In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gsm_trx_name(): don't break if trx is NULL ...................................................................... gsm_trx_name(): don't break if trx is NULL Just as a general precaution deemed to fit such a convenience function that lives in libcommon, no actual failure observed. Change-Id: I8e77fe1abc402469fd037e2fde2f46e2c8114f59 --- M openbsc/src/libcommon/gsm_data_shared.c 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/libcommon/gsm_data_shared.c b/openbsc/src/libcommon/gsm_data_shared.c index 4eea21e..b8853ad 100644 --- a/openbsc/src/libcommon/gsm_data_shared.c +++ b/openbsc/src/libcommon/gsm_data_shared.c @@ -328,8 +328,11 @@ char *gsm_trx_name(const struct gsm_bts_trx *trx) { - snprintf(ts2str, sizeof(ts2str), "(bts=%d,trx=%d)", - trx->bts->nr, trx->nr); + if (!trx) + snprintf(ts2str, sizeof(ts2str), "(trx=NULL)"); + else + snprintf(ts2str, sizeof(ts2str), "(bts=%d,trx=%d)", + trx->bts->nr, trx->nr); return ts2str; } -- To view, visit https://gerrit.osmocom.org/1033 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8e77fe1abc402469fd037e2fde2f46e2c8114f59 Gerrit-PatchSet: 1 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 Wed Oct 12 09:50:40 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 09:50:40 +0000 Subject: osmo-bts[master]: octphy: set tx attenuation via VTY In-Reply-To: References: Message-ID: Patch Set 9: Code-Review-1 (4 comments) https://gerrit.osmocom.org/#/c/905/9/include/osmo-bts/phy_link.h File include/osmo-bts/phy_link.h: Line 66: uint32_t tx_atten_flag; we can make that a bool. https://gerrit.osmocom.org/#/c/905/9/src/osmo-bts-octphy/l1_oml.c File src/osmo-bts-octphy/l1_oml.c: Line 1362: if (plink->u.octphy.tx_atten_flag == 1) { particularly if (but not only if) it's a bool, the '== 1' is not needed. Just checking for if (tx_atten_flag) makes it obvious that there are no other magic values that might have other meanings, but that it's only about true/false. Line 1364: } no newline after else and befor eopening brace https://gerrit.osmocom.org/#/c/905/9/src/osmo-bts-octphy/octphy_vty.c File src/osmo-bts-octphy/octphy_vty.c: Line 151: if (argv[0][0] == 'o') { I think we can afford a !strcmp() here to have more clean code. it's not performance critical, after all. -- 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: 9 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 Oct 12 09:57:05 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 09:57:05 +0000 Subject: osmo-bts[master]: octphy: prevent mismatch between dsp-firmware and octphy hea... In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1012 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icba5756517d632d53b129c5ce1a1dab4936dab91 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 Wed Oct 12 10:01:34 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 10:01:34 +0000 Subject: [MERGED] osmo-bts[master]: octphy: prevent mismatch between dsp-firmware and octphy hea... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: octphy: prevent mismatch between dsp-firmware and octphy headers ...................................................................... octphy: prevent mismatch between dsp-firmware and octphy headers in its current statue l1_oml.c does not check if the version number in the header files (octvc1_main_version.h) matches up the version that is reported from the DSP during startip. This patch ads a check to make sure that the currently loaded firmware and the headers used during compile time match. If a mismatch is detected, osmo-bts exits immediately. Change-Id: Icba5756517d632d53b129c5ce1a1dab4936dab91 --- M src/osmo-bts-octphy/l1_oml.c 1 file changed, 20 insertions(+), 6 deletions(-) Approvals: Harald Welte: 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 1b74fd4..74853bf 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -50,6 +50,7 @@ #include #include #include +#include /* Map OSMOCOM logical channel type to OctPHY Logical channel type */ static tOCTVC1_GSM_LOGICAL_CHANNEL_COMBINATION_ENUM pchan_to_logChComb[_GSM_PCHAN_MAX] = @@ -1207,28 +1208,41 @@ return l1if_req_compl(fl1h, msg, app_info_sys_compl_cb, 0); } -static int app_info_compl_cb(struct octphy_hdl *fl1h, struct msgb *resp, void *data) +static int app_info_compl_cb(struct octphy_hdl *fl1h, struct msgb *resp, + void *data) { + char ver_hdr[32]; + tOCTVC1_MAIN_MSG_APPLICATION_INFO_RSP *air = (tOCTVC1_MAIN_MSG_APPLICATION_INFO_RSP *) resp->l2h; - /* in a completion call-back, we take msgb ownership and must - * release it before returning */ + sprintf(ver_hdr, "%02i.%02i.%02i-B%i", cOCTVC1_MAIN_VERSION_MAJOR, + cOCTVC1_MAIN_VERSION_MINOR, cOCTVC1_MAIN_VERSION_MAINTENANCE, + cOCTVC1_MAIN_VERSION_BUILD); mOCTVC1_MAIN_MSG_APPLICATION_INFO_RSP_SWAP(air); - LOGP(DL1C, LOGL_INFO, "Rx APP-INFO.resp (name='%s', desc='%s', ver='%s')\n", - air->szName, air->szDescription, air->szVersion); + LOGP(DL1C, LOGL_INFO, + "Rx APP-INFO.resp (name='%s', desc='%s', ver='%s', ver_hdr='%s')\n", + air->szName, air->szDescription, air->szVersion, ver_hdr); + + /* Bail if dsp firmware does not match up the header version info */ + if (strcmp(air->szVersion, ver_hdr) != 0) { + LOGP(DL1C, LOGL_ERROR, + "Invalid header-file / dsp-firmware combination, exiting...\n"); + exit(1); + } talloc_replace(fl1h->info.app.name, fl1h, air->szName); talloc_replace(fl1h->info.app.description, fl1h, air->szDescription); talloc_replace(fl1h->info.app.version, fl1h, air->szVersion); + /* in a completion call-back, we take msgb ownership and must + * release it before returning */ msgb_free(resp); return 0; } - int l1if_check_app_version(struct gsm_bts_trx *trx) { -- To view, visit https://gerrit.osmocom.org/1012 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icba5756517d632d53b129c5ce1a1dab4936dab91 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 Wed Oct 12 10:02:05 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 10:02:05 +0000 Subject: openbsc[master]: DTX DL: use FSM for AMR In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1031 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idac8609faf9b5ced818fde899ccfc6ed0c42e8fd Gerrit-PatchSet: 2 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 Wed Oct 12 10:07:52 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 10:07:52 +0000 Subject: osmo-bts[master]: DTX DL: use FSM for AMR In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/1030/4/src/common/dtx_dl_amr_fsm.c File src/common/dtx_dl_amr_fsm.c: Line 229: .name = "Voice", I think the state names could need a bit more verbosity, either in the name, or actually at least in the comments here in the code or in the header file. -- To view, visit https://gerrit.osmocom.org/1030 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I74a0b42cb34d525b8a70d264135e82994ca70d31 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: Yes From gerrit-no-reply at lists.osmocom.org Wed Oct 12 10:08:47 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 10:08:47 +0000 Subject: openggsn[master]: Add control interface In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1042 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia76f841d2c9cd14394e9316fcd39f4060e23c898 Gerrit-PatchSet: 2 Gerrit-Project: openggsn 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 Oct 12 10:09:01 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 10:09:01 +0000 Subject: libosmocore[master]: Add function to send TRAP over Control Interface In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/649 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic0b8d88c4f5c4d42c3f8fb754f8eabf049c9e388 Gerrit-PatchSet: 3 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-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Oct 12 10:17:38 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 10:17:38 +0000 Subject: osmo-bts[master]: rsl: improving the log output In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/902 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifaa253e5baed5ca364dfbc046a7cb559f106bfbd Gerrit-PatchSet: 6 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 Wed Oct 12 10:17:44 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 10:17:44 +0000 Subject: [MERGED] osmo-bts[master]: rsl: improving the log output In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: rsl: improving the log output ...................................................................... rsl: improving the log output to show more details about the payload type and the connection Change-Id: Ifaa253e5baed5ca364dfbc046a7cb559f106bfbd --- M src/common/rsl.c 1 file changed, 20 insertions(+), 7 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/rsl.c b/src/common/rsl.c index 0f16f7d..d2fea12 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1584,21 +1584,34 @@ return tx_ipac_XXcx_nack(lchan, RSL_ERR_MAND_IE_ERROR, 0, dch->c.msg_type); - /* any of these can be NULL!! */ - speech_mode = TLVP_VAL(&tp, RSL_IE_IPAC_SPEECH_MODE); - payload_type = TLVP_VAL(&tp, RSL_IE_IPAC_RTP_PAYLOAD); - payload_type2 = TLVP_VAL(&tp, RSL_IE_IPAC_RTP_PAYLOAD2); - - if (TLVP_PRESENT(&tp, RSL_IE_IPAC_REMOTE_IP)) + if (TLVP_PRESENT(&tp, RSL_IE_IPAC_REMOTE_IP)) { connect_ip = tlvp_val32_unal(&tp, RSL_IE_IPAC_REMOTE_IP); + LOGP(DRSL, LOGL_NOTICE, "connect_ip %d \n", connect_ip ); + } else LOGP(DRSL, LOGL_NOTICE, "CRCX does not specify a remote IP\n"); - if (TLVP_PRESENT(&tp, RSL_IE_IPAC_REMOTE_PORT)) + if (TLVP_PRESENT(&tp, RSL_IE_IPAC_REMOTE_PORT)) { connect_port = tlvp_val16_unal(&tp, RSL_IE_IPAC_REMOTE_PORT); + LOGP(DRSL, LOGL_NOTICE, "connect_port %d \n", connect_port ); + } else LOGP(DRSL, LOGL_NOTICE, "CRCX does not specify a remote port\n"); + speech_mode = TLVP_VAL(&tp, RSL_IE_IPAC_SPEECH_MODE); + if (speech_mode) + LOGP(DRSL, LOGL_NOTICE, "speech mode: %d\n", *speech_mode); + else + LOGP(DRSL, LOGL_NOTICE, "speech mode: none\n"); + + payload_type = TLVP_VAL(&tp, RSL_IE_IPAC_RTP_PAYLOAD); + if (payload_type) + LOGP(DRSL, LOGL_NOTICE, "payload type: %d\n",*payload_type); + else + LOGP(DRSL, LOGL_NOTICE, "payload type: none\n"); + + payload_type2 = TLVP_VAL(&tp, RSL_IE_IPAC_RTP_PAYLOAD2); + if (dch->c.msg_type == RSL_MT_IPAC_CRCX && connect_ip && connect_port) inc_ip_port = 1; -- To view, visit https://gerrit.osmocom.org/902 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifaa253e5baed5ca364dfbc046a7cb559f106bfbd Gerrit-PatchSet: 7 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 Wed Oct 12 10:19:22 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 10:19:22 +0000 Subject: openbsc[master]: jenkins.sh: use osmo-build-dep.sh, log test failures In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1023 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4d6ffd5b230dd095650cc2231678b66056a8e4b5 Gerrit-PatchSet: 3 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 Wed Oct 12 10:19:39 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 10:19:39 +0000 Subject: libosmo-abis[master]: jenkins.sh: cosmetic: export instead of inlining PATH env In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1017 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I24a383140f2f84e90ab743691bcbf041de7b034d Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis 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 Wed Oct 12 10:19:42 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 10:19:42 +0000 Subject: osmo-sip-connector[master]: jenkins.sh: use osmo-build-dep.sh, log test failures In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1026 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1b03786069cc4373dec73711e3a31ec05dfac2e3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sip-connector 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 Wed Oct 12 10:19:44 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 10:19:44 +0000 Subject: osmo-iuh[master]: jenkins.sh: use osmo-build-dep.sh In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1025 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I24f5a04abdf986eee4358bb3327b8d8b9b27e8f2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh 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 Wed Oct 12 10:19:47 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 10:19:47 +0000 Subject: osmo-bts[master]: jenkins.sh: use osmo-build-dep.sh, log test failures In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1024 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6ad88bce18677b148af63ae8f6e0ab7e3b38b5a2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts 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 Wed Oct 12 10:19:49 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 10:19:49 +0000 Subject: libosmo-sccp[master]: jenkins.sh: use osmo-build-dep.sh, log test failures In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1022 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4e462e2c92db14b6c2e18b212779761f2e1829af Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp 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 Wed Oct 12 10:19:52 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 10:19:52 +0000 Subject: libosmo-netif[master]: jenkins.sh: use osmo-build-dep.sh, log test failures In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1021 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I022fbaaa1d211f68b38f18cfaf338ece51198c34 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif 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 Wed Oct 12 10:19:55 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 10:19:55 +0000 Subject: libosmo-abis[master]: jenkins.sh: call cat-testlogs.sh on check failure In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1019 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I60e70d290c41633528b39401219746ccf0f93784 Gerrit-PatchSet: 4 Gerrit-Project: libosmo-abis 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 Wed Oct 12 10:19:58 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 10:19:58 +0000 Subject: libosmo-abis[master]: jenkins.sh: use osmo-build-dep.sh, print separator In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1018 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I36ce41c669ffb123ec0741061e357a94baee6460 Gerrit-PatchSet: 4 Gerrit-Project: libosmo-abis 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 Wed Oct 12 10:20:02 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 10:20:02 +0000 Subject: libosmocore[master]: jenkins.sh: drop unecessary PATH, now in slave config In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1020 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifaff3e5e13c920eb716a5609bfec2f96e10f17b0 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 Wed Oct 12 10:28:48 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Wed, 12 Oct 2016 10:28:48 +0000 Subject: libosmocore[master]: libosmocoding: migrate transcoding routines from OsmoBTS In-Reply-To: References: Message-ID: Patch Set 4: i'd love to see progress on this, but without any of the subject matter experts (tom, sylvain) providing review, it will not make any progress, I'm afraid :/ -- 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: 4 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 Wed Oct 12 10:55:25 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 12 Oct 2016 10:55:25 +0000 Subject: [PATCH] openbsc[master]: Log use of incompatible BS-AG-BLKS-RES value Message-ID: Review at https://gerrit.osmocom.org/1043 Log use of incompatible BS-AG-BLKS-RES value There's "channel-descrption bs-ag-blks-res" vty command which sets BS-AG-BLKS-RES which might be too high if CCCH is combined with SDCCHs. Previously proper value was silently enforced. Log this situation explicitly and add spec reference to the comment. Change-Id: I53e2b881fc28472d6709f063fb265a4e6a0fffcd --- M openbsc/src/libbsc/bsc_init.c 1 file changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/43/1043/1 diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c index c38bca1..bf6e056 100644 --- a/openbsc/src/libbsc/bsc_init.c +++ b/openbsc/src/libbsc/bsc_init.c @@ -437,9 +437,14 @@ switch (n) { case 0: bts->si_common.chan_desc.ccch_conf = RSL_BCCH_CCCH_CONF_1_C; - /* Limit reserved block to 2 on combined channel */ - if (bts->si_common.chan_desc.bs_ag_blks_res > 2) + /* Limit reserved block to 2 on combined channel according to + 3GPP TS 44.018 Table 10.5.2.11.1 */ + if (bts->si_common.chan_desc.bs_ag_blks_res > 2) { + LOGP(DNM, LOGL_NOTICE, "CCCH is combined with SDCCHs, " + "reducing BS-AG-BLKS-RES value %d -> 2\n", + bts->si_common.chan_desc.bs_ag_blks_res); bts->si_common.chan_desc.bs_ag_blks_res = 2; + } break; case 1: bts->si_common.chan_desc.ccch_conf = RSL_BCCH_CCCH_CONF_1_NC; -- To view, visit https://gerrit.osmocom.org/1043 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I53e2b881fc28472d6709f063fb265a4e6a0fffcd Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Oct 12 11:14:40 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 11:14:40 +0000 Subject: osmo-bts[master]: octphy: set tx attenuation via VTY In-Reply-To: References: Message-ID: Patch Set 9: (1 comment) https://gerrit.osmocom.org/#/c/905/9/src/osmo-bts-octphy/l1_oml.c File src/osmo-bts-octphy/l1_oml.c: Line 1364: } > no newline after else and befor eopening brace '} else {' -- 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: 9 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 Wed Oct 12 11:22:21 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 11:22:21 +0000 Subject: [MERGED] libosmo-abis[master]: jenkins.sh: use osmo-build-dep.sh, print separator In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jenkins.sh: use osmo-build-dep.sh, print separator ...................................................................... jenkins.sh: use osmo-build-dep.sh, print separator Change-Id: I36ce41c669ffb123ec0741061e357a94baee6460 --- M contrib/jenkins.sh 1 file changed, 19 insertions(+), 11 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index e315b4f..50628fc 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -2,20 +2,28 @@ set -ex -rm -rf deps/install -mkdir deps || true -cd deps -osmo-deps.sh libosmocore +base="$PWD" +deps="$base/deps" +inst="$deps/install" +export deps inst -cd libosmocore -autoreconf --install --force -./configure --prefix=$PWD/../install -$MAKE $PARALLEL_MAKE install +mkdir "$deps" || true +rm -rf "$inst" -cd ../../ +osmo-build-dep.sh libosmocore + +export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" +export LD_LIBRARY_PATH="$inst/lib" + +set +x +echo +echo +echo +echo " =============================== libosmo-abis ===============================" +echo +set -x + autoreconf --install --force -export PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH -export LD_LIBRARY_PATH=$PWD/deps/install/lib ./configure $MAKE $PARALLEL_MAKE $MAKE distcheck -- To view, visit https://gerrit.osmocom.org/1018 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I36ce41c669ffb123ec0741061e357a94baee6460 Gerrit-PatchSet: 5 Gerrit-Project: libosmo-abis 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 Oct 12 11:22:21 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 11:22:21 +0000 Subject: [MERGED] libosmo-abis[master]: jenkins.sh: cosmetic: export instead of inlining PATH env In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jenkins.sh: cosmetic: export instead of inlining PATH env ...................................................................... jenkins.sh: cosmetic: export instead of inlining PATH env Change-Id: I24a383140f2f84e90ab743691bcbf041de7b034d --- M contrib/jenkins.sh 1 file changed, 5 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 772b85d..e315b4f 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -14,6 +14,8 @@ cd ../../ autoreconf --install --force -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH ./configure -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH $MAKE $PARALLEL_MAKE -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE distcheck +export PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH +export LD_LIBRARY_PATH=$PWD/deps/install/lib +./configure +$MAKE $PARALLEL_MAKE +$MAKE distcheck -- To view, visit https://gerrit.osmocom.org/1017 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I24a383140f2f84e90ab743691bcbf041de7b034d Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis 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 Oct 12 11:22:22 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 12 Oct 2016 11:22:22 +0000 Subject: [MERGED] openbsc[master]: DTX DL: use FSM for AMR In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: DTX DL: use FSM for AMR ...................................................................... DTX DL: use FSM for AMR - consolidate all DTX-specific things in a separate struct - rename struct fields to better reflect meaning - add pointer to DL FSM for AMR - remove unused flag - expand buffer to hold cached payload alongside with CMR/CMI Change-Id: Idac8609faf9b5ced818fde899ccfc6ed0c42e8fd --- M openbsc/include/openbsc/gsm_data_shared.h 1 file changed, 9 insertions(+), 12 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 1e3855f..d889959 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -295,23 +295,20 @@ struct { struct amr_multirate_conf amr_mr; struct { - uint8_t buf[18]; + struct osmo_fsm_inst *dl_amr_fsm; + uint8_t cache[20]; uint8_t len; uint32_t fn; bool is_update; - } last_sid; - /* FIXME: 2 flags below are mutually exclusive - is it worth it - to merge them? */ - /* set for each SID frame to detect talkspurt for codecs without - explicit ONSET event */ - bool ul_sid; - /* set for each SID_FIRST_P1 sent to L1 but not followed by - either of _P2 or InH */ - bool dl_fst; + /* set for each SID frame to detect talkspurt for codecs + without explicit ONSET event */ + bool ul_sid; + /* indicates if DTXd was active during DL measurement + period */ + bool dl_active; + } dtx; uint8_t last_cmr; uint32_t last_fn; - /* indicates if DTXd was active during DL measurement period */ - bool dtxd_active; } tch; /* BTS-side ciphering state (rx only, bi-directional, ...) */ uint8_t ciph_state; -- To view, visit https://gerrit.osmocom.org/1031 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idac8609faf9b5ced818fde899ccfc6ed0c42e8fd Gerrit-PatchSet: 3 Gerrit-Project: openbsc 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 Wed Oct 12 11:28:33 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 11:28:33 +0000 Subject: [MERGED] libosmocore[master]: jenkins.sh: drop unecessary PATH, now in slave config In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jenkins.sh: drop unecessary PATH, now in slave config ...................................................................... jenkins.sh: drop unecessary PATH, now in slave config Change-Id: Ifaff3e5e13c920eb716a5609bfec2f96e10f17b0 --- M contrib/jenkins.sh 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index e9f63e4..e5e17c8 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash -export PATH="$PATH:$HOME/osmo-ci/scripts" set -ex -- To view, visit https://gerrit.osmocom.org/1020 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifaff3e5e13c920eb716a5609bfec2f96e10f17b0 Gerrit-PatchSet: 2 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 Oct 12 11:28:48 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 11:28:48 +0000 Subject: [MERGED] libosmo-netif[master]: jenkins.sh: use osmo-build-dep.sh, log test failures In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jenkins.sh: use osmo-build-dep.sh, log test failures ...................................................................... jenkins.sh: use osmo-build-dep.sh, log test failures Like in libosmo-abis' jenkins.sh Change-Id: I022fbaaa1d211f68b38f18cfaf338ece51198c34 --- M contrib/jenkins.sh 1 file changed, 24 insertions(+), 18 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index a347e3c..9a37ca5 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -2,25 +2,31 @@ set -ex -rm -rf deps/install -mkdir deps || true -cd deps -osmo-deps.sh libosmocore +base="$PWD" +deps="$base/deps" +inst="$deps/install" +export deps inst -cd libosmocore -autoreconf --install --force -./configure --prefix=$PWD/../install -$MAKE $PARALLEL_MAKE install +mkdir "$deps" || true +rm -rf "$inst" -cd ../ -osmo-deps.sh libosmo-abis -cd libosmo-abis -autoreconf --install --force -PKG_CONFIG_PATH=$PWD/../install/lib/pkgconfig:$PKG_CONFIG_PATH ./configure --prefix=$PWD/../install -PKG_CONFIG_PATH=$PWD/..//install/lib/pkgconfig:$PKG_CONFIG_PATH $MAKE $PARALLEL_MAKE install +osmo-build-dep.sh libosmocore -cd ../../ +export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" +export LD_LIBRARY_PATH="$inst/lib" + +osmo-build-dep.sh libosmo-abis + +set +x +echo +echo +echo +echo " =============================== libosmo-netif ===============================" +echo +set -x + autoreconf --install --force -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH ./configure -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH $MAKE $PARALLEL_MAKE -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE distcheck +./configure +$MAKE $PARALLEL_MAKE +$MAKE distcheck \ + || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/1021 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I022fbaaa1d211f68b38f18cfaf338ece51198c34 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif 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 Oct 12 11:28:54 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 11:28:54 +0000 Subject: [MERGED] libosmo-sccp[master]: jenkins.sh: use osmo-build-dep.sh, log test failures In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jenkins.sh: use osmo-build-dep.sh, log test failures ...................................................................... jenkins.sh: use osmo-build-dep.sh, log test failures Like in libosmo-abis' jenkins.sh Change-Id: I4e462e2c92db14b6c2e18b212779761f2e1829af --- M contrib/jenkins.sh 1 file changed, 24 insertions(+), 24 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 463f3d8..33045d8 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -2,32 +2,32 @@ set -ex -rm -rf deps/install -mkdir deps || true -cd deps -osmo-deps.sh libosmocore +base="$PWD" +deps="$base/deps" +inst="$deps/install" +export deps inst -cd libosmocore -autoreconf --install --force -./configure --prefix=$PWD/../install -$MAKE $PARALLEL_MAKE install +mkdir "$deps" || true +rm -rf "$inst" -cd ../ -osmo-deps.sh libosmo-abis -cd libosmo-abis -autoreconf --install --force -PKG_CONFIG_PATH=$PWD/../install/lib/pkgconfig:$PKG_CONFIG_PATH ./configure --prefix=$PWD/../install -PKG_CONFIG_PATH=$PWD/..//install/lib/pkgconfig:$PKG_CONFIG_PATH $MAKE $PARALLEL_MAKE install +osmo-build-dep.sh libosmocore -cd ../ -osmo-deps.sh libosmo-netif -cd libosmo-netif -autoreconf --install --force -PKG_CONFIG_PATH=$PWD/../install/lib/pkgconfig:$PKG_CONFIG_PATH ./configure --prefix=$PWD/../install -PKG_CONFIG_PATH=$PWD/..//install/lib/pkgconfig:$PKG_CONFIG_PATH $MAKE $PARALLEL_MAKE install +export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" +export LD_LIBRARY_PATH="$inst/lib" -cd ../../ +osmo-build-dep.sh libosmo-abis +osmo-build-dep.sh libosmo-netif + +set +x +echo +echo +echo +echo " =============================== libosmo-sccp ===============================" +echo +set -x + autoreconf --install --force -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH ./configure -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH $MAKE $PARALLEL_MAKE -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE distcheck +./configure +$MAKE $PARALLEL_MAKE +$MAKE distcheck \ + || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/1022 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4e462e2c92db14b6c2e18b212779761f2e1829af Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp 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 Oct 12 11:29:01 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 11:29:01 +0000 Subject: [MERGED] libosmo-abis[master]: jenkins.sh: call cat-testlogs.sh on check failure In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jenkins.sh: call cat-testlogs.sh on check failure ...................................................................... jenkins.sh: call cat-testlogs.sh on check failure Change-Id: I60e70d290c41633528b39401219746ccf0f93784 --- M contrib/jenkins.sh 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 50628fc..403909b 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -26,4 +26,5 @@ autoreconf --install --force ./configure $MAKE $PARALLEL_MAKE -$MAKE distcheck +$MAKE distcheck \ + || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/1019 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I60e70d290c41633528b39401219746ccf0f93784 Gerrit-PatchSet: 5 Gerrit-Project: libosmo-abis 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 Oct 12 11:29:05 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 11:29:05 +0000 Subject: [MERGED] osmo-bts[master]: jenkins.sh: use osmo-build-dep.sh, log test failures In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jenkins.sh: use osmo-build-dep.sh, log test failures ...................................................................... jenkins.sh: use osmo-build-dep.sh, log test failures Like in libosmo-abis' and other jenkins.sh Change-Id: I6ad88bce18677b148af63ae8f6e0ab7e3b38b5a2 --- M contrib/jenkins_oct.sh M contrib/jenkins_sysmobts.sh 2 files changed, 63 insertions(+), 52 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins_oct.sh b/contrib/jenkins_oct.sh index 32b1407..7920224 100755 --- a/contrib/jenkins_oct.sh +++ b/contrib/jenkins_oct.sh @@ -2,33 +2,29 @@ set -ex -rm -rf deps/install -mkdir deps || true -cd deps +base="$PWD" +deps="$base/deps" +inst="$deps/install" +export deps inst + +mkdir "$deps" || true +rm -rf "$inst" # Get the headers.. +cd "$deps" git clone git://git.osmocom.org/openbsc || true cd openbsc git pull --rebase +cd "$base" +osmo-build-dep.sh libosmocore -# Build the dependency -cd ../ +export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" +export LD_LIBRARY_PATH="$inst/lib" -osmo-deps.sh libosmocore -cd libosmocore -autoreconf --install --force -./configure --prefix=$PWD/../install -$MAKE $PARALLEL_MAKE install +osmo-build-dep.sh libosmo-abis -cd ../ -osmo-deps.sh libosmo-abis -cd libosmo-abis -autoreconf --install --force -PKG_CONFIG_PATH=$PWD/../install/lib/pkgconfig ./configure --prefix=$PWD/../install -PKG_CONFIG_PATH=$PWD/../install/lib/pkgconfig $MAKE $PARALLEL_MAKE install - -cd ../ +cd "$deps" if ! test -d layer1-api; then git clone git://git.osmocom.org/octphy-2g-headers layer1-api @@ -43,11 +39,21 @@ git reset --hard $FIRMWARE_VERSION fi +cd "$base" -# Build osmo-bts -cd ../../ +set +x +echo +echo +echo +echo " =============================== osmo-bts-octphy ===============================" +echo +set -x + autoreconf --install --force -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig ./configure --with-openbsc=$PWD/deps/openbsc/openbsc/include --with-octsdr-2g=$PWD/deps/layer1-api/ --enable-octphy -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig $MAKE $PARALLEL_MAKE -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE check -DISTCHECK_CONFIGURE_FLAGS="--with-octsdr-2g=$PWD/deps/layer1-api/ --with-openbsc=$PWD/deps/openbsc/openbsc/include --enable-octphy" PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE distcheck +./configure --with-openbsc="$deps/openbsc/openbsc/include" --with-octsdr-2g="$deps/deps/layer1-api/" --enable-octphy +$MAKE $PARALLEL_MAKE +$MAKE check \ + || cat-testlogs.sh +DISTCHECK_CONFIGURE_FLAGS="--with-octsdr-2g=$deps/layer1-api/ --with-openbsc=$deps/openbsc/openbsc/include --enable-octphy" \ + $MAKE distcheck \ + || cat-testlogs.sh diff --git a/contrib/jenkins_sysmobts.sh b/contrib/jenkins_sysmobts.sh index 051c8e0..be544a7 100755 --- a/contrib/jenkins_sysmobts.sh +++ b/contrib/jenkins_sysmobts.sh @@ -2,33 +2,29 @@ set -ex -rm -rf deps/install -mkdir deps || true -cd deps +base="$PWD" +deps="$base/deps" +inst="$deps/install" +export deps inst + +mkdir "$deps" || true +rm -rf "$inst" # Get the headers.. +cd "$deps" git clone git://git.osmocom.org/openbsc || true cd openbsc git pull --rebase +cd "$base" +osmo-build-dep.sh libosmocore -# Build the dependency -cd ../ +export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" +export LD_LIBRARY_PATH="$inst/lib" -osmo-deps.sh libosmocore -cd libosmocore -autoreconf --install --force -./configure --prefix=$PWD/../install -$MAKE $PARALLEL_MAKE install +osmo-build-dep.sh libosmo-abis -cd ../ -osmo-deps.sh libosmo-abis -cd libosmo-abis -autoreconf --install --force -PKG_CONFIG_PATH=$PWD/../install/lib/pkgconfig ./configure --prefix=$PWD/../install -PKG_CONFIG_PATH=$PWD/../install/lib/pkgconfig $MAKE $PARALLEL_MAKE install - -cd ../ +cd "$deps" if ! test -d layer1-api; then git clone git://git.sysmocom.de/sysmo-bts/layer1-api.git layer1-api @@ -42,20 +38,29 @@ else git reset --hard $FIRMWARE_VERSION fi -mkdir -p $PWD/../install/include/sysmocom/femtobts/ -cp include/*.h ../install/include/sysmocom/femtobts/ +mkdir -p "$inst/include/sysmocom/femtobts" +cp include/*.h "$inst/include/sysmocom/femtobts/" +cd "$base" -# Build osmo-bts -cd ../../ +set +x +echo +echo +echo +echo " =============================== osmo-bts-sysmo ===============================" +echo +set -x + autoreconf --install --force -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig ./configure --enable-sysmocom-bts --with-openbsc=$PWD/deps/openbsc/openbsc/include -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig $MAKE $PARALLEL_MAKE -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE check -DISTCHECK_CONFIGURE_FLAGS="--enable-sysmocom-bts --with-openbsc=$PWD/deps/openbsc/openbsc/include" PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE distcheck - +./configure --enable-sysmocom-bts --with-openbsc="$deps/openbsc/openbsc/include" +$MAKE $PARALLEL_MAKE +$MAKE check \ + || cat-testlogs.sh +DISTCHECK_CONFIGURE_FLAGS="--enable-sysmocom-bts --with-openbsc=$deps/openbsc/openbsc/include" \ + $MAKE distcheck \ + || cat-testlogs.sh # This will not work for the femtobts if [ $FIRMWARE_VERSION != "femtobts_v2.7" ]; then - PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig $MAKE -C contrib/sysmobts-calib + $MAKE -C contrib/sysmobts-calib fi -- To view, visit https://gerrit.osmocom.org/1024 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6ad88bce18677b148af63ae8f6e0ab7e3b38b5a2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts 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 Oct 12 11:29:23 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 11:29:23 +0000 Subject: [MERGED] openbsc[master]: jenkins.sh: use osmo-build-dep.sh, log test failures In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jenkins.sh: use osmo-build-dep.sh, log test failures ...................................................................... jenkins.sh: use osmo-build-dep.sh, log test failures Like in libosmo-abis' jenkins.sh Change-Id: I4d6ffd5b230dd095650cc2231678b66056a8e4b5 --- M contrib/jenkins.sh 1 file changed, 23 insertions(+), 40 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 3c60996..7ad4ee6 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -5,64 +5,47 @@ base="$PWD" deps="$base/deps" inst="$deps/install" +export deps inst mkdir "$deps" || true rm -rf "$inst" -build_dep() { - project="$1" - branch="$2" - cfg="$3" - set +x - echo - echo - echo - echo " =============================== $project ===============================" - echo - set -x - if [ -z "$project" ]; then - echo "internal failure" - exit 1 - fi - cd "$deps" - rm -rf "$project" - osmo-deps.sh "$project" - cd "$project" - if [ -n "$branch" ]; then - git checkout "$branch" - fi - git rev-parse HEAD - autoreconf --install --force - ./configure --prefix="$inst" $cfg - $MAKE $PARALLEL_MAKE install -} +osmo-build-dep.sh libosmocore "" ac_cv_path_DOXYGEN=false -build_dep libosmocore "" ac_cv_path_DOXYGEN=false - -# All below builds want this PKG_CONFIG_PATH export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" +export LD_LIBRARY_PATH="$inst/lib" if [ "x$IU" = "x--enable-iu" ]; then netif_branch="sysmocom/sctp" sccp_branch="sysmocom/iu" fi -build_dep libosmo-abis -build_dep libosmo-netif $netif_branch -build_dep libosmo-sccp $sccp_branch -PARALLEL_MAKE="" build_dep libsmpp34 -build_dep openggsn +osmo-build-dep.sh libosmo-abis +osmo-build-dep.sh libosmo-netif $netif_branch +osmo-build-dep.sh libosmo-sccp $sccp_branch +PARALLEL_MAKE="" osmo-build-dep.sh libsmpp34 +osmo-build-dep.sh openggsn if [ "x$IU" = "x--enable-iu" ]; then - build_dep libasn1c - #build_dep asn1c aper-prefix # only needed for make regen in osmo-iuh - build_dep osmo-iuh + osmo-build-dep.sh libasn1c + #osmo-build-dep.sh asn1c aper-prefix # only needed for make regen in osmo-iuh + osmo-build-dep.sh osmo-iuh fi + +set +x +echo +echo +echo +echo " =============================== openbsc ===============================" +echo +set -x cd "$base" cd openbsc autoreconf --install --force ./configure --enable-osmo-bsc --enable-nat $SMPP $MGCP $IU --enable-vty-tests --enable-external-tests $MAKE $PARALLEL_MAKE -LD_LIBRARY_PATH="$inst/lib" $MAKE check -LD_LIBRARY_PATH="$inst/lib" $MAKE distcheck +LD_LIBRARY_PATH="$inst/lib" $MAKE check \ + || cat-testlogs.sh +LD_LIBRARY_PATH="$inst/lib" $MAKE distcheck \ + || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/1023 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4d6ffd5b230dd095650cc2231678b66056a8e4b5 Gerrit-PatchSet: 4 Gerrit-Project: openbsc 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 Oct 12 11:29:31 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 11:29:31 +0000 Subject: [MERGED] osmo-iuh[master]: jenkins.sh: use osmo-build-dep.sh In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jenkins.sh: use osmo-build-dep.sh ...................................................................... jenkins.sh: use osmo-build-dep.sh Like in libosmo-abis' and other jenkins.sh Change-Id: I24f5a04abdf986eee4358bb3327b8d8b9b27e8f2 --- M contrib/jenkins.sh 1 file changed, 17 insertions(+), 43 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index b19f0c6..770575e 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,61 +1,35 @@ #!/usr/bin/env bash -export PATH="$PATH:$HOME/osmo-ci/scripts" set -ex base="$PWD" deps="$base/deps" inst="$deps/install" +export deps inst mkdir "$deps" || true rm -rf "$inst" -marker() { - set +x - echo - echo - echo - echo " =============================== $@ ===============================" - echo - set -x -} +osmo-build-dep.sh libosmocore -build_dep() { - project="$1" - branch="$2" - marker $project - if [ -z "$project" ]; then - echo "internal failure" - exit 1 - fi - cd "$deps" - rm -rf "$project" - osmo-deps.sh "$project" - cd "$project" - if [ -n "$branch" ]; then - git checkout "$branch" - fi - git rev-parse HEAD - autoreconf --install --force - ./configure --prefix="$inst" - $MAKE $PARALLEL_MAKE install -} - -build_dep libosmocore - -# All below builds want this PKG_CONFIG_PATH export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" +export LD_LIBRARY_PATH="$inst/lib" -build_dep libosmo-abis -build_dep libosmo-netif sysmocom/sctp -build_dep libosmo-sccp sysmocom/iu -build_dep libasn1c +osmo-build-dep.sh libosmo-abis +osmo-build-dep.sh libosmo-netif sysmocom/sctp +osmo-build-dep.sh libosmo-sccp sysmocom/iu +osmo-build-dep.sh libasn1c # the asn1c binary is used by the 'regen' target below -build_dep asn1c aper-prefix +osmo-build-dep.sh asn1c aper-prefix -marker osmo-iuh -cd "$base" +set +x +echo +echo +echo +echo " =============================== osmo-iuh ===============================" +echo +set -x autoreconf --install --force ./configure @@ -75,7 +49,7 @@ fi $MAKE $PARALLEL_MAKE -LD_LIBRARY_PATH="$inst/lib" $MAKE check \ +$MAKE check \ || cat-testlogs.sh -LD_LIBRARY_PATH="$inst/lib" $MAKE distcheck \ +$MAKE distcheck \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/1025 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I24f5a04abdf986eee4358bb3327b8d8b9b27e8f2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh 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 Oct 12 11:29:35 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 11:29:35 +0000 Subject: [MERGED] osmo-sip-connector[master]: jenkins.sh: use osmo-build-dep.sh, log test failures In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jenkins.sh: use osmo-build-dep.sh, log test failures ...................................................................... jenkins.sh: use osmo-build-dep.sh, log test failures Like in libosmo-abis' and other jenkins.sh Change-Id: I1b03786069cc4373dec73711e3a31ec05dfac2e3 --- M contrib/jenkins.sh 1 file changed, 26 insertions(+), 15 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index fb4e2f2..588634e 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -2,20 +2,31 @@ set -ex -rm -rf deps/install -mkdir deps || true -cd deps -osmo-deps.sh libosmocore +base="$PWD" +deps="$base/deps" +inst="$deps/install" +export deps inst -cd libosmocore +mkdir "$deps" || true +rm -rf "$inst" + +osmo-build-dep.sh libosmocore + +export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" +export LD_LIBRARY_PATH="$inst/lib" + +set +x +echo +echo +echo +echo " =============================== osmo-sip-connector ===============================" +echo +set -x + autoreconf --install --force -./configure --prefix=$PWD/../install -$MAKE $PARALLEL_MAKE install - -cd ../../ -autoreconf --install --force -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig ./configure --enable-vty-tests --enable-external-tests -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig $MAKE $PARALLEL_MAKE -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE check -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE distcheck - +./configure --enable-vty-tests --enable-external-tests +$MAKE $PARALLEL_MAKE +$MAKE check \ + || cat-testlogs.sh +$MAKE distcheck \ + || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/1026 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1b03786069cc4373dec73711e3a31ec05dfac2e3 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sip-connector 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 Oct 12 11:36:46 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 12 Oct 2016 11:36:46 +0000 Subject: [PATCH] osmo-bts[master]: DTX DL: use FSM for AMR 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/1030 to look at the new patch set (#5). DTX DL: use FSM for AMR Use dedicated FSM to handle all DTX DL related events: - add explicit checks if DTX DL is enabled (fixes regression for non-DTX setup introduced in 654175f33bd412671e3ef8cdd65c0689d10f278c) - fix handling of AMR CMI for SPEECH frames - add FSM for DTX DL - sync with corresponding changes in OpenBSC's - handle FACCH-related DTX ONSET events This affects both lc15 and sysmobts and requires corresponding change in OpenBSC (Change-Id: Idac8609faf9b5ced818fde899ccfc6ed0c42e8fd). Change-Id: I74a0b42cb34d525b8a70d264135e82994ca70d31 --- M include/osmo-bts/Makefile.am A include/osmo-bts/dtx_dl_amr_fsm.h M include/osmo-bts/msg_utils.h M src/common/Makefile.am A src/common/dtx_dl_amr_fsm.c M src/common/l1sap.c M src/common/msg_utils.c M src/common/rsl.c M src/osmo-bts-litecell15/l1_if.c M src/osmo-bts-litecell15/l1_if.h M src/osmo-bts-litecell15/tch.c M src/osmo-bts-sysmo/l1_if.c M src/osmo-bts-sysmo/l1_if.h M src/osmo-bts-sysmo/tch.c 14 files changed, 668 insertions(+), 147 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/30/1030/5 diff --git a/include/osmo-bts/Makefile.am b/include/osmo-bts/Makefile.am index d0b55ff..ef4165f 100644 --- a/include/osmo-bts/Makefile.am +++ b/include/osmo-bts/Makefile.am @@ -1,4 +1,5 @@ noinst_HEADERS = abis.h bts.h bts_model.h gsm_data.h logging.h measurement.h \ oml.h paging.h rsl.h signal.h vty.h amr.h pcu_if.h pcuif_proto.h \ handover.h msg_utils.h tx_power.h control_if.h cbch.h l1sap.h \ - power_control.h scheduler.h scheduler_backend.h phy_link.h + power_control.h scheduler.h scheduler_backend.h phy_link.h \ + dtx_dl_amr_fsm.h diff --git a/include/osmo-bts/dtx_dl_amr_fsm.h b/include/osmo-bts/dtx_dl_amr_fsm.h new file mode 100644 index 0000000..8b19595 --- /dev/null +++ b/include/osmo-bts/dtx_dl_amr_fsm.h @@ -0,0 +1,35 @@ +#pragma once + +#include +#include +#include + +/* DTX DL AMR FSM */ + +#define X(s) (1 << (s)) + +enum dtx_dl_amr_fsm_states { + ST_VOICE, + ST_SID_F1, + ST_SID_F2, + ST_F1_INH, + ST_U_INH, + ST_SID_U, + ST_ONSET_V, + ST_ONSET_F, + ST_FACCH_V, + ST_FACCH, +}; + +enum dtx_dl_amr_fsm_events { + E_VOICE, + E_ONSET, + E_FACCH, + E_COMPL, + E_INHIB, + E_SID_F, + E_SID_U, +}; + +extern const struct value_string dtx_dl_amr_fsm_event_names[]; +extern struct osmo_fsm dtx_dl_amr_fsm; diff --git a/include/osmo-bts/msg_utils.h b/include/osmo-bts/msg_utils.h index f99f3c4..31bd172 100644 --- a/include/osmo-bts/msg_utils.h +++ b/include/osmo-bts/msg_utils.h @@ -26,12 +26,11 @@ }; void lchan_set_marker(bool t, struct gsm_lchan *lchan); -void save_last_sid(struct gsm_lchan *lchan, const uint8_t *l1_payload, - size_t length, uint32_t fn, int update, uint8_t cmr, - int8_t cmi); -int dtx_amr_check_onset(struct gsm_lchan *lchan, const uint8_t *rtp_pl, +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, size_t rtp_pl_len, uint32_t fn, uint8_t *l1_payload, - uint8_t *ft_out); + bool marker, uint8_t *len, uint8_t *ft_out); uint8_t repeat_last_sid(struct gsm_lchan *lchan, uint8_t *dst, uint32_t fn); int msg_verify_ipa_structure(struct msgb *msg); int msg_verify_oml_structure(struct msgb *msg); diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 856f741..dd368d0 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -7,6 +7,7 @@ rsl.c vty.c paging.c measurement.c amr.c lchan.c \ load_indication.c pcu_sock.c handover.c msg_utils.c \ tx_power.c bts_ctrl_commands.c bts_ctrl_lookup.c \ - l1sap.c cbch.c power_control.c main.c phy_link.c + l1sap.c cbch.c power_control.c main.c phy_link.c \ + dtx_dl_amr_fsm.c libl1sched_a_SOURCES = scheduler.c diff --git a/src/common/dtx_dl_amr_fsm.c b/src/common/dtx_dl_amr_fsm.c new file mode 100644 index 0000000..7677624 --- /dev/null +++ b/src/common/dtx_dl_amr_fsm.c @@ -0,0 +1,304 @@ +/* DTX DL AMR FSM */ + +/* (C) 2016 by 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 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 . + * + */ + +#include +#include + +void dtx_fsm_voice(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_VOICE: + case E_FACCH: + break; + case E_SID_F: + case E_SID_U: + osmo_fsm_inst_state_chg(fi, ST_SID_F1, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Inexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_sid_f1(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_F: +/* FIXME: what shall we do if we get SID-FIRST _again_ (twice in a row)? + 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); + 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); + break; + case E_COMPL: + 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); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_sid_f2(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_U: + 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); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_f1_inh(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_u_inh(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 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) { + 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_INHIB: + osmo_fsm_inst_state_chg(fi, ST_U_INH, 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_onset_v(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_U: + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_FACCH_V, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_onset_f(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_U: + 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_FACCH, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_facch_v(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_FACCH: + break; + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); + break; + case E_SID_U: + break; + case E_SID_F: + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_facch(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_FACCH: + break; + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); + break; + case E_SID_U: + case E_SID_F: + osmo_fsm_inst_state_chg(fi, ST_SID_F1, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +static struct osmo_fsm_state dtx_dl_amr_fsm_states[] = { + [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), + .name = "Voice", + .action = dtx_fsm_voice, + }, + [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), + .name = "SID-FIRST (P1)", + .action = dtx_fsm_sid_f1, + }, + [ST_SID_F2]= { + .in_event_mask = X(E_SID_U) | X(E_VOICE) | X(E_FACCH), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_ONSET_F), + .name = "SID-FIRST (P2)", + .action = dtx_fsm_sid_f2, + }, + [ST_F1_INH]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), + .name = "SID-FIRST (Inh)", + .action = dtx_fsm_f1_inh, + }, + [ST_U_INH]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), + .name = "SID-UPDATE (Inh)", + .action = dtx_fsm_u_inh, + }, + [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", + .action = dtx_fsm_sid_upd, + }, + [ST_ONSET_V]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), + .name = "ONSET (Voice)", + .action = dtx_fsm_onset_v, + }, + [ST_ONSET_F]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH) | X(E_SID_U), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH), + .name = "ONSET (FACCH)", + .action = dtx_fsm_onset_f, + }, + [ST_FACCH_V]= { + .in_event_mask = X(E_FACCH) | X(E_VOICE) | X(E_SID_U) | X(E_SID_F), + .out_state_mask = X(ST_FACCH_V) | X(ST_VOICE) | X(ST_SID_F1), + .name = "FACCH (Voice)", + .action = dtx_fsm_facch_v, + }, + [ST_FACCH]= { + .in_event_mask = X(E_FACCH) | X(E_VOICE) | X(E_SID_U) | X(E_SID_F), + .out_state_mask = X(ST_FACCH_V) | X(ST_VOICE) | X(ST_SID_F1), + .name = "FACCH", + .action = dtx_fsm_facch, + }, +}; + +const struct value_string dtx_dl_amr_fsm_event_names[] = { + { E_VOICE, "Voice" }, + { E_FACCH, "FACCH" }, + { E_COMPL, "Complete P1 -> P2" }, + { E_INHIB, "Inhibit" }, + { E_SID_F, "SID-FIRST" }, + { E_SID_U, "SID-UPDATE" }, + { 0, NULL } +}; + +struct osmo_fsm dtx_dl_amr_fsm = { + .name = "DTX DL AMR FSM", + .states = dtx_dl_amr_fsm_states, + .num_states = ARRAY_SIZE(dtx_dl_amr_fsm_states), + .event_names = dtx_dl_amr_fsm_event_names, + .log_subsys = DL1C, +}; diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 943bdfe..9c783df 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -528,6 +529,7 @@ uint8_t *p, *si; struct lapdm_entity *le; struct osmo_phsap_prim pp; + bool dtxd_facch = false; int rc; chan_nr = rts_ind->chan_nr; @@ -582,8 +584,11 @@ p[0] = lchan->ms_power_ctrl.current; p[1] = lchan->rqd_ta; le = &lchan->lapdm_ch.lapdm_acch; - } else + } else { + if (lchan->ts->trx->bts->dtxd) + dtxd_facch = true; le = &lchan->lapdm_ch.lapdm_dcch; + } rc = lapdm_phsap_dequeue_prim(le, &pp); if (rc < 0) { if (L1SAP_IS_LINK_SACCH(link_id)) { @@ -609,6 +614,10 @@ memcpy(p, pp.oph.msg->data, GSM_MACBLOCK_LEN); /* check if it is a RR CIPH MODE CMD. if yes, enable RX ciphering */ check_for_ciph_cmd(pp.oph.msg, lchan, chan_nr); + if (dtxd_facch && lchan->tch.dtx.dl_amr_fsm) + osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, + E_FACCH, + (void *)lchan); } msgb_free(pp.oph.msg); } @@ -1136,14 +1145,27 @@ rc = l1sap_chan_act_dact_modify(trx, chan_nr, PRIM_INFO_ACTIVATE, 0); if (rc) return -RSL_ERR_EQUIPMENT_FAIL; + + /* Init DTX DL FSM if necessary */ + //FIXME: only do it for AMR TCH/* + osmo_fsm_register(&dtx_dl_amr_fsm); + lchan->tch.dtx.dl_amr_fsm = osmo_fsm_inst_alloc(&dtx_dl_amr_fsm, + tall_bts_ctx, lchan, + LOGL_DEBUG, lchan->name); return 0; } int l1sap_chan_rel(struct gsm_bts_trx *trx, uint8_t chan_nr) { + struct gsm_lchan *lchan = get_lchan_by_chan_nr(trx, chan_nr); LOGP(DL1P, LOGL_INFO, "deactivating channel chan_nr=0x%02x trx=%d\n", chan_nr, trx->nr); + if (lchan->tch.dtx.dl_amr_fsm) { + osmo_fsm_inst_free(lchan->tch.dtx.dl_amr_fsm); + lchan->tch.dtx.dl_amr_fsm = NULL; + } + return l1sap_chan_act_dact_modify(trx, chan_nr, PRIM_INFO_DEACTIVATE, 0); } diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 99a211f..f9853c5 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -17,6 +17,7 @@ * */ +#include #include #include #include @@ -26,6 +27,7 @@ #include #include #include +#include #include #include @@ -92,13 +94,12 @@ void lchan_set_marker(bool t, struct gsm_lchan *lchan) { if (t) - lchan->tch.ul_sid = true; - else if (lchan->tch.ul_sid) { - lchan->tch.ul_sid = false; + lchan->tch.dtx.ul_sid = true; + else if (lchan->tch.dtx.ul_sid) { + lchan->tch.dtx.ul_sid = false; lchan->rtp_tx_marker = true; } } - /*! \brief Store the last SID frame in lchan context * \param[in] lchan Logical channel on which we check scheduling @@ -106,76 +107,106 @@ * \param[in] length length of l1_payload * \param[in] fn Frame Number for which we check scheduling * \param[in] update 0 if SID_FIRST, 1 if SID_UPDATE, -1 if not AMR SID - * \param[in] cmr Codec Mode Request (AMR-specific, ignored otherwise) - * \param[in] cmi Codec Mode Indication (AMR-specific, ignored otherwise) */ -void save_last_sid(struct gsm_lchan *lchan, const uint8_t *l1_payload, - size_t length, uint32_t fn, int update, uint8_t cmr, - int8_t cmi) +void dtx_cache_payload(struct gsm_lchan *lchan, const uint8_t *l1_payload, + size_t length, uint32_t fn, int update) { size_t amr = (update < 0) ? 0 : 2, - copy_len = OSMO_MIN(length + 1, ARRAY_SIZE(lchan->tch.last_sid.buf)); + copy_len = OSMO_MIN(length + 1, ARRAY_SIZE(lchan->tch.dtx.cache)); - lchan->tch.last_sid.len = copy_len + amr; - lchan->tch.last_sid.fn = fn; - lchan->tch.last_sid.is_update = update; + lchan->tch.dtx.len = copy_len + amr; + lchan->tch.dtx.fn = fn; + lchan->tch.dtx.is_update = update; - if (amr) - amr_set_mode_pref(lchan->tch.last_sid.buf, &lchan->tch.amr_mr, - cmi, cmr); - memcpy(lchan->tch.last_sid.buf + amr, l1_payload, copy_len); + memcpy(lchan->tch.dtx.cache + amr, l1_payload, copy_len); } -/*! \brief Check current and cached SID to decide if talkspurt takes place +/*! \brief Check current state of DTX DL AMR FSM and dispatch necessary events * \param[in] lchan Logical channel on which we check scheduling * \param[in] rtp_pl buffer with RTP data * \param[in] rtp_pl_len length of rtp_pl * \param[in] fn Frame Number for which we check scheduling * \param[in] l1_payload buffer where CMR and CMI prefix should be added + * \param[out] len Length of expected L1 payload * \param[out] ft_out Frame Type to be populated after decoding - * \returns 0 if frame should be send immediately (2 byte CMR,CMI prefix added: - * caller must adjust length as necessary), - * 1 if ONSET event is detected - * negative if no sending is necessary (either error or cached SID - * UPDATE) + * \returns 0 in case of success; negative on error */ -int dtx_amr_check_onset(struct gsm_lchan *lchan, const uint8_t *rtp_pl, +int dtx_dl_amr_fsm_step(struct gsm_lchan *lchan, const uint8_t *rtp_pl, size_t rtp_pl_len, uint32_t fn, uint8_t *l1_payload, - uint8_t *ft_out) + bool marker, uint8_t *len, uint8_t *ft_out) { uint8_t cmr; enum osmo_amr_type ft; enum osmo_amr_quality bfi; int8_t sti, cmi; - osmo_amr_rtp_dec(rtp_pl, rtp_pl_len, &cmr, &cmi, &ft, &bfi, &sti); - *ft_out = ft; /* only needed for old sysmo firmware */ + int rc; - if (ft == AMR_SID) { - save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, sti, cmr, cmi); - if (sti) /* SID_UPDATE should be cached and send later */ - return -EAGAIN; - else { /* SID_FIRST - cached and send right away */ - amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi, - cmr); - return 0; - } + if (rtp_pl == NULL) { /* SID-FIRST P1 -> P2 */ + *len = 3; + memcpy(l1_payload, lchan->tch.dtx.cache, 2); + osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, E_COMPL, + (void *)lchan); + return 0; } - if (ft != AMR_NO_DATA && !osmo_amr_is_speech(ft)) { + 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); + return rc; + } + + /* only needed for old sysmo firmware: */ + *ft_out = ft; + + /* CMI in downlink tells the L1 encoder which encoding function + * it will use, so we have to use the frame type */ + if (osmo_amr_is_speech(ft)) + cmi = ft; + + /* populate L1 payload with CMR/CMI - might be ignored by caller: */ + amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi, cmr); + + /* populate DTX cache with CMR/CMI - overwrite cache which will be + either updated or invalidated by caller anyway: */ + amr_set_mode_pref(lchan->tch.dtx.cache, &lchan->tch.amr_mr, cmi, cmr); + *len = 3 + rtp_pl_len; + + /* DTX DL is not enabled, move along */ + if (!lchan->ts->trx->bts->dtxd) + return 0; + + if (osmo_amr_is_speech(ft)) { + if (lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F1 || + lchan->tch.dtx.dl_amr_fsm->state == ST_SID_U) /* AMR HR */ + if (lchan->type == GSM_LCHAN_TCH_H && marker) + return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, + E_INHIB, + (void *)lchan); + /* AMR FR */ + if (marker && lchan->tch.dtx.dl_amr_fsm->state == ST_SID_U) + 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 (ft == AMR_SID) { + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, sti); + return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, + sti ? E_SID_U : E_SID_F, + (void *)lchan); + } + + if (ft != AMR_NO_DATA) { LOGP(DRTP, LOGL_ERROR, "unsupported AMR FT 0x%02x\n", ft); return -ENOTSUP; } - if (osmo_amr_is_speech(ft)) { - if (lchan->tch.last_sid.len) { /* force ONSET */ - lchan->tch.last_sid.len = 0; - return 1; - } - /* We received AMR SPEECH frame - invalidate saved SID */ - lchan->tch.last_sid.len = 0; - amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi, cmr); - } - + if (marker) + osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, E_VOICE, + (void *)lchan); + *len = 0; return 0; } @@ -188,10 +219,10 @@ uint32_t fn) { /* Compute approx. time delta based on Fn duration */ - uint32_t delta = GSM_FN_TO_MS(fn - lchan->tch.last_sid.fn); + uint32_t delta = GSM_FN_TO_MS(fn - lchan->tch.dtx.fn); /* according to 3GPP TS 26.093 A.5.1.1: */ - if (lchan->tch.last_sid.is_update) { + if (lchan->tch.dtx.is_update) { /* SID UPDATE should be repeated every 8th RTP frame */ if (delta < GSM_RTP_FRAME_DURATION_MS * 8) return true; @@ -252,10 +283,10 @@ if (dtx_amr_sid_optional(lchan, fn)) return 0; - if (lchan->tch.last_sid.len) { - memcpy(dst, lchan->tch.last_sid.buf, lchan->tch.last_sid.len); - lchan->tch.last_sid.fn = fn; - return lchan->tch.last_sid.len + 1; + if (lchan->tch.dtx.len) { + memcpy(dst, lchan->tch.dtx.cache, lchan->tch.dtx.len); + lchan->tch.dtx.fn = fn; + return lchan->tch.dtx.len + 1; } LOGP(DL1C, LOGL_DEBUG, "Have to send %s frame on TCH but SID buffer " diff --git a/src/common/rsl.c b/src/common/rsl.c index 493ff3b..00525ca 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -2185,9 +2185,9 @@ msgb_tv_put(msg, RSL_IE_MEAS_RES_NR, lchan->meas.res_nr++); size_t ie_len = gsm0858_rsl_ul_meas_enc(&lchan->meas.ul_res, - lchan->tch.dtxd_active, + lchan->tch.dtx.dl_active, meas_res); - lchan->tch.dtxd_active = false; + lchan->tch.dtx.dl_active = false; if (ie_len >= 3) { msgb_tlv_put(msg, RSL_IE_UPLINK_MEAS, ie_len, meas_res); lchan->meas.flags &= ~LC_UL_M_F_RES_VALID; diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index a4378c1..16aeabb 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -432,7 +432,7 @@ } static int ph_tch_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache, bool marker) { struct lc15l1_hdl *fl1 = trx_lc15l1_hdl(trx); struct gsm_lchan *lchan; @@ -468,7 +468,7 @@ rc = l1if_tch_encode(lchan, l1p->u.phDataReq.msgUnitParam.u8Buffer, &l1p->u.phDataReq.msgUnitParam.u8Size, - msg->data, msg->len, u32Fn, + msg->data, msg->len, u32Fn, use_cache, l1sap->u.tch.marker); if (rc < 0) { /* no data encoded for L1: smth will be generated below */ @@ -500,16 +500,14 @@ } else { /* empty frame */ if (trx->bts->dtxd && trx != trx->bts->c0) - lchan->tch.dtxd_active = true; + lchan->tch.dtx.dl_active = true; empty_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr); } /* send message to DSP's queue */ osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], nmsg); - if (l1sap->u.tch.marker) { /* DTX: send voice after ONSET was sent */ - l1sap->u.tch.marker = 0; - return ph_tch_req(trx, l1sap->oph.msg, l1sap); - } + if (rc > 0 && trx->bts->dtxd) /* DTX: send voice after ONSET was sent */ + return ph_tch_req(trx, l1sap->oph.msg, l1sap, true, false); return 0; } @@ -577,7 +575,7 @@ rc = ph_data_req(trx, msg, l1sap); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): - rc = ph_tch_req(trx, msg, l1sap); + rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); break; case OSMO_PRIM(PRIM_MPH_INFO, PRIM_OP_REQUEST): rc = mph_info_req(trx, msg, l1sap); diff --git a/src/osmo-bts-litecell15/l1_if.h b/src/osmo-bts-litecell15/l1_if.h index adb197d..7feee56 100644 --- a/src/osmo-bts-litecell15/l1_if.h +++ b/src/osmo-bts-litecell15/l1_if.h @@ -90,8 +90,8 @@ /* tch.c */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, - bool marker); + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker); int l1if_tch_rx(struct gsm_bts_trx *trx, uint8_t chan_nr, struct msgb *l1p_msg); int l1if_tch_fill(struct gsm_lchan *lchan, uint8_t *l1_buffer); struct msgb *gen_empty_tch_msg(struct gsm_lchan *lchan, uint32_t fn); diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index e246ffb..b251388 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -198,8 +199,7 @@ * \returns number of \a l1_payload bytes filled */ static int rtppayload_to_l1_amr(uint8_t *l1_payload, const uint8_t *rtp_payload, - uint8_t payload_len, - struct gsm_lchan *lchan, uint8_t ft) + uint8_t payload_len, uint8_t ft) { memcpy(l1_payload, rtp_payload, payload_len); return payload_len; @@ -210,10 +210,11 @@ /*! \brief function for incoming RTP via TCH.req * \param[in] rtp_pl buffer containing RTP payload * \param[in] rtp_pl_len length of \a rtp_pl + * \param[in] use_cache Use cached payload instead of parsing RTP * \param[in] marker RTP header Marker bit (indicates speech onset) * \returns 0 if encoding result can be sent further to L1 without extra actions * positive value if data is ready AND extra actions are required - * negative value otherwise + * negative value otherwise (no data for L1 encoded) * * This function prepares a msgb with a L1 PH-DATA.req primitive and * queues it into lchan->dl_tch_queue. @@ -223,7 +224,8 @@ * pre-fill the primtive. */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, bool marker) + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker) { uint8_t *payload_type; uint8_t *l1_payload, ft; @@ -242,17 +244,17 @@ *payload_type = GsmL1_TchPlType_Fr; rc = rtppayload_to_l1_fr(l1_payload, rtp_pl, rtp_pl_len); - if (rc) + if (rc && lchan->ts->trx->bts->dtxd) is_sid = osmo_fr_check_sid(rtp_pl, rtp_pl_len); } else{ *payload_type = GsmL1_TchPlType_Hr; rc = rtppayload_to_l1_hr(l1_payload, rtp_pl, rtp_pl_len); - if (rc) + if (rc && lchan->ts->trx->bts->dtxd) is_sid = osmo_hr_check_sid(rtp_pl, rtp_pl_len); } if (is_sid) - save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, -1, 0, 0); + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, -1); break; case GSM48_CMODE_SPEECH_EFR: *payload_type = GsmL1_TchPlType_Efr; @@ -261,25 +263,75 @@ /* FIXME: detect and save EFR SID */ break; case GSM48_CMODE_SPEECH_AMR: - rc = dtx_amr_check_onset(lchan, rtp_pl, rtp_pl_len, fn, - l1_payload, &ft); - - if (marker || rc > 0) { - *payload_type = GsmL1_TchPlType_Amr_Onset; - *len = 1; - if (rc != 0) { - LOGP(DRTP, LOGL_NOTICE, "%s SPEECH frame without" - " Marker: ONSET forced\n", - get_value_string(osmo_amr_type_names, ft)); - return rc; - } - LOGP(DRTP, LOGL_DEBUG, "%s SPEECH frame with Marker\n", - get_value_string(osmo_amr_type_names, ft)); - } - else { + if (use_cache) { *payload_type = GsmL1_TchPlType_Amr; - rc = 2 + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, - rtp_pl_len, lchan, ft); + rtppayload_to_l1_amr(l1_payload, lchan->tch.dtx.cache, + lchan->tch.dtx.len, ft); + *len = lchan->tch.dtx.len + 1; + return 0; + } + + rc = dtx_dl_amr_fsm_step(lchan, rtp_pl, rtp_pl_len, fn, + l1_payload, marker, len, &ft); + if (rc < 0) + return rc; + if (!lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + } + + /* DTX DL-specific logic below: */ + switch (lchan->tch.dtx.dl_amr_fsm->state) { + case ST_ONSET_V: + case ST_ONSET_F: + *payload_type = GsmL1_TchPlType_Amr_Onset; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + *len = 1; + return 1; + case ST_VOICE: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F1: + if (lchan->type == GSM_LCHAN_TCH_H) { /* AMR HR */ + *payload_type = GsmL1_TchPlType_Amr_SidFirstP1; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, + rtp_pl_len, ft); + return 0; + } + /* AMR FR */ + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F2: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_F1_INH: + *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: + *payload_type = GsmL1_TchPlType_Amr_SidUpdateInH; + *len = 3; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + return 1; + case ST_SID_U: + return -EAGAIN; + case ST_FACCH_V: + case ST_FACCH: + /* FIXME: if this possible at all? */ + return 0; + default: + LOGP(DRTP, LOGL_ERROR, "Unhandled DTX DL AMR FSM state " + "%d\n", lchan->tch.dtx.dl_amr_fsm->state); + return -EINVAL; } break; default: @@ -442,7 +494,20 @@ switch (lchan->tch_mode) { case GSM48_CMODE_SPEECH_AMR: - *payload_type = GsmL1_TchPlType_Amr; + if (lchan->type == GSM_LCHAN_TCH_H && + lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F1 && + lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr_SidFirstP2; + rc = dtx_dl_amr_fsm_step(lchan, NULL, 0, fn, l1_payload, + false, &(msu_param->u8Size), + NULL); + if (rc < 0) { + msgb_free(msg); + return NULL; + } + return msg; + } else + *payload_type = GsmL1_TchPlType_Amr; break; case GSM48_CMODE_SPEECH_V1: if (lchan->type == GSM_LCHAN_TCH_F) @@ -458,12 +523,13 @@ return NULL; } - rc = repeat_last_sid(lchan, l1_payload, fn); - if (!rc) { - msgb_free(msg); - return NULL; + if (lchan->ts->trx->bts->dtxd) { + rc = repeat_last_sid(lchan, l1_payload, fn); + if (!rc) { + msgb_free(msg); + return NULL; + } + msu_param->u8Size = rc; } - msu_param->u8Size = rc; - return msg; } diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 09627af..c3f7c73 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -427,7 +427,7 @@ } static int ph_tch_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache, bool marker) { struct femtol1_hdl *fl1 = trx_femtol1_hdl(trx); struct gsm_lchan *lchan; @@ -463,7 +463,7 @@ rc = l1if_tch_encode(lchan, l1p->u.phDataReq.msgUnitParam.u8Buffer, &l1p->u.phDataReq.msgUnitParam.u8Size, - msg->data, msg->len, u32Fn, + msg->data, msg->len, u32Fn, use_cache, l1sap->u.tch.marker); if (rc < 0) { /* no data encoded for L1: smth will be generated below */ @@ -495,16 +495,14 @@ } else { /* empty frame */ if (trx->bts->dtxd && trx != trx->bts->c0) - lchan->tch.dtxd_active = true; + lchan->tch.dtx.dl_active = true; empty_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr); } /* send message to DSP's queue */ osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], nmsg); - if (l1sap->u.tch.marker) { /* DTX: send voice after ONSET was sent */ - l1sap->u.tch.marker = 0; - return ph_tch_req(trx, l1sap->oph.msg, l1sap); - } + if (rc > 0 && trx->bts->dtxd) /* DTX: send voice after ONSET was sent */ + return ph_tch_req(trx, l1sap->oph.msg, l1sap, true, false); return 0; } @@ -572,7 +570,7 @@ rc = ph_data_req(trx, msg, l1sap); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): - rc = ph_tch_req(trx, msg, l1sap); + rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); break; case OSMO_PRIM(PRIM_MPH_INFO, PRIM_OP_REQUEST): rc = mph_info_req(trx, msg, l1sap); diff --git a/src/osmo-bts-sysmo/l1_if.h b/src/osmo-bts-sysmo/l1_if.h index ece7a01..0dc919b 100644 --- a/src/osmo-bts-sysmo/l1_if.h +++ b/src/osmo-bts-sysmo/l1_if.h @@ -110,8 +110,8 @@ /* tch.c */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, - bool marker); + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker); int l1if_tch_rx(struct gsm_bts_trx *trx, uint8_t chan_nr, struct msgb *l1p_msg); int l1if_tch_fill(struct gsm_lchan *lchan, uint8_t *l1_buffer); struct msgb *gen_empty_tch_msg(struct gsm_lchan *lchan, uint32_t fn); diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index ca9045e..b08ba7e 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -281,8 +282,7 @@ * \returns number of \a l1_payload bytes filled */ static int rtppayload_to_l1_amr(uint8_t *l1_payload, const uint8_t *rtp_payload, - uint8_t payload_len, - struct gsm_lchan *lchan, uint8_t ft) + uint8_t payload_len, uint8_t ft) { #ifdef USE_L1_RTP_MODE memcpy(l1_payload, rtp_payload, payload_len); @@ -306,10 +306,11 @@ /*! \brief function for incoming RTP via TCH.req * \param[in] rtp_pl buffer containing RTP payload * \param[in] rtp_pl_len length of \a rtp_pl + * \param[in] use_cache Use cached payload instead of parsing RTP * \param[in] marker RTP header Marker bit (indicates speech onset) * \returns 0 if encoding result can be sent further to L1 without extra actions * positive value if data is ready AND extra actions are required - * negative value otherwise + * negative value otherwise (no data for L1 encoded) * * This function prepares a msgb with a L1 PH-DATA.req primitive and * queues it into lchan->dl_tch_queue. @@ -319,7 +320,8 @@ * pre-fill the primtive. */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, bool marker) + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker) { uint8_t *payload_type; uint8_t *l1_payload, ft; @@ -338,17 +340,17 @@ *payload_type = GsmL1_TchPlType_Fr; rc = rtppayload_to_l1_fr(l1_payload, rtp_pl, rtp_pl_len); - if (rc) + if (rc && lchan->ts->trx->bts->dtxd) is_sid = osmo_fr_check_sid(rtp_pl, rtp_pl_len); } else{ *payload_type = GsmL1_TchPlType_Hr; rc = rtppayload_to_l1_hr(l1_payload, rtp_pl, rtp_pl_len); - if (rc) + if (rc && lchan->ts->trx->bts->dtxd) is_sid = osmo_hr_check_sid(rtp_pl, rtp_pl_len); } if (is_sid) - save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, -1, 0, 0); + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, -1); break; #if defined(L1_HAS_EFR) && defined(USE_L1_RTP_MODE) case GSM48_CMODE_SPEECH_EFR: @@ -359,25 +361,75 @@ break; #endif case GSM48_CMODE_SPEECH_AMR: - rc = dtx_amr_check_onset(lchan, rtp_pl, rtp_pl_len, fn, - l1_payload, &ft); - - if (marker || rc > 0) { - *payload_type = GsmL1_TchPlType_Amr_Onset; - *len = 1; - if (rc != 0) { - LOGP(DRTP, LOGL_NOTICE, "%s SPEECH frame without" - " Marker: ONSET forced\n", - get_value_string(osmo_amr_type_names, ft)); - return rc; - } - LOGP(DRTP, LOGL_DEBUG, "%s SPEECH frame with Marker\n", - get_value_string(osmo_amr_type_names, ft)); - } - else { + if (use_cache) { *payload_type = GsmL1_TchPlType_Amr; - rc = 2 + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, - rtp_pl_len, lchan, ft); + rtppayload_to_l1_amr(l1_payload, lchan->tch.dtx.cache, + lchan->tch.dtx.len, ft); + *len = lchan->tch.dtx.len + 1; + return 0; + } + + rc = dtx_dl_amr_fsm_step(lchan, rtp_pl, rtp_pl_len, fn, + l1_payload, marker, len, &ft); + if (rc < 0) + return rc; + if (!lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + } + + /* DTX DL-specific logic below: */ + switch (lchan->tch.dtx.dl_amr_fsm->state) { + case ST_ONSET_V: + case ST_ONSET_F: + *payload_type = GsmL1_TchPlType_Amr_Onset; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + *len = 1; + return 1; + case ST_VOICE: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F1: + if (lchan->type == GSM_LCHAN_TCH_H) { /* AMR HR */ + *payload_type = GsmL1_TchPlType_Amr_SidFirstP1; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, + rtp_pl_len, ft); + return 0; + } + /* AMR FR */ + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F2: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_F1_INH: + *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: + *payload_type = GsmL1_TchPlType_Amr_SidUpdateInH; + *len = 3; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + return 1; + case ST_SID_U: + return -EAGAIN; + case ST_FACCH_V: + case ST_FACCH: + /* FIXME: if this possible at all? */ + return 0; + default: + LOGP(DRTP, LOGL_ERROR, "Unhandled DTX DL AMR FSM state " + "%d\n", lchan->tch.dtx.dl_amr_fsm->state); + return -EINVAL; } break; default: @@ -544,7 +596,20 @@ switch (lchan->tch_mode) { case GSM48_CMODE_SPEECH_AMR: - *payload_type = GsmL1_TchPlType_Amr; + if (lchan->type == GSM_LCHAN_TCH_H && + lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F1 && + lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr_SidFirstP2; + rc = dtx_dl_amr_fsm_step(lchan, NULL, 0, fn, l1_payload, + false, &(msu_param->u8Size), + NULL); + if (rc < 0) { + msgb_free(msg); + return NULL; + } + return msg; + } else + *payload_type = GsmL1_TchPlType_Amr; break; case GSM48_CMODE_SPEECH_V1: if (lchan->type == GSM_LCHAN_TCH_F) @@ -560,12 +625,13 @@ return NULL; } - rc = repeat_last_sid(lchan, l1_payload, fn); - if (!rc) { - msgb_free(msg); - return NULL; + if (lchan->ts->trx->bts->dtxd) { + rc = repeat_last_sid(lchan, l1_payload, fn); + if (!rc) { + msgb_free(msg); + return NULL; + } + msu_param->u8Size = rc; } - msu_param->u8Size = rc; - return msg; } -- To view, visit https://gerrit.osmocom.org/1030 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I74a0b42cb34d525b8a70d264135e82994ca70d31 Gerrit-PatchSet: 5 Gerrit-Project: osmo-bts 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 Wed Oct 12 11:37:49 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 12 Oct 2016 11:37:49 +0000 Subject: [MERGED] libosmocore[master]: Add function to send TRAP over Control Interface In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Add function to send TRAP over Control Interface ...................................................................... Add function to send TRAP over Control Interface Change-Id: Ic0b8d88c4f5c4d42c3f8fb754f8eabf049c9e388 Related: OS#1646 --- M include/osmocom/ctrl/control_if.h M src/ctrl/control_if.c 2 files changed, 22 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/ctrl/control_if.h b/include/osmocom/ctrl/control_if.h index 181c60a..512ae10 100644 --- a/include/osmocom/ctrl/control_if.h +++ b/include/osmocom/ctrl/control_if.h @@ -20,6 +20,7 @@ int ctrl_cmd_send(struct osmo_wqueue *queue, struct ctrl_cmd *cmd); +int ctrl_cmd_send_trap(struct ctrl_handle *ctrl, const char *name, char *value); struct ctrl_handle *ctrl_interface_setup(void *data, uint16_t port, ctrl_cmd_lookup lookup); struct ctrl_handle *ctrl_interface_setup_dynip(void *data, diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 2ffc251..df39486 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -117,6 +117,27 @@ return ret; } +/*! \brief Send TRAP over given Control Interface + * \param[in] ctrl Control Interface over which TRAP will be sent + * \param[in] name Name of the TRAP variable + * \param[in] value Value of the TRAP variable + * \return Negative value on error, result of ctrl_cmd_send_to_all() otherwise + */ +int ctrl_cmd_send_trap(struct ctrl_handle *ctrl, const char *name, char *value) +{ + int r; + struct ctrl_cmd *cmd = ctrl_cmd_create(NULL, CTRL_TYPE_TRAP); + if (!cmd) + return -ENOMEM; + + cmd->id = "0"; /* It's a TRAP! */ + cmd->variable = name; + cmd->reply = value; + r = ctrl_cmd_send_to_all(ctrl, cmd); + talloc_free(cmd); + return r; +} + struct ctrl_cmd *ctrl_cmd_trap(struct ctrl_cmd *cmd) { struct ctrl_cmd *trap; -- To view, visit https://gerrit.osmocom.org/649 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic0b8d88c4f5c4d42c3f8fb754f8eabf049c9e388 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore 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 Oct 12 11:40:11 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 12 Oct 2016 11:40:11 +0000 Subject: [MERGED] openggsn[master]: Add control interface In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Add control interface ...................................................................... Add control interface Only generation of TRAP messages over Control Interface is supported so far. Note: requires corresponding version of libosmoctrl. Change-Id: Ia76f841d2c9cd14394e9316fcd39f4060e23c898 Related: OS#1646 --- M configure.ac M ggsn/Makefile.am M ggsn/ggsn.c M gtp/gtp.h 4 files changed, 34 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 9b8d988..b11730b 100644 --- a/configure.ac +++ b/configure.ac @@ -117,6 +117,7 @@ PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.6.4) PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.3.0) +PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl) AC_CONFIG_FILES([Makefile doc/Makefile diff --git a/ggsn/Makefile.am b/ggsn/Makefile.am index c8868c1..3ad3a6e 100644 --- a/ggsn/Makefile.am +++ b/ggsn/Makefile.am @@ -2,13 +2,13 @@ AM_LDFLAGS = @EXEC_LDFLAGS@ -AM_CFLAGS = -O2 -D_GNU_SOURCE -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' -ggdb $(LIBOSMOCORE_CFLAGS) +AM_CFLAGS = -O2 -D_GNU_SOURCE -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' -ggdb $(LIBOSMOCORE_CFLAGS) $(LIBOSMOCTRL_CFLAGS) if ENABLE_GTP_KERNEL AM_CFLAGS += -DGTP_KERNEL -ggsn_LDADD = @EXEC_LDADD@ -lgtp -lgtpnl -L../gtp ../lib/libmisc.a $(LIBOSMOCORE_LIBS) +ggsn_LDADD = @EXEC_LDADD@ -lgtp -lgtpnl -L../gtp ../lib/libmisc.a $(LIBOSMOCORE_LIBS) $(LIBOSMOCTRL_LIBS) else -ggsn_LDADD = @EXEC_LDADD@ -lgtp -L../gtp ../lib/libmisc.a $(LIBOSMOCORE_LIBS) +ggsn_LDADD = @EXEC_LDADD@ -lgtp -L../gtp ../lib/libmisc.a $(LIBOSMOCORE_LIBS) $(LIBOSMOCTRL_LIBS) endif ggsn_DEPENDENCIES = ../gtp/libgtp.la ../lib/libmisc.a diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 6866901..9609d52 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -39,7 +39,7 @@ #include #include #include - +#include #include #include #include @@ -47,6 +47,11 @@ #include #include + +#include +#include +#include +#include #include "../lib/tun.h" #include "../lib/ippool.h" @@ -131,6 +136,9 @@ int delete_context(struct pdp_t *pdp) { DEBUGP(DGGSN, "Deleting PDP context\n"); + struct ippoolm_t *member = pdp->peer; + char v[NAMESIZE]; + snprintf(v, sizeof(v), "%" PRIu64 ",%s", pdp->imsi, inet_ntoa(member->addr)); if (pdp->peer) ippool_freeip(ippool, (struct ippoolm_t *)pdp->peer); else @@ -141,6 +149,9 @@ "Cannot delete tunnel from kernel: %s\n", strerror(errno)); } +/* FIXME: naming? */ + if (ctrl_cmd_send_trap(gsn->ctrl, "imsi-rem-ip", v) < 0) + LOGP(DGGSN, LOGL_ERROR, "Trap creation failed.\n"); return 0; } @@ -149,6 +160,7 @@ { struct in_addr addr; struct ippoolm_t *member; + char v[NAMESIZE]; DEBUGP(DGGSN, "Received create PDP context request\n"); @@ -177,6 +189,13 @@ if (gtp_kernel_tunnel_add(pdp) < 0) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "Cannot add tunnel to kernel: %s\n", strerror(errno)); + } +/* FIXME: naming? */ + snprintf(v, sizeof(v), "%" PRIu64 ",%s", pdp->imsi, inet_ntoa(member->addr)); + if (ctrl_cmd_send_trap(gsn->ctrl, "imsi-ass-ip", v) < 0) { + LOGP(DGGSN, LOGL_ERROR, "Trap creation failed.\n"); + gtp_create_context_resp(gsn, pdp, GTPCAUSE_NO_RESOURCES); + return 0; } gtp_create_context_resp(gsn, pdp, GTPCAUSE_ACC_REQ); @@ -526,6 +545,12 @@ gtp_set_cb_delete_context(gsn, delete_context); gtp_set_cb_create_context_ind(gsn, create_context_ind); + gsn->ctrl = ctrl_interface_setup(NULL, OSMO_CTRL_PORT_GGSN, NULL); + if (!gsn->ctrl) { + LOGP(DGGSN, LOGL_ERROR, "Failed to create CTRL interface.\n"); + exit(1); + } + /* skip the configuration of the tun0 if we're using the gtp0 device */ if (gtp_kernel_enabled()) goto skip_tun; @@ -597,6 +622,7 @@ if (FD_ISSET(gsn->fd1u, &fds)) gtp_decaps1u(gsn); + osmo_select_main(1); } err: gtp_kernel_stop(); diff --git a/gtp/gtp.h b/gtp/gtp.h index 539e255..fd138cc 100644 --- a/gtp/gtp.h +++ b/gtp/gtp.h @@ -12,6 +12,8 @@ #ifndef _GTP_H #define _GTP_H +#include + #define GTP_MODE_GGSN 1 #define GTP_MODE_SGSN 2 @@ -245,7 +247,7 @@ unsigned char restart_counter; /* Increment on restart. Stored on disk */ char *statedir; /* Disk location for permanent storage */ - + struct ctrl_handle *ctrl; /* Control Interface */ struct queue_t *queue_req; /* Request queue */ struct queue_t *queue_resp; /* Response queue */ -- To view, visit https://gerrit.osmocom.org/1042 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia76f841d2c9cd14394e9316fcd39f4060e23c898 Gerrit-PatchSet: 2 Gerrit-Project: openggsn 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 Wed Oct 12 11:47:56 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 11:47:56 +0000 Subject: [PATCH] libosmocore[master]: NOT FOR MERGE: introduce ASAN failure to test jenkins.sh In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/975 to look at the new patch set (#6). NOT FOR MERGE: introduce ASAN failure to test jenkins.sh Change-Id: I9b0b22d5163bd1243f6ea0e25bce15e0a626000d --- M contrib/jenkins.sh M src/Makefile.am M tests/Makefile.am M tests/bits/bitrev_test.c M tests/bits/bitrev_test.ok 5 files changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/75/975/6 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 742963c..6fb0c6b 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -5,7 +5,7 @@ autoreconf --install --force ./configure --enable-static --enable-sanitize -$MAKE $PARALLEL_MAKE check \ +$MAKE V=1 $PARALLEL_MAKE check \ || cat-testlogs.sh $MAKE distcheck \ || cat-testlogs.sh diff --git a/src/Makefile.am b/src/Makefile.am index 74bdb21..bd01780 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -35,4 +35,5 @@ endif crc%gen.c: crcXXgen.c.tpl + env $(AM_V_GEN)sed -e's/XX/$*/g' $< > $@ diff --git a/tests/Makefile.am b/tests/Makefile.am index ae5735a..4de96c8 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -171,6 +171,7 @@ TESTSUITE = $(srcdir)/testsuite check-local: atconfig $(TESTSUITE) + env $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS) installcheck-local: atconfig $(TESTSUITE) diff --git a/tests/bits/bitrev_test.c b/tests/bits/bitrev_test.c index ed3939a..e84a898 100644 --- a/tests/bits/bitrev_test.c +++ b/tests/bits/bitrev_test.c @@ -300,9 +300,7 @@ sh_chk(in1, ARRAY_SIZE(in1), offs, true); sh_chk(in1, ARRAY_SIZE(in1), offs, false); sh_chk(in2, ARRAY_SIZE(in2), offs, true); - /* in2 is too short to shift left 12 nibbles */ - if (offs < 12) - sh_chk(in2, ARRAY_SIZE(in2), offs, false); + sh_chk(in2, ARRAY_SIZE(in2), offs, false); } return 0; } diff --git a/tests/bits/bitrev_test.ok b/tests/bits/bitrev_test.ok index d2fb12c..f58f070 100644 --- a/tests/bits/bitrev_test.ok +++ b/tests/bits/bitrev_test.ok @@ -156,3 +156,5 @@ OUT: 00dcafedeadb [6] R IN: b00bbabeface, nibble 12: OUT: 0b00bbabefac +[6] L IN: b00bbabeface, nibble 12: + OUT: 00bbabeface0 -- To view, visit https://gerrit.osmocom.org/975 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9b0b22d5163bd1243f6ea0e25bce15e0a626000d Gerrit-PatchSet: 6 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 Wed Oct 12 13:31:50 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 13:31:50 +0000 Subject: [PATCH] libosmocore[master]: gsm/Makefile.am: use proper top_builddir/top_srcdir paths Message-ID: Review at https://gerrit.osmocom.org/1044 gsm/Makefile.am: use proper top_builddir/top_srcdir paths This fixes the conv*gen.c targets when building in a different directory than the source tree. Notably, building in a different dir worked when the generated sources were already present from a previous build inside the source directory. Change-Id: I5a9b780ad4ba607ea39854dcf7207ed05f5447bc --- M src/gsm/Makefile.am 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/44/1044/1 diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index a2f2524..2071413 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -29,7 +29,7 @@ milenage/milenage.c gan.c ipa.c gsm0341.c apn.c \ gsup.c gprs_gea.c libgsmint_la_LDFLAGS = -no-undefined -libgsmint_la_LIBADD = ../libosmocore.la +libgsmint_la_LIBADD = $(top_builddir)/src/libosmocore.la libosmogsm_la_SOURCES = libosmogsm_la_LDFLAGS = $(LTLDFLAGS_OSMOGSM) -version-info $(LIBVERSION) -no-undefined $(TALLOC_LIBS) @@ -37,5 +37,5 @@ EXTRA_DIST = libosmogsm.map -conv%gen.c: ../../utils/conv_gen.py - $(AM_V_GEN)python2 ../../utils/conv_gen.py +conv%gen.c: $(top_srcdir)/utils/conv_gen.py + $(AM_V_GEN)python2 $(top_srcdir)/utils/conv_gen.py -- To view, visit https://gerrit.osmocom.org/1044 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5a9b780ad4ba607ea39854dcf7207ed05f5447bc Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Oct 12 15:46:49 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 15:46:49 +0000 Subject: [PATCH] libosmocore[master]: configure: add --enable-sanitize, use in jenkins.sh 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/974 to look at the new patch set (#5). configure: add --enable-sanitize, use in jenkins.sh --enable-sanitize adds address sanitizer CFLAGS/CPPFLAGS to the entire build. Also pass UBSAN_OPTIONS to the test suite run (only has effect during runtime). Add this flag to jenkins.sh's configure step. To ensure that we get the sanitize results, add 'make check' to jenkins to catch sanitize failures; Keep 'make distcheck' without ASAN; it has its own configure which omits --enable-sanitize. This way we test both with and without ASAN. Change-Id: Idf7f46fa048608c2951f2473cb528f6c8dc2681d --- M configure.ac M contrib/jenkins.sh 2 files changed, 15 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/74/974/5 diff --git a/configure.ac b/configure.ac index e3752b4..ea68839 100644 --- a/configure.ac +++ b/configure.ac @@ -202,6 +202,18 @@ AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort]) fi +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS+=" -fsanitize=address -fsanitize=undefined" + CPPFLAGS+=" -fsanitize=address -fsanitize=undefined" +fi + AC_OUTPUT( libosmocore.pc libosmocodec.pc diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index e9f63e4..742963c 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -4,7 +4,8 @@ set -ex autoreconf --install --force -./configure --enable-static -$MAKE $PARALLEL_MAKE +./configure --enable-static --enable-sanitize +$MAKE $PARALLEL_MAKE check \ + || cat-testlogs.sh $MAKE distcheck \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/974 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Idf7f46fa048608c2951f2473cb528f6c8dc2681d Gerrit-PatchSet: 5 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 Oct 12 15:46:50 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 15:46:50 +0000 Subject: [PATCH] libosmocore[master]: NOT FOR MERGE: add ubsan failure to see if jenkins.sh catche... Message-ID: Review at https://gerrit.osmocom.org/1045 NOT FOR MERGE: add ubsan failure to see if jenkins.sh catches it Change-Id: I6de7a703eee56a2f4875fef684b8050751b0b4ca --- M tests/bits/bitrev_test.c 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/45/1045/1 diff --git a/tests/bits/bitrev_test.c b/tests/bits/bitrev_test.c index ed3939a..a4f4ea9 100644 --- a/tests/bits/bitrev_test.c +++ b/tests/bits/bitrev_test.c @@ -296,6 +296,9 @@ const uint8_t in1[] = { 0xF0, 0x0D, 0xCA, 0xFE, 0xDE, 0xAD, 0xBE, 0xEF }, in2[] = { 0xB0, 0x0B, 0xBA, 0xBE, 0xFA, 0xCE }; + long int ub = 100; + long int ub2; + for (offs = 0; offs < 13; offs++) { sh_chk(in1, ARRAY_SIZE(in1), offs, true); sh_chk(in1, ARRAY_SIZE(in1), offs, false); @@ -303,6 +306,9 @@ /* in2 is too short to shift left 12 nibbles */ if (offs < 12) sh_chk(in2, ARRAY_SIZE(in2), offs, false); + ub *= 546453978298369; + ub2 = ub << offs; + fprintf(stderr, "ub %ld\n", ub2); } return 0; } -- To view, visit https://gerrit.osmocom.org/1045 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6de7a703eee56a2f4875fef684b8050751b0b4ca Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Oct 12 15:47:04 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 15:47:04 +0000 Subject: [PATCH] libosmocore[master]: NOT FOR MERGE: introduce ASAN failure to test jenkins.sh In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/975 to look at the new patch set (#7). NOT FOR MERGE: introduce ASAN failure to test jenkins.sh Change-Id: I9b0b22d5163bd1243f6ea0e25bce15e0a626000d --- M contrib/jenkins.sh M src/Makefile.am M tests/bits/bitrev_test.c M tests/bits/bitrev_test.ok 4 files changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/75/975/7 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 742963c..6fb0c6b 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -5,7 +5,7 @@ autoreconf --install --force ./configure --enable-static --enable-sanitize -$MAKE $PARALLEL_MAKE check \ +$MAKE V=1 $PARALLEL_MAKE check \ || cat-testlogs.sh $MAKE distcheck \ || cat-testlogs.sh diff --git a/src/Makefile.am b/src/Makefile.am index 74bdb21..bd01780 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -35,4 +35,5 @@ endif crc%gen.c: crcXXgen.c.tpl + env $(AM_V_GEN)sed -e's/XX/$*/g' $< > $@ diff --git a/tests/bits/bitrev_test.c b/tests/bits/bitrev_test.c index ed3939a..e84a898 100644 --- a/tests/bits/bitrev_test.c +++ b/tests/bits/bitrev_test.c @@ -300,9 +300,7 @@ sh_chk(in1, ARRAY_SIZE(in1), offs, true); sh_chk(in1, ARRAY_SIZE(in1), offs, false); sh_chk(in2, ARRAY_SIZE(in2), offs, true); - /* in2 is too short to shift left 12 nibbles */ - if (offs < 12) - sh_chk(in2, ARRAY_SIZE(in2), offs, false); + sh_chk(in2, ARRAY_SIZE(in2), offs, false); } return 0; } diff --git a/tests/bits/bitrev_test.ok b/tests/bits/bitrev_test.ok index d2fb12c..f58f070 100644 --- a/tests/bits/bitrev_test.ok +++ b/tests/bits/bitrev_test.ok @@ -156,3 +156,5 @@ OUT: 00dcafedeadb [6] R IN: b00bbabeface, nibble 12: OUT: 0b00bbabefac +[6] L IN: b00bbabeface, nibble 12: + OUT: 00bbabeface0 -- To view, visit https://gerrit.osmocom.org/975 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9b0b22d5163bd1243f6ea0e25bce15e0a626000d Gerrit-PatchSet: 7 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 Wed Oct 12 15:56:30 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 12 Oct 2016 15:56:30 +0000 Subject: [PATCH] osmo-bts[master]: Remove duplicated code Message-ID: Review at https://gerrit.osmocom.org/1046 Remove duplicated code Change-Id: Id0d3b19dbfaa16d1734321a07a6eb0355bfd77c9 --- M src/common/l1sap.c 1 file changed, 11 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/46/1046/1 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index dd234ee..1dd6c0f 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -204,15 +204,13 @@ /* send primitive as gsmtap */ static int gsmtap_ph_data(struct osmo_phsap_prim *l1sap, uint8_t *chan_type, - uint8_t *tn, uint8_t *ss, uint32_t *fn, uint8_t **data, int *len) + uint8_t *ss, uint32_t fn, uint8_t **data, int *len) { struct msgb *msg = l1sap->oph.msg; uint8_t chan_nr, link_id; *data = msg->data + sizeof(struct osmo_phsap_prim); *len = msg->len - sizeof(struct osmo_phsap_prim); - *fn = l1sap->u.data.fn; - *tn = L1SAP_CHAN2TS(l1sap->u.data.chan_nr); chan_nr = l1sap->u.data.chan_nr; link_id = l1sap->u.data.link_id; @@ -233,7 +231,7 @@ #warning Set BS_AG_BLKS_RES /* The sapi depends on DSP configuration, not * on the actual SYSTEM INFORMATION 3. */ - if (L1SAP_FN2CCCHBLOCK(*fn) >= 1) + if (L1SAP_FN2CCCHBLOCK(fn) >= 1) *chan_type = GSMTAP_CHANNEL_PCH; else *chan_type = GSMTAP_CHANNEL_AGCH; @@ -245,18 +243,16 @@ } static int gsmtap_pdch(struct osmo_phsap_prim *l1sap, uint8_t *chan_type, - uint8_t *tn, uint8_t *ss, uint32_t *fn, uint8_t **data, int *len) + uint8_t *ss, uint32_t fn, uint8_t **data, int *len) { struct msgb *msg = l1sap->oph.msg; *data = msg->data + sizeof(struct osmo_phsap_prim); *len = msg->len - sizeof(struct osmo_phsap_prim); - *fn = l1sap->u.data.fn; - *tn = L1SAP_CHAN2TS(l1sap->u.data.chan_nr); - if (L1SAP_IS_PTCCH(*fn)) { + if (L1SAP_IS_PTCCH(fn)) { *chan_type = GSMTAP_CHANNEL_PTCCH; - *ss = L1SAP_FN2PTCCHBLOCK(*fn); + *ss = L1SAP_FN2PTCCHBLOCK(fn); if (l1sap->oph.primitive == PRIM_OP_INDICATION) { if ((*data[0]) == 7) @@ -308,12 +304,14 @@ uplink = 0; /* fall through */ case OSMO_PRIM(PRIM_PH_DATA, PRIM_OP_INDICATION): + fn = l1sap->u.data.fn; + tn = L1SAP_CHAN2TS(l1sap->u.data.chan_nr); if (ts_is_pdch(&trx->ts[tn])) - rc = gsmtap_pdch(l1sap, &chan_type, &tn, &ss, &fn, &data, - &len); + rc = gsmtap_pdch(l1sap, &chan_type, &ss, fn, &data, + &len); else - rc = gsmtap_ph_data(l1sap, &chan_type, &tn, &ss, &fn, - &data, &len); + rc = gsmtap_ph_data(l1sap, &chan_type, &ss, fn, &data, + &len); break; case OSMO_PRIM(PRIM_PH_RACH, PRIM_OP_INDICATION): rc = gsmtap_ph_rach(l1sap, &chan_type, &tn, &ss, &fn, &data, -- To view, visit https://gerrit.osmocom.org/1046 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id0d3b19dbfaa16d1734321a07a6eb0355bfd77c9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Oct 12 15:56:30 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 12 Oct 2016 15:56:30 +0000 Subject: [PATCH] osmo-bts[master]: Fix AGCH/PCH proportional static allocation Message-ID: Review at https://gerrit.osmocom.org/1047 Fix AGCH/PCH proportional static allocation Do not assume that 1 == BS_AG_BLKS_RES but take that information from SI3. Note: this implements static variant - changing BS_AG_BLKS_RES on OpenBSC side will not affect BTS after initial value has been acquired. Change-Id: Ib9e0705234ef53d2c70bea6b6dd542176e58145d Related: OS#1575 --- M include/osmo-bts/bts.h M src/common/l1sap.c M src/common/paging.c M src/common/sysinfo.c M src/osmo-bts-litecell15/l1_if.c M src/osmo-bts-litecell15/oml.c M src/osmo-bts-octphy/l1_if.c M src/osmo-bts-sysmo/l1_if.c M src/osmo-bts-sysmo/oml.c 9 files changed, 18 insertions(+), 50 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/47/1047/1 diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h index ec58edd..1e4ace8 100644 --- a/include/osmo-bts/bts.h +++ b/include/osmo-bts/bts.h @@ -36,7 +36,7 @@ int lchan_init_lapdm(struct gsm_lchan *lchan); void load_timer_start(struct gsm_bts *bts); - +uint8_t num_agch(struct gsm_bts_trx *trx); void bts_update_status(enum bts_global_status which, int on); int trx_ms_pwr_ctrl_is_osmo(struct gsm_bts_trx *trx); diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 1dd6c0f..b9ce94c 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -204,7 +204,8 @@ /* send primitive as gsmtap */ static int gsmtap_ph_data(struct osmo_phsap_prim *l1sap, uint8_t *chan_type, - uint8_t *ss, uint32_t fn, uint8_t **data, int *len) + uint8_t *ss, uint32_t fn, uint8_t **data, int *len, + uint8_t num_agch) { struct msgb *msg = l1sap->oph.msg; uint8_t chan_nr, link_id; @@ -228,10 +229,9 @@ } else if (L1SAP_IS_CHAN_BCCH(chan_nr)) { *chan_type = GSMTAP_CHANNEL_BCCH; } else if (L1SAP_IS_CHAN_AGCH_PCH(chan_nr)) { -#warning Set BS_AG_BLKS_RES /* The sapi depends on DSP configuration, not * on the actual SYSTEM INFORMATION 3. */ - if (L1SAP_FN2CCCHBLOCK(fn) >= 1) + if (L1SAP_FN2CCCHBLOCK(fn) >= num_agch) *chan_type = GSMTAP_CHANNEL_PCH; else *chan_type = GSMTAP_CHANNEL_AGCH; @@ -311,7 +311,7 @@ &len); else rc = gsmtap_ph_data(l1sap, &chan_type, &ss, fn, &data, - &len); + &len, num_agch(trx)); break; case OSMO_PRIM(PRIM_PH_RACH, PRIM_OP_INDICATION): rc = gsmtap_ph_rach(l1sap, &chan_type, &tn, &ss, &fn, &data, @@ -607,11 +607,10 @@ msgb_free(pp.oph.msg); } } else if (L1SAP_IS_CHAN_AGCH_PCH(chan_nr)) { + LOGP(DL1P, LOGL_ERROR, "AGCH/PCH: %d\n", num_agch(trx)); p = msgb_put(msg, GSM_MACBLOCK_LEN); -#warning "TODO: Yet another assumption that BS_AG_BLKS_RES=1" - /* if CCCH block is 0, it is AGCH */ rc = bts_ccch_copy_msg(trx->bts, p, &g_time, - (L1SAP_FN2CCCHBLOCK(fn) < 1)); + (L1SAP_FN2CCCHBLOCK(fn) < num_agch(trx))); if (rc <= 0) memcpy(p, fill_frame, GSM_MACBLOCK_LEN); } diff --git a/src/common/paging.c b/src/common/paging.c index f75f12d..957d609 100644 --- a/src/common/paging.c +++ b/src/common/paging.c @@ -538,12 +538,6 @@ struct paging_state *ps = btsb->paging_state; struct gsm48_system_information_type_3 *si3 = (void *) bts->si_buf[SYSINFO_TYPE_3]; -#warning "TODO: Remove this when setting u8NbrOfAgch is implemented properly" - if (si3->control_channel_desc.bs_ag_blks_res != 1) - LOGP(DPAG, LOGL_ERROR, - "Paging: BS_AG_BLKS_RES = %d != 1 not fully supported\n", - si3->control_channel_desc.bs_ag_blks_res); - paging_si_update(ps, &si3->control_channel_desc); } return 0; diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c index ee42da2..cb65106 100644 --- a/src/common/sysinfo.c +++ b/src/common/sysinfo.c @@ -132,6 +132,13 @@ return NULL; } +uint8_t num_agch(struct gsm_bts_trx *trx) +{ + struct gsm48_system_information_type_3 *si3 = + (void *) trx->bts->si_buf[SYSINFO_TYPE_3]; + return si3->control_channel_desc.bs_ag_blks_res; +} + uint8_t *lchan_sacch_get(struct gsm_lchan *lchan) { uint32_t tmp; diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index 1c98951..ec18ee0 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -1109,22 +1109,6 @@ return l1if_handle_ind(fl1h, msg); } -#if 0 -/* called by RSL if the BCCH SI has been modified */ -int sysinfo_has_changed(struct gsm_bts *bts, int si) -{ - /* FIXME: Determine BS_AG_BLKS_RES and - * * set cfgParams.u.agch.u8NbrOfAgch - * * determine implications on paging - */ - /* FIXME: Check for Extended BCCH presence */ - /* FIXME: Check for CCCH_CONF */ - /* FIXME: Check for BS_PA_MFRMS: update paging */ - - return 0; -} -#endif - static int activate_rf_compl_cb(struct gsm_bts_trx *trx, struct msgb *resp, void *data) { diff --git a/src/osmo-bts-litecell15/oml.c b/src/osmo-bts-litecell15/oml.c index 634c236..8fdf136 100644 --- a/src/osmo-bts-litecell15/oml.c +++ b/src/osmo-bts-litecell15/oml.c @@ -1024,8 +1024,7 @@ lch_par->rach.u8Bsic = lchan->ts->trx->bts->bsic; break; case GsmL1_Sapi_Agch: -#warning Set BS_AG_BLKS_RES - lch_par->agch.u8NbrOfAgch = 1; + lch_par->agch.u8NbrOfAgch = num_agch(lchan->ts->trx); break; case GsmL1_Sapi_TchH: case GsmL1_Sapi_TchF: diff --git a/src/osmo-bts-octphy/l1_if.c b/src/osmo-bts-octphy/l1_if.c index c4105ac..2f28cd6 100644 --- a/src/osmo-bts-octphy/l1_if.c +++ b/src/osmo-bts-octphy/l1_if.c @@ -487,6 +487,8 @@ sapi = cOCTVC1_GSM_SAPI_ENUM_BCCH; } else if (L1SAP_IS_CHAN_AGCH_PCH(chan_nr)) { #warning Set BS_AG_BLKS_RES + /* FIXME: how does octphy differentiate between AGCH and PCH? + How to supply num_of_agch properly? */ sapi = cOCTVC1_GSM_SAPI_ENUM_PCH_AGCH; } else { LOGP(DL1C, LOGL_NOTICE, "unknown prim %d op %d " diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 11a5729..d215357 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -1134,22 +1134,6 @@ return l1if_handle_ind(fl1h, msg); } -#if 0 -/* called by RSL if the BCCH SI has been modified */ -int sysinfo_has_changed(struct gsm_bts *bts, int si) -{ - /* FIXME: Determine BS_AG_BLKS_RES and - * * set cfgParams.u.agch.u8NbrOfAgch - * * determine implications on paging - */ - /* FIXME: Check for Extended BCCH presence */ - /* FIXME: Check for CCCH_CONF */ - /* FIXME: Check for BS_PA_MFRMS: update paging */ - - return 0; -} -#endif - static int activate_rf_compl_cb(struct gsm_bts_trx *trx, struct msgb *resp, void *data) { diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c index c1f1e0b..e7e7690 100644 --- a/src/osmo-bts-sysmo/oml.c +++ b/src/osmo-bts-sysmo/oml.c @@ -1039,8 +1039,7 @@ lch_par->rach.u8Bsic = lchan->ts->trx->bts->bsic; break; case GsmL1_Sapi_Agch: -#warning Set BS_AG_BLKS_RES - lch_par->agch.u8NbrOfAgch = 1; + lch_par->agch.u8NbrOfAgch = num_agch(lchan->ts->trx); break; case GsmL1_Sapi_TchH: case GsmL1_Sapi_TchF: -- To view, visit https://gerrit.osmocom.org/1047 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib9e0705234ef53d2c70bea6b6dd542176e58145d Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed Oct 12 15:58:37 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 12 Oct 2016 15:58:37 +0000 Subject: [PATCH] osmo-bts[master]: octphy: set tx attenuation via VTY 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/905 to look at the new patch set (#10). 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, 25 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/05/905/10 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 74853bf..41f5bc2 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..fc0923d 100644 --- a/src/osmo-bts-octphy/octphy_vty.c +++ b/src/osmo-bts-octphy/octphy_vty.c @@ -136,9 +136,9 @@ } 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 "use either oml attribute value or specified tx-attenuation (quarter-dB)\n" + "oml or tx-attenuation in quarter-dB\n") { struct phy_link *plink = vty->index; @@ -148,7 +148,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 +207,14 @@ 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: 10 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 Wed Oct 12 16:27:25 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 12 Oct 2016 16:27:25 +0000 Subject: [PATCH] osmo-bts[master]: DTX DL: use FSM for AMR 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/1030 to look at the new patch set (#6). DTX DL: use FSM for AMR Use dedicated FSM to handle all DTX DL related events: - add explicit checks if DTX DL is enabled (fixes regression for non-DTX setup introduced in 654175f33bd412671e3ef8cdd65c0689d10f278c) - fix handling of AMR CMI for SPEECH frames - add FSM for DTX DL - sync with corresponding changes in OpenBSC's - handle FACCH-related DTX ONSET events This affects both lc15 and sysmobts and requires corresponding change in OpenBSC (Change-Id: Idac8609faf9b5ced818fde899ccfc6ed0c42e8fd). Change-Id: I74a0b42cb34d525b8a70d264135e82994ca70d31 --- M include/osmo-bts/Makefile.am A include/osmo-bts/dtx_dl_amr_fsm.h M include/osmo-bts/msg_utils.h M src/common/Makefile.am A src/common/dtx_dl_amr_fsm.c M src/common/l1sap.c M src/common/msg_utils.c M src/common/rsl.c M src/osmo-bts-litecell15/l1_if.c M src/osmo-bts-litecell15/l1_if.h M src/osmo-bts-litecell15/tch.c M src/osmo-bts-sysmo/l1_if.c M src/osmo-bts-sysmo/l1_if.h M src/osmo-bts-sysmo/tch.c 14 files changed, 684 insertions(+), 147 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/30/1030/6 diff --git a/include/osmo-bts/Makefile.am b/include/osmo-bts/Makefile.am index d0b55ff..ef4165f 100644 --- a/include/osmo-bts/Makefile.am +++ b/include/osmo-bts/Makefile.am @@ -1,4 +1,5 @@ noinst_HEADERS = abis.h bts.h bts_model.h gsm_data.h logging.h measurement.h \ oml.h paging.h rsl.h signal.h vty.h amr.h pcu_if.h pcuif_proto.h \ handover.h msg_utils.h tx_power.h control_if.h cbch.h l1sap.h \ - power_control.h scheduler.h scheduler_backend.h phy_link.h + power_control.h scheduler.h scheduler_backend.h phy_link.h \ + dtx_dl_amr_fsm.h diff --git a/include/osmo-bts/dtx_dl_amr_fsm.h b/include/osmo-bts/dtx_dl_amr_fsm.h new file mode 100644 index 0000000..8b19595 --- /dev/null +++ b/include/osmo-bts/dtx_dl_amr_fsm.h @@ -0,0 +1,35 @@ +#pragma once + +#include +#include +#include + +/* DTX DL AMR FSM */ + +#define X(s) (1 << (s)) + +enum dtx_dl_amr_fsm_states { + ST_VOICE, + ST_SID_F1, + ST_SID_F2, + ST_F1_INH, + ST_U_INH, + ST_SID_U, + ST_ONSET_V, + ST_ONSET_F, + ST_FACCH_V, + ST_FACCH, +}; + +enum dtx_dl_amr_fsm_events { + E_VOICE, + E_ONSET, + E_FACCH, + E_COMPL, + E_INHIB, + E_SID_F, + E_SID_U, +}; + +extern const struct value_string dtx_dl_amr_fsm_event_names[]; +extern struct osmo_fsm dtx_dl_amr_fsm; diff --git a/include/osmo-bts/msg_utils.h b/include/osmo-bts/msg_utils.h index f99f3c4..31bd172 100644 --- a/include/osmo-bts/msg_utils.h +++ b/include/osmo-bts/msg_utils.h @@ -26,12 +26,11 @@ }; void lchan_set_marker(bool t, struct gsm_lchan *lchan); -void save_last_sid(struct gsm_lchan *lchan, const uint8_t *l1_payload, - size_t length, uint32_t fn, int update, uint8_t cmr, - int8_t cmi); -int dtx_amr_check_onset(struct gsm_lchan *lchan, const uint8_t *rtp_pl, +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, size_t rtp_pl_len, uint32_t fn, uint8_t *l1_payload, - uint8_t *ft_out); + bool marker, uint8_t *len, uint8_t *ft_out); uint8_t repeat_last_sid(struct gsm_lchan *lchan, uint8_t *dst, uint32_t fn); int msg_verify_ipa_structure(struct msgb *msg); int msg_verify_oml_structure(struct msgb *msg); diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 856f741..dd368d0 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -7,6 +7,7 @@ rsl.c vty.c paging.c measurement.c amr.c lchan.c \ load_indication.c pcu_sock.c handover.c msg_utils.c \ tx_power.c bts_ctrl_commands.c bts_ctrl_lookup.c \ - l1sap.c cbch.c power_control.c main.c phy_link.c + l1sap.c cbch.c power_control.c main.c phy_link.c \ + dtx_dl_amr_fsm.c libl1sched_a_SOURCES = scheduler.c diff --git a/src/common/dtx_dl_amr_fsm.c b/src/common/dtx_dl_amr_fsm.c new file mode 100644 index 0000000..b110cf2 --- /dev/null +++ b/src/common/dtx_dl_amr_fsm.c @@ -0,0 +1,320 @@ +/* DTX DL AMR FSM */ + +/* (C) 2016 by 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 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 . + * + */ + +#include +#include + +void dtx_fsm_voice(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_VOICE: + case E_FACCH: + break; + case E_SID_F: + case E_SID_U: + osmo_fsm_inst_state_chg(fi, ST_SID_F1, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Inexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_sid_f1(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_F: +/* FIXME: what shall we do if we get SID-FIRST _again_ (twice in a row)? + 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); + 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); + break; + case E_COMPL: + 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); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_sid_f2(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_U: + 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); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_f1_inh(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_u_inh(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 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) { + 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_INHIB: + osmo_fsm_inst_state_chg(fi, ST_U_INH, 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_onset_v(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_U: + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_FACCH_V, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_onset_f(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_U: + 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_FACCH, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_facch_v(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_FACCH: + break; + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); + break; + case E_SID_U: + break; + case E_SID_F: + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_facch(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_FACCH: + break; + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); + break; + case E_SID_U: + case E_SID_F: + osmo_fsm_inst_state_chg(fi, ST_SID_F1, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +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), + .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_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), + .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), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_ONSET_F), + .name = "SID-FIRST (P2)", + .action = dtx_fsm_sid_f2, + }, + /* SID-FIRST Inhibited: + incoming SPEECH or FACCH (only for AMR HR) */ + [ST_F1_INH]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), + .name = "SID-FIRST (Inh)", + .action = dtx_fsm_f1_inh, + }, + /* SID-UPDATE Inhibited: + incoming SPEECH or FACCH (only for AMR HR) */ + [ST_U_INH]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), + .name = "SID-UPDATE (Inh)", + .action = dtx_fsm_u_inh, + }, + /* 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", + .action = dtx_fsm_sid_upd, + }, + /* ONSET - end of silent period due to incoming SPEECH frame */ + [ST_ONSET_V]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), + .name = "ONSET (SPEECH)", + .action = dtx_fsm_onset_v, + }, + /* ONSET - end of silent period due to incoming FACCH frame */ + [ST_ONSET_F]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH) | X(E_SID_U), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH), + .name = "ONSET (FACCH)", + .action = dtx_fsm_onset_f, + }, + /* FACCH sending state: SPEECH was observed before so once we're done + FSM should get back to VOICE state */ + [ST_FACCH_V]= { + .in_event_mask = X(E_FACCH) | X(E_VOICE) | X(E_SID_U) | X(E_SID_F), + .out_state_mask = X(ST_FACCH_V) | X(ST_VOICE) | X(ST_SID_F1), + .name = "FACCH (SPEECH)", + .action = dtx_fsm_facch_v, + }, + /* FACCH sending state: no SPEECH was observed before so once we're done + FSM should get back to silent period via SID-FIRST */ + [ST_FACCH]= { + .in_event_mask = X(E_FACCH) | X(E_VOICE) | X(E_SID_U) | X(E_SID_F), + .out_state_mask = X(ST_FACCH_V) | X(ST_VOICE) | X(ST_SID_F1), + .name = "FACCH", + .action = dtx_fsm_facch, + }, +}; + +const struct value_string dtx_dl_amr_fsm_event_names[] = { + { E_VOICE, "Voice" }, + { E_FACCH, "FACCH" }, + { E_COMPL, "Complete P1 -> P2" }, + { E_INHIB, "Inhibit" }, + { E_SID_F, "SID-FIRST" }, + { E_SID_U, "SID-UPDATE" }, + { 0, NULL } +}; + +struct osmo_fsm dtx_dl_amr_fsm = { + .name = "DTX DL AMR FSM", + .states = dtx_dl_amr_fsm_states, + .num_states = ARRAY_SIZE(dtx_dl_amr_fsm_states), + .event_names = dtx_dl_amr_fsm_event_names, + .log_subsys = DL1C, +}; diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 943bdfe..9c783df 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -528,6 +529,7 @@ uint8_t *p, *si; struct lapdm_entity *le; struct osmo_phsap_prim pp; + bool dtxd_facch = false; int rc; chan_nr = rts_ind->chan_nr; @@ -582,8 +584,11 @@ p[0] = lchan->ms_power_ctrl.current; p[1] = lchan->rqd_ta; le = &lchan->lapdm_ch.lapdm_acch; - } else + } else { + if (lchan->ts->trx->bts->dtxd) + dtxd_facch = true; le = &lchan->lapdm_ch.lapdm_dcch; + } rc = lapdm_phsap_dequeue_prim(le, &pp); if (rc < 0) { if (L1SAP_IS_LINK_SACCH(link_id)) { @@ -609,6 +614,10 @@ memcpy(p, pp.oph.msg->data, GSM_MACBLOCK_LEN); /* check if it is a RR CIPH MODE CMD. if yes, enable RX ciphering */ check_for_ciph_cmd(pp.oph.msg, lchan, chan_nr); + if (dtxd_facch && lchan->tch.dtx.dl_amr_fsm) + osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, + E_FACCH, + (void *)lchan); } msgb_free(pp.oph.msg); } @@ -1136,14 +1145,27 @@ rc = l1sap_chan_act_dact_modify(trx, chan_nr, PRIM_INFO_ACTIVATE, 0); if (rc) return -RSL_ERR_EQUIPMENT_FAIL; + + /* Init DTX DL FSM if necessary */ + //FIXME: only do it for AMR TCH/* + osmo_fsm_register(&dtx_dl_amr_fsm); + lchan->tch.dtx.dl_amr_fsm = osmo_fsm_inst_alloc(&dtx_dl_amr_fsm, + tall_bts_ctx, lchan, + LOGL_DEBUG, lchan->name); return 0; } int l1sap_chan_rel(struct gsm_bts_trx *trx, uint8_t chan_nr) { + struct gsm_lchan *lchan = get_lchan_by_chan_nr(trx, chan_nr); LOGP(DL1P, LOGL_INFO, "deactivating channel chan_nr=0x%02x trx=%d\n", chan_nr, trx->nr); + if (lchan->tch.dtx.dl_amr_fsm) { + osmo_fsm_inst_free(lchan->tch.dtx.dl_amr_fsm); + lchan->tch.dtx.dl_amr_fsm = NULL; + } + return l1sap_chan_act_dact_modify(trx, chan_nr, PRIM_INFO_DEACTIVATE, 0); } diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 99a211f..f9853c5 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -17,6 +17,7 @@ * */ +#include #include #include #include @@ -26,6 +27,7 @@ #include #include #include +#include #include #include @@ -92,13 +94,12 @@ void lchan_set_marker(bool t, struct gsm_lchan *lchan) { if (t) - lchan->tch.ul_sid = true; - else if (lchan->tch.ul_sid) { - lchan->tch.ul_sid = false; + lchan->tch.dtx.ul_sid = true; + else if (lchan->tch.dtx.ul_sid) { + lchan->tch.dtx.ul_sid = false; lchan->rtp_tx_marker = true; } } - /*! \brief Store the last SID frame in lchan context * \param[in] lchan Logical channel on which we check scheduling @@ -106,76 +107,106 @@ * \param[in] length length of l1_payload * \param[in] fn Frame Number for which we check scheduling * \param[in] update 0 if SID_FIRST, 1 if SID_UPDATE, -1 if not AMR SID - * \param[in] cmr Codec Mode Request (AMR-specific, ignored otherwise) - * \param[in] cmi Codec Mode Indication (AMR-specific, ignored otherwise) */ -void save_last_sid(struct gsm_lchan *lchan, const uint8_t *l1_payload, - size_t length, uint32_t fn, int update, uint8_t cmr, - int8_t cmi) +void dtx_cache_payload(struct gsm_lchan *lchan, const uint8_t *l1_payload, + size_t length, uint32_t fn, int update) { size_t amr = (update < 0) ? 0 : 2, - copy_len = OSMO_MIN(length + 1, ARRAY_SIZE(lchan->tch.last_sid.buf)); + copy_len = OSMO_MIN(length + 1, ARRAY_SIZE(lchan->tch.dtx.cache)); - lchan->tch.last_sid.len = copy_len + amr; - lchan->tch.last_sid.fn = fn; - lchan->tch.last_sid.is_update = update; + lchan->tch.dtx.len = copy_len + amr; + lchan->tch.dtx.fn = fn; + lchan->tch.dtx.is_update = update; - if (amr) - amr_set_mode_pref(lchan->tch.last_sid.buf, &lchan->tch.amr_mr, - cmi, cmr); - memcpy(lchan->tch.last_sid.buf + amr, l1_payload, copy_len); + memcpy(lchan->tch.dtx.cache + amr, l1_payload, copy_len); } -/*! \brief Check current and cached SID to decide if talkspurt takes place +/*! \brief Check current state of DTX DL AMR FSM and dispatch necessary events * \param[in] lchan Logical channel on which we check scheduling * \param[in] rtp_pl buffer with RTP data * \param[in] rtp_pl_len length of rtp_pl * \param[in] fn Frame Number for which we check scheduling * \param[in] l1_payload buffer where CMR and CMI prefix should be added + * \param[out] len Length of expected L1 payload * \param[out] ft_out Frame Type to be populated after decoding - * \returns 0 if frame should be send immediately (2 byte CMR,CMI prefix added: - * caller must adjust length as necessary), - * 1 if ONSET event is detected - * negative if no sending is necessary (either error or cached SID - * UPDATE) + * \returns 0 in case of success; negative on error */ -int dtx_amr_check_onset(struct gsm_lchan *lchan, const uint8_t *rtp_pl, +int dtx_dl_amr_fsm_step(struct gsm_lchan *lchan, const uint8_t *rtp_pl, size_t rtp_pl_len, uint32_t fn, uint8_t *l1_payload, - uint8_t *ft_out) + bool marker, uint8_t *len, uint8_t *ft_out) { uint8_t cmr; enum osmo_amr_type ft; enum osmo_amr_quality bfi; int8_t sti, cmi; - osmo_amr_rtp_dec(rtp_pl, rtp_pl_len, &cmr, &cmi, &ft, &bfi, &sti); - *ft_out = ft; /* only needed for old sysmo firmware */ + int rc; - if (ft == AMR_SID) { - save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, sti, cmr, cmi); - if (sti) /* SID_UPDATE should be cached and send later */ - return -EAGAIN; - else { /* SID_FIRST - cached and send right away */ - amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi, - cmr); - return 0; - } + if (rtp_pl == NULL) { /* SID-FIRST P1 -> P2 */ + *len = 3; + memcpy(l1_payload, lchan->tch.dtx.cache, 2); + osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, E_COMPL, + (void *)lchan); + return 0; } - if (ft != AMR_NO_DATA && !osmo_amr_is_speech(ft)) { + 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); + return rc; + } + + /* only needed for old sysmo firmware: */ + *ft_out = ft; + + /* CMI in downlink tells the L1 encoder which encoding function + * it will use, so we have to use the frame type */ + if (osmo_amr_is_speech(ft)) + cmi = ft; + + /* populate L1 payload with CMR/CMI - might be ignored by caller: */ + amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi, cmr); + + /* populate DTX cache with CMR/CMI - overwrite cache which will be + either updated or invalidated by caller anyway: */ + amr_set_mode_pref(lchan->tch.dtx.cache, &lchan->tch.amr_mr, cmi, cmr); + *len = 3 + rtp_pl_len; + + /* DTX DL is not enabled, move along */ + if (!lchan->ts->trx->bts->dtxd) + return 0; + + if (osmo_amr_is_speech(ft)) { + if (lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F1 || + lchan->tch.dtx.dl_amr_fsm->state == ST_SID_U) /* AMR HR */ + if (lchan->type == GSM_LCHAN_TCH_H && marker) + return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, + E_INHIB, + (void *)lchan); + /* AMR FR */ + if (marker && lchan->tch.dtx.dl_amr_fsm->state == ST_SID_U) + 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 (ft == AMR_SID) { + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, sti); + return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, + sti ? E_SID_U : E_SID_F, + (void *)lchan); + } + + if (ft != AMR_NO_DATA) { LOGP(DRTP, LOGL_ERROR, "unsupported AMR FT 0x%02x\n", ft); return -ENOTSUP; } - if (osmo_amr_is_speech(ft)) { - if (lchan->tch.last_sid.len) { /* force ONSET */ - lchan->tch.last_sid.len = 0; - return 1; - } - /* We received AMR SPEECH frame - invalidate saved SID */ - lchan->tch.last_sid.len = 0; - amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi, cmr); - } - + if (marker) + osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, E_VOICE, + (void *)lchan); + *len = 0; return 0; } @@ -188,10 +219,10 @@ uint32_t fn) { /* Compute approx. time delta based on Fn duration */ - uint32_t delta = GSM_FN_TO_MS(fn - lchan->tch.last_sid.fn); + uint32_t delta = GSM_FN_TO_MS(fn - lchan->tch.dtx.fn); /* according to 3GPP TS 26.093 A.5.1.1: */ - if (lchan->tch.last_sid.is_update) { + if (lchan->tch.dtx.is_update) { /* SID UPDATE should be repeated every 8th RTP frame */ if (delta < GSM_RTP_FRAME_DURATION_MS * 8) return true; @@ -252,10 +283,10 @@ if (dtx_amr_sid_optional(lchan, fn)) return 0; - if (lchan->tch.last_sid.len) { - memcpy(dst, lchan->tch.last_sid.buf, lchan->tch.last_sid.len); - lchan->tch.last_sid.fn = fn; - return lchan->tch.last_sid.len + 1; + if (lchan->tch.dtx.len) { + memcpy(dst, lchan->tch.dtx.cache, lchan->tch.dtx.len); + lchan->tch.dtx.fn = fn; + return lchan->tch.dtx.len + 1; } LOGP(DL1C, LOGL_DEBUG, "Have to send %s frame on TCH but SID buffer " diff --git a/src/common/rsl.c b/src/common/rsl.c index 493ff3b..00525ca 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -2185,9 +2185,9 @@ msgb_tv_put(msg, RSL_IE_MEAS_RES_NR, lchan->meas.res_nr++); size_t ie_len = gsm0858_rsl_ul_meas_enc(&lchan->meas.ul_res, - lchan->tch.dtxd_active, + lchan->tch.dtx.dl_active, meas_res); - lchan->tch.dtxd_active = false; + lchan->tch.dtx.dl_active = false; if (ie_len >= 3) { msgb_tlv_put(msg, RSL_IE_UPLINK_MEAS, ie_len, meas_res); lchan->meas.flags &= ~LC_UL_M_F_RES_VALID; diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index a4378c1..16aeabb 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -432,7 +432,7 @@ } static int ph_tch_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache, bool marker) { struct lc15l1_hdl *fl1 = trx_lc15l1_hdl(trx); struct gsm_lchan *lchan; @@ -468,7 +468,7 @@ rc = l1if_tch_encode(lchan, l1p->u.phDataReq.msgUnitParam.u8Buffer, &l1p->u.phDataReq.msgUnitParam.u8Size, - msg->data, msg->len, u32Fn, + msg->data, msg->len, u32Fn, use_cache, l1sap->u.tch.marker); if (rc < 0) { /* no data encoded for L1: smth will be generated below */ @@ -500,16 +500,14 @@ } else { /* empty frame */ if (trx->bts->dtxd && trx != trx->bts->c0) - lchan->tch.dtxd_active = true; + lchan->tch.dtx.dl_active = true; empty_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr); } /* send message to DSP's queue */ osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], nmsg); - if (l1sap->u.tch.marker) { /* DTX: send voice after ONSET was sent */ - l1sap->u.tch.marker = 0; - return ph_tch_req(trx, l1sap->oph.msg, l1sap); - } + if (rc > 0 && trx->bts->dtxd) /* DTX: send voice after ONSET was sent */ + return ph_tch_req(trx, l1sap->oph.msg, l1sap, true, false); return 0; } @@ -577,7 +575,7 @@ rc = ph_data_req(trx, msg, l1sap); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): - rc = ph_tch_req(trx, msg, l1sap); + rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); break; case OSMO_PRIM(PRIM_MPH_INFO, PRIM_OP_REQUEST): rc = mph_info_req(trx, msg, l1sap); diff --git a/src/osmo-bts-litecell15/l1_if.h b/src/osmo-bts-litecell15/l1_if.h index adb197d..7feee56 100644 --- a/src/osmo-bts-litecell15/l1_if.h +++ b/src/osmo-bts-litecell15/l1_if.h @@ -90,8 +90,8 @@ /* tch.c */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, - bool marker); + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker); int l1if_tch_rx(struct gsm_bts_trx *trx, uint8_t chan_nr, struct msgb *l1p_msg); int l1if_tch_fill(struct gsm_lchan *lchan, uint8_t *l1_buffer); struct msgb *gen_empty_tch_msg(struct gsm_lchan *lchan, uint32_t fn); diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index e246ffb..b251388 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -198,8 +199,7 @@ * \returns number of \a l1_payload bytes filled */ static int rtppayload_to_l1_amr(uint8_t *l1_payload, const uint8_t *rtp_payload, - uint8_t payload_len, - struct gsm_lchan *lchan, uint8_t ft) + uint8_t payload_len, uint8_t ft) { memcpy(l1_payload, rtp_payload, payload_len); return payload_len; @@ -210,10 +210,11 @@ /*! \brief function for incoming RTP via TCH.req * \param[in] rtp_pl buffer containing RTP payload * \param[in] rtp_pl_len length of \a rtp_pl + * \param[in] use_cache Use cached payload instead of parsing RTP * \param[in] marker RTP header Marker bit (indicates speech onset) * \returns 0 if encoding result can be sent further to L1 without extra actions * positive value if data is ready AND extra actions are required - * negative value otherwise + * negative value otherwise (no data for L1 encoded) * * This function prepares a msgb with a L1 PH-DATA.req primitive and * queues it into lchan->dl_tch_queue. @@ -223,7 +224,8 @@ * pre-fill the primtive. */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, bool marker) + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker) { uint8_t *payload_type; uint8_t *l1_payload, ft; @@ -242,17 +244,17 @@ *payload_type = GsmL1_TchPlType_Fr; rc = rtppayload_to_l1_fr(l1_payload, rtp_pl, rtp_pl_len); - if (rc) + if (rc && lchan->ts->trx->bts->dtxd) is_sid = osmo_fr_check_sid(rtp_pl, rtp_pl_len); } else{ *payload_type = GsmL1_TchPlType_Hr; rc = rtppayload_to_l1_hr(l1_payload, rtp_pl, rtp_pl_len); - if (rc) + if (rc && lchan->ts->trx->bts->dtxd) is_sid = osmo_hr_check_sid(rtp_pl, rtp_pl_len); } if (is_sid) - save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, -1, 0, 0); + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, -1); break; case GSM48_CMODE_SPEECH_EFR: *payload_type = GsmL1_TchPlType_Efr; @@ -261,25 +263,75 @@ /* FIXME: detect and save EFR SID */ break; case GSM48_CMODE_SPEECH_AMR: - rc = dtx_amr_check_onset(lchan, rtp_pl, rtp_pl_len, fn, - l1_payload, &ft); - - if (marker || rc > 0) { - *payload_type = GsmL1_TchPlType_Amr_Onset; - *len = 1; - if (rc != 0) { - LOGP(DRTP, LOGL_NOTICE, "%s SPEECH frame without" - " Marker: ONSET forced\n", - get_value_string(osmo_amr_type_names, ft)); - return rc; - } - LOGP(DRTP, LOGL_DEBUG, "%s SPEECH frame with Marker\n", - get_value_string(osmo_amr_type_names, ft)); - } - else { + if (use_cache) { *payload_type = GsmL1_TchPlType_Amr; - rc = 2 + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, - rtp_pl_len, lchan, ft); + rtppayload_to_l1_amr(l1_payload, lchan->tch.dtx.cache, + lchan->tch.dtx.len, ft); + *len = lchan->tch.dtx.len + 1; + return 0; + } + + rc = dtx_dl_amr_fsm_step(lchan, rtp_pl, rtp_pl_len, fn, + l1_payload, marker, len, &ft); + if (rc < 0) + return rc; + if (!lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + } + + /* DTX DL-specific logic below: */ + switch (lchan->tch.dtx.dl_amr_fsm->state) { + case ST_ONSET_V: + case ST_ONSET_F: + *payload_type = GsmL1_TchPlType_Amr_Onset; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + *len = 1; + return 1; + case ST_VOICE: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F1: + if (lchan->type == GSM_LCHAN_TCH_H) { /* AMR HR */ + *payload_type = GsmL1_TchPlType_Amr_SidFirstP1; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, + rtp_pl_len, ft); + return 0; + } + /* AMR FR */ + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F2: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_F1_INH: + *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: + *payload_type = GsmL1_TchPlType_Amr_SidUpdateInH; + *len = 3; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + return 1; + case ST_SID_U: + return -EAGAIN; + case ST_FACCH_V: + case ST_FACCH: + /* FIXME: if this possible at all? */ + return 0; + default: + LOGP(DRTP, LOGL_ERROR, "Unhandled DTX DL AMR FSM state " + "%d\n", lchan->tch.dtx.dl_amr_fsm->state); + return -EINVAL; } break; default: @@ -442,7 +494,20 @@ switch (lchan->tch_mode) { case GSM48_CMODE_SPEECH_AMR: - *payload_type = GsmL1_TchPlType_Amr; + if (lchan->type == GSM_LCHAN_TCH_H && + lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F1 && + lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr_SidFirstP2; + rc = dtx_dl_amr_fsm_step(lchan, NULL, 0, fn, l1_payload, + false, &(msu_param->u8Size), + NULL); + if (rc < 0) { + msgb_free(msg); + return NULL; + } + return msg; + } else + *payload_type = GsmL1_TchPlType_Amr; break; case GSM48_CMODE_SPEECH_V1: if (lchan->type == GSM_LCHAN_TCH_F) @@ -458,12 +523,13 @@ return NULL; } - rc = repeat_last_sid(lchan, l1_payload, fn); - if (!rc) { - msgb_free(msg); - return NULL; + if (lchan->ts->trx->bts->dtxd) { + rc = repeat_last_sid(lchan, l1_payload, fn); + if (!rc) { + msgb_free(msg); + return NULL; + } + msu_param->u8Size = rc; } - msu_param->u8Size = rc; - return msg; } diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 09627af..c3f7c73 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -427,7 +427,7 @@ } static int ph_tch_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache, bool marker) { struct femtol1_hdl *fl1 = trx_femtol1_hdl(trx); struct gsm_lchan *lchan; @@ -463,7 +463,7 @@ rc = l1if_tch_encode(lchan, l1p->u.phDataReq.msgUnitParam.u8Buffer, &l1p->u.phDataReq.msgUnitParam.u8Size, - msg->data, msg->len, u32Fn, + msg->data, msg->len, u32Fn, use_cache, l1sap->u.tch.marker); if (rc < 0) { /* no data encoded for L1: smth will be generated below */ @@ -495,16 +495,14 @@ } else { /* empty frame */ if (trx->bts->dtxd && trx != trx->bts->c0) - lchan->tch.dtxd_active = true; + lchan->tch.dtx.dl_active = true; empty_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr); } /* send message to DSP's queue */ osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], nmsg); - if (l1sap->u.tch.marker) { /* DTX: send voice after ONSET was sent */ - l1sap->u.tch.marker = 0; - return ph_tch_req(trx, l1sap->oph.msg, l1sap); - } + if (rc > 0 && trx->bts->dtxd) /* DTX: send voice after ONSET was sent */ + return ph_tch_req(trx, l1sap->oph.msg, l1sap, true, false); return 0; } @@ -572,7 +570,7 @@ rc = ph_data_req(trx, msg, l1sap); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): - rc = ph_tch_req(trx, msg, l1sap); + rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); break; case OSMO_PRIM(PRIM_MPH_INFO, PRIM_OP_REQUEST): rc = mph_info_req(trx, msg, l1sap); diff --git a/src/osmo-bts-sysmo/l1_if.h b/src/osmo-bts-sysmo/l1_if.h index ece7a01..0dc919b 100644 --- a/src/osmo-bts-sysmo/l1_if.h +++ b/src/osmo-bts-sysmo/l1_if.h @@ -110,8 +110,8 @@ /* tch.c */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, - bool marker); + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker); int l1if_tch_rx(struct gsm_bts_trx *trx, uint8_t chan_nr, struct msgb *l1p_msg); int l1if_tch_fill(struct gsm_lchan *lchan, uint8_t *l1_buffer); struct msgb *gen_empty_tch_msg(struct gsm_lchan *lchan, uint32_t fn); diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index ca9045e..b08ba7e 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -281,8 +282,7 @@ * \returns number of \a l1_payload bytes filled */ static int rtppayload_to_l1_amr(uint8_t *l1_payload, const uint8_t *rtp_payload, - uint8_t payload_len, - struct gsm_lchan *lchan, uint8_t ft) + uint8_t payload_len, uint8_t ft) { #ifdef USE_L1_RTP_MODE memcpy(l1_payload, rtp_payload, payload_len); @@ -306,10 +306,11 @@ /*! \brief function for incoming RTP via TCH.req * \param[in] rtp_pl buffer containing RTP payload * \param[in] rtp_pl_len length of \a rtp_pl + * \param[in] use_cache Use cached payload instead of parsing RTP * \param[in] marker RTP header Marker bit (indicates speech onset) * \returns 0 if encoding result can be sent further to L1 without extra actions * positive value if data is ready AND extra actions are required - * negative value otherwise + * negative value otherwise (no data for L1 encoded) * * This function prepares a msgb with a L1 PH-DATA.req primitive and * queues it into lchan->dl_tch_queue. @@ -319,7 +320,8 @@ * pre-fill the primtive. */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, bool marker) + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker) { uint8_t *payload_type; uint8_t *l1_payload, ft; @@ -338,17 +340,17 @@ *payload_type = GsmL1_TchPlType_Fr; rc = rtppayload_to_l1_fr(l1_payload, rtp_pl, rtp_pl_len); - if (rc) + if (rc && lchan->ts->trx->bts->dtxd) is_sid = osmo_fr_check_sid(rtp_pl, rtp_pl_len); } else{ *payload_type = GsmL1_TchPlType_Hr; rc = rtppayload_to_l1_hr(l1_payload, rtp_pl, rtp_pl_len); - if (rc) + if (rc && lchan->ts->trx->bts->dtxd) is_sid = osmo_hr_check_sid(rtp_pl, rtp_pl_len); } if (is_sid) - save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, -1, 0, 0); + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, -1); break; #if defined(L1_HAS_EFR) && defined(USE_L1_RTP_MODE) case GSM48_CMODE_SPEECH_EFR: @@ -359,25 +361,75 @@ break; #endif case GSM48_CMODE_SPEECH_AMR: - rc = dtx_amr_check_onset(lchan, rtp_pl, rtp_pl_len, fn, - l1_payload, &ft); - - if (marker || rc > 0) { - *payload_type = GsmL1_TchPlType_Amr_Onset; - *len = 1; - if (rc != 0) { - LOGP(DRTP, LOGL_NOTICE, "%s SPEECH frame without" - " Marker: ONSET forced\n", - get_value_string(osmo_amr_type_names, ft)); - return rc; - } - LOGP(DRTP, LOGL_DEBUG, "%s SPEECH frame with Marker\n", - get_value_string(osmo_amr_type_names, ft)); - } - else { + if (use_cache) { *payload_type = GsmL1_TchPlType_Amr; - rc = 2 + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, - rtp_pl_len, lchan, ft); + rtppayload_to_l1_amr(l1_payload, lchan->tch.dtx.cache, + lchan->tch.dtx.len, ft); + *len = lchan->tch.dtx.len + 1; + return 0; + } + + rc = dtx_dl_amr_fsm_step(lchan, rtp_pl, rtp_pl_len, fn, + l1_payload, marker, len, &ft); + if (rc < 0) + return rc; + if (!lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + } + + /* DTX DL-specific logic below: */ + switch (lchan->tch.dtx.dl_amr_fsm->state) { + case ST_ONSET_V: + case ST_ONSET_F: + *payload_type = GsmL1_TchPlType_Amr_Onset; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + *len = 1; + return 1; + case ST_VOICE: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F1: + if (lchan->type == GSM_LCHAN_TCH_H) { /* AMR HR */ + *payload_type = GsmL1_TchPlType_Amr_SidFirstP1; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, + rtp_pl_len, ft); + return 0; + } + /* AMR FR */ + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F2: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_F1_INH: + *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: + *payload_type = GsmL1_TchPlType_Amr_SidUpdateInH; + *len = 3; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + return 1; + case ST_SID_U: + return -EAGAIN; + case ST_FACCH_V: + case ST_FACCH: + /* FIXME: if this possible at all? */ + return 0; + default: + LOGP(DRTP, LOGL_ERROR, "Unhandled DTX DL AMR FSM state " + "%d\n", lchan->tch.dtx.dl_amr_fsm->state); + return -EINVAL; } break; default: @@ -544,7 +596,20 @@ switch (lchan->tch_mode) { case GSM48_CMODE_SPEECH_AMR: - *payload_type = GsmL1_TchPlType_Amr; + if (lchan->type == GSM_LCHAN_TCH_H && + lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F1 && + lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr_SidFirstP2; + rc = dtx_dl_amr_fsm_step(lchan, NULL, 0, fn, l1_payload, + false, &(msu_param->u8Size), + NULL); + if (rc < 0) { + msgb_free(msg); + return NULL; + } + return msg; + } else + *payload_type = GsmL1_TchPlType_Amr; break; case GSM48_CMODE_SPEECH_V1: if (lchan->type == GSM_LCHAN_TCH_F) @@ -560,12 +625,13 @@ return NULL; } - rc = repeat_last_sid(lchan, l1_payload, fn); - if (!rc) { - msgb_free(msg); - return NULL; + if (lchan->ts->trx->bts->dtxd) { + rc = repeat_last_sid(lchan, l1_payload, fn); + if (!rc) { + msgb_free(msg); + return NULL; + } + msu_param->u8Size = rc; } - msu_param->u8Size = rc; - return msg; } -- To view, visit https://gerrit.osmocom.org/1030 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I74a0b42cb34d525b8a70d264135e82994ca70d31 Gerrit-PatchSet: 6 Gerrit-Project: osmo-bts 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 Wed Oct 12 16:28:23 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 12 Oct 2016 16:28:23 +0000 Subject: osmo-bts[master]: DTX DL: use FSM for AMR In-Reply-To: References: Message-ID: Patch Set 4: (1 comment) Added comments for FSM states. https://gerrit.osmocom.org/#/c/1030/4/src/common/dtx_dl_amr_fsm.c File src/common/dtx_dl_amr_fsm.c: Line 229: .name = "Voice", > I think the state names could need a bit more verbosity, either in the name Done -- To view, visit https://gerrit.osmocom.org/1030 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I74a0b42cb34d525b8a70d264135e82994ca70d31 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 Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Oct 12 18:00:13 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 12 Oct 2016 18:00:13 +0000 Subject: libosmocore[master]: libosmocoding: migrate transcoding routines from OsmoBTS In-Reply-To: References: Message-ID: Patch Set 4: > i'd love to see progress on this, but without any of the subject > matter experts (tom, sylvain) providing review, it will not make > any progress, I'm afraid :/ Hi Harald! I asked Tom to help me with some questions. Maybe you know Piotr Krysik, the maintainer of GR-GSM. He already tested some common parts of this library in his project. xCCH, RACH and SCH are works fine. TCH is WIP. I am looking forward to the moment, when all related problems will be solved and the change will be merged. -- 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: 4 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 Wed Oct 12 18:03:37 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 12 Oct 2016 18:03:37 +0000 Subject: libosmocore[master]: utils/conv_gen.py: fix some typos In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/836 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3327b92715744af4ef61496ef0121555d9d24799 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-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Oct 12 18:04:43 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 12 Oct 2016 18:04:43 +0000 Subject: libosmocore[master]: gsm/gsm0503.h: fix typo In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/830 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I263d61111544eeb7227e1e0e8f2d14479eae2079 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-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Oct 12 19:10:14 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 12 Oct 2016 19:10:14 +0000 Subject: libosmo-abis[master]: Remove use of private oRTP function In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-2 > There's nothing to be raised with upstream, I think. You want to > remove access to a private API, and I agree we should try that. > However, then remove the select() based RTCP code completely and > rely on polling, and verify that it all still works. If it does, > we can marge such a patch [but not the current one]. Only if it > doensn't we indeed should talk to upstream. I was about to write the same. Max, if you want to move things forward do the full work and not just half of it. A patch like this with all good intentions is making it a lot worse than moving things forward. So what you changed is: * select the RTCP socket * If it is readable ignore it * Hope/Assume that reading from the RTP socket will try to read RTCP too (yes, it seems to do that even in old oRTP versions). BUT: Let's assume this case: * oRTP is send/recv * RTP is blocked by a firewall/bad masquerading * RTCP arrives.. Now RTCP will never be read and the select will always trigger.. making any user of this code spend 99% CPU time.. and now you, Harald and me have spent time with it. Try to understand how the code around is using this method, it is static which makes it a lot easier. -- To view, visit https://gerrit.osmocom.org/908 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iff1b15c68efca3e02267e0308142c6a7a0c2a974 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis 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 Oct 12 19:12:06 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 12 Oct 2016 19:12:06 +0000 Subject: libosmocore[master]: gsm/Makefile.am: use proper top_builddir/top_srcdir paths In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 (2 comments) https://gerrit.osmocom.org/#/c/1044/1//COMMIT_MSG Commit Message: Line 13: already present from a previous build inside the source directory. and make dist/distcheck will copy the built files into the srcball and make distcheck is our only srcdir!=builddir target. https://gerrit.osmocom.org/#/c/1044/1/src/gsm/Makefile.am File src/gsm/Makefile.am: Line 32: libgsmint_la_LIBADD = $(top_builddir)/src/libosmocore.la if you use $(builddir)/../ things might be easier to move in the future? -- To view, visit https://gerrit.osmocom.org/1044 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5a9b780ad4ba607ea39854dcf7207ed05f5447bc Gerrit-PatchSet: 1 Gerrit-Project: libosmocore 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 Wed Oct 12 19:12:56 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 12 Oct 2016 19:12:56 +0000 Subject: openbsc[master]: Log use of incompatible BS-AG-BLKS-RES value In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1043 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I53e2b881fc28472d6709f063fb265a4e6a0fffcd Gerrit-PatchSet: 1 Gerrit-Project: openbsc 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 Oct 12 19:14:41 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 12 Oct 2016 19:14:41 +0000 Subject: openggsn[master]: build: be robust against install-sh files above the root dir In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 wtf.. did I leave my "bogonen" (can't find the reference to the hitchhiker guide) energy in the office... -- To view, visit https://gerrit.osmocom.org/1015 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4aef311d7a475800e09f48110a499c3759c69f5d Gerrit-PatchSet: 1 Gerrit-Project: openggsn 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 Wed Oct 12 19:16:33 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 12 Oct 2016 19:16:33 +0000 Subject: openggsn[master]: gsn_restart file: set umask back to original after write fai... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/1014/1/gtp/gtp.c File gtp/gtp.c: Line 687: LOGP(DLGTP, LOGL_ERROR, the logp and the above too (didn't notice when doing the migration) could lead to a creation of a new logfile... so maybe it is better to do the restoration earlier and in all branches? -- To view, visit https://gerrit.osmocom.org/1014 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If7d948e2f2ba47ecebba5614f18235a53b273d14 Gerrit-PatchSet: 1 Gerrit-Project: openggsn 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 Wed Oct 12 19:16:46 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 12 Oct 2016 19:16:46 +0000 Subject: openggsn[master]: configure: check for pkg-config presence In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1016 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I658152eb24fd783fce9ceac35872ab918c80209a Gerrit-PatchSet: 1 Gerrit-Project: openggsn 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 Wed Oct 12 19:18:21 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 12 Oct 2016 19:18:21 +0000 Subject: openggsn[master]: fix gsn_restart file buffer overflow and missing path sep In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/1013/1/gtp/gtp.c File gtp/gtp.c: Line 650: RED... RED.. ? is that a good color? -- To view, visit https://gerrit.osmocom.org/1013 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idf0a64ff45720aa818f2f9de1e8ba2fe2c82631b Gerrit-PatchSet: 1 Gerrit-Project: openggsn 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 Wed Oct 12 19:20:37 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 12 Oct 2016 19:20:37 +0000 Subject: openbsc[master]: ussd: Add band-aid for interrogationSS In-Reply-To: References: Message-ID: Patch Set 4: @neels: ping? -- To view, visit https://gerrit.osmocom.org/503 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib0dc4485388f030eb172fe21f5327b7ab94751f5 Gerrit-PatchSet: 4 Gerrit-Project: openbsc 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 Wed Oct 12 19:22:42 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 12 Oct 2016 19:22:42 +0000 Subject: openbsc[master]: sndcp: Fixups for sndcp layer based on coverity-scan suggest... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 What are we waiting for? looks good. Haven't check if comp_...[] can uint overflow in it is usages.. -- To view, visit https://gerrit.osmocom.org/965 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4f9adf251f5119e67ffe76baad6f1f996ac8dbad Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: wax miguel Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Oct 12 22:50:21 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 22:50:21 +0000 Subject: libosmocore[master]: configure: add --enable-sanitize, use in jenkins.sh In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+2 applying positive feedback from hwelte (here) and hfreyther (private chat) -- To view, visit https://gerrit.osmocom.org/974 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idf7f46fa048608c2951f2473cb528f6c8dc2681d Gerrit-PatchSet: 5 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 Wed Oct 12 22:50:24 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 22:50:24 +0000 Subject: [MERGED] libosmocore[master]: configure: add --enable-sanitize, use in jenkins.sh In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: configure: add --enable-sanitize, use in jenkins.sh ...................................................................... configure: add --enable-sanitize, use in jenkins.sh --enable-sanitize adds address sanitizer CFLAGS/CPPFLAGS to the entire build. Also pass UBSAN_OPTIONS to the test suite run (only has effect during runtime). Add this flag to jenkins.sh's configure step. To ensure that we get the sanitize results, add 'make check' to jenkins to catch sanitize failures; Keep 'make distcheck' without ASAN; it has its own configure which omits --enable-sanitize. This way we test both with and without ASAN. Change-Id: Idf7f46fa048608c2951f2473cb528f6c8dc2681d --- M configure.ac M contrib/jenkins.sh 2 files changed, 15 insertions(+), 2 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index e3752b4..ea68839 100644 --- a/configure.ac +++ b/configure.ac @@ -202,6 +202,18 @@ AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort]) fi +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS+=" -fsanitize=address -fsanitize=undefined" + CPPFLAGS+=" -fsanitize=address -fsanitize=undefined" +fi + AC_OUTPUT( libosmocore.pc libosmocodec.pc diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index e5e17c8..108a73a 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -3,7 +3,8 @@ set -ex autoreconf --install --force -./configure --enable-static -$MAKE $PARALLEL_MAKE +./configure --enable-static --enable-sanitize +$MAKE $PARALLEL_MAKE check \ + || cat-testlogs.sh $MAKE distcheck \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/974 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idf7f46fa048608c2951f2473cb528f6c8dc2681d Gerrit-PatchSet: 6 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 Oct 12 22:50:24 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 22:50:24 +0000 Subject: [MERGED] libosmocore[master]: gsm/Makefile.am: use proper top_builddir/top_srcdir paths In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: gsm/Makefile.am: use proper top_builddir/top_srcdir paths ...................................................................... gsm/Makefile.am: use proper top_builddir/top_srcdir paths This fixes the conv*gen.c targets when building in a different directory than the source tree. Notably, building in a different dir worked when the generated sources were already present from a previous build inside the source directory. Change-Id: I5a9b780ad4ba607ea39854dcf7207ed05f5447bc --- M src/gsm/Makefile.am 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index a2f2524..2071413 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -29,7 +29,7 @@ milenage/milenage.c gan.c ipa.c gsm0341.c apn.c \ gsup.c gprs_gea.c libgsmint_la_LDFLAGS = -no-undefined -libgsmint_la_LIBADD = ../libosmocore.la +libgsmint_la_LIBADD = $(top_builddir)/src/libosmocore.la libosmogsm_la_SOURCES = libosmogsm_la_LDFLAGS = $(LTLDFLAGS_OSMOGSM) -version-info $(LIBVERSION) -no-undefined $(TALLOC_LIBS) @@ -37,5 +37,5 @@ EXTRA_DIST = libosmogsm.map -conv%gen.c: ../../utils/conv_gen.py - $(AM_V_GEN)python2 ../../utils/conv_gen.py +conv%gen.c: $(top_srcdir)/utils/conv_gen.py + $(AM_V_GEN)python2 $(top_srcdir)/utils/conv_gen.py -- To view, visit https://gerrit.osmocom.org/1044 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5a9b780ad4ba607ea39854dcf7207ed05f5447bc Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Oct 12 22:53:35 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 22:53:35 +0000 Subject: [PATCH] openggsn[master]: fix gsn_restart file buffer overflow and missing path sep 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/1013 to look at the new patch set (#2). fix gsn_restart file buffer overflow and missing path sep Fix errors during gsn_restart file path composition: - possible buffer overflow because the wrong remaining length was fed to strncat(). - missing path separator: put restart file in dir/gsn_restart instead of ../dirgsn_restart. This assumes that the path separator is '/'. Use talloc_asprintf() to fix all filename length problems and shorten the code. In order to free the allocated path, add a free_filename label, and jump there instead of returning from the fopen("w") failure branch. Also don't return from "fclose failed" branch in order to free the path, remove the if {} braces. Remove the NAMESIZE constant that is now unused. Change-Id: Idf0a64ff45720aa818f2f9de1e8ba2fe2c82631b --- M gtp/gtp.c M gtp/gtp.h 2 files changed, 7 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openggsn refs/changes/13/1013/2 diff --git a/gtp/gtp.c b/gtp/gtp.c index 12cb492..ccb2611 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -646,13 +646,11 @@ FILE *f; int i, rc; int counter = 0; - char filename[NAMESIZE]; - - filename[NAMESIZE - 1] = 0; /* No null term. guarantee by strncpy */ - strncpy(filename, gsn->statedir, NAMESIZE - 1); - strncat(filename, RESTART_FILE, NAMESIZE - 1 - sizeof(RESTART_FILE)); + char *filename; i = umask(022); + filename = talloc_asprintf(NULL, "%s/%s", gsn->statedir, RESTART_FILE); + OSMO_ASSERT(filename); /* We try to open file. On failure we will later try to create file */ if (!(f = fopen(filename, "r"))) { @@ -680,17 +678,17 @@ LOGP(DLGTP, LOGL_ERROR, "fopen(path=%s, mode=%s) failed: Error = %s\n", filename, "w", strerror(errno)); - return; + goto free_filename; } umask(i); fprintf(f, "%d\n", gsn->restart_counter); close_file: - if (fclose(f)) { + if (fclose(f)) LOGP(DLGTP, LOGL_ERROR, "fclose failed: Error = %s\n", strerror(errno)); - return; - } +free_filename: + talloc_free(filename); } int gtp_new(struct gsn_t **gsn, char *statedir, struct in_addr *listen, diff --git a/gtp/gtp.h b/gtp/gtp.h index fd138cc..8341bfd 100644 --- a/gtp/gtp.h +++ b/gtp/gtp.h @@ -31,7 +31,6 @@ #define ERRMSG_SIZE 255 #define RESTART_FILE "gsn_restart" -#define NAMESIZE 1024 /* GTP version 1 extension header type definitions. */ #define GTP_EXT_PDCP_PDU 0xC0 /* PDCP PDU Number */ -- To view, visit https://gerrit.osmocom.org/1013 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Idf0a64ff45720aa818f2f9de1e8ba2fe2c82631b Gerrit-PatchSet: 2 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Oct 12 23:03:47 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 23:03:47 +0000 Subject: [PATCH] openggsn[master]: gsn_restart file: wrap umask change tightly around file crea... 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/1014 to look at the new patch set (#3). gsn_restart file: wrap umask change tightly around file creation An fopen("w") error used to omit the umask() call to reinstate the previous umask. Also an fopen("r") at the top will never create a file and hence does not need a umask set. Instead, wrap the umask change and change-back tightly around the single fopen("w") call. Change-Id: If7d948e2f2ba47ecebba5614f18235a53b273d14 --- M gtp/gtp.c 1 file changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openggsn refs/changes/14/1014/3 diff --git a/gtp/gtp.c b/gtp/gtp.c index ccb2611..dcbe777 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -648,7 +648,6 @@ int counter = 0; char *filename; - i = umask(022); filename = talloc_asprintf(NULL, "%s/%s", gsn->statedir, RESTART_FILE); OSMO_ASSERT(filename); @@ -658,7 +657,6 @@ "State information file (%s) not found. Creating new file.\n", filename); } else { - umask(i); rc = fscanf(f, "%d", &counter); if (rc != 1) { LOGP(DLGTP, LOGL_ERROR, @@ -674,14 +672,18 @@ gsn->restart_counter = (unsigned char)counter; gsn->restart_counter++; - if (!(f = fopen(filename, "w"))) { + /* Keep the umask closely wrapped around our fopen() call in case the + * log outputs cause file creation. */ + i = umask(022); + f = fopen(filename, "w"); + umask(i); + if (!f) { LOGP(DLGTP, LOGL_ERROR, "fopen(path=%s, mode=%s) failed: Error = %s\n", filename, "w", strerror(errno)); goto free_filename; } - umask(i); fprintf(f, "%d\n", gsn->restart_counter); close_file: if (fclose(f)) -- To view, visit https://gerrit.osmocom.org/1014 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If7d948e2f2ba47ecebba5614f18235a53b273d14 Gerrit-PatchSet: 3 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Oct 12 23:04:34 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 23:04:34 +0000 Subject: openggsn[master]: gsn_restart file: wrap umask change tightly around file crea... In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/1014/1/gtp/gtp.c File gtp/gtp.c: Line 687: LOGP(DLGTP, LOGL_ERROR, > the logp and the above too (didn't notice when doing the migration) could l good point, actually the umask is only needed around the fopen("w") -- To view, visit https://gerrit.osmocom.org/1014 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If7d948e2f2ba47ecebba5614f18235a53b273d14 Gerrit-PatchSet: 1 Gerrit-Project: openggsn 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 Wed Oct 12 23:09:16 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 23:09:16 +0000 Subject: openggsn[master]: fix gsn_restart file buffer overflow and missing path sep In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/1013/2//COMMIT_MSG Commit Message: Line 24: Remove the NAMESIZE constant that is now unused. in the meantime a patch by Max actually uses the NAMESIZE constant again. -- To view, visit https://gerrit.osmocom.org/1013 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idf0a64ff45720aa818f2f9de1e8ba2fe2c82631b Gerrit-PatchSet: 2 Gerrit-Project: openggsn 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 Wed Oct 12 23:23:01 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 23:23:01 +0000 Subject: [PATCH] openggsn[master]: fix gsn_restart file buffer overflow and missing path sep 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/1013 to look at the new patch set (#3). fix gsn_restart file buffer overflow and missing path sep Fix errors during gsn_restart file path composition: - possible buffer overflow because the wrong remaining length was fed to strncat(). - missing path separator: put restart file in dir/gsn_restart instead of ../dirgsn_restart. This assumes that the path separator is '/'. Use talloc_asprintf() to fix all filename length problems and shorten the code. In order to free the allocated path, add a free_filename label, and jump there instead of returning from the fopen("w") failure branch. Also don't return from "fclose failed" branch in order to free the path, remove the if {} braces. Change-Id: Idf0a64ff45720aa818f2f9de1e8ba2fe2c82631b --- M gtp/gtp.c 1 file changed, 7 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openggsn refs/changes/13/1013/3 diff --git a/gtp/gtp.c b/gtp/gtp.c index 12cb492..ccb2611 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -646,13 +646,11 @@ FILE *f; int i, rc; int counter = 0; - char filename[NAMESIZE]; - - filename[NAMESIZE - 1] = 0; /* No null term. guarantee by strncpy */ - strncpy(filename, gsn->statedir, NAMESIZE - 1); - strncat(filename, RESTART_FILE, NAMESIZE - 1 - sizeof(RESTART_FILE)); + char *filename; i = umask(022); + filename = talloc_asprintf(NULL, "%s/%s", gsn->statedir, RESTART_FILE); + OSMO_ASSERT(filename); /* We try to open file. On failure we will later try to create file */ if (!(f = fopen(filename, "r"))) { @@ -680,17 +678,17 @@ LOGP(DLGTP, LOGL_ERROR, "fopen(path=%s, mode=%s) failed: Error = %s\n", filename, "w", strerror(errno)); - return; + goto free_filename; } umask(i); fprintf(f, "%d\n", gsn->restart_counter); close_file: - if (fclose(f)) { + if (fclose(f)) LOGP(DLGTP, LOGL_ERROR, "fclose failed: Error = %s\n", strerror(errno)); - return; - } +free_filename: + talloc_free(filename); } int gtp_new(struct gsn_t **gsn, char *statedir, struct in_addr *listen, -- To view, visit https://gerrit.osmocom.org/1013 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Idf0a64ff45720aa818f2f9de1e8ba2fe2c82631b Gerrit-PatchSet: 3 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Oct 12 23:26:17 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 23:26:17 +0000 Subject: [MERGED] openggsn[master]: configure: check for pkg-config presence In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: configure: check for pkg-config presence ...................................................................... configure: check for pkg-config presence Change-Id: I658152eb24fd783fce9ceac35872ab918c80209a --- M configure.ac 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/configure.ac b/configure.ac index e4744b3..1a36357 100644 --- a/configure.ac +++ b/configure.ac @@ -20,6 +20,13 @@ AC_PROG_CXX LT_INIT +dnl check for pkg-config (explained in detail in libosmocore/configure.ac) +AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no) +if test "x$PKG_CONFIG_INSTALLED" = "xno"; then + AC_MSG_WARN([You need to install pkg-config]) +fi +PKG_PROG_PKG_CONFIG([0.20]) + AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_LIBOBJ_DIR([lib]) -- To view, visit https://gerrit.osmocom.org/1016 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I658152eb24fd783fce9ceac35872ab918c80209a Gerrit-PatchSet: 2 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Oct 12 23:26:18 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 23:26:18 +0000 Subject: [MERGED] openggsn[master]: build: be robust against install-sh files above the root dir In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: build: be robust against install-sh files above the root dir ...................................................................... build: be robust against install-sh files above the root dir Explicitly set AC_CONFIG_AUX_DIR. To reproduce the error avoided by this patch: rm install-sh # in case it was already generated. touch ../install-sh # yes, outside this source tree autoreconf -fi This will produce an error like ... configure.ac:16: error: required file '../ltmain.sh' not found configure.ac:5: installing '../missing' src/Makefile.am: installing '../depcomp' autoreconf: automake failed with exit status: 1 See also automake (vim `which automake`) and look for 'sub locate_aux_dir'. Change-Id: I4aef311d7a475800e09f48110a499c3759c69f5d --- M configure.ac 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/configure.ac b/configure.ac index b11730b..e4744b3 100644 --- a/configure.ac +++ b/configure.ac @@ -4,6 +4,9 @@ AM_CONFIG_HEADER([config.h]) #AC_CONFIG_HEADER([config.h]) +dnl *This* is the root dir, even if an install-sh exists in ../ or ../../ +AC_CONFIG_AUX_DIR([.]) + AC_CANONICAL_SYSTEM dnl kernel style compile messages -- To view, visit https://gerrit.osmocom.org/1015 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4aef311d7a475800e09f48110a499c3759c69f5d Gerrit-PatchSet: 2 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Oct 12 23:26:47 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 23:26:47 +0000 Subject: [ABANDON] libosmocore[master]: NOT FOR MERGE: introduce ASAN failure to test jenkins.sh In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: NOT FOR MERGE: introduce ASAN failure to test jenkins.sh ...................................................................... Abandoned served its purpose -- To view, visit https://gerrit.osmocom.org/975 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I9b0b22d5163bd1243f6ea0e25bce15e0a626000d Gerrit-PatchSet: 7 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 Wed Oct 12 23:26:53 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 23:26:53 +0000 Subject: [ABANDON] libosmocore[master]: NOT FOR MERGE: add ubsan failure to see if jenkins.sh catche... In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: NOT FOR MERGE: add ubsan failure to see if jenkins.sh catches it ...................................................................... Abandoned served its purpose -- To view, visit https://gerrit.osmocom.org/1045 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I6de7a703eee56a2f4875fef684b8050751b0b4ca 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 Wed Oct 12 23:38:02 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 23:38:02 +0000 Subject: osmo-bts[master]: DTX DL: use FSM for AMR In-Reply-To: References: Message-ID: Patch Set 6: (1 comment) It looks like not too much effort to first fix the regression in a separate commit, and only then do the DTX re-implementation. It was just the couple of 'if (lchan->ts->trx->bts->dtxd)' inserted, right? Well, the effort might not be necessary when this is anyway basically a completely new implementation of DTX. Harald/Holger, what are your opinions? https://gerrit.osmocom.org/#/c/1030/6//COMMIT_MSG Commit Message: Line 14: - sync with corresponding changes in OpenBSC's what "corresponding changes"? I don't enjoy having to be intelligent when reading commit logs... -- To view, visit https://gerrit.osmocom.org/1030 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I74a0b42cb34d525b8a70d264135e82994ca70d31 Gerrit-PatchSet: 6 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 Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Oct 12 23:44:00 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 12 Oct 2016 23:44:00 +0000 Subject: osmo-bts[master]: DTX DL: use FSM for AMR In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+1 > Well, the effort might not be necessary The point being that osmo-bts master is currently completely broken: due to an openbsc change that goes with this patch here, osmo-bts doesn't compile now, and even before that sysmobts voice is broken. Both are fixed by this commit, so I'd rather have it merged sooner than later. Nevertheless this shortcuts our usual requirement of separating smaller commits where it makes sense. -- To view, visit https://gerrit.osmocom.org/1030 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I74a0b42cb34d525b8a70d264135e82994ca70d31 Gerrit-PatchSet: 6 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 Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Oct 13 00:05:16 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 00:05:16 +0000 Subject: openbsc[master]: sndcp: Fixups for sndcp layer based on coverity-scan suggest... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 (2 comments) not sure what potential comp_...[] uint overflow Holger is talking about https://gerrit.osmocom.org/#/c/965/2/openbsc/src/gprs/gprs_sndcp_xid.c File openbsc/src/gprs/gprs_sndcp_xid.c: Line 1373: lt[i].algo = comp_field->algo; comp_field.algo is an int, but lt[i] aka entity_algo_table.algo is an unsigned int. That might be worth another look. But it's not part of this patch. Line 1376: if (rc < 0) { this fix is actually quite funny :) -- To view, visit https://gerrit.osmocom.org/965 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4f9adf251f5119e67ffe76baad6f1f996ac8dbad Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: wax miguel Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Oct 13 00:16:07 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 00:16:07 +0000 Subject: openbsc[master]: OML: Fixing static OML attribute tables In-Reply-To: References: Message-ID: Patch Set 3: Code-Review-1 (4 comments) https://gerrit.osmocom.org/#/c/973/3//COMMIT_MSG Commit Message: Line 7: OML: Fixing static OML attribute tables This commit seems to do a whole lot more than fix some attribute tables. I think the commit log should mention added files and new unit tests, and possibly other things. Cosmetic: Let me comment once because you do this a lot: it's shorter to say "Fix static" than "Fixing static". The standard commit log form of grammar is the imperative, because it's the shortest: "add x", "fix y", "implement z". Line 9: - the OML attribute tables are hardcoded. To set variable parameters, interesting to have a bullet list with ... one bullet! https://gerrit.osmocom.org/#/c/973/3/openbsc/include/openbsc/Makefile.am File openbsc/include/openbsc/Makefile.am: Line 84: bts_ipaccess_nanobts_omlattr.h \ this list was sorted alphabetically before you add this line https://gerrit.osmocom.org/#/c/973/3/openbsc/src/libbsc/bts_ipaccess_nanobts_omlattr.c File openbsc/src/libbsc/bts_ipaccess_nanobts_omlattr.c: Line 3: /* (C) 2009-2010 by Harald Welte Looks like this file is copied or moved from somewhere, how about mentioning that in the commit log? -- To view, visit https://gerrit.osmocom.org/973 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibeb34a84912d6cf695f553a34c69320fca7d08fa Gerrit-PatchSet: 3 Gerrit-Project: openbsc 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 Thu Oct 13 00:19:44 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 00:19:44 +0000 Subject: openbsc[master]: gsm0408: Adding log output for 3g specific RR messages In-Reply-To: References: Message-ID: Patch Set 2: (2 comments) https://gerrit.osmocom.org/#/c/1037/2//COMMIT_MSG Commit Message: Line 11: adds log output for those messages. The behaviour is not "adds adds". Instead of "This commit adds" you can just say "Add". Line 18: also commit d26acf3a0352f7341774a32fc407c8ed7a98c0d2 in wrong commit hash. Looks more like 349784c72d9eaff7d1dc8b9640f2d8e53b31b7e5 -- To view, visit https://gerrit.osmocom.org/1037 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I41f2242fdf59c3eb4b3f8f7f003c17f7e0df01aa Gerrit-PatchSet: 2 Gerrit-Project: openbsc 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 Thu Oct 13 00:22:13 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 00:22:13 +0000 Subject: osmo-bts[master]: octphy: improved channel measurement In-Reply-To: References: Message-ID: Patch Set 7: (1 comment) https://gerrit.osmocom.org/#/c/904/7//COMMIT_MSG Commit Message: Line 10: comments here. ah, now I understand, this is one of the patches from Octasic, and you have no idea what it is about. Neither do I. -- To view, visit https://gerrit.osmocom.org/904 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib2de74e8ec6549f867ac0a04c554167b664ce9b6 Gerrit-PatchSet: 7 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 Thu Oct 13 00:28:44 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 00:28:44 +0000 Subject: osmo-bts[master]: octphy: set tx attenuation via VTY In-Reply-To: References: Message-ID: Patch Set 10: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/905/10/src/osmo-bts-octphy/octphy_vty.c File src/osmo-bts-octphy/octphy_vty.c: Line 141: "oml or tx-attenuation in quarter-dB\n") no, you would have one string for 'oml' and one for '<0-359>'. I'd suggest: 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") -- 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: 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 Thu Oct 13 00:34:16 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 00:34:16 +0000 Subject: osmo-bts[master]: octphy: Fixed OML ADM state handling In-Reply-To: References: Message-ID: Patch Set 9: (3 comments) https://gerrit.osmocom.org/#/c/906/9//COMMIT_MSG Commit Message: Line 7: octphy: Fixed OML ADM state handling you mean, the state handling is fixed (=invariable), or this patch fixes it? :) "fix OML ADM state handling" Line 10: adds a proper state handling but only for lock/unlock of OC_RADIO_CARRIER obj class. Basically all state handling is still accepted blindly, as the default cases don't error out. https://gerrit.osmocom.org/#/c/906/9/src/osmo-bts-octphy/l1_oml.c File src/osmo-bts-octphy/l1_oml.c: Line 1579: "TRX already closed..!\n\n"); when the user sees this log message, she has to guess what the code tried to do: "Cannot close TRX, it is already closed." -- 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: 9 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 Thu Oct 13 00:51:19 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 00:51:19 +0000 Subject: osmo-pcu[master]: EGPRS: fix for EPDAN out of window In-Reply-To: References: Message-ID: Patch Set 5: (5 comments) You may agree or not agree with my final style improvement. But please rebase onto master to clarify the parent commit. https://gerrit.osmocom.org/#/c/862/5//COMMIT_MSG Commit Message: Line 1: Parent: daa43f84 (Merge commit 'refs/changes/61/861/4' of https://gerrit.osmocom.org/osmo-pcu) the parent is a Merge-commit?? https://gerrit.osmocom.org/#/c/862/2/src/rlc.cpp File src/rlc.cpp: Line 108: unsigned num_blocks = rbb->cur_bit > (unsigned)distance() > What is meant is distance is guaranteed to be positive. since It seems to me then that distance() should return a uint16_t? https://gerrit.osmocom.org/#/c/862/5/src/rlc.cpp File src/rlc.cpp: Line 109: ? distance() : rbb->cur_bit; would make sense to call distance() only once ... but it's not really a performance burden in this case, just general style, to clearly show to the reader that the value is not intended to change between the comparison and setting it to num_blocks. You could use a uint with a comment: /* distance() is guaranteed to be positive because it does & mod_sns() */ uint16_t d = distance(); and then use 'd' to determine num_blocks. https://gerrit.osmocom.org/#/c/862/5/src/tbf_dl.cpp File src/tbf_dl.cpp: Line 851: ? m_window.distance() : num_blocks; (same) Line 931: ? m_window.distance() : rbb->cur_bit; (same) -- To view, visit https://gerrit.osmocom.org/862 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id07d178970f168f5389016c1eea31eb6b82057b6 Gerrit-PatchSet: 5 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Oct 13 01:01:06 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 01:01:06 +0000 Subject: osmo-pcu[master]: EGPRS: add test case to show EPDAN BSN out of window bug In-Reply-To: References: Message-ID: Patch Set 7: Code-Review+1 (2 comments) I would appreciate the indicated comment change and a rebase onto master before submitting, but otherwise this looks good now. https://gerrit.osmocom.org/#/c/861/6//COMMIT_MSG Commit Message: Line 9: This patch adds a test case test_tbf_epdan_out_of_rx_window, > fix this no need to generate noise by posting to yourself? https://gerrit.osmocom.org/#/c/861/7/tests/tbf/TbfTest.cpp File tests/tbf/TbfTest.cpp: Line 2026: * expects the same bug. which shall be fixed in subsequent patch Shorten this to: Test that a bit within the uncompressed bitmap whose BSN is not within the transmit window shall be ignored. See section 9.1.8.2.4 of 44.060 version 7.27.0 Release 7. -- To view, visit https://gerrit.osmocom.org/861 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If32b67f5c05707155281128b776a90a1e3d587b2 Gerrit-PatchSet: 7 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Oct 13 01:23:54 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 01:23:54 +0000 Subject: osmo-pcu[master]: EGPRS: Add EPDAN CRBB Tree based decoding In-Reply-To: References: Message-ID: Patch Set 26: (9 comments) Looks like we're moving into the final cosmetics. I appreciate your patience with the review process. https://gerrit.osmocom.org/#/c/416/26/src/egprs_rlc_compression.cpp File src/egprs_rlc_compression.cpp: Line 24: } egprs_compress_node; since we're in C++ land, you don't need to have a name in the end. Think of 'struct' as exactly a 'class' that has public members. Line 30: struct egprs_compress_node *egprs_compress::create_tree_node(void *parent) since we're in C++, you don't need to repeat 'struct' here, only egprs_compress_node suffices. Line 32: struct egprs_compress_node *new_node; also no 'struct' necessary, same below numerous times. Line 45: return egprs_compress::s_instance; wrong indenting Line 81: * section 9.1.10 of 3gpp 44.060 */ very good, but put this comment above the 'if (idx < 64)' line Line 89: * of 3gpp 44.060 use 80 chars of width Line 280: >> (7 - (bit_pos & 0x07))) & 0x01; this actually fits on one 80 char wide line. Line 281: (bit_pos)++; drop the braces Line 297: * \param color_code_bit[in] Color code 1 for Ones runlength 0 for Zero runlength please still explain to me your choice of the term "color code". Is it a term used in the spec? I dimly remember this used in schools as a playful term for 'boolean'? If it's not a term from the spec I would probably name the param 'ones', so that true means Ones and false means Zeros. -- To view, visit https://gerrit.osmocom.org/416 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieae1992ed4b02bb1e09eec2d3de1a030eabd16ce Gerrit-PatchSet: 26 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: pravin Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: pravin Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Oct 13 02:14:45 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 02:14:45 +0000 Subject: [PATCH] openbsc[master]: ipaccess-config: initialize root talloc ctx with name Message-ID: Review at https://gerrit.osmocom.org/1048 ipaccess-config: initialize root talloc ctx with name tall_ctx_config is defined but remains NULL. Instead initialize as named const. Change-Id: Iec708eda2e4f8eb88b9e5bc5f82f6342709760b1 --- M openbsc/src/ipaccess/ipaccess-config.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/48/1048/1 diff --git a/openbsc/src/ipaccess/ipaccess-config.c b/openbsc/src/ipaccess/ipaccess-config.c index 9e3a471..453877b 100644 --- a/openbsc/src/ipaccess/ipaccess-config.c +++ b/openbsc/src/ipaccess/ipaccess-config.c @@ -852,6 +852,8 @@ struct sockaddr_in sin; int rc, option_index = 0, stream_id = 0xff; + tall_ctx_config = talloc_named_const(NULL, 0, "ipaccess-config"); + osmo_init_logging(&log_info); log_parse_category_mask(osmo_stderr_target, "DNM,0"); bts_model_nanobts_init(); -- To view, visit https://gerrit.osmocom.org/1048 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iec708eda2e4f8eb88b9e5bc5f82f6342709760b1 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 13 02:14:46 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 02:14:46 +0000 Subject: [PATCH] openbsc[master]: bs11_config: initialize bs11 tall ctx, use instead of bsc ctx Message-ID: Review at https://gerrit.osmocom.org/1049 bs11_config: initialize bs11 tall ctx, use instead of bsc ctx Actually initialize tall_bs11cfg_ctx as named const. Change-Id: I3b42b29cd1a688cb4c9d1d4e44208509d936e4ef --- M openbsc/src/utils/bs11_config.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/49/1049/1 diff --git a/openbsc/src/utils/bs11_config.c b/openbsc/src/utils/bs11_config.c index 227b9f8..3420991 100644 --- a/openbsc/src/utils/bs11_config.c +++ b/openbsc/src/utils/bs11_config.c @@ -890,6 +890,8 @@ struct gsm_network *gsmnet; struct e1inp_line *line; + tall_bs11cfg_ctx = talloc_named_const(NULL, 0, "bs11-config"); + osmo_init_logging(&log_info); handle_options(argc, argv); bts_model_bs11_init(); -- To view, visit https://gerrit.osmocom.org/1049 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3b42b29cd1a688cb4c9d1d4e44208509d936e4ef Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 13 02:14:46 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 02:14:46 +0000 Subject: [PATCH] openbsc[master]: meas_pcap2db.c: remove unused include of msgb.h Message-ID: Review at https://gerrit.osmocom.org/1050 meas_pcap2db.c: remove unused include of msgb.h Change-Id: I2197432c9482537bd5cf06a6c4fc912607ffab53 --- M openbsc/src/utils/meas_pcap2db.c 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/50/1050/1 diff --git a/openbsc/src/utils/meas_pcap2db.c b/openbsc/src/utils/meas_pcap2db.c index 261ee61..b874ac4 100644 --- a/openbsc/src/utils/meas_pcap2db.c +++ b/openbsc/src/utils/meas_pcap2db.c @@ -31,7 +31,6 @@ #include #include -#include #include #include -- To view, visit https://gerrit.osmocom.org/1050 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2197432c9482537bd5cf06a6c4fc912607ffab53 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 13 02:14:46 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 02:14:46 +0000 Subject: [PATCH] openbsc[master]: gtphub_test.c: remove unused include of msgb.h Message-ID: Review at https://gerrit.osmocom.org/1051 gtphub_test.c: remove unused include of msgb.h Change-Id: I7a8003a0e0bff803941d7981ffc07cf78c3ae9a9 --- M openbsc/tests/gtphub/gtphub_test.c 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/51/1051/1 diff --git a/openbsc/tests/gtphub/gtphub_test.c b/openbsc/tests/gtphub/gtphub_test.c index e24967b..7d7673b 100644 --- a/openbsc/tests/gtphub/gtphub_test.c +++ b/openbsc/tests/gtphub/gtphub_test.c @@ -26,7 +26,6 @@ #include #include -#include #include #include -- To view, visit https://gerrit.osmocom.org/1051 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7a8003a0e0bff803941d7981ffc07cf78c3ae9a9 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 13 02:14:47 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 02:14:47 +0000 Subject: [PATCH] openbsc[master]: msgb talloc ctx: initialize in all main() scopes Message-ID: Review at https://gerrit.osmocom.org/1052 msgb talloc ctx: initialize in all main() scopes Add msgb_talloc_ctx_init() call to many main() functions still lacking a msgb talloc context. Change-Id: Ib0d6751260659cabf18a7ce80680ba2fb4228ea1 --- M openbsc/src/gprs/gtphub_main.c M openbsc/src/ipaccess/ipaccess-config.c M openbsc/src/ipaccess/ipaccess-proxy.c M openbsc/src/osmo-bsc/osmo_bsc_main.c M openbsc/src/osmo-bsc_mgcp/mgcp_main.c M openbsc/src/utils/bs11_config.c M openbsc/src/utils/meas_udp2db.c M openbsc/src/utils/meas_vis.c M openbsc/src/utils/smpp_mirror.c M openbsc/tests/bsc-nat/bsc_nat_test.c M openbsc/tests/bsc/bsc_test.c M openbsc/tests/gbproxy/gbproxy_test.c M openbsc/tests/mgcp/mgcp_test.c M openbsc/tests/oap/oap_test.c M openbsc/tests/trau/trau_test.c 15 files changed, 20 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/52/1052/1 diff --git a/openbsc/src/gprs/gtphub_main.c b/openbsc/src/gprs/gtphub_main.c index 1e20a63..46360f9 100644 --- a/openbsc/src/gprs/gtphub_main.c +++ b/openbsc/src/gprs/gtphub_main.c @@ -299,6 +299,7 @@ struct gtphub *hub = &_hub; osmo_gtphub_ctx = talloc_named_const(NULL, 0, "osmo_gtphub"); + msgb_talloc_ctx_init(osmo_gtphub_ctx, 0); signal(SIGINT, &signal_handler); signal(SIGABRT, &signal_handler); diff --git a/openbsc/src/ipaccess/ipaccess-config.c b/openbsc/src/ipaccess/ipaccess-config.c index 453877b..3c2d6cc 100644 --- a/openbsc/src/ipaccess/ipaccess-config.c +++ b/openbsc/src/ipaccess/ipaccess-config.c @@ -853,6 +853,7 @@ int rc, option_index = 0, stream_id = 0xff; tall_ctx_config = talloc_named_const(NULL, 0, "ipaccess-config"); + msgb_talloc_ctx_init(tall_ctx_config, 0); osmo_init_logging(&log_info); log_parse_category_mask(osmo_stderr_target, "DNM,0"); diff --git a/openbsc/src/ipaccess/ipaccess-proxy.c b/openbsc/src/ipaccess/ipaccess-proxy.c index 4077b3f..52e77e8 100644 --- a/openbsc/src/ipaccess/ipaccess-proxy.c +++ b/openbsc/src/ipaccess/ipaccess-proxy.c @@ -1200,6 +1200,7 @@ int rc; tall_bsc_ctx = talloc_named_const(NULL, 1, "ipaccess-proxy"); + msgb_talloc_ctx_init(tall_bsc_ctx, 0); osmo_init_logging(&log_info); log_parse_category_mask(osmo_stderr_target, "DLINP:DLMI"); diff --git a/openbsc/src/osmo-bsc/osmo_bsc_main.c b/openbsc/src/osmo-bsc/osmo_bsc_main.c index d3128e4..daab55b 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_main.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_main.c @@ -192,6 +192,7 @@ int rc; tall_bsc_ctx = talloc_named_const(NULL, 1, "openbsc"); + msgb_talloc_ctx_init(tall_bsc_ctx, 0); osmo_init_logging(&log_info); osmo_stats_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 ac55e25..964768e 100644 --- a/openbsc/src/osmo-bsc_mgcp/mgcp_main.c +++ b/openbsc/src/osmo-bsc_mgcp/mgcp_main.c @@ -203,6 +203,7 @@ int on = 1, rc; tall_bsc_ctx = talloc_named_const(NULL, 1, "mgcp-callagent"); + msgb_talloc_ctx_init(tall_bsc_ctx, 0); osmo_init_ignore_signals(); osmo_init_logging(&log_info); diff --git a/openbsc/src/utils/bs11_config.c b/openbsc/src/utils/bs11_config.c index 3420991..7356b82 100644 --- a/openbsc/src/utils/bs11_config.c +++ b/openbsc/src/utils/bs11_config.c @@ -891,6 +891,7 @@ struct e1inp_line *line; tall_bs11cfg_ctx = talloc_named_const(NULL, 0, "bs11-config"); + msgb_talloc_ctx_init(tall_bs11cfg_ctx, 0); osmo_init_logging(&log_info); handle_options(argc, argv); diff --git a/openbsc/src/utils/meas_udp2db.c b/openbsc/src/utils/meas_udp2db.c index 4a07217..5032d0c 100644 --- a/openbsc/src/utils/meas_udp2db.c +++ b/openbsc/src/utils/meas_udp2db.c @@ -90,6 +90,8 @@ char *db_fname; int rc; + msgb_talloc_ctx_init(NULL, 0); + if (argc < 2) { fprintf(stderr, "You have to specify the database file name\n"); exit(2); diff --git a/openbsc/src/utils/meas_vis.c b/openbsc/src/utils/meas_vis.c index 4f7e632..061a7a4 100644 --- a/openbsc/src/utils/meas_vis.c +++ b/openbsc/src/utils/meas_vis.c @@ -264,6 +264,8 @@ char *header[1]; char *title[1]; + msgb_talloc_ctx_init(NULL, 0); + printf("sizeof(gsm_meas_rep)=%u\n", sizeof(struct gsm_meas_rep)); printf("sizeof(meas_feed_meas)=%u\n", sizeof(struct meas_feed_meas)); diff --git a/openbsc/src/utils/smpp_mirror.c b/openbsc/src/utils/smpp_mirror.c index 2f154db..95df5f2 100644 --- a/openbsc/src/utils/smpp_mirror.c +++ b/openbsc/src/utils/smpp_mirror.c @@ -302,6 +302,8 @@ int port = 0; int rc; + msgb_talloc_ctx_init(NULL, 0); + memset(&esme, 0, sizeof(esme)); osmo_init_logging(&log_info); diff --git a/openbsc/tests/bsc-nat/bsc_nat_test.c b/openbsc/tests/bsc-nat/bsc_nat_test.c index b531c6b..2914a01 100644 --- a/openbsc/tests/bsc-nat/bsc_nat_test.c +++ b/openbsc/tests/bsc-nat/bsc_nat_test.c @@ -1551,6 +1551,7 @@ int main(int argc, char **argv) { + msgb_talloc_ctx_init(NULL, 0); sccp_set_log_area(DSCCP); osmo_init_logging(&log_info); diff --git a/openbsc/tests/bsc/bsc_test.c b/openbsc/tests/bsc/bsc_test.c index cc45652..6d41941 100644 --- a/openbsc/tests/bsc/bsc_test.c +++ b/openbsc/tests/bsc/bsc_test.c @@ -199,6 +199,7 @@ int main(int argc, char **argv) { + msgb_talloc_ctx_init(NULL, 0); osmo_init_logging(&log_info); test_scan(); diff --git a/openbsc/tests/gbproxy/gbproxy_test.c b/openbsc/tests/gbproxy/gbproxy_test.c index a2ff95b..b32ccb5 100644 --- a/openbsc/tests/gbproxy/gbproxy_test.c +++ b/openbsc/tests/gbproxy/gbproxy_test.c @@ -4842,6 +4842,8 @@ int main(int argc, char **argv) { + msgb_talloc_ctx_init(NULL, 0); + osmo_init_logging(&info); log_set_use_color(osmo_stderr_target, 0); log_set_print_filename(osmo_stderr_target, 0); diff --git a/openbsc/tests/mgcp/mgcp_test.c b/openbsc/tests/mgcp/mgcp_test.c index 6c94002..e2dc8fa 100644 --- a/openbsc/tests/mgcp/mgcp_test.c +++ b/openbsc/tests/mgcp/mgcp_test.c @@ -1202,6 +1202,7 @@ int main(int argc, char **argv) { + msgb_talloc_ctx_init(NULL, 0); osmo_init_logging(&log_info); test_strline(); diff --git a/openbsc/tests/oap/oap_test.c b/openbsc/tests/oap/oap_test.c index 339d774..d200ed2 100644 --- a/openbsc/tests/oap/oap_test.c +++ b/openbsc/tests/oap/oap_test.c @@ -234,6 +234,7 @@ int main(int argc, char **argv) { + msgb_talloc_ctx_init(NULL, 0); osmo_init_logging(&info); test_oap_api(); diff --git a/openbsc/tests/trau/trau_test.c b/openbsc/tests/trau/trau_test.c index b95f1e8..c74e6db 100644 --- a/openbsc/tests/trau/trau_test.c +++ b/openbsc/tests/trau/trau_test.c @@ -66,6 +66,8 @@ unsigned char data[33]; int i; + msgb_talloc_ctx_init(NULL, 0); + memset(data, 0x00, sizeof(data)); test_trau_fr_efr(data); memset(data, 0xff, sizeof(data)); -- To view, visit https://gerrit.osmocom.org/1052 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib0d6751260659cabf18a7ce80680ba2fb4228ea1 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 13 02:14:47 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 02:14:47 +0000 Subject: [PATCH] openbsc[master]: msgb ctx: use new msgb_talloc_ctx_init(), don't access tallo... Message-ID: Review at https://gerrit.osmocom.org/1053 msgb ctx: use new msgb_talloc_ctx_init(), don't access talloc_msgb_ctx Drop extern definitions of talloc_msgb_ctx and use msgb_talloc_ctx_init() instead. In sgsn_test.c, use a local variable msgb_ctx to do the talloc report from the return value of msgb_talloc_ctx_init(). Change-Id: I2f9ace855f0ecbdc9adf5d75bcb1a3d666570de4 --- M openbsc/src/gprs/gb_proxy_main.c M openbsc/src/gprs/sgsn_main.c M openbsc/src/libcommon/talloc_ctx.c M openbsc/src/osmo-bsc_nat/bsc_nat.c M openbsc/tests/sgsn/sgsn_test.c 5 files changed, 7 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/53/1053/1 diff --git a/openbsc/src/gprs/gb_proxy_main.c b/openbsc/src/gprs/gb_proxy_main.c index 2ddfca7..04875c7 100644 --- a/openbsc/src/gprs/gb_proxy_main.c +++ b/openbsc/src/gprs/gb_proxy_main.c @@ -189,8 +189,6 @@ } } -extern void *tall_msgb_ctx; - extern int bsc_vty_go_parent(struct vty *vty); static struct vty_app_info vty_info = { @@ -231,7 +229,7 @@ int rc; tall_bsc_ctx = talloc_named_const(NULL, 0, "nsip_proxy"); - tall_msgb_ctx = talloc_named_const(tall_bsc_ctx, 0, "msgb"); + msgb_talloc_ctx_init(tall_bsc_ctx, 0); signal(SIGINT, &signal_handler); signal(SIGABRT, &signal_handler); diff --git a/openbsc/src/gprs/sgsn_main.c b/openbsc/src/gprs/sgsn_main.c index 822c359..b4be631 100644 --- a/openbsc/src/gprs/sgsn_main.c +++ b/openbsc/src/gprs/sgsn_main.c @@ -163,7 +163,6 @@ /* NSI that BSSGP uses when transmitting on NS */ extern struct gprs_ns_inst *bssgp_nsi; -extern void *tall_msgb_ctx; extern int bsc_vty_go_parent(struct vty *vty); @@ -328,7 +327,7 @@ srand(time(NULL)); tall_bsc_ctx = talloc_named_const(NULL, 0, "osmo_sgsn"); - tall_msgb_ctx = talloc_named_const(tall_bsc_ctx, 0, "msgb"); + msgb_talloc_ctx_init(tall_bsc_ctx, 0); signal(SIGINT, &signal_handler); signal(SIGABRT, &signal_handler); diff --git a/openbsc/src/libcommon/talloc_ctx.c b/openbsc/src/libcommon/talloc_ctx.c index a917a8c..7a8bfd3 100644 --- a/openbsc/src/libcommon/talloc_ctx.c +++ b/openbsc/src/libcommon/talloc_ctx.c @@ -20,7 +20,6 @@ #include extern void *tall_bsc_ctx; -extern void *tall_msgb_ctx; extern void *tall_fle_ctx; extern void *tall_locop_ctx; extern void *tall_authciphop_ctx; @@ -38,7 +37,7 @@ void talloc_ctx_init(void *ctx_root) { - tall_msgb_ctx = talloc_named_const(ctx_root, 0, "msgb"); + msgb_talloc_ctx_init(ctx_root, 0); tall_fle_ctx = talloc_named_const(ctx_root, 0, "bs11_file_list_entry"); tall_locop_ctx = talloc_named_const(ctx_root, 0, "loc_updating_oper"); tall_authciphop_ctx = talloc_named_const(ctx_root, 0, "auth_ciph_oper"); diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c index 6ae8c05..a4dd679 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c @@ -1573,12 +1573,11 @@ osmo_timer_schedule(&sccp_close, SCCP_CLOSE_TIME, 0); } -extern void *tall_msgb_ctx; extern void *tall_ctr_ctx; static void talloc_init_ctx() { tall_bsc_ctx = talloc_named_const(NULL, 0, "nat"); - tall_msgb_ctx = talloc_named_const(tall_bsc_ctx, 0, "msgb"); + msgb_talloc_ctx_init(tall_bsc_ctx, 0); tall_ctr_ctx = talloc_named_const(tall_bsc_ctx, 0, "counter"); } diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c index 5ee5fa4..789817c 100644 --- a/openbsc/tests/sgsn/sgsn_test.c +++ b/openbsc/tests/sgsn/sgsn_test.c @@ -39,8 +39,6 @@ #include -extern void *tall_msgb_ctx; - void *tall_bsc_ctx; static struct sgsn_instance sgsn_inst = { .config_file = "osmo_sgsn.cfg", @@ -2423,11 +2421,12 @@ int main(int argc, char **argv) { void *osmo_sgsn_ctx; + void *msgb_ctx; osmo_init_logging(&info); osmo_sgsn_ctx = talloc_named_const(NULL, 0, "osmo_sgsn"); tall_bsc_ctx = talloc_named_const(osmo_sgsn_ctx, 0, "bsc"); - tall_msgb_ctx = talloc_named_const(osmo_sgsn_ctx, 0, "msgb"); + msgb_ctx = msgb_talloc_ctx_init(osmo_sgsn_ctx, 0); sgsn_rate_ctr_init(); sgsn_auth_init(); @@ -2458,7 +2457,7 @@ printf("Done\n"); talloc_report_full(osmo_sgsn_ctx, stderr); - OSMO_ASSERT(talloc_total_blocks(tall_msgb_ctx) == 1); + OSMO_ASSERT(talloc_total_blocks(msgb_ctx) == 1); OSMO_ASSERT(talloc_total_blocks(tall_bsc_ctx) == 2); return 0; } -- To view, visit https://gerrit.osmocom.org/1053 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2f9ace855f0ecbdc9adf5d75bcb1a3d666570de4 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 13 02:17:57 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 02:17:57 +0000 Subject: [PATCH] osmo-iuh[master]: fix msgb talloc context initialization Message-ID: Review at https://gerrit.osmocom.org/1054 fix msgb talloc context initialization Properly initialize msgb talloc context in hnbgw and all tests, using the new msgb_talloc_ctx_init(). test-ranap.c: since msgb talloc ctx is now in test_common_init(), remove msgb talloc init here. Change-Id: I807c799aff1239184728551ed77fdafa73bd683f --- M src/hnbgw.c M src/tests/test-ranap.c M src/tests/test-ranap.ok M src/tests/test_common.c 4 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/54/1054/1 diff --git a/src/hnbgw.c b/src/hnbgw.c index 500cf0f..8d6dbb1 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -454,6 +454,7 @@ tall_hnb_ctx = talloc_named_const(NULL, 0, "hnb_context"); talloc_asn1_ctx = talloc_named_const(NULL, 0, "asn1_context"); + msgb_talloc_ctx_init(tall_hnb_ctx, 0); g_hnb_gw = hnb_gw_create(tall_hnb_ctx); g_hnb_gw->config.rnc_id = 23; diff --git a/src/tests/test-ranap.c b/src/tests/test-ranap.c index c70009b..c1c7003 100644 --- a/src/tests/test-ranap.c +++ b/src/tests/test-ranap.c @@ -97,8 +97,6 @@ //asn_debug = 1; - msgb_set_talloc_ctx(talloc_named_const(NULL, 1, "msgb")); - test_common_init(); test_aper_int(1); diff --git a/src/tests/test-ranap.ok b/src/tests/test-ranap.ok index 2ad19e6..bda3c8e 100644 --- a/src/tests/test-ranap.ok +++ b/src/tests/test-ranap.ok @@ -214,5 +214,5 @@ 00 0a 00 11 00 00 01 00 29 40 0a 00 00 01 00 28 40 03 05 c2 d0 report talloc report on 'asn1_context' (total 0 bytes in 1 blocks) -talloc report on 'msgb' (total 1 bytes in 1 blocks) +talloc report on 'msgb' (total 0 bytes in 1 blocks) exit diff --git a/src/tests/test_common.c b/src/tests/test_common.c index 5a37e7e..ba00709 100644 --- a/src/tests/test_common.c +++ b/src/tests/test_common.c @@ -78,6 +78,7 @@ { int rc; + msgb_talloc_ctx_init(NULL, 0); talloc_asn1_ctx = talloc_named_const(NULL, 0, "asn1_context"); rc = osmo_init_logging(&test_log_info); -- To view, visit https://gerrit.osmocom.org/1054 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I807c799aff1239184728551ed77fdafa73bd683f Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 13 02:18:47 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 02:18:47 +0000 Subject: [PATCH] osmo-bts[master]: msgb ctx: use new msgb_talloc_ctx_init() in various main()s Message-ID: Review at https://gerrit.osmocom.org/1055 msgb ctx: use new msgb_talloc_ctx_init() in various main()s Change-Id: I31d62d5e1f0b272985fdef5013270d385c4b988a --- M src/common/main.c M src/osmo-bts-litecell15/misc/lc15bts_mgr.c M src/osmo-bts-sysmo/misc/sysmobts_mgr.c M tests/agch/agch_test.c M tests/cipher/cipher_test.c M tests/handover/handover_test.c M tests/paging/paging_test.c 7 files changed, 7 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/55/1055/1 diff --git a/src/common/main.c b/src/common/main.c index 99febe0..60839df 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -219,14 +219,12 @@ struct gsm_bts_role_bts *btsb; struct gsm_bts_trx *trx; struct e1inp_line *line; - void *tall_msgb_ctx; int rc, i; printf("((*))\n |\n / \\ OsmoBTS\n"); tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context"); - tall_msgb_ctx = talloc_pool(tall_bts_ctx, 100*1024); - msgb_set_talloc_ctx(tall_msgb_ctx); + msgb_talloc_ctx_init(tall_bts_ctx, 100*1024); bts_log_init(NULL); diff --git a/src/osmo-bts-litecell15/misc/lc15bts_mgr.c b/src/osmo-bts-litecell15/misc/lc15bts_mgr.c index c97525c..193e108 100644 --- a/src/osmo-bts-litecell15/misc/lc15bts_mgr.c +++ b/src/osmo-bts-litecell15/misc/lc15bts_mgr.c @@ -222,13 +222,11 @@ int main(int argc, char **argv) { - void *tall_msgb_ctx; int rc; tall_mgr_ctx = talloc_named_const(NULL, 1, "bts manager"); - tall_msgb_ctx = talloc_named_const(tall_mgr_ctx, 1, "msgb"); - msgb_set_talloc_ctx(tall_msgb_ctx); + msgb_talloc_ctx_init(tall_mgr_ctx); mgr_log_init(); diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr.c b/src/osmo-bts-sysmo/misc/sysmobts_mgr.c index ccb84d8..f126db2 100644 --- a/src/osmo-bts-sysmo/misc/sysmobts_mgr.c +++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr.c @@ -245,13 +245,11 @@ int main(int argc, char **argv) { - void *tall_msgb_ctx; int rc; tall_mgr_ctx = talloc_named_const(NULL, 1, "bts manager"); - tall_msgb_ctx = talloc_named_const(tall_mgr_ctx, 1, "msgb"); - msgb_set_talloc_ctx(tall_msgb_ctx); + msgb_talloc_ctx_init(tall_mgr_ctx, 0); mgr_log_init(); if (classify_bts() != 0) diff --git a/tests/agch/agch_test.c b/tests/agch/agch_test.c index 4175bdd..e275c64 100644 --- a/tests/agch/agch_test.c +++ b/tests/agch/agch_test.c @@ -224,11 +224,8 @@ int main(int argc, char **argv) { - void *tall_msgb_ctx; - tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context"); - tall_msgb_ctx = talloc_named_const(tall_bts_ctx, 1, "msgb"); - msgb_set_talloc_ctx(tall_msgb_ctx); + msgb_talloc_ctx_init(tall_bts_ctx, 0); bts_log_init(NULL); diff --git a/tests/cipher/cipher_test.c b/tests/cipher/cipher_test.c index a175012..c913925 100644 --- a/tests/cipher/cipher_test.c +++ b/tests/cipher/cipher_test.c @@ -66,11 +66,8 @@ int main(int argc, char **argv) { - void *tall_msgb_ctx; - tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context"); - tall_msgb_ctx = talloc_named_const(tall_bts_ctx, 1, "msgb"); - msgb_set_talloc_ctx(tall_msgb_ctx); + msgb_talloc_ctx_init(tall_bts_ctx, 0); bts_log_init(NULL); diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c index e1f4d86..d1dc34a 100644 --- a/tests/handover/handover_test.c +++ b/tests/handover/handover_test.c @@ -58,7 +58,6 @@ { struct gsm_bts_role_bts *btsb; void *tall_bts_ctx; - void *tall_msgb_ctx; struct e1inp_line *line; struct gsm_lchan *lchan; struct osmo_phsap_prim nl1sap; @@ -67,8 +66,7 @@ int i; tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context"); - tall_msgb_ctx = talloc_named_const(tall_bts_ctx, 1, "msgb"); - msgb_set_talloc_ctx(tall_msgb_ctx); + msgb_talloc_ctx_init(tall_bts_ctx, 0); bts_log_init(NULL); osmo_stderr_target->categories[DHO].loglevel = LOGL_DEBUG; diff --git a/tests/paging/paging_test.c b/tests/paging/paging_test.c index de839e4..1d5f216 100644 --- a/tests/paging/paging_test.c +++ b/tests/paging/paging_test.c @@ -112,11 +112,8 @@ int main(int argc, char **argv) { - void *tall_msgb_ctx; - tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context"); - tall_msgb_ctx = talloc_named_const(tall_bts_ctx, 1, "msgb"); - msgb_set_talloc_ctx(tall_msgb_ctx); + msgb_talloc_ctx_init(tall_bts_ctx, 0); bts_log_init(NULL); -- To view, visit https://gerrit.osmocom.org/1055 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I31d62d5e1f0b272985fdef5013270d385c4b988a Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 13 06:58:00 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 13 Oct 2016 06:58:00 +0000 Subject: osmo-bts[master]: DTX DL: use FSM for AMR In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1030 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I74a0b42cb34d525b8a70d264135e82994ca70d31 Gerrit-PatchSet: 6 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 Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Oct 13 06:58:06 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 13 Oct 2016 06:58:06 +0000 Subject: [MERGED] osmo-bts[master]: DTX DL: use FSM for AMR In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: DTX DL: use FSM for AMR ...................................................................... DTX DL: use FSM for AMR Use dedicated FSM to handle all DTX DL related events: - add explicit checks if DTX DL is enabled (fixes regression for non-DTX setup introduced in 654175f33bd412671e3ef8cdd65c0689d10f278c) - fix handling of AMR CMI for SPEECH frames - add FSM for DTX DL - sync with corresponding changes in OpenBSC's - handle FACCH-related DTX ONSET events This affects both lc15 and sysmobts and requires corresponding change in OpenBSC (Change-Id: Idac8609faf9b5ced818fde899ccfc6ed0c42e8fd). Change-Id: I74a0b42cb34d525b8a70d264135e82994ca70d31 --- M include/osmo-bts/Makefile.am A include/osmo-bts/dtx_dl_amr_fsm.h M include/osmo-bts/msg_utils.h M src/common/Makefile.am A src/common/dtx_dl_amr_fsm.c M src/common/l1sap.c M src/common/msg_utils.c M src/common/rsl.c M src/osmo-bts-litecell15/l1_if.c M src/osmo-bts-litecell15/l1_if.h M src/osmo-bts-litecell15/tch.c M src/osmo-bts-sysmo/l1_if.c M src/osmo-bts-sysmo/l1_if.h M src/osmo-bts-sysmo/tch.c 14 files changed, 684 insertions(+), 147 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmo-bts/Makefile.am b/include/osmo-bts/Makefile.am index d0b55ff..ef4165f 100644 --- a/include/osmo-bts/Makefile.am +++ b/include/osmo-bts/Makefile.am @@ -1,4 +1,5 @@ noinst_HEADERS = abis.h bts.h bts_model.h gsm_data.h logging.h measurement.h \ oml.h paging.h rsl.h signal.h vty.h amr.h pcu_if.h pcuif_proto.h \ handover.h msg_utils.h tx_power.h control_if.h cbch.h l1sap.h \ - power_control.h scheduler.h scheduler_backend.h phy_link.h + power_control.h scheduler.h scheduler_backend.h phy_link.h \ + dtx_dl_amr_fsm.h diff --git a/include/osmo-bts/dtx_dl_amr_fsm.h b/include/osmo-bts/dtx_dl_amr_fsm.h new file mode 100644 index 0000000..8b19595 --- /dev/null +++ b/include/osmo-bts/dtx_dl_amr_fsm.h @@ -0,0 +1,35 @@ +#pragma once + +#include +#include +#include + +/* DTX DL AMR FSM */ + +#define X(s) (1 << (s)) + +enum dtx_dl_amr_fsm_states { + ST_VOICE, + ST_SID_F1, + ST_SID_F2, + ST_F1_INH, + ST_U_INH, + ST_SID_U, + ST_ONSET_V, + ST_ONSET_F, + ST_FACCH_V, + ST_FACCH, +}; + +enum dtx_dl_amr_fsm_events { + E_VOICE, + E_ONSET, + E_FACCH, + E_COMPL, + E_INHIB, + E_SID_F, + E_SID_U, +}; + +extern const struct value_string dtx_dl_amr_fsm_event_names[]; +extern struct osmo_fsm dtx_dl_amr_fsm; diff --git a/include/osmo-bts/msg_utils.h b/include/osmo-bts/msg_utils.h index f99f3c4..31bd172 100644 --- a/include/osmo-bts/msg_utils.h +++ b/include/osmo-bts/msg_utils.h @@ -26,12 +26,11 @@ }; void lchan_set_marker(bool t, struct gsm_lchan *lchan); -void save_last_sid(struct gsm_lchan *lchan, const uint8_t *l1_payload, - size_t length, uint32_t fn, int update, uint8_t cmr, - int8_t cmi); -int dtx_amr_check_onset(struct gsm_lchan *lchan, const uint8_t *rtp_pl, +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, size_t rtp_pl_len, uint32_t fn, uint8_t *l1_payload, - uint8_t *ft_out); + bool marker, uint8_t *len, uint8_t *ft_out); uint8_t repeat_last_sid(struct gsm_lchan *lchan, uint8_t *dst, uint32_t fn); int msg_verify_ipa_structure(struct msgb *msg); int msg_verify_oml_structure(struct msgb *msg); diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 856f741..dd368d0 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -7,6 +7,7 @@ rsl.c vty.c paging.c measurement.c amr.c lchan.c \ load_indication.c pcu_sock.c handover.c msg_utils.c \ tx_power.c bts_ctrl_commands.c bts_ctrl_lookup.c \ - l1sap.c cbch.c power_control.c main.c phy_link.c + l1sap.c cbch.c power_control.c main.c phy_link.c \ + dtx_dl_amr_fsm.c libl1sched_a_SOURCES = scheduler.c diff --git a/src/common/dtx_dl_amr_fsm.c b/src/common/dtx_dl_amr_fsm.c new file mode 100644 index 0000000..b110cf2 --- /dev/null +++ b/src/common/dtx_dl_amr_fsm.c @@ -0,0 +1,320 @@ +/* DTX DL AMR FSM */ + +/* (C) 2016 by 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 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 . + * + */ + +#include +#include + +void dtx_fsm_voice(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_VOICE: + case E_FACCH: + break; + case E_SID_F: + case E_SID_U: + osmo_fsm_inst_state_chg(fi, ST_SID_F1, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Inexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_sid_f1(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_F: +/* FIXME: what shall we do if we get SID-FIRST _again_ (twice in a row)? + 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); + 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); + break; + case E_COMPL: + 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); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_sid_f2(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_U: + 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); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_f1_inh(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_u_inh(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 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) { + 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_INHIB: + osmo_fsm_inst_state_chg(fi, ST_U_INH, 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_onset_v(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_U: + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); + break; + case E_FACCH: + osmo_fsm_inst_state_chg(fi, ST_FACCH_V, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_onset_f(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_SID_U: + 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_FACCH, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_facch_v(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_FACCH: + break; + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); + break; + case E_SID_U: + break; + case E_SID_F: + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +void dtx_fsm_facch(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + switch (event) { + case E_FACCH: + break; + case E_VOICE: + osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); + break; + case E_SID_U: + case E_SID_F: + osmo_fsm_inst_state_chg(fi, ST_SID_F1, 0, 0); + break; + default: + LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); + OSMO_ASSERT(0); + break; + } +} + +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), + .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_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), + .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), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_ONSET_F), + .name = "SID-FIRST (P2)", + .action = dtx_fsm_sid_f2, + }, + /* SID-FIRST Inhibited: + incoming SPEECH or FACCH (only for AMR HR) */ + [ST_F1_INH]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), + .name = "SID-FIRST (Inh)", + .action = dtx_fsm_f1_inh, + }, + /* SID-UPDATE Inhibited: + incoming SPEECH or FACCH (only for AMR HR) */ + [ST_U_INH]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), + .name = "SID-UPDATE (Inh)", + .action = dtx_fsm_u_inh, + }, + /* 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", + .action = dtx_fsm_sid_upd, + }, + /* ONSET - end of silent period due to incoming SPEECH frame */ + [ST_ONSET_V]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), + .name = "ONSET (SPEECH)", + .action = dtx_fsm_onset_v, + }, + /* ONSET - end of silent period due to incoming FACCH frame */ + [ST_ONSET_F]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH) | X(E_SID_U), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH), + .name = "ONSET (FACCH)", + .action = dtx_fsm_onset_f, + }, + /* FACCH sending state: SPEECH was observed before so once we're done + FSM should get back to VOICE state */ + [ST_FACCH_V]= { + .in_event_mask = X(E_FACCH) | X(E_VOICE) | X(E_SID_U) | X(E_SID_F), + .out_state_mask = X(ST_FACCH_V) | X(ST_VOICE) | X(ST_SID_F1), + .name = "FACCH (SPEECH)", + .action = dtx_fsm_facch_v, + }, + /* FACCH sending state: no SPEECH was observed before so once we're done + FSM should get back to silent period via SID-FIRST */ + [ST_FACCH]= { + .in_event_mask = X(E_FACCH) | X(E_VOICE) | X(E_SID_U) | X(E_SID_F), + .out_state_mask = X(ST_FACCH_V) | X(ST_VOICE) | X(ST_SID_F1), + .name = "FACCH", + .action = dtx_fsm_facch, + }, +}; + +const struct value_string dtx_dl_amr_fsm_event_names[] = { + { E_VOICE, "Voice" }, + { E_FACCH, "FACCH" }, + { E_COMPL, "Complete P1 -> P2" }, + { E_INHIB, "Inhibit" }, + { E_SID_F, "SID-FIRST" }, + { E_SID_U, "SID-UPDATE" }, + { 0, NULL } +}; + +struct osmo_fsm dtx_dl_amr_fsm = { + .name = "DTX DL AMR FSM", + .states = dtx_dl_amr_fsm_states, + .num_states = ARRAY_SIZE(dtx_dl_amr_fsm_states), + .event_names = dtx_dl_amr_fsm_event_names, + .log_subsys = DL1C, +}; diff --git a/src/common/l1sap.c b/src/common/l1sap.c index dd234ee..f3e620e 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -524,6 +525,7 @@ uint8_t *p, *si; struct lapdm_entity *le; struct osmo_phsap_prim pp; + bool dtxd_facch = false; int rc; chan_nr = rts_ind->chan_nr; @@ -578,8 +580,11 @@ p[0] = lchan->ms_power_ctrl.current; p[1] = lchan->rqd_ta; le = &lchan->lapdm_ch.lapdm_acch; - } else + } else { + if (lchan->ts->trx->bts->dtxd) + dtxd_facch = true; le = &lchan->lapdm_ch.lapdm_dcch; + } rc = lapdm_phsap_dequeue_prim(le, &pp); if (rc < 0) { if (L1SAP_IS_LINK_SACCH(link_id)) { @@ -605,6 +610,10 @@ memcpy(p, pp.oph.msg->data, GSM_MACBLOCK_LEN); /* check if it is a RR CIPH MODE CMD. if yes, enable RX ciphering */ check_for_ciph_cmd(pp.oph.msg, lchan, chan_nr); + if (dtxd_facch && lchan->tch.dtx.dl_amr_fsm) + osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, + E_FACCH, + (void *)lchan); } msgb_free(pp.oph.msg); } @@ -1132,14 +1141,27 @@ rc = l1sap_chan_act_dact_modify(trx, chan_nr, PRIM_INFO_ACTIVATE, 0); if (rc) return -RSL_ERR_EQUIPMENT_FAIL; + + /* Init DTX DL FSM if necessary */ + //FIXME: only do it for AMR TCH/* + osmo_fsm_register(&dtx_dl_amr_fsm); + lchan->tch.dtx.dl_amr_fsm = osmo_fsm_inst_alloc(&dtx_dl_amr_fsm, + tall_bts_ctx, lchan, + LOGL_DEBUG, lchan->name); return 0; } int l1sap_chan_rel(struct gsm_bts_trx *trx, uint8_t chan_nr) { + struct gsm_lchan *lchan = get_lchan_by_chan_nr(trx, chan_nr); LOGP(DL1P, LOGL_INFO, "deactivating channel chan_nr=0x%02x trx=%d\n", chan_nr, trx->nr); + if (lchan->tch.dtx.dl_amr_fsm) { + osmo_fsm_inst_free(lchan->tch.dtx.dl_amr_fsm); + lchan->tch.dtx.dl_amr_fsm = NULL; + } + return l1sap_chan_act_dact_modify(trx, chan_nr, PRIM_INFO_DEACTIVATE, 0); } diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 99a211f..f9853c5 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -17,6 +17,7 @@ * */ +#include #include #include #include @@ -26,6 +27,7 @@ #include #include #include +#include #include #include @@ -92,13 +94,12 @@ void lchan_set_marker(bool t, struct gsm_lchan *lchan) { if (t) - lchan->tch.ul_sid = true; - else if (lchan->tch.ul_sid) { - lchan->tch.ul_sid = false; + lchan->tch.dtx.ul_sid = true; + else if (lchan->tch.dtx.ul_sid) { + lchan->tch.dtx.ul_sid = false; lchan->rtp_tx_marker = true; } } - /*! \brief Store the last SID frame in lchan context * \param[in] lchan Logical channel on which we check scheduling @@ -106,76 +107,106 @@ * \param[in] length length of l1_payload * \param[in] fn Frame Number for which we check scheduling * \param[in] update 0 if SID_FIRST, 1 if SID_UPDATE, -1 if not AMR SID - * \param[in] cmr Codec Mode Request (AMR-specific, ignored otherwise) - * \param[in] cmi Codec Mode Indication (AMR-specific, ignored otherwise) */ -void save_last_sid(struct gsm_lchan *lchan, const uint8_t *l1_payload, - size_t length, uint32_t fn, int update, uint8_t cmr, - int8_t cmi) +void dtx_cache_payload(struct gsm_lchan *lchan, const uint8_t *l1_payload, + size_t length, uint32_t fn, int update) { size_t amr = (update < 0) ? 0 : 2, - copy_len = OSMO_MIN(length + 1, ARRAY_SIZE(lchan->tch.last_sid.buf)); + copy_len = OSMO_MIN(length + 1, ARRAY_SIZE(lchan->tch.dtx.cache)); - lchan->tch.last_sid.len = copy_len + amr; - lchan->tch.last_sid.fn = fn; - lchan->tch.last_sid.is_update = update; + lchan->tch.dtx.len = copy_len + amr; + lchan->tch.dtx.fn = fn; + lchan->tch.dtx.is_update = update; - if (amr) - amr_set_mode_pref(lchan->tch.last_sid.buf, &lchan->tch.amr_mr, - cmi, cmr); - memcpy(lchan->tch.last_sid.buf + amr, l1_payload, copy_len); + memcpy(lchan->tch.dtx.cache + amr, l1_payload, copy_len); } -/*! \brief Check current and cached SID to decide if talkspurt takes place +/*! \brief Check current state of DTX DL AMR FSM and dispatch necessary events * \param[in] lchan Logical channel on which we check scheduling * \param[in] rtp_pl buffer with RTP data * \param[in] rtp_pl_len length of rtp_pl * \param[in] fn Frame Number for which we check scheduling * \param[in] l1_payload buffer where CMR and CMI prefix should be added + * \param[out] len Length of expected L1 payload * \param[out] ft_out Frame Type to be populated after decoding - * \returns 0 if frame should be send immediately (2 byte CMR,CMI prefix added: - * caller must adjust length as necessary), - * 1 if ONSET event is detected - * negative if no sending is necessary (either error or cached SID - * UPDATE) + * \returns 0 in case of success; negative on error */ -int dtx_amr_check_onset(struct gsm_lchan *lchan, const uint8_t *rtp_pl, +int dtx_dl_amr_fsm_step(struct gsm_lchan *lchan, const uint8_t *rtp_pl, size_t rtp_pl_len, uint32_t fn, uint8_t *l1_payload, - uint8_t *ft_out) + bool marker, uint8_t *len, uint8_t *ft_out) { uint8_t cmr; enum osmo_amr_type ft; enum osmo_amr_quality bfi; int8_t sti, cmi; - osmo_amr_rtp_dec(rtp_pl, rtp_pl_len, &cmr, &cmi, &ft, &bfi, &sti); - *ft_out = ft; /* only needed for old sysmo firmware */ + int rc; - if (ft == AMR_SID) { - save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, sti, cmr, cmi); - if (sti) /* SID_UPDATE should be cached and send later */ - return -EAGAIN; - else { /* SID_FIRST - cached and send right away */ - amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi, - cmr); - return 0; - } + if (rtp_pl == NULL) { /* SID-FIRST P1 -> P2 */ + *len = 3; + memcpy(l1_payload, lchan->tch.dtx.cache, 2); + osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, E_COMPL, + (void *)lchan); + return 0; } - if (ft != AMR_NO_DATA && !osmo_amr_is_speech(ft)) { + 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); + return rc; + } + + /* only needed for old sysmo firmware: */ + *ft_out = ft; + + /* CMI in downlink tells the L1 encoder which encoding function + * it will use, so we have to use the frame type */ + if (osmo_amr_is_speech(ft)) + cmi = ft; + + /* populate L1 payload with CMR/CMI - might be ignored by caller: */ + amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi, cmr); + + /* populate DTX cache with CMR/CMI - overwrite cache which will be + either updated or invalidated by caller anyway: */ + amr_set_mode_pref(lchan->tch.dtx.cache, &lchan->tch.amr_mr, cmi, cmr); + *len = 3 + rtp_pl_len; + + /* DTX DL is not enabled, move along */ + if (!lchan->ts->trx->bts->dtxd) + return 0; + + if (osmo_amr_is_speech(ft)) { + if (lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F1 || + lchan->tch.dtx.dl_amr_fsm->state == ST_SID_U) /* AMR HR */ + if (lchan->type == GSM_LCHAN_TCH_H && marker) + return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, + E_INHIB, + (void *)lchan); + /* AMR FR */ + if (marker && lchan->tch.dtx.dl_amr_fsm->state == ST_SID_U) + 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 (ft == AMR_SID) { + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, sti); + return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, + sti ? E_SID_U : E_SID_F, + (void *)lchan); + } + + if (ft != AMR_NO_DATA) { LOGP(DRTP, LOGL_ERROR, "unsupported AMR FT 0x%02x\n", ft); return -ENOTSUP; } - if (osmo_amr_is_speech(ft)) { - if (lchan->tch.last_sid.len) { /* force ONSET */ - lchan->tch.last_sid.len = 0; - return 1; - } - /* We received AMR SPEECH frame - invalidate saved SID */ - lchan->tch.last_sid.len = 0; - amr_set_mode_pref(l1_payload, &lchan->tch.amr_mr, cmi, cmr); - } - + if (marker) + osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, E_VOICE, + (void *)lchan); + *len = 0; return 0; } @@ -188,10 +219,10 @@ uint32_t fn) { /* Compute approx. time delta based on Fn duration */ - uint32_t delta = GSM_FN_TO_MS(fn - lchan->tch.last_sid.fn); + uint32_t delta = GSM_FN_TO_MS(fn - lchan->tch.dtx.fn); /* according to 3GPP TS 26.093 A.5.1.1: */ - if (lchan->tch.last_sid.is_update) { + if (lchan->tch.dtx.is_update) { /* SID UPDATE should be repeated every 8th RTP frame */ if (delta < GSM_RTP_FRAME_DURATION_MS * 8) return true; @@ -252,10 +283,10 @@ if (dtx_amr_sid_optional(lchan, fn)) return 0; - if (lchan->tch.last_sid.len) { - memcpy(dst, lchan->tch.last_sid.buf, lchan->tch.last_sid.len); - lchan->tch.last_sid.fn = fn; - return lchan->tch.last_sid.len + 1; + if (lchan->tch.dtx.len) { + memcpy(dst, lchan->tch.dtx.cache, lchan->tch.dtx.len); + lchan->tch.dtx.fn = fn; + return lchan->tch.dtx.len + 1; } LOGP(DL1C, LOGL_DEBUG, "Have to send %s frame on TCH but SID buffer " diff --git a/src/common/rsl.c b/src/common/rsl.c index d2fea12..6c8f5cc 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -2199,9 +2199,9 @@ msgb_tv_put(msg, RSL_IE_MEAS_RES_NR, lchan->meas.res_nr++); size_t ie_len = gsm0858_rsl_ul_meas_enc(&lchan->meas.ul_res, - lchan->tch.dtxd_active, + lchan->tch.dtx.dl_active, meas_res); - lchan->tch.dtxd_active = false; + lchan->tch.dtx.dl_active = false; if (ie_len >= 3) { msgb_tlv_put(msg, RSL_IE_UPLINK_MEAS, ie_len, meas_res); lchan->meas.flags &= ~LC_UL_M_F_RES_VALID; diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index 1c98951..f47634e 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -426,7 +426,7 @@ } static int ph_tch_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache, bool marker) { struct lc15l1_hdl *fl1 = trx_lc15l1_hdl(trx); struct gsm_lchan *lchan; @@ -462,7 +462,7 @@ rc = l1if_tch_encode(lchan, l1p->u.phDataReq.msgUnitParam.u8Buffer, &l1p->u.phDataReq.msgUnitParam.u8Size, - msg->data, msg->len, u32Fn, + msg->data, msg->len, u32Fn, use_cache, l1sap->u.tch.marker); if (rc < 0) { /* no data encoded for L1: smth will be generated below */ @@ -494,16 +494,14 @@ } else { /* empty frame */ if (trx->bts->dtxd && trx != trx->bts->c0) - lchan->tch.dtxd_active = true; + lchan->tch.dtx.dl_active = true; empty_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr); } /* send message to DSP's queue */ osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], nmsg); - if (l1sap->u.tch.marker) { /* DTX: send voice after ONSET was sent */ - l1sap->u.tch.marker = 0; - return ph_tch_req(trx, l1sap->oph.msg, l1sap); - } + if (rc > 0 && trx->bts->dtxd) /* DTX: send voice after ONSET was sent */ + return ph_tch_req(trx, l1sap->oph.msg, l1sap, true, false); return 0; } @@ -571,7 +569,7 @@ rc = ph_data_req(trx, msg, l1sap); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): - rc = ph_tch_req(trx, msg, l1sap); + rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); break; case OSMO_PRIM(PRIM_MPH_INFO, PRIM_OP_REQUEST): rc = mph_info_req(trx, msg, l1sap); diff --git a/src/osmo-bts-litecell15/l1_if.h b/src/osmo-bts-litecell15/l1_if.h index adb197d..7feee56 100644 --- a/src/osmo-bts-litecell15/l1_if.h +++ b/src/osmo-bts-litecell15/l1_if.h @@ -90,8 +90,8 @@ /* tch.c */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, - bool marker); + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker); int l1if_tch_rx(struct gsm_bts_trx *trx, uint8_t chan_nr, struct msgb *l1p_msg); int l1if_tch_fill(struct gsm_lchan *lchan, uint8_t *l1_buffer); struct msgb *gen_empty_tch_msg(struct gsm_lchan *lchan, uint32_t fn); diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index e246ffb..b251388 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -198,8 +199,7 @@ * \returns number of \a l1_payload bytes filled */ static int rtppayload_to_l1_amr(uint8_t *l1_payload, const uint8_t *rtp_payload, - uint8_t payload_len, - struct gsm_lchan *lchan, uint8_t ft) + uint8_t payload_len, uint8_t ft) { memcpy(l1_payload, rtp_payload, payload_len); return payload_len; @@ -210,10 +210,11 @@ /*! \brief function for incoming RTP via TCH.req * \param[in] rtp_pl buffer containing RTP payload * \param[in] rtp_pl_len length of \a rtp_pl + * \param[in] use_cache Use cached payload instead of parsing RTP * \param[in] marker RTP header Marker bit (indicates speech onset) * \returns 0 if encoding result can be sent further to L1 without extra actions * positive value if data is ready AND extra actions are required - * negative value otherwise + * negative value otherwise (no data for L1 encoded) * * This function prepares a msgb with a L1 PH-DATA.req primitive and * queues it into lchan->dl_tch_queue. @@ -223,7 +224,8 @@ * pre-fill the primtive. */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, bool marker) + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker) { uint8_t *payload_type; uint8_t *l1_payload, ft; @@ -242,17 +244,17 @@ *payload_type = GsmL1_TchPlType_Fr; rc = rtppayload_to_l1_fr(l1_payload, rtp_pl, rtp_pl_len); - if (rc) + if (rc && lchan->ts->trx->bts->dtxd) is_sid = osmo_fr_check_sid(rtp_pl, rtp_pl_len); } else{ *payload_type = GsmL1_TchPlType_Hr; rc = rtppayload_to_l1_hr(l1_payload, rtp_pl, rtp_pl_len); - if (rc) + if (rc && lchan->ts->trx->bts->dtxd) is_sid = osmo_hr_check_sid(rtp_pl, rtp_pl_len); } if (is_sid) - save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, -1, 0, 0); + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, -1); break; case GSM48_CMODE_SPEECH_EFR: *payload_type = GsmL1_TchPlType_Efr; @@ -261,25 +263,75 @@ /* FIXME: detect and save EFR SID */ break; case GSM48_CMODE_SPEECH_AMR: - rc = dtx_amr_check_onset(lchan, rtp_pl, rtp_pl_len, fn, - l1_payload, &ft); - - if (marker || rc > 0) { - *payload_type = GsmL1_TchPlType_Amr_Onset; - *len = 1; - if (rc != 0) { - LOGP(DRTP, LOGL_NOTICE, "%s SPEECH frame without" - " Marker: ONSET forced\n", - get_value_string(osmo_amr_type_names, ft)); - return rc; - } - LOGP(DRTP, LOGL_DEBUG, "%s SPEECH frame with Marker\n", - get_value_string(osmo_amr_type_names, ft)); - } - else { + if (use_cache) { *payload_type = GsmL1_TchPlType_Amr; - rc = 2 + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, - rtp_pl_len, lchan, ft); + rtppayload_to_l1_amr(l1_payload, lchan->tch.dtx.cache, + lchan->tch.dtx.len, ft); + *len = lchan->tch.dtx.len + 1; + return 0; + } + + rc = dtx_dl_amr_fsm_step(lchan, rtp_pl, rtp_pl_len, fn, + l1_payload, marker, len, &ft); + if (rc < 0) + return rc; + if (!lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + } + + /* DTX DL-specific logic below: */ + switch (lchan->tch.dtx.dl_amr_fsm->state) { + case ST_ONSET_V: + case ST_ONSET_F: + *payload_type = GsmL1_TchPlType_Amr_Onset; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + *len = 1; + return 1; + case ST_VOICE: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F1: + if (lchan->type == GSM_LCHAN_TCH_H) { /* AMR HR */ + *payload_type = GsmL1_TchPlType_Amr_SidFirstP1; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, + rtp_pl_len, ft); + return 0; + } + /* AMR FR */ + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F2: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_F1_INH: + *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: + *payload_type = GsmL1_TchPlType_Amr_SidUpdateInH; + *len = 3; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + return 1; + case ST_SID_U: + return -EAGAIN; + case ST_FACCH_V: + case ST_FACCH: + /* FIXME: if this possible at all? */ + return 0; + default: + LOGP(DRTP, LOGL_ERROR, "Unhandled DTX DL AMR FSM state " + "%d\n", lchan->tch.dtx.dl_amr_fsm->state); + return -EINVAL; } break; default: @@ -442,7 +494,20 @@ switch (lchan->tch_mode) { case GSM48_CMODE_SPEECH_AMR: - *payload_type = GsmL1_TchPlType_Amr; + if (lchan->type == GSM_LCHAN_TCH_H && + lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F1 && + lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr_SidFirstP2; + rc = dtx_dl_amr_fsm_step(lchan, NULL, 0, fn, l1_payload, + false, &(msu_param->u8Size), + NULL); + if (rc < 0) { + msgb_free(msg); + return NULL; + } + return msg; + } else + *payload_type = GsmL1_TchPlType_Amr; break; case GSM48_CMODE_SPEECH_V1: if (lchan->type == GSM_LCHAN_TCH_F) @@ -458,12 +523,13 @@ return NULL; } - rc = repeat_last_sid(lchan, l1_payload, fn); - if (!rc) { - msgb_free(msg); - return NULL; + if (lchan->ts->trx->bts->dtxd) { + rc = repeat_last_sid(lchan, l1_payload, fn); + if (!rc) { + msgb_free(msg); + return NULL; + } + msu_param->u8Size = rc; } - msu_param->u8Size = rc; - return msg; } diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 11a5729..bef2d30 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -421,7 +421,7 @@ } static int ph_tch_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache, bool marker) { struct femtol1_hdl *fl1 = trx_femtol1_hdl(trx); struct gsm_lchan *lchan; @@ -457,7 +457,7 @@ rc = l1if_tch_encode(lchan, l1p->u.phDataReq.msgUnitParam.u8Buffer, &l1p->u.phDataReq.msgUnitParam.u8Size, - msg->data, msg->len, u32Fn, + msg->data, msg->len, u32Fn, use_cache, l1sap->u.tch.marker); if (rc < 0) { /* no data encoded for L1: smth will be generated below */ @@ -489,16 +489,14 @@ } else { /* empty frame */ if (trx->bts->dtxd && trx != trx->bts->c0) - lchan->tch.dtxd_active = true; + lchan->tch.dtx.dl_active = true; empty_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr); } /* send message to DSP's queue */ osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], nmsg); - if (l1sap->u.tch.marker) { /* DTX: send voice after ONSET was sent */ - l1sap->u.tch.marker = 0; - return ph_tch_req(trx, l1sap->oph.msg, l1sap); - } + if (rc > 0 && trx->bts->dtxd) /* DTX: send voice after ONSET was sent */ + return ph_tch_req(trx, l1sap->oph.msg, l1sap, true, false); return 0; } @@ -566,7 +564,7 @@ rc = ph_data_req(trx, msg, l1sap); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): - rc = ph_tch_req(trx, msg, l1sap); + rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); break; case OSMO_PRIM(PRIM_MPH_INFO, PRIM_OP_REQUEST): rc = mph_info_req(trx, msg, l1sap); diff --git a/src/osmo-bts-sysmo/l1_if.h b/src/osmo-bts-sysmo/l1_if.h index ece7a01..0dc919b 100644 --- a/src/osmo-bts-sysmo/l1_if.h +++ b/src/osmo-bts-sysmo/l1_if.h @@ -110,8 +110,8 @@ /* tch.c */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, - bool marker); + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker); int l1if_tch_rx(struct gsm_bts_trx *trx, uint8_t chan_nr, struct msgb *l1p_msg); int l1if_tch_fill(struct gsm_lchan *lchan, uint8_t *l1_buffer); struct msgb *gen_empty_tch_msg(struct gsm_lchan *lchan, uint32_t fn); diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index ca9045e..b08ba7e 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -281,8 +282,7 @@ * \returns number of \a l1_payload bytes filled */ static int rtppayload_to_l1_amr(uint8_t *l1_payload, const uint8_t *rtp_payload, - uint8_t payload_len, - struct gsm_lchan *lchan, uint8_t ft) + uint8_t payload_len, uint8_t ft) { #ifdef USE_L1_RTP_MODE memcpy(l1_payload, rtp_payload, payload_len); @@ -306,10 +306,11 @@ /*! \brief function for incoming RTP via TCH.req * \param[in] rtp_pl buffer containing RTP payload * \param[in] rtp_pl_len length of \a rtp_pl + * \param[in] use_cache Use cached payload instead of parsing RTP * \param[in] marker RTP header Marker bit (indicates speech onset) * \returns 0 if encoding result can be sent further to L1 without extra actions * positive value if data is ready AND extra actions are required - * negative value otherwise + * negative value otherwise (no data for L1 encoded) * * This function prepares a msgb with a L1 PH-DATA.req primitive and * queues it into lchan->dl_tch_queue. @@ -319,7 +320,8 @@ * pre-fill the primtive. */ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, - const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, bool marker) + const uint8_t *rtp_pl, unsigned int rtp_pl_len, uint32_t fn, + bool use_cache, bool marker) { uint8_t *payload_type; uint8_t *l1_payload, ft; @@ -338,17 +340,17 @@ *payload_type = GsmL1_TchPlType_Fr; rc = rtppayload_to_l1_fr(l1_payload, rtp_pl, rtp_pl_len); - if (rc) + if (rc && lchan->ts->trx->bts->dtxd) is_sid = osmo_fr_check_sid(rtp_pl, rtp_pl_len); } else{ *payload_type = GsmL1_TchPlType_Hr; rc = rtppayload_to_l1_hr(l1_payload, rtp_pl, rtp_pl_len); - if (rc) + if (rc && lchan->ts->trx->bts->dtxd) is_sid = osmo_hr_check_sid(rtp_pl, rtp_pl_len); } if (is_sid) - save_last_sid(lchan, rtp_pl, rtp_pl_len, fn, -1, 0, 0); + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, -1); break; #if defined(L1_HAS_EFR) && defined(USE_L1_RTP_MODE) case GSM48_CMODE_SPEECH_EFR: @@ -359,25 +361,75 @@ break; #endif case GSM48_CMODE_SPEECH_AMR: - rc = dtx_amr_check_onset(lchan, rtp_pl, rtp_pl_len, fn, - l1_payload, &ft); - - if (marker || rc > 0) { - *payload_type = GsmL1_TchPlType_Amr_Onset; - *len = 1; - if (rc != 0) { - LOGP(DRTP, LOGL_NOTICE, "%s SPEECH frame without" - " Marker: ONSET forced\n", - get_value_string(osmo_amr_type_names, ft)); - return rc; - } - LOGP(DRTP, LOGL_DEBUG, "%s SPEECH frame with Marker\n", - get_value_string(osmo_amr_type_names, ft)); - } - else { + if (use_cache) { *payload_type = GsmL1_TchPlType_Amr; - rc = 2 + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, - rtp_pl_len, lchan, ft); + rtppayload_to_l1_amr(l1_payload, lchan->tch.dtx.cache, + lchan->tch.dtx.len, ft); + *len = lchan->tch.dtx.len + 1; + return 0; + } + + rc = dtx_dl_amr_fsm_step(lchan, rtp_pl, rtp_pl_len, fn, + l1_payload, marker, len, &ft); + if (rc < 0) + return rc; + if (!lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + } + + /* DTX DL-specific logic below: */ + switch (lchan->tch.dtx.dl_amr_fsm->state) { + case ST_ONSET_V: + case ST_ONSET_F: + *payload_type = GsmL1_TchPlType_Amr_Onset; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + *len = 1; + return 1; + case ST_VOICE: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F1: + if (lchan->type == GSM_LCHAN_TCH_H) { /* AMR HR */ + *payload_type = GsmL1_TchPlType_Amr_SidFirstP1; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, + rtp_pl_len, ft); + return 0; + } + /* AMR FR */ + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_SID_F2: + *payload_type = GsmL1_TchPlType_Amr; + rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, + ft); + return 0; + case ST_F1_INH: + *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: + *payload_type = GsmL1_TchPlType_Amr_SidUpdateInH; + *len = 3; + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); + return 1; + case ST_SID_U: + return -EAGAIN; + case ST_FACCH_V: + case ST_FACCH: + /* FIXME: if this possible at all? */ + return 0; + default: + LOGP(DRTP, LOGL_ERROR, "Unhandled DTX DL AMR FSM state " + "%d\n", lchan->tch.dtx.dl_amr_fsm->state); + return -EINVAL; } break; default: @@ -544,7 +596,20 @@ switch (lchan->tch_mode) { case GSM48_CMODE_SPEECH_AMR: - *payload_type = GsmL1_TchPlType_Amr; + if (lchan->type == GSM_LCHAN_TCH_H && + lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F1 && + lchan->ts->trx->bts->dtxd) { + *payload_type = GsmL1_TchPlType_Amr_SidFirstP2; + rc = dtx_dl_amr_fsm_step(lchan, NULL, 0, fn, l1_payload, + false, &(msu_param->u8Size), + NULL); + if (rc < 0) { + msgb_free(msg); + return NULL; + } + return msg; + } else + *payload_type = GsmL1_TchPlType_Amr; break; case GSM48_CMODE_SPEECH_V1: if (lchan->type == GSM_LCHAN_TCH_F) @@ -560,12 +625,13 @@ return NULL; } - rc = repeat_last_sid(lchan, l1_payload, fn); - if (!rc) { - msgb_free(msg); - return NULL; + if (lchan->ts->trx->bts->dtxd) { + rc = repeat_last_sid(lchan, l1_payload, fn); + if (!rc) { + msgb_free(msg); + return NULL; + } + msu_param->u8Size = rc; } - msu_param->u8Size = rc; - return msg; } -- To view, visit https://gerrit.osmocom.org/1030 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I74a0b42cb34d525b8a70d264135e82994ca70d31 Gerrit-PatchSet: 7 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 Thu Oct 13 08:35:25 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 13 Oct 2016 08:35:25 +0000 Subject: [MERGED] openbsc[master]: Log use of incompatible BS-AG-BLKS-RES value In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Log use of incompatible BS-AG-BLKS-RES value ...................................................................... Log use of incompatible BS-AG-BLKS-RES value There's "channel-descrption bs-ag-blks-res" vty command which sets BS-AG-BLKS-RES which might be too high if CCCH is combined with SDCCHs. Previously proper value was silently enforced. Log this situation explicitly and add spec reference to the comment. Change-Id: I53e2b881fc28472d6709f063fb265a4e6a0fffcd --- M openbsc/src/libbsc/bsc_init.c 1 file changed, 7 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c index c38bca1..bf6e056 100644 --- a/openbsc/src/libbsc/bsc_init.c +++ b/openbsc/src/libbsc/bsc_init.c @@ -437,9 +437,14 @@ switch (n) { case 0: bts->si_common.chan_desc.ccch_conf = RSL_BCCH_CCCH_CONF_1_C; - /* Limit reserved block to 2 on combined channel */ - if (bts->si_common.chan_desc.bs_ag_blks_res > 2) + /* Limit reserved block to 2 on combined channel according to + 3GPP TS 44.018 Table 10.5.2.11.1 */ + if (bts->si_common.chan_desc.bs_ag_blks_res > 2) { + LOGP(DNM, LOGL_NOTICE, "CCCH is combined with SDCCHs, " + "reducing BS-AG-BLKS-RES value %d -> 2\n", + bts->si_common.chan_desc.bs_ag_blks_res); bts->si_common.chan_desc.bs_ag_blks_res = 2; + } break; case 1: bts->si_common.chan_desc.ccch_conf = RSL_BCCH_CCCH_CONF_1_NC; -- To view, visit https://gerrit.osmocom.org/1043 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I53e2b881fc28472d6709f063fb265a4e6a0fffcd Gerrit-PatchSet: 2 Gerrit-Project: openbsc 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 Oct 13 08:50:24 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 13 Oct 2016 08:50:24 +0000 Subject: [ABANDON] libosmo-abis[master]: Remove use of private oRTP function In-Reply-To: References: Message-ID: Max has abandoned this change. Change subject: Remove use of private oRTP function ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/908 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Iff1b15c68efca3e02267e0308142c6a7a0c2a974 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis 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 Thu Oct 13 09:27:53 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 13 Oct 2016 09:27:53 +0000 Subject: [PATCH] libosmocore[master]: gsm0408: Completing GSM 04.08 RR message types Message-ID: Review at https://gerrit.osmocom.org/1056 gsm0408: Completing GSM 04.08 RR message types - Add missing message types to be up to date with the latest specification release (3GPP TS 04.18) - Add value strings to translate RR message type identifiers into human readable strings. (see gsm48_rr_msg_name() in gsm48.h Change-Id: I3ceb070bf4dc8f5a071a5d43c6aa2d4e84c2dec6 --- M include/osmocom/gsm/gsm48.h M include/osmocom/gsm/protocol/gsm_04_08.h M src/gsm/gsm48.c 3 files changed, 124 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/56/1056/1 diff --git a/include/osmocom/gsm/gsm48.h b/include/osmocom/gsm/gsm48.h index d6e58c2..6a52c2d 100644 --- a/include/osmocom/gsm/gsm48.h +++ b/include/osmocom/gsm/gsm48.h @@ -20,6 +20,7 @@ extern const struct tlv_definition gsm48_mm_att_tlvdef; const char *gsm48_cc_state_name(uint8_t state); const char *gsm48_cc_msg_name(uint8_t msgtype); +const char *gsm48_rr_msg_name(uint8_t msgtype); const char *rr_cause_name(uint8_t cause); int gsm48_decode_lai(struct gsm48_loc_area_id *lai, uint16_t *mcc, diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index fa2bb06..767aa3d 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -1021,6 +1021,10 @@ #define GSM48_MT_RR_IMM_ASS 0x3f #define GSM48_MT_RR_IMM_ASS_EXT 0x39 #define GSM48_MT_RR_IMM_ASS_REJ 0x3a +#define GSM48_MT_RR_DTM_ASS_FAIL 0x48 +#define GSM48_MT_RR_DTM_REJECT 0x49 +#define GSM48_MT_RR_DTM_REQUEST 0x4A +#define GSM48_MT_RR_PACKET_ASS 0x4B #define GSM48_MT_RR_CIPH_M_CMD 0x35 #define GSM48_MT_RR_CIPH_M_COMPL 0x32 @@ -1036,6 +1040,8 @@ #define GSM48_MT_RR_HANDO_COMPL 0x2c #define GSM48_MT_RR_HANDO_FAIL 0x28 #define GSM48_MT_RR_HANDO_INFO 0x2d +#define GSM48_MT_RR_HANDO_INFO 0x2d +#define GSM48_MT_RR_DTM_ASS_CMD 0x4c #define GSM48_MT_RR_CELL_CHG_ORDER 0x08 #define GSM48_MT_RR_PDCH_ASS_CMD 0x23 @@ -1049,9 +1055,9 @@ #define GSM48_MT_RR_PAG_REQ_3 0x24 #define GSM48_MT_RR_PAG_RESP 0x27 #define GSM48_MT_RR_NOTIF_NCH 0x20 -#define GSM48_MT_RR_NOTIF_FACCH 0x25 +#define GSM48_MT_RR_NOTIF_FACCH 0x25 /* (Reserved) */ #define GSM48_MT_RR_NOTIF_RESP 0x26 - +#define GSM48_MT_RR_PACKET_NOTIF 0x4e #define GSM48_MT_RR_UTRAN_CLSM_CHG 0x60 #define GSM48_MT_RR_CDMA2K_CLSM_CHG 0x62 #define GSM48_MT_RR_IS_TO_UTRAN_HANDO 0x63 @@ -1077,6 +1083,10 @@ #define GSM48_MT_RR_SYSINFO_16 0x3d #define GSM48_MT_RR_SYSINFO_17 0x3e +#define GSM48_MT_RR_SYSINFO_18 0x40 +#define GSM48_MT_RR_SYSINFO_19 0x41 +#define GSM48_MT_RR_SYSINFO_20 0x42 + #define GSM48_MT_RR_CHAN_MODE_MODIF 0x10 #define GSM48_MT_RR_STATUS 0x12 #define GSM48_MT_RR_CHAN_MODE_MODIF_ACK 0x17 @@ -1087,6 +1097,7 @@ #define GSM48_MT_RR_EXT_MEAS_REP 0x36 #define GSM48_MT_RR_EXT_MEAS_REP_ORD 0x37 #define GSM48_MT_RR_GPRS_SUSP_REQ 0x34 +#define GSM48_MT_RR_DTM_INFO 0x4d #define GSM48_MT_RR_VGCS_UPL_GRANT 0x09 #define GSM48_MT_RR_UPLINK_RELEASE 0x0e diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c index b4740cf..aab3091 100644 --- a/src/gsm/gsm48.c +++ b/src/gsm/gsm48.c @@ -162,6 +162,11 @@ { 0, NULL }, }; +const char *rr_cause_name(uint8_t cause) +{ + return get_value_string(rr_cause_names, cause); +} + /* FIXME: convert to value_string */ static const char *cc_state_names[32] = { "NULL", @@ -250,11 +255,114 @@ return get_value_string(cc_msg_names, msgtype); } -const char *rr_cause_name(uint8_t cause) + +static const struct value_string rr_msg_names[] = { + /* Channel establishment messages */ + { GSM48_MT_RR_INIT_REQ, "RR INITIALISATION REQUEST" }, + { GSM48_MT_RR_ADD_ASS, "ADDITIONAL ASSIGNMENT" }, + { GSM48_MT_RR_IMM_ASS, "IMMEDIATE ASSIGNMENT" }, + { GSM48_MT_RR_IMM_ASS_EXT, "MMEDIATE ASSIGNMENT EXTENDED" }, + { GSM48_MT_RR_IMM_ASS_REJ, "IMMEDIATE ASSIGNMENT REJECT" }, + { GSM48_MT_RR_DTM_ASS_FAIL, "DTM ASSIGNMENT FAILURE" }, + { GSM48_MT_RR_DTM_REJECT, "DTM REJECT" }, + { GSM48_MT_RR_DTM_REQUEST, "DTM REQUEST" }, + { GSM48_MT_RR_PACKET_ASS, "PACKET ASSIGNMENT" }, + + /* Ciphering messages */ + { GSM48_MT_RR_CIPH_M_CMD, "CIPHERING MODE COMMAND" }, + { GSM48_MT_RR_CIPH_M_COMPL, "CIPHERING MODE COMPLETE" }, + + /* Configuration change messages */ + { GSM48_MT_RR_CFG_CHG_CMD, "CONFIGURATION CHANGE COMMAND" }, + { GSM48_MT_RR_CFG_CHG_ACK, "CONFIGURATION CHANGE ACK" }, + { GSM48_MT_RR_CFG_CHG_REJ, "CONFIGURATION CHANGE REJECT" }, + + /* Handover messages */ + { GSM48_MT_RR_ASS_CMD, "ASSIGNMENT COMMAND" }, + { GSM48_MT_RR_ASS_COMPL, "ASSIGNMENT COMPLETE" }, + { GSM48_MT_RR_ASS_FAIL, "ASSIGNMENT FAILURE" }, + { GSM48_MT_RR_HANDO_CMD, "HANDOVER COMMAND" }, + { GSM48_MT_RR_HANDO_COMPL, "HANDOVER COMPLETE" }, + { GSM48_MT_RR_HANDO_FAIL, "HANDOVER FAILURE" }, + { GSM48_MT_RR_HANDO_INFO, "PHYSICAL INFORMATION" }, + { GSM48_MT_RR_DTM_ASS_CMD, "DTM ASSIGNMENT COMMAND" }, + + { GSM48_MT_RR_CELL_CHG_ORDER, "RR-CELL CHANGE ORDER" }, + { GSM48_MT_RR_PDCH_ASS_CMD, "PDCH ASSIGNMENT COMMAND" }, + + /* Channel release messages */ + { GSM48_MT_RR_CHAN_REL, "CHANNEL RELEASE" }, + { GSM48_MT_RR_PART_REL, "PARTIAL RELEASE" }, + { GSM48_MT_RR_PART_REL_COMP, "PARTIAL RELEASE COMPLETE" }, + + /* Paging and Notification messages */ + { GSM48_MT_RR_PAG_REQ_1, "PAGING REQUEST TYPE 1" }, + { GSM48_MT_RR_PAG_REQ_2, "PAGING REQUEST TYPE 2" }, + { GSM48_MT_RR_PAG_REQ_3, "PAGING REQUEST TYPE 3" }, + { GSM48_MT_RR_PAG_RESP, "PAGING RESPONSE" }, + { GSM48_MT_RR_NOTIF_NCH, "NOTIFICATION/NCH" }, + { GSM48_MT_RR_NOTIF_FACCH, "(Reserved)" }, + { GSM48_MT_RR_NOTIF_RESP, "NOTIFICATION/RESPONSE" }, + { GSM48_MT_RR_PACKET_NOTIF, "PACKET NOTIFICATION" }, + /* 3G Specific messages */ + { GSM48_MT_RR_UTRAN_CLSM_CHG, "UTRAN Classmark Change" }, + { GSM48_MT_RR_CDMA2K_CLSM_CHG, "cdma 2000 Classmark Change" }, + { GSM48_MT_RR_IS_TO_UTRAN_HANDO, "Inter System to UTRAN Handover Command" }, + { GSM48_MT_RR_IS_TO_CDMA2K_HANDO, "Inter System to cdma2000 Handover Command" }, + + /* System information messages */ + { GSM48_MT_RR_SYSINFO_8, "SYSTEM INFORMATION TYPE 8" }, + { GSM48_MT_RR_SYSINFO_1, "SYSTEM INFORMATION TYPE 1" }, + { GSM48_MT_RR_SYSINFO_2, "SYSTEM INFORMATION TYPE 2" }, + { GSM48_MT_RR_SYSINFO_3, "SYSTEM INFORMATION TYPE 3" }, + { GSM48_MT_RR_SYSINFO_4, "SYSTEM INFORMATION TYPE 4" }, + { GSM48_MT_RR_SYSINFO_5, "SYSTEM INFORMATION TYPE 5" }, + { GSM48_MT_RR_SYSINFO_6, "SYSTEM INFORMATION TYPE 6" }, + { GSM48_MT_RR_SYSINFO_7, "SYSTEM INFORMATION TYPE 7" }, + { GSM48_MT_RR_SYSINFO_2bis, "SYSTEM INFORMATION TYPE 2bis" }, + { GSM48_MT_RR_SYSINFO_2ter, "SYSTEM INFORMATION TYPE 2ter" }, + { GSM48_MT_RR_SYSINFO_2quater, "SYSTEM INFORMATION TYPE 2quater" }, + { GSM48_MT_RR_SYSINFO_5bis, "SYSTEM INFORMATION TYPE 5bis" }, + { GSM48_MT_RR_SYSINFO_5ter, "SYSTEM INFORMATION TYPE 5ter" }, + { GSM48_MT_RR_SYSINFO_9, "SYSTEM INFORMATION TYPE 9" }, + { GSM48_MT_RR_SYSINFO_13, "SYSTEM INFORMATION TYPE 13" }, + { GSM48_MT_RR_SYSINFO_16, "SYSTEM INFORMATION TYPE 16" }, + { GSM48_MT_RR_SYSINFO_17, "SYSTEM INFORMATION TYPE 17" }, + { GSM48_MT_RR_SYSINFO_18, "SYSTEM INFORMATION TYPE 18" }, + { GSM48_MT_RR_SYSINFO_19, "SYSTEM INFORMATION TYPE 19" }, + { GSM48_MT_RR_SYSINFO_20, "SYSTEM INFORMATION TYPE 20" }, + + /* Miscellaneous messages */ + { GSM48_MT_RR_CHAN_MODE_MODIF, "CHANNEL MODE MODIFY" }, + { GSM48_MT_RR_STATUS, "RR STATUS" }, + { GSM48_MT_RR_CHAN_MODE_MODIF_ACK, "CHANNEL MODE MODIFY ACKNOWLEDGE" }, + { GSM48_MT_RR_FREQ_REDEF, "FREQUENCY REDEFINITION" }, + { GSM48_MT_RR_MEAS_REP, "MEASUREMENT REPORT" }, + { GSM48_MT_RR_CLSM_CHG, "CLASSMARK CHANGE" }, + { GSM48_MT_RR_CLSM_ENQ, "CLASSMARK ENQUIRY" }, + { GSM48_MT_RR_EXT_MEAS_REP, "EXTENDED MEASUREMENT REPORT" }, + { GSM48_MT_RR_EXT_MEAS_REP_ORD, "EXTENDED MEASUREMENT ORDER" }, + { GSM48_MT_RR_GPRS_SUSP_REQ, "GPRS SUSPENSION REQUEST" }, + { GSM48_MT_RR_DTM_INFO, "DTM INFORMATION" }, + + /* VGCS uplink control messages */ + { GSM48_MT_RR_VGCS_UPL_GRANT, "VGCS UPLINK GRANT" }, + { GSM48_MT_RR_UPLINK_RELEASE, "UPLINK RELEASE" }, + { GSM48_MT_RR_UPLINK_FREE, "0c" }, + { GSM48_MT_RR_UPLINK_BUSY, "UPLINK BUSY" }, + { GSM48_MT_RR_TALKER_IND, "TALKER INDICATION" }, + + /* Application messages */ + { GSM48_MT_RR_APP_INFO, "Application Information" }, + { 0, NULL } +}; + +const char *gsm48_rr_msg_name(uint8_t msgtype) { - return get_value_string(rr_cause_names, cause); + return get_value_string(rr_msg_names, msgtype); } + const struct value_string gsm48_chan_mode_names[] = { { GSM48_CMODE_SIGN, "SIGNALLING" }, { GSM48_CMODE_SPEECH_V1, "SPEECH_V1" }, -- To view, visit https://gerrit.osmocom.org/1056 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3ceb070bf4dc8f5a071a5d43c6aa2d4e84c2dec6 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Thu Oct 13 09:42:07 2016 From: gerrit-no-reply at lists.osmocom.org (pravin) Date: Thu, 13 Oct 2016 09:42:07 +0000 Subject: osmo-pcu[master]: EGPRS: Add EPDAN CRBB Tree based decoding In-Reply-To: References: Message-ID: Patch Set 26: (1 comment) https://gerrit.osmocom.org/#/c/416/26/src/egprs_rlc_compression.cpp File src/egprs_rlc_compression.cpp: Line 297: * \param color_code_bit[in] Color code 1 for Ones runlength 0 for Zero runlength > please still explain to me your choice of the term "color code". Is it a te A one bit indicator (i.e. Compressed Bitmap Starting Color Code) is used to indicate whether the compressed bitmap starts with a run length of zeros or a run length of ones. This is explained in section 9.1.10 (compression) of 3gpp 44.060. -- To view, visit https://gerrit.osmocom.org/416 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieae1992ed4b02bb1e09eec2d3de1a030eabd16ce Gerrit-PatchSet: 26 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: pravin Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: pravin Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Oct 13 09:47:30 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 13 Oct 2016 09:47:30 +0000 Subject: [PATCH] osmo-bts[master]: TRX: fix building with latest DTX changes Message-ID: Review at https://gerrit.osmocom.org/1057 TRX: fix building with latest DTX changes Bring up-to-speed with latest changes in OpenBSC. Change-Id: I16b24b2cd09600e215de163e7b5baae329887c9e --- M src/osmo-bts-trx/scheduler_trx.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/57/1057/1 diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index 02e7aba..463630c 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -1123,7 +1123,7 @@ /* indicate bad frame */ switch (tch_mode) { case GSM48_CMODE_SPEECH_V1: /* FR */ - if (lchan->tch.ul_sid) + if (lchan->tch.dtx.ul_sid) return 0; /* DTXu: pause in progress */ memset(tch_data, 0, GSM_FR_BYTES); rc = GSM_FR_BYTES; @@ -1297,7 +1297,7 @@ /* indicate bad frame */ switch (tch_mode) { case GSM48_CMODE_SPEECH_V1: /* HR */ - if (lchan->tch.ul_sid) + if (lchan->tch.dtx.ul_sid) return 0; /* DTXu: pause in progress */ tch_data[0] = 0x70; /* F = 0, FT = 111 */ memset(tch_data + 1, 0, 14); -- To view, visit https://gerrit.osmocom.org/1057 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I16b24b2cd09600e215de163e7b5baae329887c9e Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Oct 13 09:47:46 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 13 Oct 2016 09:47:46 +0000 Subject: [PATCH] osmo-bts[master]: build: Enable subdir-objects Message-ID: Review at https://gerrit.osmocom.org/1058 build: Enable subdir-objects This fixes warning (and even build on some newer automake). Change-Id: I52ef0021e652746d3edf414a54ccbbe0ac18c98c --- M configure.ac 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/58/1058/1 diff --git a/configure.ac b/configure.ac index 1e8a4ec..04a8a38 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ dnl *This* is the root dir, even if an install-sh exists in ../ or ../../ AC_CONFIG_AUX_DIR([.]) -AM_INIT_AUTOMAKE([dist-bzip2]) +AM_INIT_AUTOMAKE([dist-bzip2 subdir-objects]) AC_CONFIG_TESTDIR(tests) dnl kernel style compile messages -- To view, visit https://gerrit.osmocom.org/1058 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I52ef0021e652746d3edf414a54ccbbe0ac18c98c Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu Oct 13 09:52:25 2016 From: gerrit-no-reply at lists.osmocom.org (pravin) Date: Thu, 13 Oct 2016 09:52:25 +0000 Subject: [PATCH] osmo-pcu[master]: EGPRS: Add EPDAN CRBB Tree based decoding In-Reply-To: References: Message-ID: Hello Max, Neels Hofmeyr, arvind.sirsikar, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/416 to look at the new patch set (#27). EGPRS: Add EPDAN CRBB Tree based decoding Implemented tree based algorithm to decode compressed bitmap in EPDAN as described in section 9.1.10 of 3GPP 44.060. This algorithm intends to improve the performance over existing method. New Regression test is added under bitcomp directory. Test case is added to validate decompressed result of the bitmap Present in EPDAN. Test is done for multiple bitmaps of varying length. Invalid inputs are also part of the test vector. Change-Id: Ieae1992ed4b02bb1e09eec2d3de1a030eabd16ce --- M src/Makefile.am M src/decoding.cpp A src/egprs_rlc_compression.cpp A src/egprs_rlc_compression.h M tests/Makefile.am A tests/bitcomp/BitcompTest.cpp A tests/bitcomp/BitcompTest.err A tests/bitcomp/BitcompTest.ok M tests/testsuite.at 9 files changed, 787 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/16/416/27 diff --git a/src/Makefile.am b/src/Makefile.am index 9bdec2f..9b047e7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -62,7 +62,8 @@ rlc.cpp \ osmobts_sock.cpp \ gprs_codel.c \ - gprs_coding_scheme.cpp + gprs_coding_scheme.cpp \ + egprs_rlc_compression.cpp bin_PROGRAMS = \ osmo-pcu @@ -94,7 +95,8 @@ pcu_utils.h \ cxx_linuxlist.h \ gprs_codel.h \ - gprs_coding_scheme.h + gprs_coding_scheme.h \ + egprs_rlc_compression.h osmo_pcu_SOURCES = pcu_main.cpp diff --git a/src/decoding.cpp b/src/decoding.cpp index 3f5c4d2..6ae4b16 100644 --- a/src/decoding.cpp +++ b/src/decoding.cpp @@ -20,6 +20,7 @@ #include #include #include +#include extern "C" { #include @@ -692,21 +693,17 @@ if (crbb_len > 0) { int old_len = bits->cur_bit; - struct bitvec crbb; - crbb.data = (uint8_t *)desc->CRBB; - crbb.data_len = sizeof(desc->CRBB); - crbb.cur_bit = desc->CRBB_LENGTH; - - rc = osmo_t4_decode(&crbb, desc->CRBB_STARTING_COLOR_CODE, - bits); - + LOGP(DRLCMACDL, LOGL_DEBUG, "Compress bitmap exists, " + "CRBB LEN = %d and Starting color code = %d", + desc->CRBB_LENGTH, desc->CRBB_STARTING_COLOR_CODE); + rc = egprs_compress::decompress_crbb(desc->CRBB_LENGTH, + desc->CRBB_STARTING_COLOR_CODE, desc->CRBB, bits); if (rc < 0) { LOGP(DRLCMACUL, LOGL_NOTICE, - "Failed to decode CRBB: " - "length %d, data '%s'\n", - desc->CRBB_LENGTH, - osmo_hexdump(crbb.data, crbb.data_len)); + "Failed to decode CRBB: length %d, data '%s'\n", + desc->CRBB_LENGTH, osmo_hexdump( + desc->CRBB, (desc->CRBB_LENGTH + 7)/8)); /* We don't know the SSN offset for the URBB, * return what we have so far and assume the * bitmap has stopped here */ diff --git a/src/egprs_rlc_compression.cpp b/src/egprs_rlc_compression.cpp new file mode 100644 index 0000000..d34d4da --- /dev/null +++ b/src/egprs_rlc_compression.cpp @@ -0,0 +1,361 @@ +/* egprs_rlc_compression.h +* Routines for EGPRS RLC bitmap compression handling +*/ +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +#define EGPRS_CODEWORDS 79 /* total number of codewords */ + +struct egprs_compress_node{ + struct egprs_compress_node *left; + struct egprs_compress_node *right; + int run_length; +}; + +extern void *tall_pcu_ctx; + +egprs_compress *egprs_compress::s_instance = 0; + +egprs_compress_node *egprs_compress::create_tree_node(void *parent) +{ + egprs_compress_node *new_node; + + new_node = talloc_zero(parent, egprs_compress_node); + new_node->left = NULL; + new_node->right = NULL; + new_node->run_length = -1; + return new_node; +} + +egprs_compress *egprs_compress::instance() +{ + if (!egprs_compress::s_instance) + egprs_compress::s_instance = new egprs_compress; + return egprs_compress::s_instance; +} + +/* Expands the given tree by incorporating + * the given codewords. + * \param root[in] Root of ones or zeros tree + * \param cdwd[in] Array of code words + * number of codewords is EGPRS_CODEWORDS + */ +void egprs_compress::build_codewords(egprs_compress_node *root, const char *cdwd[]) +{ + egprs_compress_node *iter; + int len; + int i; + int idx; + + for (idx = 0; idx < EGPRS_CODEWORDS; idx++) { + len = strlen((const char *)cdwd[idx]); + iter = root; + for (i = 0; i < len; i++) { + if (cdwd[idx][i] == '0') { + if (!iter->left) + iter->left = create_tree_node(root); + iter = iter->left; + } else { + if (!iter->right) + iter->right = create_tree_node(root); + iter = iter->right; + } + } + if (iter) { + /* The first 64 run lengths are 0, 1, 2, ..., 63 + * and the following ones are 64, 128, 192 described in + * section 9.1.10 of 3gpp 44.060 */ + if (idx < 64) + iter->run_length = idx; + else + iter->run_length = (idx - 63) * 64; + } + } +} + +/* 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", + "000111", + "0111", + "1000", + "1011", + "1100", + "1110", + "1111", + "10011", + "10100", + "00111", + "01000", + "001000", + "000011", + "110100", + "110101", + "101010", + "101011", + "0100111", + "0001100", + "0001000", + "0010111", + "0000011", + "0000100", + "0101000", + "0101011", + "0010011", + "0100100", + "0011000", + "00000010", + "00000011", + "00011010", + "00011011", + "00010010", + "00010011", + "00010100", + "00010101", + "00010110", + "00010111", + "00101000", + "00101001", + "00101010", + "00101011", + "00101100", + "00101101", + "00000100", + "00000101", + "00001010", + "00001011", + "01010010", + "01010011", + "01010100", + "01010101", + "00100100", + "00100101", + "01011000", + "01011001", + "01011010", + "01011011", + "01001010", + "01001011", + "00110010", + "00110011", + "00110100", + "11011", + "10010", + "010111", + "0110111", + "00110110", + "00110111", + "01100100", + "01100101", + "01101000", + "01100111", + "011001100", + "011001101", + "011010010", + "011010011", + "011010100" +}; + +const char *zero_run_len_code_list[EGPRS_CODEWORDS] = { + "0000110111", + "10", + "11", + "010", + "011", + "0011", + "0010", + "00011", + "000101", + "000100", + "0000100", + "0000101", + "0000111", + "00000100", + "00000111", + "000011000", + "0000010111", + "0000011000", + "0000001000", + "00001100111", + "00001101000", + "00001101100", + "00000110111", + "00000101000", + "00000010111", + "00000011000", + "000011001010", + "000011001011", + "000011001100", + "000011001101", + "000001101000", + "000001101001", + "000001101010", + "000001101011", + "000011010010", + "000011010011", + "000011010100", + "000011010101", + "000011010110", + "000011010111", + "000001101100", + "000001101101", + "000011011010", + "000011011011", + "000001010100", + "000001010101", + "000001010110", + "000001010111", + "000001100100", + "000001100101", + "000001010010", + "000001010011", + "000000100100", + "000000110111", + "000000111000", + "000000100111", + "000000101000", + "000001011000", + "000001011001", + "000000101011", + "000000101100", + "000001011010", + "000001100110", + "000001100111", + "0000001111", + "000011001000", + "000011001001", + "000001011011", + "000000110011", + "000000110100", + "000000110101", + "0000001101100", + "0000001101101", + "0000001001010", + "0000001001011", + "0000001001100", + "0000001001101", + "0000001110010", + "0000001110011" +}; + +/* Calculate runlength of a codeword + * \param root[in] Root of Ones or Zeros tree + * \param bmbuf[in] Received compressed bitmap buf + * \param bit_pos[in] The start bit pos to read codeword + * \param len_codewd[in] Length of code word + * \param rlen[out] Calculated run length + */ +static int search_runlen( + egprs_compress_node *root, + const uint8_t *bmbuf, + uint8_t bit_pos, + uint8_t *len_codewd, + uint16_t *rlen) +{ + egprs_compress_node *iter; + uint8_t dir; + + iter = root; + *len_codewd = 0; + + while (iter->run_length == -1) { + if ((!iter->left) && (!iter->right)) + return -1; + /* get the bit value at the bitpos and put it in right most of dir */ + dir = (bmbuf[bit_pos/8] >> (7 - (bit_pos & 0x07))) & 0x01; + bit_pos++; + (*len_codewd)++; + if (!dir && (iter->left != NULL)) + iter = iter->left; + else if (dir && (iter->right != NULL)) + iter = iter->right; + else + return -1; + } + LOGP(DRLCMACUL, LOGL_DEBUG, "Run_length = %d\n", iter->run_length); + *rlen = iter->run_length; + return 1; +} + +/* Decompress received block bitmap + * \param compress_bmap_len[in] Compressed bitmap length + * \param color_code_bit[in] Color code 1 for Ones runlength 0 for Zero runlength + * as described in section 9.1.10 of 3gpp 44.060. + * \param orig_crbb_buf[in] Received block crbb bitmap + * \param dest[out] Uncompressed bitvector + */ +int egprs_compress::decompress_crbb( + int8_t compress_bmap_len, + bool color_code_bit, + const uint8_t *orig_crbb_buf, + bitvec *dest) +{ + + uint8_t bit_pos = 0; + uint8_t data; + egprs_compress_node *list = NULL; + uint8_t nbits = 0; /* number of bits of codeword */ + uint16_t run_length = 0; + uint16_t cbmaplen = 0; /* compressed bitmap part after decompression */ + unsigned wp = dest->cur_bit; + int rc = 0; + egprs_compress *compress = instance(); + + while (compress_bmap_len > 0) { + if (color_code_bit) { + data = 0xff; + list = compress->ones_list; + } else { + data = 0x00; + list = compress->zeros_list; + } + rc = search_runlen(list, orig_crbb_buf, + bit_pos, &nbits, &run_length); + if (rc == -1) + return -1; + /* If run length > 64, need makeup and terminating code */ + if (run_length < 64) + color_code_bit = !color_code_bit; + cbmaplen = cbmaplen + run_length; + /* put run length of Ones in uncompressed bitmap */ + while (run_length != 0) { + if (run_length > 8) { + bitvec_write_field(dest, wp, data, 8); + run_length = run_length - 8; + } else { + bitvec_write_field(dest, wp, data, run_length); + run_length = 0; + } + } + bit_pos = bit_pos + nbits; + compress_bmap_len = compress_bmap_len - nbits; + } + return 0; +} + +void egprs_compress::decode_tree_init() +{ + ones_list = create_tree_node(tall_pcu_ctx); + zeros_list = create_tree_node(tall_pcu_ctx); + build_codewords(ones_list, one_run_len_code_list); + build_codewords(zeros_list, zero_run_len_code_list); +} + +egprs_compress::egprs_compress() +{ + decode_tree_init(); +} + diff --git a/src/egprs_rlc_compression.h b/src/egprs_rlc_compression.h new file mode 100644 index 0000000..87d9b50 --- /dev/null +++ b/src/egprs_rlc_compression.h @@ -0,0 +1,29 @@ +/* egprs_rlc_compression.h + * Routines for EGPRS RLC bitmap compression handling + */ + +#pragma once + +struct egprs_compress_node; + +/* Singleton to manage the EGPRS compression algorithm. */ +class egprs_compress +{ +public: + static int decompress_crbb(int8_t compress_bmap_len, + bool color_code_bit, const uint8_t *orig_buf, + bitvec *dest); + egprs_compress(); + +private: + egprs_compress_node *ones_list; + egprs_compress_node *zeros_list; + + void decode_tree_init(void); + static egprs_compress *s_instance; + static egprs_compress*instance(); + egprs_compress_node *create_tree_node(void *); + void build_codewords(egprs_compress_node *root, const char *cdwd[]); + /* singleton class, so this private destructor is left unimplemented. */ + ~egprs_compress(); +}; diff --git a/tests/Makefile.am b/tests/Makefile.am index 2a3415e..a24f4ea 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,7 +1,7 @@ AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGB_CFLAGS) $(LIBOSMOGSM_CFLAGS) -I$(top_srcdir)/src/ AM_LDFLAGS = -lrt -check_PROGRAMS = rlcmac/RLCMACTest alloc/AllocTest tbf/TbfTest types/TypesTest ms/MsTest llist/LListTest llc/LlcTest codel/codel_test edge/EdgeTest +check_PROGRAMS = rlcmac/RLCMACTest alloc/AllocTest tbf/TbfTest types/TypesTest ms/MsTest llist/LListTest llc/LlcTest codel/codel_test edge/EdgeTest bitcomp/BitcompTest noinst_PROGRAMS = emu/pcu_emu rlcmac_RLCMACTest_SOURCES = rlcmac/RLCMACTest.cpp @@ -23,6 +23,11 @@ $(top_builddir)/src/libgprs.la \ $(LIBOSMOGB_LIBS) \ $(LIBOSMOGSM_LIBS) \ + $(LIBOSMOCORE_LIBS) \ + $(COMMON_LA) + +bitcomp_BitcompTest_SOURCES = bitcomp/BitcompTest.cpp ../src/egprs_rlc_compression.cpp +bitcomp_BitcompTest_LDADD = \ $(LIBOSMOCORE_LIBS) \ $(COMMON_LA) @@ -108,6 +113,7 @@ rlcmac/RLCMACTest.ok rlcmac/RLCMACTest.err \ alloc/AllocTest.ok alloc/AllocTest.err \ tbf/TbfTest.ok tbf/TbfTest.err \ + bitcomp/BitcompTest.ok bitcomp/BitcompTest.err \ types/TypesTest.ok types/TypesTest.err \ ms/MsTest.ok ms/MsTest.err \ llc/LlcTest.ok llc/LlcTest.err \ diff --git a/tests/bitcomp/BitcompTest.cpp b/tests/bitcomp/BitcompTest.cpp new file mode 100644 index 0000000..fd3b0df --- /dev/null +++ b/tests/bitcomp/BitcompTest.cpp @@ -0,0 +1,236 @@ +#include +#include + +#include "rlc.h" +#include "gprs_debug.h" +#include +#include "egprs_rlc_compression.h" + +extern "C" { +#include +#include +#include +#include +} + +#define NEW 1 +#define MASK(n) (0xFF << (8-n)) +#define MAX_CRBB_LEN 23 +#define MAX_URBB_LEN 40 + +void *tall_pcu_ctx; + +struct test_data { + int8_t crbb_len; + uint8_t cc; + uint8_t crbb_data[MAX_CRBB_LEN]; /* compressed data */ + uint8_t ucmp_data[MAX_URBB_LEN]; /* uncompressed data */ + int ucmp_len; + int verify; +} test[] = { + { .crbb_len = 67, .cc = 1, + .crbb_data = { + 0x02, 0x0c, 0xa0, 0x30, 0xcb, 0x1a, 0x0c, 0xe3, 0x6c + }, + .ucmp_data = { + 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x01, 0xff, 0xff, + 0xff, 0xf8, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xfe, + 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xdb + }, + .ucmp_len = 194, .verify = 1 + }, + { .crbb_len = 40, .cc = 1, + .crbb_data = { + 0x53, 0x06, 0xc5, 0x40, 0x6d + }, + .ucmp_data = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, + 0x00, 0x00, 0x00, 0x00, 0x03 + }, + .ucmp_len = 182, .verify = 1 + }, + { .crbb_len = 8, .cc = 1, + .crbb_data = {0x02}, + .ucmp_data = {0xff, 0xff, 0xff, 0xf8}, + .ucmp_len = 29, .verify = 1 + }, + { .crbb_len = 103, .cc = 1, + .crbb_data = { + 0x02, 0x0c, 0xe0, 0x41, 0xa0, 0x0c, 0x36, 0x0d, 0x03, + 0x71, 0xb0, 0x6e, 0x24 + }, + .ucmp_data = { + 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xff, 0xff, + 0xf8, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xfe, 0x00, 0x00, + 0x0f, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xff, + 0xff, 0xff, 0x80, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff + }, + .ucmp_len = 288, .verify = 1 + }, + /* Test vector from libosmocore test */ + { .crbb_len = 35, .cc = 0, + .crbb_data = {0xde, 0x88, 0x75, 0x65, 0x80}, + .ucmp_data = {0x37, 0x47, 0x81, 0xf0}, + .ucmp_len = 28, .verify = 1 + }, + { .crbb_len = 18, .cc = 1, + .crbb_data = {0xdd, 0x41, 0x00}, + .ucmp_data = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x00, 0x00 + }, + .ucmp_len = 90, .verify = 1 + }, + /*Invalid inputs*/ + { .crbb_len = 18, .cc = 1, + .crbb_data = {0x1E, 0x70, 0xc0}, + .ucmp_data = {0x0}, + .ucmp_len = 0, .verify = 0 + }, + { .crbb_len = 14, .cc = 1, + .crbb_data = {0x00, 0x1E, 0x7c}, + .ucmp_data = {0x0}, + .ucmp_len = 0, .verify = 0 + }, + { .crbb_len = 24, .cc = 0, + .crbb_data = {0x00, 0x00, 0x00}, + .ucmp_data = {0x0}, + .ucmp_len = 0, .verify = 0 + } + }; + +static const struct log_info_cat default_categories[] = { + {"DCSN1", "\033[1;31m", "Concrete Syntax Notation One (CSN1)", LOGL_INFO, 0}, + {"DL1IF", "\033[1;32m", "GPRS PCU L1 interface (L1IF)", LOGL_DEBUG, 1}, + {"DRLCMAC", "\033[0;33m", "GPRS RLC/MAC layer (RLCMAC)", LOGL_DEBUG, 1}, + {"DRLCMACDATA", "\033[0;33m", "GPRS RLC/MAC layer Data (RLCMAC)", LOGL_DEBUG, 1}, + {"DRLCMACDL", "\033[1;33m", "GPRS RLC/MAC layer Downlink (RLCMAC)", LOGL_DEBUG, 1}, + {"DRLCMACUL", "\033[1;36m", "GPRS RLC/MAC layer Uplink (RLCMAC)", LOGL_DEBUG, 1}, + {"DRLCMACSCHED", "\033[0;36m", "GPRS RLC/MAC layer Scheduling (RLCMAC)", LOGL_DEBUG, 1}, + {"DRLCMACMEAS", "\033[1;31m", "GPRS RLC/MAC layer Measurements (RLCMAC)", LOGL_INFO, 1}, + {"DNS", "\033[1;34m", "GPRS Network Service Protocol (NS)", LOGL_INFO, 1}, + {"DBSSGP", "\033[1;34m", "GPRS BSS Gateway Protocol (BSSGP)", LOGL_INFO, 1}, + {"DPCU", "\033[1;35m", "GPRS Packet Control Unit (PCU)", LOGL_NOTICE, 1}, +}; + +static int filter_fn(const struct log_context *ctx, + struct log_target *tar) +{ + return 1; +} + +/* To verify the result with expected result */ +int check_result(bitvec bits, uint8_t *exp_data, int exp_len) +{ + if (bits.cur_bit != exp_len) + return 0; + size_t n = (exp_len / 8); + int rem = (exp_len % 8); + + if (memcmp(exp_data, bits.data, n) == 0) { + if (rem == 0) + return 1; + if ((bits.data[n] & MASK(rem)) == ((*(exp_data + n)) & MASK(rem))) + return 1; + else + return 0; + } else + return 0; +} + +/* To test decoding of compressed bitmap by Tree based method + * and to verify the result with expected result + * for invalid input verfication is suppressed + */ +static void test_EPDAN_decode_tree(void) +{ + bitvec dest; + int init_flag = 1; + int itr; + int rc; + uint8_t bits_data[RLC_EGPRS_MAX_WS/8]; + + printf("=== start %s ===\n", __func__); + + for (itr = 0 ; itr < (sizeof(test) / sizeof(test_data)) ; itr++) { + dest.data = bits_data; + dest.data_len = sizeof(bits_data); + dest.cur_bit = 0; + memset(dest.data, 0, sizeof(bits_data)); + LOGP(DRLCMACDL, LOGL_DEBUG, "\nTest:%d\nTree based decoding:" + "\nuncompressed data = %s\nlen = %d\n", itr + 1, + osmo_hexdump(test[itr].crbb_data, + (test[itr].crbb_len + 7)/8), test[itr].crbb_len + ); + rc = egprs_compress::decompress_crbb(test[itr].crbb_len, + test[itr].cc, test[itr].crbb_data, &dest); + if (rc < 0) { + LOGP(DRLCMACUL, LOGL_NOTICE, + "\nFailed to decode CRBB: length %d, data %s", + test[itr].crbb_len, osmo_hexdump( + test[itr].crbb_data, (test[itr].crbb_len + 7)/8)); + } + if (init_flag) + init_flag = 0; + if (test[itr].verify) { + if (check_result(dest, test[itr].ucmp_data, + test[itr].ucmp_len) == 0) { + LOGP(DRLCMACDL, LOGL_DEBUG, "\nTree based decoding" + ":Error\nexpected data = %s\nexpected" + " len = %d\ndecoded data = %s\n" + "decoded len = %d\n", + osmo_hexdump(test[itr].ucmp_data, + (test[itr].ucmp_len + 7)/8), + test[itr].ucmp_len, osmo_hexdump(dest.data, + (dest.cur_bit + 7)/8), dest.cur_bit + ); + OSMO_ASSERT(0); + } + } + LOGP(DRLCMACDL, LOGL_DEBUG, "\nexpected data = %s\nexpected len = %d" + "\ndecoded data = %s\ndecoded len = %d\n", + osmo_hexdump(test[itr].ucmp_data, + (test[itr].ucmp_len + 7)/8), + test[itr].ucmp_len, osmo_hexdump(dest.data, + (dest.cur_bit + 7)/8), dest.cur_bit + ); + } + + printf("=== end %s ===\n", __func__); +} + +const struct log_info debug_log_info = { + filter_fn, + (struct log_info_cat *)default_categories, + ARRAY_SIZE(default_categories), +}; + +int main(int argc, char **argv) +{ + osmo_init_logging(&debug_log_info); + log_set_use_color(osmo_stderr_target, 0); + log_set_print_filename(osmo_stderr_target, 0); + + tall_pcu_ctx = talloc_named_const(NULL, 1, "moiji-mobile bitcompTest context"); + if (!tall_pcu_ctx) + abort(); + + test_EPDAN_decode_tree(); + + if (getenv("TALLOC_REPORT_FULL")) + talloc_report_full(tall_pcu_ctx, stderr); + talloc_free(tall_pcu_ctx); + return EXIT_SUCCESS; +} + +/* + * stubs that should not be reached + */ +extern "C" { +void l1if_pdch_req() { abort(); } +void l1if_connect_pdch() { abort(); } +void l1if_close_pdch() { abort(); } +void l1if_open_pdch() { abort(); } +} + diff --git a/tests/bitcomp/BitcompTest.err b/tests/bitcomp/BitcompTest.err new file mode 100644 index 0000000..7481d72 --- /dev/null +++ b/tests/bitcomp/BitcompTest.err @@ -0,0 +1,132 @@ + +Test:1 +Tree based decoding: +uncompressed data = 02 0c a0 30 cb 1a 0c e3 6c +len = 67 +Run_length = 29 +Run_length = 26 +Run_length = 30 +Run_length = 27 +Run_length = 31 +Run_length = 19 +Run_length = 32 + +expected data = ff ff ff f8 00 00 01 ff ff ff f8 00 00 00 ff ff ff fe 00 00 3f ff ff ff db +expected len = 194 +decoded data = ff ff ff f8 00 00 01 ff ff ff f8 00 00 00 ff ff ff fe 00 00 3f ff ff ff db +decoded len = 194 + +Test:2 +Tree based decoding: +uncompressed data = 53 06 c5 40 6d +len = 40 +Run_length = 50 +Run_length = 40 +Run_length = 51 +Run_length = 41 + +expected data = ff ff ff ff ff ff c0 00 00 00 00 3f ff ff ff ff ff f8 00 00 00 00 03 +expected len = 182 +decoded data = ff ff ff ff ff ff c0 00 00 00 00 3f ff ff ff ff ff f8 00 00 00 00 03 +decoded len = 182 + +Test:3 +Tree based decoding: +uncompressed data = 02 +len = 8 +Run_length = 29 + +expected data = ff ff ff f8 +expected len = 29 +decoded data = ff ff ff f8 +decoded len = 29 + +Test:4 +Tree based decoding: +uncompressed data = 02 0c e0 41 a0 0c 36 0d 03 71 b0 6e 24 +len = 103 +Run_length = 29 +Run_length = 19 +Run_length = 29 +Run_length = 20 +Run_length = 30 +Run_length = 21 +Run_length = 31 +Run_length = 22 +Run_length = 32 +Run_length = 22 +Run_length = 33 + +expected data = ff ff ff f8 00 00 ff ff ff f8 00 00 7f ff ff fe 00 00 0f ff ff ff e0 00 00 7f ff ff ff 80 00 01 ff ff ff ff +expected len = 288 +decoded data = ff ff ff f8 00 00 ff ff ff f8 00 00 7f ff ff fe 00 00 0f ff ff ff e0 00 00 7f ff ff ff 80 00 01 ff ff ff ff +decoded len = 288 + +Test:5 +Tree based decoding: +uncompressed data = de 88 75 65 80 +len = 35 +Run_length = 2 +Run_length = 2 +Run_length = 1 +Run_length = 3 +Run_length = 1 +Run_length = 1 +Run_length = 3 +Run_length = 4 +Run_length = 6 +Run_length = 5 + +expected data = 37 47 81 f0 +expected len = 28 +decoded data = 37 47 81 f0 +decoded len = 28 + +Test:6 +Tree based decoding: +uncompressed data = dd 41 00 +len = 18 +Run_length = 64 +Run_length = 16 +Run_length = 10 + +expected data = ff ff ff ff ff ff ff ff ff ff 00 00 +expected len = 90 +decoded data = ff ff ff ff ff ff ff ff ff ff 00 00 +decoded len = 90 + +Test:7 +Tree based decoding: +uncompressed data = 1e 70 c0 +len = 18 +Run_length = 1 +Run_length = 1 +Run_length = 2 +Run_length = 15 + +expected data = +expected len = 0 +decoded data = +decoded len = 19 + +Test:8 +Tree based decoding: +uncompressed data = 00 1e +len = 14 + +Failed to decode CRBB: length 14, data 00 1e +expected data = +expected len = 0 +decoded data = +decoded len = 0 + +Test:9 +Tree based decoding: +uncompressed data = 00 00 00 +len = 24 + +Failed to decode CRBB: length 24, data 00 00 00 +expected data = +expected len = 0 +decoded data = +decoded len = 0 diff --git a/tests/bitcomp/BitcompTest.ok b/tests/bitcomp/BitcompTest.ok new file mode 100644 index 0000000..f7720fc --- /dev/null +++ b/tests/bitcomp/BitcompTest.ok @@ -0,0 +1,2 @@ +=== start test_EPDAN_decode_tree === +=== end test_EPDAN_decode_tree === diff --git a/tests/testsuite.at b/tests/testsuite.at index 1049b31..e42a0fd 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -23,6 +23,13 @@ AT_CHECK([$OSMO_QEMU $abs_top_builddir/tests/tbf/TbfTest], [0], [expout], [experr]) AT_CLEANUP +AT_SETUP([bitcomp]) +AT_KEYWORDS([bitcomp]) +cat $abs_srcdir/bitcomp/BitcompTest.ok > expout +cat $abs_srcdir/bitcomp/BitcompTest.err > experr +AT_CHECK([$OSMO_QEMU $abs_top_builddir/tests/bitcomp/BitcompTest], [0], [expout], [experr]) +AT_CLEANUP + AT_SETUP([edge]) AT_KEYWORDS([edge]) cat $abs_srcdir/edge/EdgeTest.ok > expout -- To view, visit https://gerrit.osmocom.org/416 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ieae1992ed4b02bb1e09eec2d3de1a030eabd16ce Gerrit-PatchSet: 27 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: pravin Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: pravin From gerrit-no-reply at lists.osmocom.org Thu Oct 13 10:49:57 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 13 Oct 2016 10:49:57 +0000 Subject: osmo-bts[master]: TRX: fix building with latest DTX changes In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1057 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I16b24b2cd09600e215de163e7b5baae329887c9e 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 Thu Oct 13 10:49:59 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 13 Oct 2016 10:49:59 +0000 Subject: [MERGED] osmo-bts[master]: TRX: fix building with latest DTX changes In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: TRX: fix building with latest DTX changes ...................................................................... TRX: fix building with latest DTX changes Bring up-to-speed with latest changes in OpenBSC. Change-Id: I16b24b2cd09600e215de163e7b5baae329887c9e --- M src/osmo-bts-trx/scheduler_trx.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index 02e7aba..463630c 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -1123,7 +1123,7 @@ /* indicate bad frame */ switch (tch_mode) { case GSM48_CMODE_SPEECH_V1: /* FR */ - if (lchan->tch.ul_sid) + if (lchan->tch.dtx.ul_sid) return 0; /* DTXu: pause in progress */ memset(tch_data, 0, GSM_FR_BYTES); rc = GSM_FR_BYTES; @@ -1297,7 +1297,7 @@ /* indicate bad frame */ switch (tch_mode) { case GSM48_CMODE_SPEECH_V1: /* HR */ - if (lchan->tch.ul_sid) + if (lchan->tch.dtx.ul_sid) return 0; /* DTXu: pause in progress */ tch_data[0] = 0x70; /* F = 0, FT = 111 */ memset(tch_data + 1, 0, 14); -- To view, visit https://gerrit.osmocom.org/1057 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I16b24b2cd09600e215de163e7b5baae329887c9e 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 Thu Oct 13 10:50:55 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 13 Oct 2016 10:50:55 +0000 Subject: osmo-bts[master]: Remove duplicated code In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/1046/2//COMMIT_MSG Commit Message: Line 7: Remove duplicated code this is way too short a commit log message/description for the change, sorry. -- To view, visit https://gerrit.osmocom.org/1046 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id0d3b19dbfaa16d1734321a07a6eb0355bfd77c9 Gerrit-PatchSet: 2 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 Thu Oct 13 10:51:30 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 13 Oct 2016 10:51:30 +0000 Subject: osmo-iuh[master]: fix msgb talloc context initialization In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1054 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I807c799aff1239184728551ed77fdafa73bd683f Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh 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 Thu Oct 13 10:51:49 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 13 Oct 2016 10:51:49 +0000 Subject: openbsc[master]: ipaccess-config: initialize root talloc ctx with name In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1048 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iec708eda2e4f8eb88b9e5bc5f82f6342709760b1 Gerrit-PatchSet: 1 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 Thu Oct 13 10:51:55 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 13 Oct 2016 10:51:55 +0000 Subject: openbsc[master]: bs11_config: initialize bs11 tall ctx, use instead of bsc ctx In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1049 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3b42b29cd1a688cb4c9d1d4e44208509d936e4ef Gerrit-PatchSet: 1 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 Thu Oct 13 10:52:01 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 13 Oct 2016 10:52:01 +0000 Subject: openbsc[master]: meas_pcap2db.c: remove unused include of msgb.h In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1050 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2197432c9482537bd5cf06a6c4fc912607ffab53 Gerrit-PatchSet: 1 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 Thu Oct 13 10:52:05 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 13 Oct 2016 10:52:05 +0000 Subject: openbsc[master]: gtphub_test.c: remove unused include of msgb.h In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1051 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7a8003a0e0bff803941d7981ffc07cf78c3ae9a9 Gerrit-PatchSet: 1 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 Thu Oct 13 10:52:18 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 13 Oct 2016 10:52:18 +0000 Subject: openbsc[master]: msgb ctx: use new msgb_talloc_ctx_init(), don't access tallo... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1053 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2f9ace855f0ecbdc9adf5d75bcb1a3d666570de4 Gerrit-PatchSet: 1 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 Thu Oct 13 10:52:28 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 13 Oct 2016 10:52:28 +0000 Subject: osmo-bts[master]: msgb ctx: use new msgb_talloc_ctx_init() in various main()s In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1055 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I31d62d5e1f0b272985fdef5013270d385c4b988a Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts 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 Thu Oct 13 10:52:32 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 13 Oct 2016 10:52:32 +0000 Subject: openbsc[master]: msgb talloc ctx: initialize in all main() scopes In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1052 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib0d6751260659cabf18a7ce80680ba2fb4228ea1 Gerrit-PatchSet: 1 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 Thu Oct 13 10:54:30 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 13 Oct 2016 10:54:30 +0000 Subject: osmo-bts[master]: build: Enable subdir-objects In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 seriously? after all the back-and-forth we had regarding subdir-objects during the past at least year or maybe even longer? I think the general concensus was that subdir-objects actually breaks in some configurations, while its absence simply causes the warning. Please check the git logs and/or mailing list for the history. -- To view, visit https://gerrit.osmocom.org/1058 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I52ef0021e652746d3edf414a54ccbbe0ac18c98c 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 Thu Oct 13 10:55:53 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 13 Oct 2016 10:55:53 +0000 Subject: libosmocore[master]: gsm0408: Completing GSM 04.08 RR message types In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 did you actually try to use the new symbol from anywhere? I would be surprised if it is exported with no change to the .map file. -- To view, visit https://gerrit.osmocom.org/1056 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3ceb070bf4dc8f5a071a5d43c6aa2d4e84c2dec6 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore 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 Oct 13 10:59:13 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 13 Oct 2016 10:59:13 +0000 Subject: osmo-bts[master]: Fix AGCH/PCH proportional static allocation In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/1047/2/src/common/sysinfo.c File src/common/sysinfo.c: Line 136: { how do we make sure that this function is only called once the si_buf contains a valid SI3 message payload? I think there's quite some chance of hidden failure here? -- To view, visit https://gerrit.osmocom.org/1047 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib9e0705234ef53d2c70bea6b6dd542176e58145d Gerrit-PatchSet: 2 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 Thu Oct 13 10:59:52 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 13 Oct 2016 10:59:52 +0000 Subject: [PATCH] libosmocore[master]: gsm0408: Completing GSM 04.08 RR message types 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/1056 to look at the new patch set (#2). gsm0408: Completing GSM 04.08 RR message types - Add missing message types to be up to date with the latest specification release (3GPP TS 04.18) - Add value strings to translate RR message type identifiers into human readable strings. (see gsm48_rr_msg_name() in gsm48.h Change-Id: I3ceb070bf4dc8f5a071a5d43c6aa2d4e84c2dec6 --- M include/osmocom/gsm/gsm48.h M include/osmocom/gsm/protocol/gsm_04_08.h M src/gsm/gsm48.c M src/gsm/libosmogsm.map 4 files changed, 125 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/56/1056/2 diff --git a/include/osmocom/gsm/gsm48.h b/include/osmocom/gsm/gsm48.h index d6e58c2..6a52c2d 100644 --- a/include/osmocom/gsm/gsm48.h +++ b/include/osmocom/gsm/gsm48.h @@ -20,6 +20,7 @@ extern const struct tlv_definition gsm48_mm_att_tlvdef; const char *gsm48_cc_state_name(uint8_t state); const char *gsm48_cc_msg_name(uint8_t msgtype); +const char *gsm48_rr_msg_name(uint8_t msgtype); const char *rr_cause_name(uint8_t cause); int gsm48_decode_lai(struct gsm48_loc_area_id *lai, uint16_t *mcc, diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index fa2bb06..767aa3d 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -1021,6 +1021,10 @@ #define GSM48_MT_RR_IMM_ASS 0x3f #define GSM48_MT_RR_IMM_ASS_EXT 0x39 #define GSM48_MT_RR_IMM_ASS_REJ 0x3a +#define GSM48_MT_RR_DTM_ASS_FAIL 0x48 +#define GSM48_MT_RR_DTM_REJECT 0x49 +#define GSM48_MT_RR_DTM_REQUEST 0x4A +#define GSM48_MT_RR_PACKET_ASS 0x4B #define GSM48_MT_RR_CIPH_M_CMD 0x35 #define GSM48_MT_RR_CIPH_M_COMPL 0x32 @@ -1036,6 +1040,8 @@ #define GSM48_MT_RR_HANDO_COMPL 0x2c #define GSM48_MT_RR_HANDO_FAIL 0x28 #define GSM48_MT_RR_HANDO_INFO 0x2d +#define GSM48_MT_RR_HANDO_INFO 0x2d +#define GSM48_MT_RR_DTM_ASS_CMD 0x4c #define GSM48_MT_RR_CELL_CHG_ORDER 0x08 #define GSM48_MT_RR_PDCH_ASS_CMD 0x23 @@ -1049,9 +1055,9 @@ #define GSM48_MT_RR_PAG_REQ_3 0x24 #define GSM48_MT_RR_PAG_RESP 0x27 #define GSM48_MT_RR_NOTIF_NCH 0x20 -#define GSM48_MT_RR_NOTIF_FACCH 0x25 +#define GSM48_MT_RR_NOTIF_FACCH 0x25 /* (Reserved) */ #define GSM48_MT_RR_NOTIF_RESP 0x26 - +#define GSM48_MT_RR_PACKET_NOTIF 0x4e #define GSM48_MT_RR_UTRAN_CLSM_CHG 0x60 #define GSM48_MT_RR_CDMA2K_CLSM_CHG 0x62 #define GSM48_MT_RR_IS_TO_UTRAN_HANDO 0x63 @@ -1077,6 +1083,10 @@ #define GSM48_MT_RR_SYSINFO_16 0x3d #define GSM48_MT_RR_SYSINFO_17 0x3e +#define GSM48_MT_RR_SYSINFO_18 0x40 +#define GSM48_MT_RR_SYSINFO_19 0x41 +#define GSM48_MT_RR_SYSINFO_20 0x42 + #define GSM48_MT_RR_CHAN_MODE_MODIF 0x10 #define GSM48_MT_RR_STATUS 0x12 #define GSM48_MT_RR_CHAN_MODE_MODIF_ACK 0x17 @@ -1087,6 +1097,7 @@ #define GSM48_MT_RR_EXT_MEAS_REP 0x36 #define GSM48_MT_RR_EXT_MEAS_REP_ORD 0x37 #define GSM48_MT_RR_GPRS_SUSP_REQ 0x34 +#define GSM48_MT_RR_DTM_INFO 0x4d #define GSM48_MT_RR_VGCS_UPL_GRANT 0x09 #define GSM48_MT_RR_UPLINK_RELEASE 0x0e diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c index b4740cf..aab3091 100644 --- a/src/gsm/gsm48.c +++ b/src/gsm/gsm48.c @@ -162,6 +162,11 @@ { 0, NULL }, }; +const char *rr_cause_name(uint8_t cause) +{ + return get_value_string(rr_cause_names, cause); +} + /* FIXME: convert to value_string */ static const char *cc_state_names[32] = { "NULL", @@ -250,11 +255,114 @@ return get_value_string(cc_msg_names, msgtype); } -const char *rr_cause_name(uint8_t cause) + +static const struct value_string rr_msg_names[] = { + /* Channel establishment messages */ + { GSM48_MT_RR_INIT_REQ, "RR INITIALISATION REQUEST" }, + { GSM48_MT_RR_ADD_ASS, "ADDITIONAL ASSIGNMENT" }, + { GSM48_MT_RR_IMM_ASS, "IMMEDIATE ASSIGNMENT" }, + { GSM48_MT_RR_IMM_ASS_EXT, "MMEDIATE ASSIGNMENT EXTENDED" }, + { GSM48_MT_RR_IMM_ASS_REJ, "IMMEDIATE ASSIGNMENT REJECT" }, + { GSM48_MT_RR_DTM_ASS_FAIL, "DTM ASSIGNMENT FAILURE" }, + { GSM48_MT_RR_DTM_REJECT, "DTM REJECT" }, + { GSM48_MT_RR_DTM_REQUEST, "DTM REQUEST" }, + { GSM48_MT_RR_PACKET_ASS, "PACKET ASSIGNMENT" }, + + /* Ciphering messages */ + { GSM48_MT_RR_CIPH_M_CMD, "CIPHERING MODE COMMAND" }, + { GSM48_MT_RR_CIPH_M_COMPL, "CIPHERING MODE COMPLETE" }, + + /* Configuration change messages */ + { GSM48_MT_RR_CFG_CHG_CMD, "CONFIGURATION CHANGE COMMAND" }, + { GSM48_MT_RR_CFG_CHG_ACK, "CONFIGURATION CHANGE ACK" }, + { GSM48_MT_RR_CFG_CHG_REJ, "CONFIGURATION CHANGE REJECT" }, + + /* Handover messages */ + { GSM48_MT_RR_ASS_CMD, "ASSIGNMENT COMMAND" }, + { GSM48_MT_RR_ASS_COMPL, "ASSIGNMENT COMPLETE" }, + { GSM48_MT_RR_ASS_FAIL, "ASSIGNMENT FAILURE" }, + { GSM48_MT_RR_HANDO_CMD, "HANDOVER COMMAND" }, + { GSM48_MT_RR_HANDO_COMPL, "HANDOVER COMPLETE" }, + { GSM48_MT_RR_HANDO_FAIL, "HANDOVER FAILURE" }, + { GSM48_MT_RR_HANDO_INFO, "PHYSICAL INFORMATION" }, + { GSM48_MT_RR_DTM_ASS_CMD, "DTM ASSIGNMENT COMMAND" }, + + { GSM48_MT_RR_CELL_CHG_ORDER, "RR-CELL CHANGE ORDER" }, + { GSM48_MT_RR_PDCH_ASS_CMD, "PDCH ASSIGNMENT COMMAND" }, + + /* Channel release messages */ + { GSM48_MT_RR_CHAN_REL, "CHANNEL RELEASE" }, + { GSM48_MT_RR_PART_REL, "PARTIAL RELEASE" }, + { GSM48_MT_RR_PART_REL_COMP, "PARTIAL RELEASE COMPLETE" }, + + /* Paging and Notification messages */ + { GSM48_MT_RR_PAG_REQ_1, "PAGING REQUEST TYPE 1" }, + { GSM48_MT_RR_PAG_REQ_2, "PAGING REQUEST TYPE 2" }, + { GSM48_MT_RR_PAG_REQ_3, "PAGING REQUEST TYPE 3" }, + { GSM48_MT_RR_PAG_RESP, "PAGING RESPONSE" }, + { GSM48_MT_RR_NOTIF_NCH, "NOTIFICATION/NCH" }, + { GSM48_MT_RR_NOTIF_FACCH, "(Reserved)" }, + { GSM48_MT_RR_NOTIF_RESP, "NOTIFICATION/RESPONSE" }, + { GSM48_MT_RR_PACKET_NOTIF, "PACKET NOTIFICATION" }, + /* 3G Specific messages */ + { GSM48_MT_RR_UTRAN_CLSM_CHG, "UTRAN Classmark Change" }, + { GSM48_MT_RR_CDMA2K_CLSM_CHG, "cdma 2000 Classmark Change" }, + { GSM48_MT_RR_IS_TO_UTRAN_HANDO, "Inter System to UTRAN Handover Command" }, + { GSM48_MT_RR_IS_TO_CDMA2K_HANDO, "Inter System to cdma2000 Handover Command" }, + + /* System information messages */ + { GSM48_MT_RR_SYSINFO_8, "SYSTEM INFORMATION TYPE 8" }, + { GSM48_MT_RR_SYSINFO_1, "SYSTEM INFORMATION TYPE 1" }, + { GSM48_MT_RR_SYSINFO_2, "SYSTEM INFORMATION TYPE 2" }, + { GSM48_MT_RR_SYSINFO_3, "SYSTEM INFORMATION TYPE 3" }, + { GSM48_MT_RR_SYSINFO_4, "SYSTEM INFORMATION TYPE 4" }, + { GSM48_MT_RR_SYSINFO_5, "SYSTEM INFORMATION TYPE 5" }, + { GSM48_MT_RR_SYSINFO_6, "SYSTEM INFORMATION TYPE 6" }, + { GSM48_MT_RR_SYSINFO_7, "SYSTEM INFORMATION TYPE 7" }, + { GSM48_MT_RR_SYSINFO_2bis, "SYSTEM INFORMATION TYPE 2bis" }, + { GSM48_MT_RR_SYSINFO_2ter, "SYSTEM INFORMATION TYPE 2ter" }, + { GSM48_MT_RR_SYSINFO_2quater, "SYSTEM INFORMATION TYPE 2quater" }, + { GSM48_MT_RR_SYSINFO_5bis, "SYSTEM INFORMATION TYPE 5bis" }, + { GSM48_MT_RR_SYSINFO_5ter, "SYSTEM INFORMATION TYPE 5ter" }, + { GSM48_MT_RR_SYSINFO_9, "SYSTEM INFORMATION TYPE 9" }, + { GSM48_MT_RR_SYSINFO_13, "SYSTEM INFORMATION TYPE 13" }, + { GSM48_MT_RR_SYSINFO_16, "SYSTEM INFORMATION TYPE 16" }, + { GSM48_MT_RR_SYSINFO_17, "SYSTEM INFORMATION TYPE 17" }, + { GSM48_MT_RR_SYSINFO_18, "SYSTEM INFORMATION TYPE 18" }, + { GSM48_MT_RR_SYSINFO_19, "SYSTEM INFORMATION TYPE 19" }, + { GSM48_MT_RR_SYSINFO_20, "SYSTEM INFORMATION TYPE 20" }, + + /* Miscellaneous messages */ + { GSM48_MT_RR_CHAN_MODE_MODIF, "CHANNEL MODE MODIFY" }, + { GSM48_MT_RR_STATUS, "RR STATUS" }, + { GSM48_MT_RR_CHAN_MODE_MODIF_ACK, "CHANNEL MODE MODIFY ACKNOWLEDGE" }, + { GSM48_MT_RR_FREQ_REDEF, "FREQUENCY REDEFINITION" }, + { GSM48_MT_RR_MEAS_REP, "MEASUREMENT REPORT" }, + { GSM48_MT_RR_CLSM_CHG, "CLASSMARK CHANGE" }, + { GSM48_MT_RR_CLSM_ENQ, "CLASSMARK ENQUIRY" }, + { GSM48_MT_RR_EXT_MEAS_REP, "EXTENDED MEASUREMENT REPORT" }, + { GSM48_MT_RR_EXT_MEAS_REP_ORD, "EXTENDED MEASUREMENT ORDER" }, + { GSM48_MT_RR_GPRS_SUSP_REQ, "GPRS SUSPENSION REQUEST" }, + { GSM48_MT_RR_DTM_INFO, "DTM INFORMATION" }, + + /* VGCS uplink control messages */ + { GSM48_MT_RR_VGCS_UPL_GRANT, "VGCS UPLINK GRANT" }, + { GSM48_MT_RR_UPLINK_RELEASE, "UPLINK RELEASE" }, + { GSM48_MT_RR_UPLINK_FREE, "0c" }, + { GSM48_MT_RR_UPLINK_BUSY, "UPLINK BUSY" }, + { GSM48_MT_RR_TALKER_IND, "TALKER INDICATION" }, + + /* Application messages */ + { GSM48_MT_RR_APP_INFO, "Application Information" }, + { 0, NULL } +}; + +const char *gsm48_rr_msg_name(uint8_t msgtype) { - return get_value_string(rr_cause_names, cause); + return get_value_string(rr_msg_names, msgtype); } + const struct value_string gsm48_chan_mode_names[] = { { GSM48_CMODE_SIGN, "SIGNALLING" }, { GSM48_CMODE_SPEECH_V1, "SPEECH_V1" }, diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index dc8559f..9ea3377 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -126,6 +126,7 @@ gsm48_att_tlvdef; gsm48_cc_msg_name; +gsm48_rr_msg_name; gsm48_cc_state_name; gsm48_construct_ra; gsm48_hdr_gmm_cipherable; -- To view, visit https://gerrit.osmocom.org/1056 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3ceb070bf4dc8f5a071a5d43c6aa2d4e84c2dec6 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Oct 13 11:01:33 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 13 Oct 2016 11:01:33 +0000 Subject: openggsn[master]: gsn_restart file: wrap umask change tightly around file crea... In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1014 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If7d948e2f2ba47ecebba5614f18235a53b273d14 Gerrit-PatchSet: 4 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Oct 13 11:02:04 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 13 Oct 2016 11:02:04 +0000 Subject: openggsn[master]: fix gsn_restart file buffer overflow and missing path sep In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1013 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idf0a64ff45720aa818f2f9de1e8ba2fe2c82631b Gerrit-PatchSet: 3 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Oct 13 11:02:27 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 13 Oct 2016 11:02:27 +0000 Subject: [ABANDON] osmo-bts[master]: build: Enable subdir-objects In-Reply-To: References: Message-ID: Max has abandoned this change. Change subject: build: Enable subdir-objects ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/1058 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I52ef0021e652746d3edf414a54ccbbe0ac18c98c 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 Thu Oct 13 11:02:57 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 13 Oct 2016 11:02:57 +0000 Subject: osmo-bts[master]: DTX: fix array size calculation In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1010 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4cd480ceb20efc69df1b00e3c7359fcbd14c19cd 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 Thu Oct 13 11:02:59 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 13 Oct 2016 11:02:59 +0000 Subject: [MERGED] osmo-bts[master]: DTX: fix array size calculation In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: DTX: fix array size calculation ...................................................................... DTX: fix array size calculation Compute array size in-place and pass it to function. Change-Id: I4cd480ceb20efc69df1b00e3c7359fcbd14c19cd Fixes: coverity CID 1357844. --- M src/common/msg_utils.c 1 file changed, 5 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index f9853c5..09596f3 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -234,10 +234,10 @@ return false; } -static inline bool fn_chk(const uint8_t *t, uint32_t fn) +static inline bool fn_chk(const uint8_t *t, uint32_t fn, uint8_t len) { uint8_t i; - for (i = 0; i < ARRAY_SIZE(t); i++) + for (i = 0; i < len; i++) if (fn % 104 == t[i]) return false; return true; @@ -256,9 +256,10 @@ h1[] = { 14, 16, 18, 20, 66, 68, 70, 72 }; if (lchan->tch_mode == GSM48_CMODE_SPEECH_V1) { if (lchan->type == GSM_LCHAN_TCH_F) - return fn_chk(f, fn); + return fn_chk(f, fn, ARRAY_SIZE(f)); else - return fn_chk(lchan->nr ? h1 : h0, fn); + return fn_chk(lchan->nr ? h1 : h0, fn, + ARRAY_SIZE(lchan->nr ? h1 : h0)); } return false; } -- To view, visit https://gerrit.osmocom.org/1010 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4cd480ceb20efc69df1b00e3c7359fcbd14c19cd 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 Thu Oct 13 11:04:26 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 13 Oct 2016 11:04:26 +0000 Subject: libosmocore[master]: stats_statsd: use int64_t instead of int for value and delta. In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1004 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I33df86de60007a64fa853d6d3af9b609877a8fc6 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Oct 13 11:04:46 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 13 Oct 2016 11:04:46 +0000 Subject: libosmocore[master]: vty/osmo_counter: use name if description is NULL In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1003 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I553b88a6fca688924b1f2b49e8cb17e90f057bb1 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Oct 13 11:04:48 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 13 Oct 2016 11:04:48 +0000 Subject: [MERGED] libosmocore[master]: vty/osmo_counter: use name if description is NULL In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: vty/osmo_counter: use name if description is NULL ...................................................................... vty/osmo_counter: use name if description is NULL `show stats` shows (null) for osmocom_counters when description is null. OpenBSC> show stats Ungrouped counters: (null): 4 Change-Id: I553b88a6fca688924b1f2b49e8cb17e90f057bb1 --- M src/vty/utils.c 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/vty/utils.c b/src/vty/utils.c index 3a0f138..27c1a85 100644 --- a/src/vty/utils.c +++ b/src/vty/utils.c @@ -159,9 +159,13 @@ { struct vty_out_context *vctx = vctx_; struct vty *vty = vctx->vty; + const char *description = counter->description; + + if (!counter->description) + description = counter->name; vty_out(vty, " %s%s: %8lu%s", - vctx->prefix, counter->description, + vctx->prefix, description, osmo_counter_get(counter), VTY_NEWLINE); return 0; -- To view, visit https://gerrit.osmocom.org/1003 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I553b88a6fca688924b1f2b49e8cb17e90f057bb1 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Oct 13 11:17:46 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 13 Oct 2016 11:17:46 +0000 Subject: [PATCH] osmo-bts[master]: Remove duplicated code 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/1046 to look at the new patch set (#3). Remove duplicated code Having duplicated code to fill in fn & tn values makes it harder to read and modify static gsmtap_p* functions. Fix this by removing the duplication and moving the common code one level up. Change-Id: Id0d3b19dbfaa16d1734321a07a6eb0355bfd77c9 --- M src/common/l1sap.c 1 file changed, 11 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/46/1046/3 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index f3e620e..0b9930e 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -205,15 +205,13 @@ /* send primitive as gsmtap */ static int gsmtap_ph_data(struct osmo_phsap_prim *l1sap, uint8_t *chan_type, - uint8_t *tn, uint8_t *ss, uint32_t *fn, uint8_t **data, int *len) + uint8_t *ss, uint32_t fn, uint8_t **data, int *len) { struct msgb *msg = l1sap->oph.msg; uint8_t chan_nr, link_id; *data = msg->data + sizeof(struct osmo_phsap_prim); *len = msg->len - sizeof(struct osmo_phsap_prim); - *fn = l1sap->u.data.fn; - *tn = L1SAP_CHAN2TS(l1sap->u.data.chan_nr); chan_nr = l1sap->u.data.chan_nr; link_id = l1sap->u.data.link_id; @@ -234,7 +232,7 @@ #warning Set BS_AG_BLKS_RES /* The sapi depends on DSP configuration, not * on the actual SYSTEM INFORMATION 3. */ - if (L1SAP_FN2CCCHBLOCK(*fn) >= 1) + if (L1SAP_FN2CCCHBLOCK(fn) >= 1) *chan_type = GSMTAP_CHANNEL_PCH; else *chan_type = GSMTAP_CHANNEL_AGCH; @@ -246,18 +244,16 @@ } static int gsmtap_pdch(struct osmo_phsap_prim *l1sap, uint8_t *chan_type, - uint8_t *tn, uint8_t *ss, uint32_t *fn, uint8_t **data, int *len) + uint8_t *ss, uint32_t fn, uint8_t **data, int *len) { struct msgb *msg = l1sap->oph.msg; *data = msg->data + sizeof(struct osmo_phsap_prim); *len = msg->len - sizeof(struct osmo_phsap_prim); - *fn = l1sap->u.data.fn; - *tn = L1SAP_CHAN2TS(l1sap->u.data.chan_nr); - if (L1SAP_IS_PTCCH(*fn)) { + if (L1SAP_IS_PTCCH(fn)) { *chan_type = GSMTAP_CHANNEL_PTCCH; - *ss = L1SAP_FN2PTCCHBLOCK(*fn); + *ss = L1SAP_FN2PTCCHBLOCK(fn); if (l1sap->oph.primitive == PRIM_OP_INDICATION) { if ((*data[0]) == 7) @@ -309,12 +305,14 @@ uplink = 0; /* fall through */ case OSMO_PRIM(PRIM_PH_DATA, PRIM_OP_INDICATION): + fn = l1sap->u.data.fn; + tn = L1SAP_CHAN2TS(l1sap->u.data.chan_nr); if (ts_is_pdch(&trx->ts[tn])) - rc = gsmtap_pdch(l1sap, &chan_type, &tn, &ss, &fn, &data, - &len); + rc = gsmtap_pdch(l1sap, &chan_type, &ss, fn, &data, + &len); else - rc = gsmtap_ph_data(l1sap, &chan_type, &tn, &ss, &fn, - &data, &len); + rc = gsmtap_ph_data(l1sap, &chan_type, &ss, fn, &data, + &len); break; case OSMO_PRIM(PRIM_PH_RACH, PRIM_OP_INDICATION): rc = gsmtap_ph_rach(l1sap, &chan_type, &tn, &ss, &fn, &data, -- To view, visit https://gerrit.osmocom.org/1046 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id0d3b19dbfaa16d1734321a07a6eb0355bfd77c9 Gerrit-PatchSet: 3 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 Thu Oct 13 11:17:46 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 13 Oct 2016 11:17:46 +0000 Subject: [PATCH] osmo-bts[master]: Fix AGCH/PCH proportional static allocation 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/1047 to look at the new patch set (#3). Fix AGCH/PCH proportional static allocation Do not assume that 1 == BS_AG_BLKS_RES but take that information from SI3. Note: this implements static variant - changing BS_AG_BLKS_RES on OpenBSC side will not affect BTS after initial value has been acquired. Change-Id: Ib9e0705234ef53d2c70bea6b6dd542176e58145d Related: OS#1575 --- M include/osmo-bts/bts.h M src/common/l1sap.c M src/common/paging.c M src/common/sysinfo.c M src/osmo-bts-litecell15/l1_if.c M src/osmo-bts-litecell15/oml.c M src/osmo-bts-octphy/l1_if.c M src/osmo-bts-sysmo/l1_if.c M src/osmo-bts-sysmo/oml.c 9 files changed, 22 insertions(+), 50 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/47/1047/3 diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h index ec58edd..1e4ace8 100644 --- a/include/osmo-bts/bts.h +++ b/include/osmo-bts/bts.h @@ -36,7 +36,7 @@ int lchan_init_lapdm(struct gsm_lchan *lchan); void load_timer_start(struct gsm_bts *bts); - +uint8_t num_agch(struct gsm_bts_trx *trx); void bts_update_status(enum bts_global_status which, int on); int trx_ms_pwr_ctrl_is_osmo(struct gsm_bts_trx *trx); diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 0b9930e..ebb300a 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -205,7 +205,8 @@ /* send primitive as gsmtap */ static int gsmtap_ph_data(struct osmo_phsap_prim *l1sap, uint8_t *chan_type, - uint8_t *ss, uint32_t fn, uint8_t **data, int *len) + uint8_t *ss, uint32_t fn, uint8_t **data, int *len, + uint8_t num_agch) { struct msgb *msg = l1sap->oph.msg; uint8_t chan_nr, link_id; @@ -229,10 +230,9 @@ } else if (L1SAP_IS_CHAN_BCCH(chan_nr)) { *chan_type = GSMTAP_CHANNEL_BCCH; } else if (L1SAP_IS_CHAN_AGCH_PCH(chan_nr)) { -#warning Set BS_AG_BLKS_RES /* The sapi depends on DSP configuration, not * on the actual SYSTEM INFORMATION 3. */ - if (L1SAP_FN2CCCHBLOCK(fn) >= 1) + if (L1SAP_FN2CCCHBLOCK(fn) >= num_agch) *chan_type = GSMTAP_CHANNEL_PCH; else *chan_type = GSMTAP_CHANNEL_AGCH; @@ -312,7 +312,7 @@ &len); else rc = gsmtap_ph_data(l1sap, &chan_type, &ss, fn, &data, - &len); + &len, num_agch(trx)); break; case OSMO_PRIM(PRIM_PH_RACH, PRIM_OP_INDICATION): rc = gsmtap_ph_rach(l1sap, &chan_type, &tn, &ss, &fn, &data, @@ -616,11 +616,10 @@ msgb_free(pp.oph.msg); } } else if (L1SAP_IS_CHAN_AGCH_PCH(chan_nr)) { + LOGP(DL1P, LOGL_ERROR, "AGCH/PCH: %d\n", num_agch(trx)); p = msgb_put(msg, GSM_MACBLOCK_LEN); -#warning "TODO: Yet another assumption that BS_AG_BLKS_RES=1" - /* if CCCH block is 0, it is AGCH */ rc = bts_ccch_copy_msg(trx->bts, p, &g_time, - (L1SAP_FN2CCCHBLOCK(fn) < 1)); + (L1SAP_FN2CCCHBLOCK(fn) < num_agch(trx))); if (rc <= 0) memcpy(p, fill_frame, GSM_MACBLOCK_LEN); } diff --git a/src/common/paging.c b/src/common/paging.c index f75f12d..957d609 100644 --- a/src/common/paging.c +++ b/src/common/paging.c @@ -538,12 +538,6 @@ struct paging_state *ps = btsb->paging_state; struct gsm48_system_information_type_3 *si3 = (void *) bts->si_buf[SYSINFO_TYPE_3]; -#warning "TODO: Remove this when setting u8NbrOfAgch is implemented properly" - if (si3->control_channel_desc.bs_ag_blks_res != 1) - LOGP(DPAG, LOGL_ERROR, - "Paging: BS_AG_BLKS_RES = %d != 1 not fully supported\n", - si3->control_channel_desc.bs_ag_blks_res); - paging_si_update(ps, &si3->control_channel_desc); } return 0; diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c index ee42da2..d47f392 100644 --- a/src/common/sysinfo.c +++ b/src/common/sysinfo.c @@ -132,6 +132,17 @@ return NULL; } +uint8_t num_agch(struct gsm_bts_trx *trx) +{ + struct gsm_bts *b = trx->bts; + struct gsm48_system_information_type_3 *si3; + if (BTS_HAS_SI(b, SYSINFO_TYPE_3)) { + si3 = GSM_BTS_SI(b, SYSINFO_TYPE_3); + return si3->control_channel_desc.bs_ag_blks_res; + } + return 1; +} + uint8_t *lchan_sacch_get(struct gsm_lchan *lchan) { uint32_t tmp; diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index f47634e..af50343 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -1107,22 +1107,6 @@ return l1if_handle_ind(fl1h, msg); } -#if 0 -/* called by RSL if the BCCH SI has been modified */ -int sysinfo_has_changed(struct gsm_bts *bts, int si) -{ - /* FIXME: Determine BS_AG_BLKS_RES and - * * set cfgParams.u.agch.u8NbrOfAgch - * * determine implications on paging - */ - /* FIXME: Check for Extended BCCH presence */ - /* FIXME: Check for CCCH_CONF */ - /* FIXME: Check for BS_PA_MFRMS: update paging */ - - return 0; -} -#endif - static int activate_rf_compl_cb(struct gsm_bts_trx *trx, struct msgb *resp, void *data) { diff --git a/src/osmo-bts-litecell15/oml.c b/src/osmo-bts-litecell15/oml.c index 634c236..8fdf136 100644 --- a/src/osmo-bts-litecell15/oml.c +++ b/src/osmo-bts-litecell15/oml.c @@ -1024,8 +1024,7 @@ lch_par->rach.u8Bsic = lchan->ts->trx->bts->bsic; break; case GsmL1_Sapi_Agch: -#warning Set BS_AG_BLKS_RES - lch_par->agch.u8NbrOfAgch = 1; + lch_par->agch.u8NbrOfAgch = num_agch(lchan->ts->trx); break; case GsmL1_Sapi_TchH: case GsmL1_Sapi_TchF: diff --git a/src/osmo-bts-octphy/l1_if.c b/src/osmo-bts-octphy/l1_if.c index c4105ac..2f28cd6 100644 --- a/src/osmo-bts-octphy/l1_if.c +++ b/src/osmo-bts-octphy/l1_if.c @@ -487,6 +487,8 @@ sapi = cOCTVC1_GSM_SAPI_ENUM_BCCH; } else if (L1SAP_IS_CHAN_AGCH_PCH(chan_nr)) { #warning Set BS_AG_BLKS_RES + /* FIXME: how does octphy differentiate between AGCH and PCH? + How to supply num_of_agch properly? */ sapi = cOCTVC1_GSM_SAPI_ENUM_PCH_AGCH; } else { LOGP(DL1C, LOGL_NOTICE, "unknown prim %d op %d " diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index bef2d30..8ae2ff5 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -1132,22 +1132,6 @@ return l1if_handle_ind(fl1h, msg); } -#if 0 -/* called by RSL if the BCCH SI has been modified */ -int sysinfo_has_changed(struct gsm_bts *bts, int si) -{ - /* FIXME: Determine BS_AG_BLKS_RES and - * * set cfgParams.u.agch.u8NbrOfAgch - * * determine implications on paging - */ - /* FIXME: Check for Extended BCCH presence */ - /* FIXME: Check for CCCH_CONF */ - /* FIXME: Check for BS_PA_MFRMS: update paging */ - - return 0; -} -#endif - static int activate_rf_compl_cb(struct gsm_bts_trx *trx, struct msgb *resp, void *data) { diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c index c1f1e0b..e7e7690 100644 --- a/src/osmo-bts-sysmo/oml.c +++ b/src/osmo-bts-sysmo/oml.c @@ -1039,8 +1039,7 @@ lch_par->rach.u8Bsic = lchan->ts->trx->bts->bsic; break; case GsmL1_Sapi_Agch: -#warning Set BS_AG_BLKS_RES - lch_par->agch.u8NbrOfAgch = 1; + lch_par->agch.u8NbrOfAgch = num_agch(lchan->ts->trx); break; case GsmL1_Sapi_TchH: case GsmL1_Sapi_TchF: -- To view, visit https://gerrit.osmocom.org/1047 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib9e0705234ef53d2c70bea6b6dd542176e58145d Gerrit-PatchSet: 3 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 Thu Oct 13 11:24:41 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 13 Oct 2016 11:24:41 +0000 Subject: [PATCH] openbsc[master]: gsm0408: Adding log output for 3g specific RR messages 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/1037 to look at the new patch set (#3). gsm0408: Adding log output for 3g specific RR messages GSM 04.18, which is the successor of GSM 04.08, describes additional RR 3g specific message types. This commit adds adds log output for those messages. The behaviour is not changed, all affected message types are still forwared to the MSC as they were before. See also 3GPP TS 04.18, section 10.4, table 10.4.1 The change requires to update libosmocore as well, see also commit f48fdb3a108da0dc23d7af4ac021e98e11f07152 in libosmocore.git for details. Change-Id: I41f2242fdf59c3eb4b3f8f7f003c17f7e0df01aa --- M openbsc/src/libbsc/bsc_api.c 1 file changed, 16 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/37/1037/3 diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c index cc12e9f..75a4cf7 100644 --- a/openbsc/src/libbsc/bsc_api.c +++ b/openbsc/src/libbsc/bsc_api.c @@ -34,6 +34,7 @@ #include #include +#include #include @@ -587,11 +588,13 @@ case GSM48_PDISC_RR: switch (msg_type) { case GSM48_MT_RR_GPRS_SUSP_REQ: - DEBUGP(DRR, "GRPS SUSPEND REQUEST\n"); + DEBUGP(DRR, "%s\n", + gsm48_rr_msg_name(GSM48_MT_RR_GPRS_SUSP_REQ)); break; case GSM48_MT_RR_STATUS: - LOGP(DRR, LOGL_NOTICE, "RR STATUS (cause: %s)\n", - rr_cause_name(gh->data[0])); + LOGP(DRR, LOGL_NOTICE, "%s (cause: %s)\n", + gsm48_rr_msg_name(GSM48_MT_RR_GPRS_SUSP_REQ), + rr_cause_name(gh->data[0])); break; case GSM48_MT_RR_MEAS_REP: /* This shouldn't actually end up here, as RSL treats @@ -643,8 +646,16 @@ /* Normally, a MSC should never receive RR * messages, but we'd rather forward what we * don't know than drop it... */ - LOGP(DRR, LOGL_NOTICE, "BSC: Passing unknown 04.08 " - "RR message type 0x%02x to MSC\n", msg_type); + if (gsm48_rr_msg_name(msg_type)) { + LOGP(DRR, LOGL_NOTICE, + "BSC: Passing %s message to MSC\n", + gsm48_rr_msg_name(msg_type)); + } else { + LOGP(DRR, LOGL_NOTICE, + "BSC: Passing unknown 04.08 " + "RR message type 0x%02x to MSC\n", + msg_type); + } if (api->dtap) api->dtap(conn, link_id, msg); } -- To view, visit https://gerrit.osmocom.org/1037 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I41f2242fdf59c3eb4b3f8f7f003c17f7e0df01aa Gerrit-PatchSet: 3 Gerrit-Project: openbsc 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 Oct 13 11:42:07 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 13 Oct 2016 11:42:07 +0000 Subject: [PATCH] openbsc[master]: gsm0408: Adding log output for 3g specific RR messages 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/1037 to look at the new patch set (#4). gsm0408: Adding log output for 3g specific RR messages GSM 04.18, which is the successor of GSM 04.08, describes additional RR 3g specific message types. This commit adds adds log output for those messages. The behaviour is not changed, all affected message types are still forwared to the MSC as they were before. See also 3GPP TS 04.18, section 10.4, table 10.4.1 The change requires to update libosmocore as well, see also commit f48fdb3a108da0dc23d7af4ac021e98e11f07152 in libosmocore.git for details. Change-Id: I41f2242fdf59c3eb4b3f8f7f003c17f7e0df01aa --- M openbsc/src/libbsc/bsc_api.c M openbsc/src/libmsc/gsm_04_08.c 2 files changed, 24 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/37/1037/4 diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c index cc12e9f..2a578ba 100644 --- a/openbsc/src/libbsc/bsc_api.c +++ b/openbsc/src/libbsc/bsc_api.c @@ -34,6 +34,7 @@ #include #include +#include #include @@ -587,11 +588,13 @@ case GSM48_PDISC_RR: switch (msg_type) { case GSM48_MT_RR_GPRS_SUSP_REQ: - DEBUGP(DRR, "GRPS SUSPEND REQUEST\n"); + DEBUGP(DRR, "%s\n", + gsm48_rr_msg_name(GSM48_MT_RR_GPRS_SUSP_REQ)); break; case GSM48_MT_RR_STATUS: - LOGP(DRR, LOGL_NOTICE, "RR STATUS (cause: %s)\n", - rr_cause_name(gh->data[0])); + LOGP(DRR, LOGL_NOTICE, "%s (cause: %s)\n", + gsm48_rr_msg_name(GSM48_MT_RR_GPRS_SUSP_REQ), + rr_cause_name(gh->data[0])); break; case GSM48_MT_RR_MEAS_REP: /* This shouldn't actually end up here, as RSL treats @@ -643,8 +646,16 @@ /* Normally, a MSC should never receive RR * messages, but we'd rather forward what we * don't know than drop it... */ - LOGP(DRR, LOGL_NOTICE, "BSC: Passing unknown 04.08 " - "RR message type 0x%02x to MSC\n", msg_type); + if (gsm48_rr_msg_name(msg_type)) { + LOGP(DRR, LOGL_NOTICE, + "BSC: Passing %s 04.08 RR message to MSC\n", + gsm48_rr_msg_name(msg_type)); + } else { + LOGP(DRR, LOGL_NOTICE, + "BSC: Passing unknown 04.08 " + "RR message type 0x%02x to MSC\n", + msg_type); + } if (api->dtap) api->dtap(conn, link_id, msg); } diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index be1b260..ec008ae 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -1270,8 +1270,14 @@ rc = gsm48_rx_rr_app_info(conn, msg); break; default: - LOGP(DRR, LOGL_NOTICE, "MSC: Unimplemented " - "GSM 04.08 RR msg type 0x%02x\n", gh->msg_type); + if (gsm48_rr_msg_name(gh->msg_type)) { + LOGP(DRR, LOGL_NOTICE, "MSC: Unimplemented " + "GSM 04.08 RR msg type %s\n", + gsm48_rr_msg_name(gh->msg_type)); + } else { + LOGP(DRR, LOGL_NOTICE, "MSC: Unimplemented " + "GSM 04.08 RR msg type 0x%02x\n", gh->msg_type); + } break; } -- To view, visit https://gerrit.osmocom.org/1037 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I41f2242fdf59c3eb4b3f8f7f003c17f7e0df01aa Gerrit-PatchSet: 4 Gerrit-Project: openbsc 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 Oct 13 11:49:52 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 11:49:52 +0000 Subject: osmo-pcu[master]: EGPRS: Add EPDAN CRBB Tree based decoding In-Reply-To: References: Message-ID: Patch Set 27: Code-Review+1 (1 comment) one last detail... https://gerrit.osmocom.org/#/c/416/26/src/egprs_rlc_compression.cpp File src/egprs_rlc_compression.cpp: Line 297: * \param orig_crbb_buf[in] Received block crbb bitmap > A one bit indicator I think the "starting" is a crucial part of the term. Please have 'starting' in the name. 'starting_color_code' IMHO is too long, I think I would actually call it 'start' and use your explanation in the comment; also, it is a bool so you should use 'true' and 'false': \param start[in] Starting Color Code, true if bitmap starts with a run length of ones, false if zeros. -- To view, visit https://gerrit.osmocom.org/416 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieae1992ed4b02bb1e09eec2d3de1a030eabd16ce Gerrit-PatchSet: 27 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: pravin Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: pravin Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Oct 13 11:57:52 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 13 Oct 2016 11:57:52 +0000 Subject: [PATCH] openbsc[master]: gsm0408: Adding log output for 3g specific RR messages 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/1037 to look at the new patch set (#5). gsm0408: Adding log output for 3g specific RR messages GSM 04.18, which is the successor of GSM 04.08, describes additional RR 3g specific message types. This commit adds adds log output for those messages. The behaviour is not changed, all affected message types are still forwared to the MSC as they were before. See also 3GPP TS 04.18, section 10.4, table 10.4.1 The change requires to update libosmocore as well, see also commit f48fdb3a108da0dc23d7af4ac021e98e11f07152 in libosmocore.git for details. Change-Id: I41f2242fdf59c3eb4b3f8f7f003c17f7e0df01aa --- M openbsc/src/libbsc/bsc_api.c M openbsc/src/libmsc/gsm_04_08.c 2 files changed, 11 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/37/1037/5 diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c index cc12e9f..207e12a 100644 --- a/openbsc/src/libbsc/bsc_api.c +++ b/openbsc/src/libbsc/bsc_api.c @@ -34,6 +34,7 @@ #include #include +#include #include @@ -587,11 +588,13 @@ case GSM48_PDISC_RR: switch (msg_type) { case GSM48_MT_RR_GPRS_SUSP_REQ: - DEBUGP(DRR, "GRPS SUSPEND REQUEST\n"); + DEBUGP(DRR, "%s\n", + gsm48_rr_msg_name(GSM48_MT_RR_GPRS_SUSP_REQ)); break; case GSM48_MT_RR_STATUS: - LOGP(DRR, LOGL_NOTICE, "RR STATUS (cause: %s)\n", - rr_cause_name(gh->data[0])); + LOGP(DRR, LOGL_NOTICE, "%s (cause: %s)\n", + gsm48_rr_msg_name(GSM48_MT_RR_GPRS_SUSP_REQ), + rr_cause_name(gh->data[0])); break; case GSM48_MT_RR_MEAS_REP: /* This shouldn't actually end up here, as RSL treats @@ -643,8 +646,9 @@ /* Normally, a MSC should never receive RR * messages, but we'd rather forward what we * don't know than drop it... */ - LOGP(DRR, LOGL_NOTICE, "BSC: Passing unknown 04.08 " - "RR message type 0x%02x to MSC\n", msg_type); + LOGP(DRR, LOGL_NOTICE, + "BSC: Passing %s 04.08 RR message to MSC\n", + gsm48_rr_msg_name(msg_type)); if (api->dtap) api->dtap(conn, link_id, msg); } diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index be1b260..6a760ba 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -1270,8 +1270,8 @@ rc = gsm48_rx_rr_app_info(conn, msg); break; default: - LOGP(DRR, LOGL_NOTICE, "MSC: Unimplemented " - "GSM 04.08 RR msg type 0x%02x\n", gh->msg_type); + LOGP(DRR, LOGL_NOTICE, "MSC: Unimplemented %s GSM 04.08 RR " + "message\n", gsm48_rr_msg_name(gh->msg_type)); break; } -- To view, visit https://gerrit.osmocom.org/1037 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I41f2242fdf59c3eb4b3f8f7f003c17f7e0df01aa Gerrit-PatchSet: 5 Gerrit-Project: openbsc 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 Oct 13 12:16:15 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 12:16:15 +0000 Subject: openbsc[master]: ussd: Add band-aid for interrogationSS In-Reply-To: References: Message-ID: Patch Set 4: (3 comments) https://gerrit.osmocom.org/#/c/503/4//COMMIT_MSG Commit Message: Line 18: Fix an issue and make the code worse. Assume ss_code > 0 to see if this Make the code *worse*?? :) So the commit log says "please reject me"? https://gerrit.osmocom.org/#/c/503/4/openbsc/src/libmsc/ussd.c File openbsc/src/libmsc/ussd.c: Line 53: rc = gsm0480_decode_ss_request(gh, msgb_l3len(msg), &req); I notice that decode_ussd_request also sets the ss.transaction_id, which decode_ss_request doesn't. It seems we're not using it anywhere though anyway. Just saying... Line 61: if (req.ussd_text[0] == '\0') { I see in decode_ussd_request this code: if (ss.ussd_text[0] == 0xFF) req->text[0] = '\0'; which is not present in decode_ss_request... where's the \0 coming from in decode_ss_? case GSM0480_MTYPE_RELEASE_COMPLETE still sets ussd_text[0] = 0xFF; so below log will say "Unhandled USSD ?" with hopefully a nul term after the '?'? -- To view, visit https://gerrit.osmocom.org/503 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib0dc4485388f030eb172fe21f5327b7ab94751f5 Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Oct 13 13:14:41 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 13:14:41 +0000 Subject: [MERGED] openbsc[master]: msgb talloc ctx: initialize in all main() scopes In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: msgb talloc ctx: initialize in all main() scopes ...................................................................... msgb talloc ctx: initialize in all main() scopes Add msgb_talloc_ctx_init() call to many main() functions still lacking a msgb talloc context. Change-Id: Ib0d6751260659cabf18a7ce80680ba2fb4228ea1 --- M openbsc/src/gprs/gtphub_main.c M openbsc/src/ipaccess/ipaccess-config.c M openbsc/src/ipaccess/ipaccess-proxy.c M openbsc/src/osmo-bsc/osmo_bsc_main.c M openbsc/src/osmo-bsc_mgcp/mgcp_main.c M openbsc/src/utils/bs11_config.c M openbsc/src/utils/meas_udp2db.c M openbsc/src/utils/meas_vis.c M openbsc/src/utils/smpp_mirror.c M openbsc/tests/bsc-nat/bsc_nat_test.c M openbsc/tests/bsc/bsc_test.c M openbsc/tests/gbproxy/gbproxy_test.c M openbsc/tests/mgcp/mgcp_test.c M openbsc/tests/oap/oap_test.c M openbsc/tests/trau/trau_test.c 15 files changed, 20 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/gprs/gtphub_main.c b/openbsc/src/gprs/gtphub_main.c index 1e20a63..46360f9 100644 --- a/openbsc/src/gprs/gtphub_main.c +++ b/openbsc/src/gprs/gtphub_main.c @@ -299,6 +299,7 @@ struct gtphub *hub = &_hub; osmo_gtphub_ctx = talloc_named_const(NULL, 0, "osmo_gtphub"); + msgb_talloc_ctx_init(osmo_gtphub_ctx, 0); signal(SIGINT, &signal_handler); signal(SIGABRT, &signal_handler); diff --git a/openbsc/src/ipaccess/ipaccess-config.c b/openbsc/src/ipaccess/ipaccess-config.c index 453877b..3c2d6cc 100644 --- a/openbsc/src/ipaccess/ipaccess-config.c +++ b/openbsc/src/ipaccess/ipaccess-config.c @@ -853,6 +853,7 @@ int rc, option_index = 0, stream_id = 0xff; tall_ctx_config = talloc_named_const(NULL, 0, "ipaccess-config"); + msgb_talloc_ctx_init(tall_ctx_config, 0); osmo_init_logging(&log_info); log_parse_category_mask(osmo_stderr_target, "DNM,0"); diff --git a/openbsc/src/ipaccess/ipaccess-proxy.c b/openbsc/src/ipaccess/ipaccess-proxy.c index 4077b3f..52e77e8 100644 --- a/openbsc/src/ipaccess/ipaccess-proxy.c +++ b/openbsc/src/ipaccess/ipaccess-proxy.c @@ -1200,6 +1200,7 @@ int rc; tall_bsc_ctx = talloc_named_const(NULL, 1, "ipaccess-proxy"); + msgb_talloc_ctx_init(tall_bsc_ctx, 0); osmo_init_logging(&log_info); log_parse_category_mask(osmo_stderr_target, "DLINP:DLMI"); diff --git a/openbsc/src/osmo-bsc/osmo_bsc_main.c b/openbsc/src/osmo-bsc/osmo_bsc_main.c index d3128e4..daab55b 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_main.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_main.c @@ -192,6 +192,7 @@ int rc; tall_bsc_ctx = talloc_named_const(NULL, 1, "openbsc"); + msgb_talloc_ctx_init(tall_bsc_ctx, 0); osmo_init_logging(&log_info); osmo_stats_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 ac55e25..964768e 100644 --- a/openbsc/src/osmo-bsc_mgcp/mgcp_main.c +++ b/openbsc/src/osmo-bsc_mgcp/mgcp_main.c @@ -203,6 +203,7 @@ int on = 1, rc; tall_bsc_ctx = talloc_named_const(NULL, 1, "mgcp-callagent"); + msgb_talloc_ctx_init(tall_bsc_ctx, 0); osmo_init_ignore_signals(); osmo_init_logging(&log_info); diff --git a/openbsc/src/utils/bs11_config.c b/openbsc/src/utils/bs11_config.c index 3420991..7356b82 100644 --- a/openbsc/src/utils/bs11_config.c +++ b/openbsc/src/utils/bs11_config.c @@ -891,6 +891,7 @@ struct e1inp_line *line; tall_bs11cfg_ctx = talloc_named_const(NULL, 0, "bs11-config"); + msgb_talloc_ctx_init(tall_bs11cfg_ctx, 0); osmo_init_logging(&log_info); handle_options(argc, argv); diff --git a/openbsc/src/utils/meas_udp2db.c b/openbsc/src/utils/meas_udp2db.c index 4a07217..5032d0c 100644 --- a/openbsc/src/utils/meas_udp2db.c +++ b/openbsc/src/utils/meas_udp2db.c @@ -90,6 +90,8 @@ char *db_fname; int rc; + msgb_talloc_ctx_init(NULL, 0); + if (argc < 2) { fprintf(stderr, "You have to specify the database file name\n"); exit(2); diff --git a/openbsc/src/utils/meas_vis.c b/openbsc/src/utils/meas_vis.c index 4f7e632..061a7a4 100644 --- a/openbsc/src/utils/meas_vis.c +++ b/openbsc/src/utils/meas_vis.c @@ -264,6 +264,8 @@ char *header[1]; char *title[1]; + msgb_talloc_ctx_init(NULL, 0); + printf("sizeof(gsm_meas_rep)=%u\n", sizeof(struct gsm_meas_rep)); printf("sizeof(meas_feed_meas)=%u\n", sizeof(struct meas_feed_meas)); diff --git a/openbsc/src/utils/smpp_mirror.c b/openbsc/src/utils/smpp_mirror.c index 2f154db..95df5f2 100644 --- a/openbsc/src/utils/smpp_mirror.c +++ b/openbsc/src/utils/smpp_mirror.c @@ -302,6 +302,8 @@ int port = 0; int rc; + msgb_talloc_ctx_init(NULL, 0); + memset(&esme, 0, sizeof(esme)); osmo_init_logging(&log_info); diff --git a/openbsc/tests/bsc-nat/bsc_nat_test.c b/openbsc/tests/bsc-nat/bsc_nat_test.c index b531c6b..2914a01 100644 --- a/openbsc/tests/bsc-nat/bsc_nat_test.c +++ b/openbsc/tests/bsc-nat/bsc_nat_test.c @@ -1551,6 +1551,7 @@ int main(int argc, char **argv) { + msgb_talloc_ctx_init(NULL, 0); sccp_set_log_area(DSCCP); osmo_init_logging(&log_info); diff --git a/openbsc/tests/bsc/bsc_test.c b/openbsc/tests/bsc/bsc_test.c index cc45652..6d41941 100644 --- a/openbsc/tests/bsc/bsc_test.c +++ b/openbsc/tests/bsc/bsc_test.c @@ -199,6 +199,7 @@ int main(int argc, char **argv) { + msgb_talloc_ctx_init(NULL, 0); osmo_init_logging(&log_info); test_scan(); diff --git a/openbsc/tests/gbproxy/gbproxy_test.c b/openbsc/tests/gbproxy/gbproxy_test.c index a2ff95b..b32ccb5 100644 --- a/openbsc/tests/gbproxy/gbproxy_test.c +++ b/openbsc/tests/gbproxy/gbproxy_test.c @@ -4842,6 +4842,8 @@ int main(int argc, char **argv) { + msgb_talloc_ctx_init(NULL, 0); + osmo_init_logging(&info); log_set_use_color(osmo_stderr_target, 0); log_set_print_filename(osmo_stderr_target, 0); diff --git a/openbsc/tests/mgcp/mgcp_test.c b/openbsc/tests/mgcp/mgcp_test.c index 6c94002..e2dc8fa 100644 --- a/openbsc/tests/mgcp/mgcp_test.c +++ b/openbsc/tests/mgcp/mgcp_test.c @@ -1202,6 +1202,7 @@ int main(int argc, char **argv) { + msgb_talloc_ctx_init(NULL, 0); osmo_init_logging(&log_info); test_strline(); diff --git a/openbsc/tests/oap/oap_test.c b/openbsc/tests/oap/oap_test.c index 339d774..d200ed2 100644 --- a/openbsc/tests/oap/oap_test.c +++ b/openbsc/tests/oap/oap_test.c @@ -234,6 +234,7 @@ int main(int argc, char **argv) { + msgb_talloc_ctx_init(NULL, 0); osmo_init_logging(&info); test_oap_api(); diff --git a/openbsc/tests/trau/trau_test.c b/openbsc/tests/trau/trau_test.c index b95f1e8..c74e6db 100644 --- a/openbsc/tests/trau/trau_test.c +++ b/openbsc/tests/trau/trau_test.c @@ -66,6 +66,8 @@ unsigned char data[33]; int i; + msgb_talloc_ctx_init(NULL, 0); + memset(data, 0x00, sizeof(data)); test_trau_fr_efr(data); memset(data, 0xff, sizeof(data)); -- To view, visit https://gerrit.osmocom.org/1052 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib0d6751260659cabf18a7ce80680ba2fb4228ea1 Gerrit-PatchSet: 2 Gerrit-Project: openbsc 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 Oct 13 13:14:41 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 13:14:41 +0000 Subject: [MERGED] openbsc[master]: msgb ctx: use new msgb_talloc_ctx_init(), don't access tallo... In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: msgb ctx: use new msgb_talloc_ctx_init(), don't access talloc_msgb_ctx ...................................................................... msgb ctx: use new msgb_talloc_ctx_init(), don't access talloc_msgb_ctx Drop extern definitions of talloc_msgb_ctx and use msgb_talloc_ctx_init() instead. In sgsn_test.c, use a local variable msgb_ctx to do the talloc report from the return value of msgb_talloc_ctx_init(). Change-Id: I2f9ace855f0ecbdc9adf5d75bcb1a3d666570de4 --- M openbsc/src/gprs/gb_proxy_main.c M openbsc/src/gprs/sgsn_main.c M openbsc/src/libcommon/talloc_ctx.c M openbsc/src/osmo-bsc_nat/bsc_nat.c M openbsc/tests/sgsn/sgsn_test.c 5 files changed, 7 insertions(+), 13 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/gprs/gb_proxy_main.c b/openbsc/src/gprs/gb_proxy_main.c index 2ddfca7..04875c7 100644 --- a/openbsc/src/gprs/gb_proxy_main.c +++ b/openbsc/src/gprs/gb_proxy_main.c @@ -189,8 +189,6 @@ } } -extern void *tall_msgb_ctx; - extern int bsc_vty_go_parent(struct vty *vty); static struct vty_app_info vty_info = { @@ -231,7 +229,7 @@ int rc; tall_bsc_ctx = talloc_named_const(NULL, 0, "nsip_proxy"); - tall_msgb_ctx = talloc_named_const(tall_bsc_ctx, 0, "msgb"); + msgb_talloc_ctx_init(tall_bsc_ctx, 0); signal(SIGINT, &signal_handler); signal(SIGABRT, &signal_handler); diff --git a/openbsc/src/gprs/sgsn_main.c b/openbsc/src/gprs/sgsn_main.c index 822c359..b4be631 100644 --- a/openbsc/src/gprs/sgsn_main.c +++ b/openbsc/src/gprs/sgsn_main.c @@ -163,7 +163,6 @@ /* NSI that BSSGP uses when transmitting on NS */ extern struct gprs_ns_inst *bssgp_nsi; -extern void *tall_msgb_ctx; extern int bsc_vty_go_parent(struct vty *vty); @@ -328,7 +327,7 @@ srand(time(NULL)); tall_bsc_ctx = talloc_named_const(NULL, 0, "osmo_sgsn"); - tall_msgb_ctx = talloc_named_const(tall_bsc_ctx, 0, "msgb"); + msgb_talloc_ctx_init(tall_bsc_ctx, 0); signal(SIGINT, &signal_handler); signal(SIGABRT, &signal_handler); diff --git a/openbsc/src/libcommon/talloc_ctx.c b/openbsc/src/libcommon/talloc_ctx.c index a917a8c..7a8bfd3 100644 --- a/openbsc/src/libcommon/talloc_ctx.c +++ b/openbsc/src/libcommon/talloc_ctx.c @@ -20,7 +20,6 @@ #include extern void *tall_bsc_ctx; -extern void *tall_msgb_ctx; extern void *tall_fle_ctx; extern void *tall_locop_ctx; extern void *tall_authciphop_ctx; @@ -38,7 +37,7 @@ void talloc_ctx_init(void *ctx_root) { - tall_msgb_ctx = talloc_named_const(ctx_root, 0, "msgb"); + msgb_talloc_ctx_init(ctx_root, 0); tall_fle_ctx = talloc_named_const(ctx_root, 0, "bs11_file_list_entry"); tall_locop_ctx = talloc_named_const(ctx_root, 0, "loc_updating_oper"); tall_authciphop_ctx = talloc_named_const(ctx_root, 0, "auth_ciph_oper"); diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c index 6ae8c05..a4dd679 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c @@ -1573,12 +1573,11 @@ osmo_timer_schedule(&sccp_close, SCCP_CLOSE_TIME, 0); } -extern void *tall_msgb_ctx; extern void *tall_ctr_ctx; static void talloc_init_ctx() { tall_bsc_ctx = talloc_named_const(NULL, 0, "nat"); - tall_msgb_ctx = talloc_named_const(tall_bsc_ctx, 0, "msgb"); + msgb_talloc_ctx_init(tall_bsc_ctx, 0); tall_ctr_ctx = talloc_named_const(tall_bsc_ctx, 0, "counter"); } diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c index 5ee5fa4..789817c 100644 --- a/openbsc/tests/sgsn/sgsn_test.c +++ b/openbsc/tests/sgsn/sgsn_test.c @@ -39,8 +39,6 @@ #include -extern void *tall_msgb_ctx; - void *tall_bsc_ctx; static struct sgsn_instance sgsn_inst = { .config_file = "osmo_sgsn.cfg", @@ -2423,11 +2421,12 @@ int main(int argc, char **argv) { void *osmo_sgsn_ctx; + void *msgb_ctx; osmo_init_logging(&info); osmo_sgsn_ctx = talloc_named_const(NULL, 0, "osmo_sgsn"); tall_bsc_ctx = talloc_named_const(osmo_sgsn_ctx, 0, "bsc"); - tall_msgb_ctx = talloc_named_const(osmo_sgsn_ctx, 0, "msgb"); + msgb_ctx = msgb_talloc_ctx_init(osmo_sgsn_ctx, 0); sgsn_rate_ctr_init(); sgsn_auth_init(); @@ -2458,7 +2457,7 @@ printf("Done\n"); talloc_report_full(osmo_sgsn_ctx, stderr); - OSMO_ASSERT(talloc_total_blocks(tall_msgb_ctx) == 1); + OSMO_ASSERT(talloc_total_blocks(msgb_ctx) == 1); OSMO_ASSERT(talloc_total_blocks(tall_bsc_ctx) == 2); return 0; } -- To view, visit https://gerrit.osmocom.org/1053 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2f9ace855f0ecbdc9adf5d75bcb1a3d666570de4 Gerrit-PatchSet: 2 Gerrit-Project: openbsc 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 Oct 13 13:14:42 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 13:14:42 +0000 Subject: [MERGED] openbsc[master]: gtphub_test.c: remove unused include of msgb.h In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: gtphub_test.c: remove unused include of msgb.h ...................................................................... gtphub_test.c: remove unused include of msgb.h Change-Id: I7a8003a0e0bff803941d7981ffc07cf78c3ae9a9 --- M openbsc/tests/gtphub/gtphub_test.c 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/tests/gtphub/gtphub_test.c b/openbsc/tests/gtphub/gtphub_test.c index e24967b..7d7673b 100644 --- a/openbsc/tests/gtphub/gtphub_test.c +++ b/openbsc/tests/gtphub/gtphub_test.c @@ -26,7 +26,6 @@ #include #include -#include #include #include -- To view, visit https://gerrit.osmocom.org/1051 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7a8003a0e0bff803941d7981ffc07cf78c3ae9a9 Gerrit-PatchSet: 2 Gerrit-Project: openbsc 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 Oct 13 13:14:42 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 13:14:42 +0000 Subject: [MERGED] openbsc[master]: meas_pcap2db.c: remove unused include of msgb.h In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: meas_pcap2db.c: remove unused include of msgb.h ...................................................................... meas_pcap2db.c: remove unused include of msgb.h Change-Id: I2197432c9482537bd5cf06a6c4fc912607ffab53 --- M openbsc/src/utils/meas_pcap2db.c 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/utils/meas_pcap2db.c b/openbsc/src/utils/meas_pcap2db.c index 261ee61..b874ac4 100644 --- a/openbsc/src/utils/meas_pcap2db.c +++ b/openbsc/src/utils/meas_pcap2db.c @@ -31,7 +31,6 @@ #include #include -#include #include #include -- To view, visit https://gerrit.osmocom.org/1050 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2197432c9482537bd5cf06a6c4fc912607ffab53 Gerrit-PatchSet: 2 Gerrit-Project: openbsc 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 Oct 13 13:14:42 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 13:14:42 +0000 Subject: [MERGED] openbsc[master]: bs11_config: initialize bs11 tall ctx, use instead of bsc ctx In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: bs11_config: initialize bs11 tall ctx, use instead of bsc ctx ...................................................................... bs11_config: initialize bs11 tall ctx, use instead of bsc ctx Actually initialize tall_bs11cfg_ctx as named const. Change-Id: I3b42b29cd1a688cb4c9d1d4e44208509d936e4ef --- M openbsc/src/utils/bs11_config.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/utils/bs11_config.c b/openbsc/src/utils/bs11_config.c index 227b9f8..3420991 100644 --- a/openbsc/src/utils/bs11_config.c +++ b/openbsc/src/utils/bs11_config.c @@ -890,6 +890,8 @@ struct gsm_network *gsmnet; struct e1inp_line *line; + tall_bs11cfg_ctx = talloc_named_const(NULL, 0, "bs11-config"); + osmo_init_logging(&log_info); handle_options(argc, argv); bts_model_bs11_init(); -- To view, visit https://gerrit.osmocom.org/1049 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3b42b29cd1a688cb4c9d1d4e44208509d936e4ef Gerrit-PatchSet: 2 Gerrit-Project: openbsc 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 Oct 13 13:14:42 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 13:14:42 +0000 Subject: [MERGED] openbsc[master]: ipaccess-config: initialize root talloc ctx with name In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: ipaccess-config: initialize root talloc ctx with name ...................................................................... ipaccess-config: initialize root talloc ctx with name tall_ctx_config is defined but remains NULL. Instead initialize as named const. Change-Id: Iec708eda2e4f8eb88b9e5bc5f82f6342709760b1 --- M openbsc/src/ipaccess/ipaccess-config.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/ipaccess/ipaccess-config.c b/openbsc/src/ipaccess/ipaccess-config.c index 9e3a471..453877b 100644 --- a/openbsc/src/ipaccess/ipaccess-config.c +++ b/openbsc/src/ipaccess/ipaccess-config.c @@ -852,6 +852,8 @@ struct sockaddr_in sin; int rc, option_index = 0, stream_id = 0xff; + tall_ctx_config = talloc_named_const(NULL, 0, "ipaccess-config"); + osmo_init_logging(&log_info); log_parse_category_mask(osmo_stderr_target, "DNM,0"); bts_model_nanobts_init(); -- To view, visit https://gerrit.osmocom.org/1048 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iec708eda2e4f8eb88b9e5bc5f82f6342709760b1 Gerrit-PatchSet: 2 Gerrit-Project: openbsc 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 Oct 13 13:14:48 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 13:14:48 +0000 Subject: [MERGED] osmo-iuh[master]: fix msgb talloc context initialization In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: fix msgb talloc context initialization ...................................................................... fix msgb talloc context initialization Properly initialize msgb talloc context in hnbgw and all tests, using the new msgb_talloc_ctx_init(). test-ranap.c: since msgb talloc ctx is now in test_common_init(), remove msgb talloc init here. Change-Id: I807c799aff1239184728551ed77fdafa73bd683f --- M src/hnbgw.c M src/tests/test-ranap.c M src/tests/test-ranap.ok M src/tests/test_common.c 4 files changed, 3 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hnbgw.c b/src/hnbgw.c index 500cf0f..8d6dbb1 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -454,6 +454,7 @@ tall_hnb_ctx = talloc_named_const(NULL, 0, "hnb_context"); talloc_asn1_ctx = talloc_named_const(NULL, 0, "asn1_context"); + msgb_talloc_ctx_init(tall_hnb_ctx, 0); g_hnb_gw = hnb_gw_create(tall_hnb_ctx); g_hnb_gw->config.rnc_id = 23; diff --git a/src/tests/test-ranap.c b/src/tests/test-ranap.c index c70009b..c1c7003 100644 --- a/src/tests/test-ranap.c +++ b/src/tests/test-ranap.c @@ -97,8 +97,6 @@ //asn_debug = 1; - msgb_set_talloc_ctx(talloc_named_const(NULL, 1, "msgb")); - test_common_init(); test_aper_int(1); diff --git a/src/tests/test-ranap.ok b/src/tests/test-ranap.ok index 2ad19e6..bda3c8e 100644 --- a/src/tests/test-ranap.ok +++ b/src/tests/test-ranap.ok @@ -214,5 +214,5 @@ 00 0a 00 11 00 00 01 00 29 40 0a 00 00 01 00 28 40 03 05 c2 d0 report talloc report on 'asn1_context' (total 0 bytes in 1 blocks) -talloc report on 'msgb' (total 1 bytes in 1 blocks) +talloc report on 'msgb' (total 0 bytes in 1 blocks) exit diff --git a/src/tests/test_common.c b/src/tests/test_common.c index 5a37e7e..ba00709 100644 --- a/src/tests/test_common.c +++ b/src/tests/test_common.c @@ -78,6 +78,7 @@ { int rc; + msgb_talloc_ctx_init(NULL, 0); talloc_asn1_ctx = talloc_named_const(NULL, 0, "asn1_context"); rc = osmo_init_logging(&test_log_info); -- To view, visit https://gerrit.osmocom.org/1054 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I807c799aff1239184728551ed77fdafa73bd683f Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh 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 Oct 13 13:58:35 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 13 Oct 2016 13:58:35 +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 (#11). 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, 31 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/05/905/11 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 74853bf..41f5bc2 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..7a92761 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,14 @@ 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: 11 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 Thu Oct 13 13:58:35 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 13 Oct 2016 13:58:35 +0000 Subject: [PATCH] osmo-bts[master]: octphy: Improving OML ADM state handling 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/906 to look at the new patch set (#10). octphy: Improving OML ADM state handling Improving 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, 71 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/06/906/10 diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c index 41f5bc2..888429e 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,75 @@ 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 RC %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, it is already closed!\n"); + } + 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: 10 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 Thu Oct 13 14:16:52 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 13 Oct 2016 14:16:52 +0000 Subject: [PATCH] openbsc[master]: sndcp: Fixups for sndcp layer based on coverity-scan suggest... In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/965 to look at the new patch set (#3). sndcp: Fixups for sndcp layer based on coverity-scan suggestions - missing break in gprs_sndcp_pcomp.c, line 143 - string overflow in slhc_test.c, line 211 - sizeof mismatch in gprs_sndcp_xid.c, line 1369 and 1378 - mismatching signedness in gprs_sndcp_xid.c, line 1377 - needless < 0 comparison in gprs_sndcp_xid.c, line 477 - needless < 0 comparison in gprs_sndcp_xid.c, line 209 - missing returncode check in v42bis_test.c, line 320 - wrong pointer dereferentialization in gprs_sndcp_comp.c, line 73 Change-Id: I4f9adf251f5119e67ffe76baad6f1f996ac8dbad --- M openbsc/src/gprs/gprs_sndcp_comp.c M openbsc/src/gprs/gprs_sndcp_pcomp.c M openbsc/src/gprs/gprs_sndcp_xid.c M openbsc/tests/slhc/slhc_test.c M openbsc/tests/v42bis/v42bis_test.c 5 files changed, 18 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/65/965/3 diff --git a/openbsc/src/gprs/gprs_sndcp_comp.c b/openbsc/src/gprs/gprs_sndcp_comp.c index b13cb8b..cae0039 100644 --- a/openbsc/src/gprs/gprs_sndcp_comp.c +++ b/openbsc/src/gprs/gprs_sndcp_comp.c @@ -70,7 +70,7 @@ comp_field->v42bis_params->nsapi, sizeof(comp_entity->nsapi)); } else if (comp_field->v44_params) { - comp_entity->nsapi_len = comp_field->v42bis_params->nsapi_len; + comp_entity->nsapi_len = comp_field->v44_params->nsapi_len; memcpy(comp_entity->nsapi, comp_field->v42bis_params->nsapi, sizeof(comp_entity->nsapi)); diff --git a/openbsc/src/gprs/gprs_sndcp_pcomp.c b/openbsc/src/gprs/gprs_sndcp_pcomp.c index 5f6fb2c..493b263 100644 --- a/openbsc/src/gprs/gprs_sndcp_pcomp.c +++ b/openbsc/src/gprs/gprs_sndcp_pcomp.c @@ -141,6 +141,7 @@ switch (pcomp_index) { case 0: type = SL_TYPE_IP; + break; case 1: type = SL_TYPE_UNCOMPRESSED_TCP; break; diff --git a/openbsc/src/gprs/gprs_sndcp_xid.c b/openbsc/src/gprs/gprs_sndcp_xid.c index 270bdee..bb43eab 100644 --- a/openbsc/src/gprs/gprs_sndcp_xid.c +++ b/openbsc/src/gprs/gprs_sndcp_xid.c @@ -206,7 +206,6 @@ /* Bail if number of ROHC profiles exceeds limit * (ROHC supports only a maximum of 16 different profiles) */ - OSMO_ASSERT(params->profile_len >= 0); OSMO_ASSERT(params->profile_len <= 16); /* Zero out buffer */ @@ -475,8 +474,7 @@ for (i = 0; i < comp_field->comp_len; i++) { /* Check if submitted PCOMP/DCOMP values are within bounds */ - if ((comp_field->comp[i] < 0) - || (comp_field->comp[i] > 0x0F)) + if (comp_field->comp[i] > 0x0F) return -EINVAL; if (i & 1) { @@ -1360,26 +1358,29 @@ { struct gprs_sndcp_comp_field *comp_field; int i = 0; + int rc; if (!comp_fields) return -EINVAL; if (!lt) return -EINVAL; - memset(lt, 0, lt_len * sizeof(lt)); + memset(lt, 0, sizeof(*lt)); llist_for_each_entry(comp_field, comp_fields, list) { + if (comp_field->algo >= 0) { + lt[i].entity = comp_field->entity; + lt[i].algo = comp_field->algo; + rc = gprs_sndcp_get_compression_class(comp_field); - lt[i].entity = comp_field->entity; - lt[i].algo = comp_field->algo; - lt[i].compclass = gprs_sndcp_get_compression_class(comp_field); + if (rc < 0) { + memset(lt, 0, sizeof(*lt)); + return -EINVAL; + } - if (lt[i].compclass < 0) { - memset(lt, 0, lt_len * sizeof(lt)); - return -EINVAL; + lt[i].compclass = rc; + i++; } - - i++; } return i; diff --git a/openbsc/tests/slhc/slhc_test.c b/openbsc/tests/slhc/slhc_test.c index e8ea02f..d2e1cd9 100644 --- a/openbsc/tests/slhc/slhc_test.c +++ b/openbsc/tests/slhc/slhc_test.c @@ -182,6 +182,8 @@ memset(packet, 0, sizeof(packet)); memset(packet_compr, 0, sizeof(packet_compr)); memset(packet_decompr, 0, sizeof(packet_decompr)); + + OSMO_ASSERT(strlen(packets[i]) < sizeof(packet_ascii)); strcpy(packet_ascii, packets[i]); packet_len = diff --git a/openbsc/tests/v42bis/v42bis_test.c b/openbsc/tests/v42bis/v42bis_test.c index 4e05514..7e90785 100644 --- a/openbsc/tests/v42bis/v42bis_test.c +++ b/openbsc/tests/v42bis/v42bis_test.c @@ -318,6 +318,7 @@ len = strlen(uncompr_packets[packet_id]); testvec = talloc_zero_size(ctx, len); len = osmo_hexparse(uncompr_packets[packet_id], testvec, len); + OSMO_ASSERT(len > 0); v42bis(ctx, V42BIS_COMPRESSION_MODE_DYNAMIC, testvec, len); v42bis(ctx, V42BIS_COMPRESSION_MODE_ALWAYS, testvec, len); v42bis(ctx, V42BIS_COMPRESSION_MODE_NEVER, testvec, len); -- To view, visit https://gerrit.osmocom.org/965 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4f9adf251f5119e67ffe76baad6f1f996ac8dbad Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: wax miguel From gerrit-no-reply at lists.osmocom.org Thu Oct 13 15:02:17 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 13 Oct 2016 15:02:17 +0000 Subject: [PATCH] libosmocore[master]: utils/conv_gen.py: generate a single file 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/828 to look at the new patch set (#6). utils/conv_gen.py: generate a single file Change-Id: Ib4e4ee5fdde38429e68e3b2fa50ec03a18f59daa --- M .gitignore M src/gsm/Makefile.am M utils/conv_gen.py 3 files changed, 308 insertions(+), 315 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/28/828/6 diff --git a/.gitignore b/.gitignore index 5165364..90c8c85 100644 --- a/.gitignore +++ b/.gitignore @@ -110,7 +110,7 @@ doc/*.tag src/crc*gen.c -src/gsm/conv*gen.c +src/gsm/gsm0503_conv.c include/osmocom/core/crc*gen.h include/osmocom/core/bit*gen.h diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index 2071413..d60e60e 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -18,16 +18,11 @@ gprs_cipher_core.c gprs_rlc.c gsm0480.c abis_nm.c gsm0502.c \ gsm0411_utils.c gsm0411_smc.c gsm0411_smr.c \ lapd_core.c lapdm.c kasumi.c gsm_04_08_gprs.c \ - conv_cs2_gen.c conv_cs3_gen.c conv_xcch_gen.c \ - conv_tch_afs_12_2_gen.c conv_tch_afs_10_2_gen.c \ - conv_tch_afs_7_95_gen.c conv_tch_afs_7_4_gen.c \ - conv_tch_afs_6_7_gen.c conv_tch_afs_5_9_gen.c \ - conv_tch_afs_5_15_gen.c conv_tch_afs_4_75_gen.c \ auth_core.c auth_comp128v1.c auth_comp128v23.c \ auth_milenage.c milenage/aes-encblock.c gea.c \ 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 + gsup.c gprs_gea.c gsm0503_conv.c libgsmint_la_LDFLAGS = -no-undefined libgsmint_la_LIBADD = $(top_builddir)/src/libosmocore.la @@ -37,5 +32,6 @@ EXTRA_DIST = libosmogsm.map -conv%gen.c: $(top_srcdir)/utils/conv_gen.py +# Convolutional codes generation +gsm0503_conv.c: $(AM_V_GEN)python2 $(top_srcdir)/utils/conv_gen.py diff --git a/utils/conv_gen.py b/utils/conv_gen.py index a4f918f..38ea63b 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -222,325 +222,322 @@ ( G1, 1 ), ] -# xCCH definition -xCCH = ConvolutionalCode( - 224, - CCH_poly, - name = "xcch", - description = [ - "xCCH convolutional code:", - "228 bits blocks, rate 1/2, k = 5", - "G0 = 1 + D3 + D4", - "G1 = 1 + D + D3 + D4", - ] -) +conv_codes = [ + # xCCH definition + ConvolutionalCode( + 224, + CCH_poly, + name = "xcch", + description = [ + "xCCH convolutional code:", + "228 bits blocks, rate 1/2, k = 5", + "G0 = 1 + D3 + D4", + "G1 = 1 + D + D3 + D4", + ] + ), -# CS2 definition -CS2 = ConvolutionalCode( - 290, - CCH_poly, - puncture = [ - 15, 19, 23, 27, 31, 35, 43, 47, 51, 55, 59, 63, 67, 71, - 75, 79, 83, 91, 95, 99, 103, 107, 111, 115, 119, 123, 127, 131, - 139, 143, 147, 151, 155, 159, 163, 167, 171, 175, 179, 187, 191, 195, - 199, 203, 207, 211, 215, 219, 223, 227, 235, 239, 243, 247, 251, 255, - 259, 263, 267, 271, 275, 283, 287, 291, 295, 299, 303, 307, 311, 315, - 319, 323, 331, 335, 339, 343, 347, 351, 355, 359, 363, 367, 371, 379, - 383, 387, 391, 395, 399, 403, 407, 411, 415, 419, 427, 431, 435, 439, - 443, 447, 451, 455, 459, 463, 467, 475, 479, 483, 487, 491, 495, 499, - 503, 507, 511, 515, 523, 527, 531, 535, 539, 543, 547, 551, 555, 559, - 563, 571, 575, 579, 583, 587, -1 - ], - name = "cs2", - description = [ - "CS2 convolutional code:", - "G0 = 1 + D3 + D4", - "G1 = 1 + D + D3 + D4", - ] -) + # CS2 definition + ConvolutionalCode( + 290, + CCH_poly, + puncture = [ + 15, 19, 23, 27, 31, 35, 43, 47, 51, 55, 59, 63, 67, 71, + 75, 79, 83, 91, 95, 99, 103, 107, 111, 115, 119, 123, 127, 131, + 139, 143, 147, 151, 155, 159, 163, 167, 171, 175, 179, 187, 191, 195, + 199, 203, 207, 211, 215, 219, 223, 227, 235, 239, 243, 247, 251, 255, + 259, 263, 267, 271, 275, 283, 287, 291, 295, 299, 303, 307, 311, 315, + 319, 323, 331, 335, 339, 343, 347, 351, 355, 359, 363, 367, 371, 379, + 383, 387, 391, 395, 399, 403, 407, 411, 415, 419, 427, 431, 435, 439, + 443, 447, 451, 455, 459, 463, 467, 475, 479, 483, 487, 491, 495, 499, + 503, 507, 511, 515, 523, 527, 531, 535, 539, 543, 547, 551, 555, 559, + 563, 571, 575, 579, 583, 587, -1 + ], + name = "cs2", + description = [ + "CS2 convolutional code:", + "G0 = 1 + D3 + D4", + "G1 = 1 + D + D3 + D4", + ] + ), -# CS3 definition -CS3 = ConvolutionalCode( - 334, - CCH_poly, - puncture = [ - 15, 17, 21, 23, 27, 29, 33, 35, 39, 41, 45, 47, 51, 53, - 57, 59, 63, 65, 69, 71, 75, 77, 81, 83, 87, 89, 93, 95, - 99, 101, 105, 107, 111, 113, 117, 119, 123, 125, 129, 131, 135, 137, - 141, 143, 147, 149, 153, 155, 159, 161, 165, 167, 171, 173, 177, 179, - 183, 185, 189, 191, 195, 197, 201, 203, 207, 209, 213, 215, 219, 221, - 225, 227, 231, 233, 237, 239, 243, 245, 249, 251, 255, 257, 261, 263, - 267, 269, 273, 275, 279, 281, 285, 287, 291, 293, 297, 299, 303, 305, - 309, 311, 315, 317, 321, 323, 327, 329, 333, 335, 339, 341, 345, 347, - 351, 353, 357, 359, 363, 365, 369, 371, 375, 377, 381, 383, 387, 389, - 393, 395, 399, 401, 405, 407, 411, 413, 417, 419, 423, 425, 429, 431, - 435, 437, 441, 443, 447, 449, 453, 455, 459, 461, 465, 467, 471, 473, - 477, 479, 483, 485, 489, 491, 495, 497, 501, 503, 507, 509, 513, 515, - 519, 521, 525, 527, 531, 533, 537, 539, 543, 545, 549, 551, 555, 557, - 561, 563, 567, 569, 573, 575, 579, 581, 585, 587, 591, 593, 597, 599, - 603, 605, 609, 611, 615, 617, 621, 623, 627, 629, 633, 635, 639, 641, - 645, 647, 651, 653, 657, 659, 663, 665, 669, 671, -1 - ], - name = "cs3", - description = [ - "CS3 convolutional code:", - "G0 = 1 + D3 + D4", - "G1 = 1 + D + D3 + D4", - ] -) + # CS3 definition + ConvolutionalCode( + 334, + CCH_poly, + puncture = [ + 15, 17, 21, 23, 27, 29, 33, 35, 39, 41, 45, 47, 51, 53, + 57, 59, 63, 65, 69, 71, 75, 77, 81, 83, 87, 89, 93, 95, + 99, 101, 105, 107, 111, 113, 117, 119, 123, 125, 129, 131, 135, 137, + 141, 143, 147, 149, 153, 155, 159, 161, 165, 167, 171, 173, 177, 179, + 183, 185, 189, 191, 195, 197, 201, 203, 207, 209, 213, 215, 219, 221, + 225, 227, 231, 233, 237, 239, 243, 245, 249, 251, 255, 257, 261, 263, + 267, 269, 273, 275, 279, 281, 285, 287, 291, 293, 297, 299, 303, 305, + 309, 311, 315, 317, 321, 323, 327, 329, 333, 335, 339, 341, 345, 347, + 351, 353, 357, 359, 363, 365, 369, 371, 375, 377, 381, 383, 387, 389, + 393, 395, 399, 401, 405, 407, 411, 413, 417, 419, 423, 425, 429, 431, + 435, 437, 441, 443, 447, 449, 453, 455, 459, 461, 465, 467, 471, 473, + 477, 479, 483, 485, 489, 491, 495, 497, 501, 503, 507, 509, 513, 515, + 519, 521, 525, 527, 531, 533, 537, 539, 543, 545, 549, 551, 555, 557, + 561, 563, 567, 569, 573, 575, 579, 581, 585, 587, 591, 593, 597, 599, + 603, 605, 609, 611, 615, 617, 621, 623, 627, 629, 633, 635, 639, 641, + 645, 647, 651, 653, 657, 659, 663, 665, 669, 671, -1 + ], + name = "cs3", + description = [ + "CS3 convolutional code:", + "G0 = 1 + D3 + D4", + "G1 = 1 + D + D3 + D4", + ] + ), -# TCH_AFS_12_2 definition -TCH_AFS_12_2 = ConvolutionalCode( - 250, - [ - ( 1, 1 ), - ( G1, G0 ), - ], - puncture = [ - 321, 325, 329, 333, 337, 341, 345, 349, 353, 357, 361, 363, - 365, 369, 373, 377, 379, 381, 385, 389, 393, 395, 397, 401, - 405, 409, 411, 413, 417, 421, 425, 427, 429, 433, 437, 441, - 443, 445, 449, 453, 457, 459, 461, 465, 469, 473, 475, 477, - 481, 485, 489, 491, 493, 495, 497, 499, 501, 503, 505, 507, - -1 - ], - name = 'tch_afs_12_2', - description = [ - "TCH/AFS 12.2 kbits convolutional code:", - "250 bits block, rate 1/2, punctured", - "G0/G0 = 1", - "G1/G0 = 1 + D + D3 + D4 / 1 + D3 + D4", - ] -) + # TCH_AFS_12_2 definition + ConvolutionalCode( + 250, + [ + ( 1, 1 ), + ( G1, G0 ), + ], + puncture = [ + 321, 325, 329, 333, 337, 341, 345, 349, 353, 357, 361, 363, + 365, 369, 373, 377, 379, 381, 385, 389, 393, 395, 397, 401, + 405, 409, 411, 413, 417, 421, 425, 427, 429, 433, 437, 441, + 443, 445, 449, 453, 457, 459, 461, 465, 469, 473, 475, 477, + 481, 485, 489, 491, 493, 495, 497, 499, 501, 503, 505, 507, + -1 + ], + name = 'tch_afs_12_2', + description = [ + "TCH/AFS 12.2 kbits convolutional code:", + "250 bits block, rate 1/2, punctured", + "G0/G0 = 1", + "G1/G0 = 1 + D + D3 + D4 / 1 + D3 + D4", + ] + ), -# TCH_AFS_10_2 definition -TCH_AFS_10_2 = ConvolutionalCode( - 210, - [ - ( G1, G3 ), - ( G2, G3 ), - ( 1, 1 ), - ], - puncture = [ - 1, 4, 7, 10, 16, 19, 22, 28, 31, 34, 40, 43, - 46, 52, 55, 58, 64, 67, 70, 76, 79, 82, 88, 91, - 94, 100, 103, 106, 112, 115, 118, 124, 127, 130, 136, 139, - 142, 148, 151, 154, 160, 163, 166, 172, 175, 178, 184, 187, - 190, 196, 199, 202, 208, 211, 214, 220, 223, 226, 232, 235, - 238, 244, 247, 250, 256, 259, 262, 268, 271, 274, 280, 283, - 286, 292, 295, 298, 304, 307, 310, 316, 319, 322, 325, 328, - 331, 334, 337, 340, 343, 346, 349, 352, 355, 358, 361, 364, - 367, 370, 373, 376, 379, 382, 385, 388, 391, 394, 397, 400, - 403, 406, 409, 412, 415, 418, 421, 424, 427, 430, 433, 436, - 439, 442, 445, 448, 451, 454, 457, 460, 463, 466, 469, 472, - 475, 478, 481, 484, 487, 490, 493, 496, 499, 502, 505, 508, - 511, 514, 517, 520, 523, 526, 529, 532, 535, 538, 541, 544, - 547, 550, 553, 556, 559, 562, 565, 568, 571, 574, 577, 580, - 583, 586, 589, 592, 595, 598, 601, 604, 607, 609, 610, 613, - 616, 619, 621, 622, 625, 627, 628, 631, 633, 634, 636, 637, - 639, 640, -1 - ], - name = 'tch_afs_10_2', - description = [ - "TCH/AFS 10.2 kbits convolutional code:", - "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", - "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", - "G3/G3 = 1", - ] -) + # TCH_AFS_10_2 definition + ConvolutionalCode( + 210, + [ + ( G1, G3 ), + ( G2, G3 ), + ( 1, 1 ), + ], + puncture = [ + 1, 4, 7, 10, 16, 19, 22, 28, 31, 34, 40, 43, + 46, 52, 55, 58, 64, 67, 70, 76, 79, 82, 88, 91, + 94, 100, 103, 106, 112, 115, 118, 124, 127, 130, 136, 139, + 142, 148, 151, 154, 160, 163, 166, 172, 175, 178, 184, 187, + 190, 196, 199, 202, 208, 211, 214, 220, 223, 226, 232, 235, + 238, 244, 247, 250, 256, 259, 262, 268, 271, 274, 280, 283, + 286, 292, 295, 298, 304, 307, 310, 316, 319, 322, 325, 328, + 331, 334, 337, 340, 343, 346, 349, 352, 355, 358, 361, 364, + 367, 370, 373, 376, 379, 382, 385, 388, 391, 394, 397, 400, + 403, 406, 409, 412, 415, 418, 421, 424, 427, 430, 433, 436, + 439, 442, 445, 448, 451, 454, 457, 460, 463, 466, 469, 472, + 475, 478, 481, 484, 487, 490, 493, 496, 499, 502, 505, 508, + 511, 514, 517, 520, 523, 526, 529, 532, 535, 538, 541, 544, + 547, 550, 553, 556, 559, 562, 565, 568, 571, 574, 577, 580, + 583, 586, 589, 592, 595, 598, 601, 604, 607, 609, 610, 613, + 616, 619, 621, 622, 625, 627, 628, 631, 633, 634, 636, 637, + 639, 640, -1 + ], + name = 'tch_afs_10_2', + description = [ + "TCH/AFS 10.2 kbits convolutional code:", + "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", + "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", + "G3/G3 = 1", + ] + ), -# TCH_AFS_7_95 definition -TCH_AFS_7_95 = ConvolutionalCode( - 165, - [ - ( 1, 1 ), - ( G5, G4 ), - ( G6, G4 ), - ], - puncture = [ - 1, 2, 4, 5, 8, 22, 70, 118, 166, 214, 262, 310, - 317, 319, 325, 332, 334, 341, 343, 349, 356, 358, 365, 367, - 373, 380, 382, 385, 389, 391, 397, 404, 406, 409, 413, 415, - 421, 428, 430, 433, 437, 439, 445, 452, 454, 457, 461, 463, - 469, 476, 478, 481, 485, 487, 490, 493, 500, 502, 503, 505, - 506, 508, 509, 511, 512, -1 - ], - name = 'tch_afs_7_95', - description = [ - "TCH/AFS 7.95 kbits convolutional code:", - "G4/G4 = 1", - "G5/G4 = 1 + D + D4 + D6 / 1 + D2 + D3 + D5 + D6", - "G6/G4 = 1 + D + D2 + D3 + D4 + D6 / 1 + D2 + D3 + D5 + D6", - ] -) + # TCH_AFS_7_95 definition + ConvolutionalCode( + 165, + [ + ( 1, 1 ), + ( G5, G4 ), + ( G6, G4 ), + ], + puncture = [ + 1, 2, 4, 5, 8, 22, 70, 118, 166, 214, 262, 310, + 317, 319, 325, 332, 334, 341, 343, 349, 356, 358, 365, 367, + 373, 380, 382, 385, 389, 391, 397, 404, 406, 409, 413, 415, + 421, 428, 430, 433, 437, 439, 445, 452, 454, 457, 461, 463, + 469, 476, 478, 481, 485, 487, 490, 493, 500, 502, 503, 505, + 506, 508, 509, 511, 512, -1 + ], + name = 'tch_afs_7_95', + description = [ + "TCH/AFS 7.95 kbits convolutional code:", + "G4/G4 = 1", + "G5/G4 = 1 + D + D4 + D6 / 1 + D2 + D3 + D5 + D6", + "G6/G4 = 1 + D + D2 + D3 + D4 + D6 / 1 + D2 + D3 + D5 + D6", + ] + ), -# TCH_AFS_7_4 definition -TCH_AFS_7_4 = ConvolutionalCode( - 154, - [ - ( G1, G3 ), - ( G2, G3 ), - ( 1, 1 ), - ], - puncture = [ - 0, 355, 361, 367, 373, 379, 385, 391, 397, 403, 409, 415, - 421, 427, 433, 439, 445, 451, 457, 460, 463, 466, 468, 469, - 471, 472, -1 - ], - name = 'tch_afs_7_4', - description = [ - "TCH/AFS 7.4 kbits convolutional code:", - "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", - "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", - "G3/G3 = 1", - ] -) + # TCH_AFS_7_4 definition + ConvolutionalCode( + 154, + [ + ( G1, G3 ), + ( G2, G3 ), + ( 1, 1 ), + ], + puncture = [ + 0, 355, 361, 367, 373, 379, 385, 391, 397, 403, 409, 415, + 421, 427, 433, 439, 445, 451, 457, 460, 463, 466, 468, 469, + 471, 472, -1 + ], + name = 'tch_afs_7_4', + description = [ + "TCH/AFS 7.4 kbits convolutional code:", + "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", + "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", + "G3/G3 = 1", + ] + ), -# TCH_AFS_6_7 definition -TCH_AFS_6_7 = ConvolutionalCode( - 140, - [ - ( G1, G3 ), - ( G2, G3 ), - ( 1, 1 ), - ( 1, 1 ), - ], - puncture = [ - 1, 3, 7, 11, 15, 27, 39, 55, 67, 79, 95, 107, - 119, 135, 147, 159, 175, 187, 199, 215, 227, 239, 255, 267, - 279, 287, 291, 295, 299, 303, 307, 311, 315, 319, 323, 327, - 331, 335, 339, 343, 347, 351, 355, 359, 363, 367, 369, 371, - 375, 377, 379, 383, 385, 387, 391, 393, 395, 399, 401, 403, - 407, 409, 411, 415, 417, 419, 423, 425, 427, 431, 433, 435, - 439, 441, 443, 447, 449, 451, 455, 457, 459, 463, 465, 467, - 471, 473, 475, 479, 481, 483, 487, 489, 491, 495, 497, 499, - 503, 505, 507, 511, 513, 515, 519, 521, 523, 527, 529, 531, - 535, 537, 539, 543, 545, 547, 549, 551, 553, 555, 557, 559, - 561, 563, 565, 567, 569, 571, 573, 575, -1 - ], - name = 'tch_afs_6_7', - description = [ - "TCH/AFS 6.7 kbits convolutional code:", - "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", - "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", - "G3/G3 = 1", - "G3/G3 = 1", - ] -) + # TCH_AFS_6_7 definition + ConvolutionalCode( + 140, + [ + ( G1, G3 ), + ( G2, G3 ), + ( 1, 1 ), + ( 1, 1 ), + ], + puncture = [ + 1, 3, 7, 11, 15, 27, 39, 55, 67, 79, 95, 107, + 119, 135, 147, 159, 175, 187, 199, 215, 227, 239, 255, 267, + 279, 287, 291, 295, 299, 303, 307, 311, 315, 319, 323, 327, + 331, 335, 339, 343, 347, 351, 355, 359, 363, 367, 369, 371, + 375, 377, 379, 383, 385, 387, 391, 393, 395, 399, 401, 403, + 407, 409, 411, 415, 417, 419, 423, 425, 427, 431, 433, 435, + 439, 441, 443, 447, 449, 451, 455, 457, 459, 463, 465, 467, + 471, 473, 475, 479, 481, 483, 487, 489, 491, 495, 497, 499, + 503, 505, 507, 511, 513, 515, 519, 521, 523, 527, 529, 531, + 535, 537, 539, 543, 545, 547, 549, 551, 553, 555, 557, 559, + 561, 563, 565, 567, 569, 571, 573, 575, -1 + ], + name = 'tch_afs_6_7', + description = [ + "TCH/AFS 6.7 kbits convolutional code:", + "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", + "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", + "G3/G3 = 1", + "G3/G3 = 1", + ] + ), -# TCH_AFS_5_9 definition -TCH_AFS_5_9 = ConvolutionalCode( - 124, - [ - ( G4, G6 ), - ( G5, G6 ), - ( 1, 1), - ( 1, 1), - ], - puncture = [ - 0, 1, 3, 5, 7, 11, 15, 31, 47, 63, 79, 95, - 111, 127, 143, 159, 175, 191, 207, 223, 239, 255, 271, 287, - 303, 319, 327, 331, 335, 343, 347, 351, 359, 363, 367, 375, - 379, 383, 391, 395, 399, 407, 411, 415, 423, 427, 431, 439, - 443, 447, 455, 459, 463, 467, 471, 475, 479, 483, 487, 491, - 495, 499, 503, 507, 509, 511, 512, 513, 515, 516, 517, 519, - -1 - ], - name = 'tch_afs_5_9', - description = [ - "TCH/AFS 5.9 kbits convolutional code:", - "124 bits", - "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", - "G5/G6 = 1 + D + D4 + D6 / 1 + D + D2 + D3 + D4 + D6", - "G6/G6 = 1", - "G6/G6 = 1", - ] -) + # TCH_AFS_5_9 definition + ConvolutionalCode( + 124, + [ + ( G4, G6 ), + ( G5, G6 ), + ( 1, 1), + ( 1, 1), + ], + puncture = [ + 0, 1, 3, 5, 7, 11, 15, 31, 47, 63, 79, 95, + 111, 127, 143, 159, 175, 191, 207, 223, 239, 255, 271, 287, + 303, 319, 327, 331, 335, 343, 347, 351, 359, 363, 367, 375, + 379, 383, 391, 395, 399, 407, 411, 415, 423, 427, 431, 439, + 443, 447, 455, 459, 463, 467, 471, 475, 479, 483, 487, 491, + 495, 499, 503, 507, 509, 511, 512, 513, 515, 516, 517, 519, + -1 + ], + name = 'tch_afs_5_9', + description = [ + "TCH/AFS 5.9 kbits convolutional code:", + "124 bits", + "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", + "G5/G6 = 1 + D + D4 + D6 / 1 + D + D2 + D3 + D4 + D6", + "G6/G6 = 1", + "G6/G6 = 1", + ] + ), -# TCH_AFS_5_15 definition -TCH_AFS_5_15 = ConvolutionalCode( - 109, - [ - ( G1, G3 ), - ( G1, G3 ), - ( G2, G3 ), - ( 1, 1 ), - ( 1, 1 ), - ], - puncture = [ - 0, 4, 5, 9, 10, 14, 15, 20, 25, 30, 35, 40, - 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, - 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, - 290, 300, 310, 315, 320, 325, 330, 334, 335, 340, 344, 345, - 350, 354, 355, 360, 364, 365, 370, 374, 375, 380, 384, 385, - 390, 394, 395, 400, 404, 405, 410, 414, 415, 420, 424, 425, - 430, 434, 435, 440, 444, 445, 450, 454, 455, 460, 464, 465, - 470, 474, 475, 480, 484, 485, 490, 494, 495, 500, 504, 505, - 510, 514, 515, 520, 524, 525, 529, 530, 534, 535, 539, 540, - 544, 545, 549, 550, 554, 555, 559, 560, 564, -1 - ], - name = 'tch_afs_5_15', - description = [ - "TCH/AFS 5.15 kbits convolutional code:", - "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", - "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", - "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", - "G3/G3 = 1", - "G3/G3 = 1", - ] -) + # TCH_AFS_5_15 definition + ConvolutionalCode( + 109, + [ + ( G1, G3 ), + ( G1, G3 ), + ( G2, G3 ), + ( 1, 1 ), + ( 1, 1 ), + ], + puncture = [ + 0, 4, 5, 9, 10, 14, 15, 20, 25, 30, 35, 40, + 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, + 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, + 290, 300, 310, 315, 320, 325, 330, 334, 335, 340, 344, 345, + 350, 354, 355, 360, 364, 365, 370, 374, 375, 380, 384, 385, + 390, 394, 395, 400, 404, 405, 410, 414, 415, 420, 424, 425, + 430, 434, 435, 440, 444, 445, 450, 454, 455, 460, 464, 465, + 470, 474, 475, 480, 484, 485, 490, 494, 495, 500, 504, 505, + 510, 514, 515, 520, 524, 525, 529, 530, 534, 535, 539, 540, + 544, 545, 549, 550, 554, 555, 559, 560, 564, -1 + ], + name = 'tch_afs_5_15', + description = [ + "TCH/AFS 5.15 kbits convolutional code:", + "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", + "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", + "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", + "G3/G3 = 1", + "G3/G3 = 1", + ] + ), -# TCH_AFS_4_75 definition -TCH_AFS_4_75 = ConvolutionalCode( - 101, - [ - ( G4, G6 ), - ( G4, G6 ), - ( G5, G6 ), - ( 1, 1 ), - ( 1, 1 ), - ], - puncture = [ - 0, 1, 2, 4, 5, 7, 9, 15, 25, 35, 45, 55, - 65, 75, 85, 95, 105, 115, 125, 135, 145, 155, 165, 175, - 185, 195, 205, 215, 225, 235, 245, 255, 265, 275, 285, 295, - 305, 315, 325, 335, 345, 355, 365, 375, 385, 395, 400, 405, - 410, 415, 420, 425, 430, 435, 440, 445, 450, 455, 459, 460, - 465, 470, 475, 479, 480, 485, 490, 495, 499, 500, 505, 509, - 510, 515, 517, 519, 520, 522, 524, 525, 526, 527, 529, 530, - 531, 532, 534, -1 - ], - name = 'tch_afs_4_75', - description = [ - "TCH/AFS 4.75 kbits convolutional code:", - "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", - "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", - "G5/G6 = 1 + D + D4 + D6 / 1 + D + D2 + D3 + D4 + D6", - "G6/G6 = 1", - "G6/G6 = 1", - ] -) + # TCH_AFS_4_75 definition + ConvolutionalCode( + 101, + [ + ( G4, G6 ), + ( G4, G6 ), + ( G5, G6 ), + ( 1, 1 ), + ( 1, 1 ), + ], + puncture = [ + 0, 1, 2, 4, 5, 7, 9, 15, 25, 35, 45, 55, + 65, 75, 85, 95, 105, 115, 125, 135, 145, 155, 165, 175, + 185, 195, 205, 215, 225, 235, 245, 255, 265, 275, 285, 295, + 305, 315, 325, 335, 345, 355, 365, 375, 385, 395, 400, 405, + 410, 415, 420, 425, 430, 435, 440, 445, 450, 455, 459, 460, + 465, 470, 475, 479, 480, 485, 490, 495, 499, 500, 505, 509, + 510, 515, 517, 519, 520, 522, 524, 525, 526, 527, 529, 530, + 531, 532, 534, -1 + ], + name = 'tch_afs_4_75', + description = [ + "TCH/AFS 4.75 kbits convolutional code:", + "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", + "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", + "G5/G6 = 1 + D + D4 + D6 / 1 + D + D2 + D3 + D4 + D6", + "G6/G6 = 1", + "G6/G6 = 1", + ] + ) +] -def gen_c(dest, pref, code): - f = open(os.path.join(dest, 'conv_' + code.name + '_gen.c'), 'w') +if __name__ == '__main__': + path = sys.argv[1] if len(sys.argv) > 1 else os.getcwd() + prefix = "gsm0503" + + print >>sys.stderr, "Generating convolutional codes..." + + # Open a new file for writing + f = open(os.path.join(path, "gsm0503_conv.c"), 'w') print >>f, mod_license print >>f, "#include " print >>f, "#include " - code.gen_tables(pref, f) -if __name__ == '__main__': - print >>sys.stderr, "Generating convolutional codes..." - prefix = "gsm0503" - path = sys.argv[1] if len(sys.argv) > 1 else os.getcwd() - gen_c(path, prefix, xCCH) - gen_c(path, prefix, CS2) - gen_c(path, prefix, CS3) - gen_c(path, prefix, TCH_AFS_12_2) - gen_c(path, prefix, TCH_AFS_10_2) - gen_c(path, prefix, TCH_AFS_7_95) - gen_c(path, prefix, TCH_AFS_7_4) - gen_c(path, prefix, TCH_AFS_6_7) - gen_c(path, prefix, TCH_AFS_5_9) - gen_c(path, prefix, TCH_AFS_5_15) - gen_c(path, prefix, TCH_AFS_4_75) - print >>sys.stderr, "\tdone." + # Generate the tables one by one + for code in conv_codes: + print >>sys.stderr, "Generate '%s' definition" % code.name + code.gen_tables(prefix, f) + + print >>sys.stderr, "Generation complete." -- To view, visit https://gerrit.osmocom.org/828 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib4e4ee5fdde38429e68e3b2fa50ec03a18f59daa Gerrit-PatchSet: 6 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 Thu Oct 13 15:04:38 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 15:04:38 +0000 Subject: [PATCH] osmo-iuh[master]: cosmetic: hnbgw: addr related renames, move define, move com... Message-ID: Review at https://gerrit.osmocom.org/1059 cosmetic: hnbgw: addr related renames, move define, move comment Prepare for parameterization of IuCS and IuPS addresses: Conform internal variable naming to local-ip, local-port, remote-ip, remote-port (instead of bind-ip). Rename HNBGW_IUH_LOCAL_IP_DEFAULT to HNGGW_LOCAL_IP_DEFAULT to be more general and move it to the top. Move a function doc comment to the .c file. Change-Id: Ice85941c978498e3ddf41d151248507e7f56cb5d --- M include/osmocom/iuh/hnbgw.h M src/hnbgw.c M src/hnbgw_vty.c 3 files changed, 22 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/59/1059/1 diff --git a/include/osmocom/iuh/hnbgw.h b/include/osmocom/iuh/hnbgw.h index dfc9d82..6b5a855 100644 --- a/include/osmocom/iuh/hnbgw.h +++ b/include/osmocom/iuh/hnbgw.h @@ -19,6 +19,8 @@ }; +#define HNBGW_LOCAL_IP_DEFAULT "0.0.0.0" + /* 25.467 Section 7.1 */ #define IUH_DEFAULT_SCTP_PORT 29169 #define RNA_DEFAULT_SCTP_PORT 25471 @@ -106,13 +108,11 @@ struct hnb_context *hnb; }; -#define HNBGW_IUH_LOCAL_IP_DEFAULT "0.0.0.0" - struct hnb_gw { struct { - const char *iuh_bind_addr; + const char *iuh_local_ip; /*! SCTP port for Iuh listening */ - uint16_t iuh_listen_port; + uint16_t iuh_local_port; /*! The UDP port where we receive multiplexed CS user * plane traffic from HNBs */ uint16_t iuh_cs_mux_port; @@ -149,8 +149,4 @@ void hnbgw_vty_init(struct hnb_gw *gw, void *tall_ctx); -/* - * Return IP address passed to the hnbgw/iuh/bind command, or - * IUH_BIND_ADDR_DEFAULT - */ -const char *hnbgw_get_iuh_bind_addr(struct hnb_gw *gw); +const char *hnbgw_get_iuh_local_ip(struct hnb_gw *gw); diff --git a/src/hnbgw.c b/src/hnbgw.c index 8d6dbb1..eb36367 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -76,7 +76,7 @@ { struct hnb_gw *gw = talloc_zero(ctx, struct hnb_gw); - gw->config.iuh_listen_port = IUH_DEFAULT_SCTP_PORT; + gw->config.iuh_local_port = IUH_DEFAULT_SCTP_PORT; gw->next_ue_ctx_id = 23; INIT_LLIST_HEAD(&gw->hnb_list); @@ -308,11 +308,15 @@ return 0; } -const char *hnbgw_get_iuh_bind_addr(struct hnb_gw *gw) +/* + * Return IP address passed to the hnbgw/iuh/local-ip command, or + * HNBGW_LOCAL_IP_DEFAULT. + */ +const char *hnbgw_get_iuh_local_ip(struct hnb_gw *gw) { - const char *addr = gw->config.iuh_bind_addr; + const char *addr = gw->config.iuh_local_ip; if (!addr) - addr = HNBGW_IUH_LOCAL_IP_DEFAULT; + addr = HNBGW_LOCAL_IP_DEFAULT; return addr; } @@ -507,8 +511,8 @@ g_hnb_gw->cnlink_ps = hnbgw_cnlink_init(g_hnb_gw, "127.0.0.2", SUA_PORT, 1); LOGP(DMAIN, LOGL_NOTICE, "Listening for Iuh at %s %d\n", - hnbgw_get_iuh_bind_addr(g_hnb_gw), - g_hnb_gw->config.iuh_listen_port); + hnbgw_get_iuh_local_ip(g_hnb_gw), + g_hnb_gw->config.iuh_local_port); srv = osmo_stream_srv_link_create(tall_hnb_ctx); if (!srv) { perror("cannot create server"); @@ -516,8 +520,8 @@ } osmo_stream_srv_link_set_data(srv, g_hnb_gw); osmo_stream_srv_link_set_proto(srv, IPPROTO_SCTP); - osmo_stream_srv_link_set_addr(srv, hnbgw_get_iuh_bind_addr(g_hnb_gw)); - osmo_stream_srv_link_set_port(srv, g_hnb_gw->config.iuh_listen_port); + osmo_stream_srv_link_set_addr(srv, hnbgw_get_iuh_local_ip(g_hnb_gw)); + osmo_stream_srv_link_set_port(srv, g_hnb_gw->config.iuh_local_port); osmo_stream_srv_link_set_accept_cb(srv, accept_cb); if (osmo_stream_srv_link_open(srv) < 0) { diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index 5dee41a..93c1f9a 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -107,10 +107,10 @@ DEFUN(cfg_hnbgw_iuh_local_ip, cfg_hnbgw_iuh_local_ip_cmd, "local-ip A.B.C.D", "Accept Iuh connections on local interface\n" - "Local interface IP address (default: " HNBGW_IUH_LOCAL_IP_DEFAULT ")") + "Local interface IP address (default: " HNBGW_LOCAL_IP_DEFAULT ")") { - talloc_free((void*)g_hnb_gw->config.iuh_bind_addr); - g_hnb_gw->config.iuh_bind_addr = talloc_strdup(tall_hnb_ctx, argv[0]); + talloc_free((void*)g_hnb_gw->config.iuh_local_ip); + g_hnb_gw->config.iuh_local_ip = talloc_strdup(tall_hnb_ctx, argv[0]); return CMD_SUCCESS; } @@ -136,8 +136,8 @@ vty_out(vty, " iuh%s", VTY_NEWLINE); - addr = g_hnb_gw->config.iuh_bind_addr; - if (addr && (strcmp(addr, HNBGW_IUH_LOCAL_IP_DEFAULT) != 0)) + addr = g_hnb_gw->config.iuh_local_ip; + if (addr && (strcmp(addr, HNBGW_LOCAL_IP_DEFAULT) != 0)) vty_out(vty, " local-ip %s%s", addr, VTY_NEWLINE); if (g_hnb_gw->config.hnbap_allow_tmsi) -- To view, visit https://gerrit.osmocom.org/1059 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ice85941c978498e3ddf41d151248507e7f56cb5d Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 13 15:04:38 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 15:04:38 +0000 Subject: [PATCH] osmo-iuh[master]: hnbgw: parameterize iuh local port: add vty cmd Message-ID: Review at https://gerrit.osmocom.org/1060 hnbgw: parameterize iuh local port: add vty cmd For completeness' sake, add VTY command to set the local Iuh port. Have the configured port as 0 to represent the default, and to match hnbgw_get_iuh_local_ip(), add hnbgw_get_iuh_local_port(). Change-Id: I4b5e9fe9fcfa489069a0728d47899ef4a61f7ce5 --- M include/osmocom/iuh/hnbgw.h M src/hnbgw.c M src/hnbgw_vty.c 3 files changed, 31 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/60/1060/1 diff --git a/include/osmocom/iuh/hnbgw.h b/include/osmocom/iuh/hnbgw.h index 6b5a855..4edd05f 100644 --- a/include/osmocom/iuh/hnbgw.h +++ b/include/osmocom/iuh/hnbgw.h @@ -150,3 +150,4 @@ void hnbgw_vty_init(struct hnb_gw *gw, void *tall_ctx); const char *hnbgw_get_iuh_local_ip(struct hnb_gw *gw); +uint16_t hnbgw_get_iuh_local_port(struct hnb_gw *gw); diff --git a/src/hnbgw.c b/src/hnbgw.c index eb36367..ebafae9 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -76,8 +76,6 @@ { struct hnb_gw *gw = talloc_zero(ctx, struct hnb_gw); - gw->config.iuh_local_port = IUH_DEFAULT_SCTP_PORT; - gw->next_ue_ctx_id = 23; INIT_LLIST_HEAD(&gw->hnb_list); INIT_LLIST_HEAD(&gw->ue_list); @@ -320,6 +318,17 @@ return addr; } +/* + * Return IP address passed to the hnbgw/iuh/local-port command, or + * IUH_DEFAULT_SCTP_PORT. + */ +uint16_t hnbgw_get_iuh_local_port(struct hnb_gw *gw) +{ + if (!g_hnb_gw->config.iuh_local_port) + return IUH_DEFAULT_SCTP_PORT; + return g_hnb_gw->config.iuh_local_port; +} + static const struct log_info_cat log_cat[] = { [DMAIN] = { .name = "DMAIN", .loglevel = LOGL_DEBUG, .enabled = 1, @@ -512,7 +521,7 @@ LOGP(DMAIN, LOGL_NOTICE, "Listening for Iuh at %s %d\n", hnbgw_get_iuh_local_ip(g_hnb_gw), - g_hnb_gw->config.iuh_local_port); + hnbgw_get_iuh_local_port(g_hnb_gw)); srv = osmo_stream_srv_link_create(tall_hnb_ctx); if (!srv) { perror("cannot create server"); @@ -521,7 +530,7 @@ osmo_stream_srv_link_set_data(srv, g_hnb_gw); osmo_stream_srv_link_set_proto(srv, IPPROTO_SCTP); osmo_stream_srv_link_set_addr(srv, hnbgw_get_iuh_local_ip(g_hnb_gw)); - osmo_stream_srv_link_set_port(srv, g_hnb_gw->config.iuh_local_port); + osmo_stream_srv_link_set_port(srv, hnbgw_get_iuh_local_port(g_hnb_gw)); osmo_stream_srv_link_set_accept_cb(srv, accept_cb); if (osmo_stream_srv_link_open(srv) < 0) { diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index 93c1f9a..89fc124 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -114,6 +114,17 @@ return CMD_SUCCESS; } +DEFUN(cfg_hnbgw_iuh_local_port, cfg_hnbgw_iuh_local_port_cmd, "local-port <1-65535>", + "Accept Iuh connections on local port\n" + "Local interface port (default: 29169)") +{ + uint16_t port = atoi(argv[0]); + if (port == IUH_DEFAULT_SCTP_PORT) + port = 0; + g_hnb_gw->config.iuh_local_port = port; + return CMD_SUCCESS; +} + DEFUN(cfg_hnbgw_iuh_hnbap_allow_tmsi, cfg_hnbgw_iuh_hnbap_allow_tmsi_cmd, "hnbap-allow-tmsi (0|1)", "Allow HNBAP UE Register messages with TMSI or PTMSI identity\n" @@ -133,12 +144,17 @@ static int config_write_hnbgw_iuh(struct vty *vty) { const char *addr; + uint16_t port; vty_out(vty, " iuh%s", VTY_NEWLINE); addr = g_hnb_gw->config.iuh_local_ip; if (addr && (strcmp(addr, HNBGW_LOCAL_IP_DEFAULT) != 0)) vty_out(vty, " local-ip %s%s", addr, VTY_NEWLINE); + + port = g_hnb_gw->config.iuh_local_port; + if (port && port != IUH_DEFAULT_SCTP_PORT) + vty_out(vty, " local-port %u%s", port, VTY_NEWLINE); if (g_hnb_gw->config.hnbap_allow_tmsi) vty_out(vty, " hnbap-allow-tmsi 1%s", VTY_NEWLINE); @@ -160,6 +176,7 @@ vty_install_default(IUH_NODE); install_element(IUH_NODE, &cfg_hnbgw_iuh_local_ip_cmd); + install_element(IUH_NODE, &cfg_hnbgw_iuh_local_port_cmd); install_element(IUH_NODE, &cfg_hnbgw_iuh_hnbap_allow_tmsi_cmd); install_element_ve(&show_hnb_cmd); -- To view, visit https://gerrit.osmocom.org/1060 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4b5e9fe9fcfa489069a0728d47899ef4a61f7ce5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 13 15:04:38 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 15:04:38 +0000 Subject: [PATCH] osmo-iuh[master]: hnbgw: vty: set explicit go_parent_cb Message-ID: Review at https://gerrit.osmocom.org/1061 hnbgw: vty: set explicit go_parent_cb A second level of depth will be added to the hnbgw node soon, which will need explicit go-parent logic. Change-Id: I8d1c18a396c215e8425ae49872b5c73316087d7d --- M include/osmocom/iuh/hnbgw.h M src/hnbgw.c M src/hnbgw_vty.c 3 files changed, 19 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/61/1061/1 diff --git a/include/osmocom/iuh/hnbgw.h b/include/osmocom/iuh/hnbgw.h index 4edd05f..6cc7984 100644 --- a/include/osmocom/iuh/hnbgw.h +++ b/include/osmocom/iuh/hnbgw.h @@ -148,6 +148,7 @@ void hnb_context_release(struct hnb_context *ctx); void hnbgw_vty_init(struct hnb_gw *gw, void *tall_ctx); +int hnbgw_vty_go_parent(struct vty *vty); const char *hnbgw_get_iuh_local_ip(struct hnb_gw *gw); uint16_t hnbgw_get_iuh_local_port(struct hnb_gw *gw); diff --git a/src/hnbgw.c b/src/hnbgw.c index ebafae9..ac988d8 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -365,6 +365,7 @@ static struct vty_app_info vty_info = { .name = "OsmoHNBGW", .version = "0", + .go_parent_cb = hnbgw_vty_go_parent, }; static struct { diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index 89fc124..25930d1 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -54,6 +54,23 @@ return CMD_SUCCESS; } +int hnbgw_vty_go_parent(struct vty *vty) +{ + switch (vty->node) { + default: + case HNBGW_NODE: + vty->node = CONFIG_NODE; + vty->index = NULL; + break; + case CONFIG_NODE: + vty->node = ENABLE_NODE; + vty->index = NULL; + break; + } + + return vty->node; +} + static void vty_dump_hnb_info(struct vty *vty, struct hnb_context *hnb) { struct hnbgw_context_map *map; -- To view, visit https://gerrit.osmocom.org/1061 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8d1c18a396c215e8425ae49872b5c73316087d7d Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 13 15:04:39 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 13 Oct 2016 15:04:39 +0000 Subject: [PATCH] osmo-iuh[master]: hnbgw: parameterize IuCS and IuPS ips and ports: add vty cmds Message-ID: Review at https://gerrit.osmocom.org/1062 hnbgw: parameterize IuCS and IuPS ips and ports: add vty cmds Basically copy-paste the Iuh local-ip and local-port code to provide parameterization of the IuCS and IuPS remote addresses. Add IUCS and IUPS nodes, enhance go_parent_cb and config writing accordingly. Change-Id: I2c28977011009df4e1fa472290bbbc359e406971 --- M include/osmocom/iuh/hnbgw.h M include/osmocom/iuh/vty.h M src/hnbgw.c M src/hnbgw_vty.c 4 files changed, 188 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/62/1062/1 diff --git a/include/osmocom/iuh/hnbgw.h b/include/osmocom/iuh/hnbgw.h index 6cc7984..2a776d4 100644 --- a/include/osmocom/iuh/hnbgw.h +++ b/include/osmocom/iuh/hnbgw.h @@ -20,6 +20,8 @@ #define HNBGW_LOCAL_IP_DEFAULT "0.0.0.0" +#define HNBGW_IUCS_REMOTE_IP_DEFAULT "127.0.0.1" +#define HNBGW_IUPS_REMOTE_IP_DEFAULT "127.0.0.2" /* 25.467 Section 7.1 */ #define IUH_DEFAULT_SCTP_PORT 29169 @@ -116,6 +118,10 @@ /*! The UDP port where we receive multiplexed CS user * plane traffic from HNBs */ uint16_t iuh_cs_mux_port; + const char *iucs_remote_ip; + uint16_t iucs_remote_port; + const char *iups_remote_ip; + uint16_t iups_remote_port; uint16_t rnc_id; bool hnbap_allow_tmsi; } config; @@ -152,3 +158,7 @@ const char *hnbgw_get_iuh_local_ip(struct hnb_gw *gw); uint16_t hnbgw_get_iuh_local_port(struct hnb_gw *gw); +const char *hnbgw_get_iucs_remote_ip(struct hnb_gw *gw); +uint16_t hnbgw_get_iucs_remote_port(struct hnb_gw *gw); +const char *hnbgw_get_iups_remote_ip(struct hnb_gw *gw); +uint16_t hnbgw_get_iups_remote_port(struct hnb_gw *gw); diff --git a/include/osmocom/iuh/vty.h b/include/osmocom/iuh/vty.h index 905a949..3d05da5 100644 --- a/include/osmocom/iuh/vty.h +++ b/include/osmocom/iuh/vty.h @@ -5,5 +5,7 @@ enum osmo_iuh_vty_node { HNBGW_NODE = _LAST_OSMOVTY_NODE + 1, IUH_NODE, + IUCS_NODE, + IUPS_NODE, }; diff --git a/src/hnbgw.c b/src/hnbgw.c index ac988d8..c344235 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -329,6 +329,52 @@ return g_hnb_gw->config.iuh_local_port; } +/* + * Return IP address passed to the hnbgw/iucs/remote-ip command, or + * HNBGW_IUCS_REMOTE_IP_DEFAULT. + */ +const char *hnbgw_get_iucs_remote_ip(struct hnb_gw *gw) +{ + const char *addr = gw->config.iucs_remote_ip; + if (!addr) + addr = HNBGW_IUCS_REMOTE_IP_DEFAULT; + return addr; +} + +/* + * Return IP address passed to the hnbgw/iucs/remote-port command, or + * SUA_PORT. + */ +uint16_t hnbgw_get_iucs_remote_port(struct hnb_gw *gw) +{ + if (!g_hnb_gw->config.iucs_remote_port) + return SUA_PORT; + return g_hnb_gw->config.iucs_remote_port; +} + +/* + * Return IP address passed to the hnbgw/iups/remote-ip command, or + * HNBGW_IUPS_REMOTE_IP_DEFAULT. + */ +const char *hnbgw_get_iups_remote_ip(struct hnb_gw *gw) +{ + const char *addr = gw->config.iups_remote_ip; + if (!addr) + addr = HNBGW_IUPS_REMOTE_IP_DEFAULT; + return addr; +} + +/* + * Return IP address passed to the hnbgw/iups/remote-port command, or + * SUA_PORT. + */ +uint16_t hnbgw_get_iups_remote_port(struct hnb_gw *gw) +{ + if (!g_hnb_gw->config.iups_remote_port) + return SUA_PORT; + return g_hnb_gw->config.iups_remote_port; +} + static const struct log_info_cat log_cat[] = { [DMAIN] = { .name = "DMAIN", .loglevel = LOGL_DEBUG, .enabled = 1, @@ -517,8 +563,14 @@ osmo_sua_set_log_area(DSUA); ranap_set_log_area(DRANAP); - g_hnb_gw->cnlink_cs = hnbgw_cnlink_init(g_hnb_gw, "127.0.0.1", SUA_PORT, 0); - g_hnb_gw->cnlink_ps = hnbgw_cnlink_init(g_hnb_gw, "127.0.0.2", SUA_PORT, 1); + g_hnb_gw->cnlink_cs = hnbgw_cnlink_init(g_hnb_gw, + hnbgw_get_iucs_remote_ip(g_hnb_gw), + hnbgw_get_iucs_remote_port(g_hnb_gw), + 0); + g_hnb_gw->cnlink_ps = hnbgw_cnlink_init(g_hnb_gw, + hnbgw_get_iups_remote_ip(g_hnb_gw), + hnbgw_get_iups_remote_port(g_hnb_gw), + 1); LOGP(DMAIN, LOGL_NOTICE, "Listening for Iuh at %s %d\n", hnbgw_get_iuh_local_ip(g_hnb_gw), diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index 25930d1..8fdd7d6 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -24,6 +24,7 @@ #include #include +#include static void *tall_hnb_ctx = NULL; static struct hnb_gw *g_hnb_gw = NULL; @@ -54,9 +55,40 @@ return CMD_SUCCESS; } +static struct cmd_node iucs_node = { + IUCS_NODE, + "%s(config-hnbgw-iucs)# ", + 1, +}; + +DEFUN(cfg_hnbgw_iucs, cfg_hnbgw_iucs_cmd, + "iucs", "Configure IuCS options") +{ + vty->node = IUCS_NODE; + return CMD_SUCCESS; +} + +static struct cmd_node iups_node = { + IUPS_NODE, + "%s(config-hnbgw-iups)# ", + 1, +}; + +DEFUN(cfg_hnbgw_iups, cfg_hnbgw_iups_cmd, + "iups", "Configure IuPS options") +{ + vty->node = IUPS_NODE; + return CMD_SUCCESS; +} + int hnbgw_vty_go_parent(struct vty *vty) { switch (vty->node) { + case IUCS_NODE: + case IUPS_NODE: + vty->node = HNBGW_NODE; + vty->index = NULL; + break; default: case HNBGW_NODE: vty->node = CONFIG_NODE; @@ -152,6 +184,46 @@ return CMD_SUCCESS; } +DEFUN(cfg_hnbgw_iucs_remote_ip, cfg_hnbgw_iucs_remote_ip_cmd, "remote-ip A.B.C.D", + "Address to establish IuCS core network link to\n" + "Remote IuCS IP address (default: " HNBGW_IUCS_REMOTE_IP_DEFAULT ")") +{ + talloc_free((void*)g_hnb_gw->config.iucs_remote_ip); + g_hnb_gw->config.iucs_remote_ip = talloc_strdup(tall_hnb_ctx, argv[0]); + return CMD_SUCCESS; +} + +DEFUN(cfg_hnbgw_iucs_remote_port, cfg_hnbgw_iucs_remote_port_cmd, "remote-port <1-65535>", + "Remote port to establish IuCS core network link to\n" + "Remote IuCS port (default: 14001)") +{ + uint16_t port = atoi(argv[0]); + if (port == SUA_PORT) + port = 0; + g_hnb_gw->config.iucs_remote_port = port; + return CMD_SUCCESS; +} + +DEFUN(cfg_hnbgw_iups_remote_ip, cfg_hnbgw_iups_remote_ip_cmd, "remote-ip A.B.C.D", + "Address to establish IuPS core network link to\n" + "Remote IuPS IP address (default: " HNBGW_IUPS_REMOTE_IP_DEFAULT ")") +{ + talloc_free((void*)g_hnb_gw->config.iups_remote_ip); + g_hnb_gw->config.iups_remote_ip = talloc_strdup(tall_hnb_ctx, argv[0]); + return CMD_SUCCESS; +} + +DEFUN(cfg_hnbgw_iups_remote_port, cfg_hnbgw_iups_remote_port_cmd, "remote-port <1-65535>", + "Remote port to establish IuPS core network link to\n" + "Remote IuPS port (default: 14001)") +{ + uint16_t port = atoi(argv[0]); + if (port == SUA_PORT) + port = 0; + g_hnb_gw->config.iups_remote_port = port; + return CMD_SUCCESS; +} + static int config_write_hnbgw(struct vty *vty) { vty_out(vty, "hnbgw%s", VTY_NEWLINE); @@ -179,6 +251,42 @@ return CMD_SUCCESS; } +static int config_write_hnbgw_iucs(struct vty *vty) +{ + const char *addr; + uint16_t port; + + vty_out(vty, " iucs%s", VTY_NEWLINE); + + addr = g_hnb_gw->config.iucs_remote_ip; + if (addr && (strcmp(addr, HNBGW_IUCS_REMOTE_IP_DEFAULT) != 0)) + vty_out(vty, " remote-ip %s%s", addr, VTY_NEWLINE); + + port = g_hnb_gw->config.iucs_remote_port; + if (port && port != SUA_PORT) + vty_out(vty, " remote-port %u%s", port, VTY_NEWLINE); + + return CMD_SUCCESS; +} + +static int config_write_hnbgw_iups(struct vty *vty) +{ + const char *addr; + uint16_t port; + + vty_out(vty, " iups%s", VTY_NEWLINE); + + addr = g_hnb_gw->config.iups_remote_ip; + if (addr && (strcmp(addr, HNBGW_IUPS_REMOTE_IP_DEFAULT) != 0)) + vty_out(vty, " remote-ip %s%s", addr, VTY_NEWLINE); + + port = g_hnb_gw->config.iups_remote_port; + if (port && port != SUA_PORT) + vty_out(vty, " remote-port %u%s", port, VTY_NEWLINE); + + return CMD_SUCCESS; +} + void hnbgw_vty_init(struct hnb_gw *gw, void *tall_ctx) { g_hnb_gw = gw; @@ -196,6 +304,20 @@ install_element(IUH_NODE, &cfg_hnbgw_iuh_local_port_cmd); install_element(IUH_NODE, &cfg_hnbgw_iuh_hnbap_allow_tmsi_cmd); + install_element(HNBGW_NODE, &cfg_hnbgw_iucs_cmd); + install_node(&iucs_node, config_write_hnbgw_iucs); + vty_install_default(IUCS_NODE); + + install_element(IUCS_NODE, &cfg_hnbgw_iucs_remote_ip_cmd); + install_element(IUCS_NODE, &cfg_hnbgw_iucs_remote_port_cmd); + + install_element(HNBGW_NODE, &cfg_hnbgw_iups_cmd); + install_node(&iups_node, config_write_hnbgw_iups); + vty_install_default(IUPS_NODE); + + install_element(IUPS_NODE, &cfg_hnbgw_iups_remote_ip_cmd); + install_element(IUPS_NODE, &cfg_hnbgw_iups_remote_port_cmd); + install_element_ve(&show_hnb_cmd); install_element_ve(&show_ue_cmd); install_element_ve(&show_talloc_cmd); -- To view, visit https://gerrit.osmocom.org/1062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2c28977011009df4e1fa472290bbbc359e406971 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 13 15:24:23 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 13 Oct 2016 15:24:23 +0000 Subject: [PATCH] openbsc[master]: OML: Improve OML attribute 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/973 to look at the new patch set (#4). OML: Improve OML attribute handling the OML attribute tables are hardcoded. To set variable parameters, the hardcoded data structure (tlv) is patched on byte level during runtime. This patch replaces this mechanism. - Replace hardcoded OML attribute tables with dynamically generated TLV structures. - Add unit tests to check if the OML attribute tables are generated correctly - Put OML attribute table generator code in a separate file: bts_ipaccess_nanobts_omlattr.c Change-Id: Ibeb34a84912d6cf695f553a34c69320fca7d08fa --- M openbsc/.gitignore M openbsc/configure.ac M openbsc/include/openbsc/Makefile.am A openbsc/include/openbsc/bts_ipaccess_nanobts_omlattr.h M openbsc/src/libbsc/Makefile.am M openbsc/src/libbsc/bts_ipaccess_nanobts.c A openbsc/src/libbsc/bts_ipaccess_nanobts_omlattr.c M openbsc/tests/Makefile.am A openbsc/tests/nanobts_omlattr/Makefile.am A openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c A openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.ok M openbsc/tests/testsuite.at 12 files changed, 638 insertions(+), 221 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/73/973/4 diff --git a/openbsc/.gitignore b/openbsc/.gitignore index 6fbd463..3324069 100644 --- a/openbsc/.gitignore +++ b/openbsc/.gitignore @@ -85,6 +85,7 @@ tests/sndcp_xid/sndcp_xid_test tests/slhc/slhc_test tests/v42bis/v42bis_test +tests/nanobts_omlattr/nanobts_omlattr_test tests/atconfig tests/atlocal diff --git a/openbsc/configure.ac b/openbsc/configure.ac index e2575c1..b18ecc1 100644 --- a/openbsc/configure.ac +++ b/openbsc/configure.ac @@ -244,6 +244,7 @@ tests/sndcp_xid/Makefile tests/slhc/Makefile tests/v42bis/Makefile + tests/nanobts_omlattr/Makefile doc/Makefile doc/examples/Makefile Makefile) diff --git a/openbsc/include/openbsc/Makefile.am b/openbsc/include/openbsc/Makefile.am index c6a0149..5737a4b 100644 --- a/openbsc/include/openbsc/Makefile.am +++ b/openbsc/include/openbsc/Makefile.am @@ -11,6 +11,7 @@ bsc_nat_sccp.h \ bsc_rll.h \ bss.h \ + bts_ipaccess_nanobts_omlattr.h \ chan_alloc.h \ crc24.h \ ctrl.h \ diff --git a/openbsc/include/openbsc/bts_ipaccess_nanobts_omlattr.h b/openbsc/include/openbsc/bts_ipaccess_nanobts_omlattr.h new file mode 100644 index 0000000..bc7860b --- /dev/null +++ b/openbsc/include/openbsc/bts_ipaccess_nanobts_omlattr.h @@ -0,0 +1,32 @@ +/* OML attribute table generator for ipaccess nanobts */ + +/* (C) 2016 by sysmocom s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * 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 + +struct msgb *nanobts_attr_bts_get(struct gsm_bts *bts); +struct msgb *nanobts_attr_nse_get(struct gsm_bts *bts); +struct msgb *nanobts_attr_cell_get(struct gsm_bts *bts); +struct msgb *nanobts_attr_nscv_get(struct gsm_bts *bts); +struct msgb *nanobts_attr_radio_get(struct gsm_bts *bts, + struct gsm_bts_trx *trx); diff --git a/openbsc/src/libbsc/Makefile.am b/openbsc/src/libbsc/Makefile.am index 4728e23..8c53817 100644 --- a/openbsc/src/libbsc/Makefile.am +++ b/openbsc/src/libbsc/Makefile.am @@ -49,5 +49,6 @@ bsc_ctrl_lookup.c \ net_init.c \ bsc_dyn_ts.c \ + bts_ipaccess_nanobts_omlattr.c \ $(NULL) diff --git a/openbsc/src/libbsc/bts_ipaccess_nanobts.c b/openbsc/src/libbsc/bts_ipaccess_nanobts.c index a6c8e29..a1bde77 100644 --- a/openbsc/src/libbsc/bts_ipaccess_nanobts.c +++ b/openbsc/src/libbsc/bts_ipaccess_nanobts.c @@ -39,6 +39,7 @@ #include #include #include +#include extern struct gsm_network *bsc_gsmnet; @@ -100,211 +101,6 @@ }, }; -static unsigned char nanobts_attr_bts[] = { - NM_ATT_INTERF_BOUND, 0x55, 0x5b, 0x61, 0x67, 0x6d, 0x73, - /* interference avg. period in numbers of SACCH multifr */ - NM_ATT_INTAVE_PARAM, 0x06, - /* conn fail based on SACCH error rate */ - NM_ATT_CONN_FAIL_CRIT, 0x00, 0x02, 0x01, 0x10, - NM_ATT_T200, 0x1e, 0x24, 0x24, 0xa8, 0x34, 0x21, 0xa8, - NM_ATT_MAX_TA, 0x3f, - NM_ATT_OVERL_PERIOD, 0x00, 0x01, 10, /* seconds */ - NM_ATT_CCCH_L_T, 10, /* percent */ - NM_ATT_CCCH_L_I_P, 1, /* seconds */ - NM_ATT_RACH_B_THRESH, 10, /* busy threshold in - dBm */ - NM_ATT_LDAVG_SLOTS, 0x03, 0xe8, /* rach load averaging 1000 slots */ - NM_ATT_BTS_AIR_TIMER, 128, /* miliseconds */ - NM_ATT_NY1, 10, /* 10 retransmissions of physical config */ - NM_ATT_BCCH_ARFCN, HARDCODED_ARFCN >> 8, HARDCODED_ARFCN & 0xff, - NM_ATT_BSIC, HARDCODED_BSIC, - NM_ATT_IPACC_CGI, 0, 7, 0x00, 0xf1, 0x10, 0x00, 0x01, 0x00, 0x00, -}; - -static unsigned char nanobts_attr_radio[] = { - NM_ATT_RF_MAXPOWR_R, 0x0c, /* number of -2dB reduction steps / Pn */ - NM_ATT_ARFCN_LIST, 0x00, 0x02, HARDCODED_ARFCN >> 8, HARDCODED_ARFCN & 0xff, -}; - -static unsigned char nanobts_attr_nse[] = { - NM_ATT_IPACC_NSEI, 0, 2, 0x03, 0x9d, /* NSEI 925 */ - /* all timers in seconds */ - NM_ATT_IPACC_NS_CFG, 0, 7, 3, /* (un)blocking timer (Tns-block) */ - 3, /* (un)blocking retries */ - 3, /* reset timer (Tns-reset) */ - 3, /* reset retries */ - 30, /* test timer (Tns-test) */ - 3, /* alive timer (Tns-alive) */ - 10, /* alive retrires */ - /* all timers in seconds, unless otherwise stated */ - NM_ATT_IPACC_BSSGP_CFG, 0, 11, - 3, /* blockimg timer (T1) */ - 3, /* blocking retries */ - 3, /* unblocking retries */ - 3, /* reset timer (T2) */ - 3, /* reset retries */ - 10, /* suspend timer (T3) in 100ms */ - 3, /* suspend retries */ - 10, /* resume timer (T4) in 100ms */ - 3, /* resume retries */ - 10, /* capability update timer (T5) */ - 3, /* capability update retries */ -}; - -static unsigned char nanobts_attr_cell[] = { - NM_ATT_IPACC_RAC, 0, 1, 1, /* routing area code */ - NM_ATT_IPACC_GPRS_PAGING_CFG, 0, 2, - 5, /* repeat time (50ms) */ - 3, /* repeat count */ - NM_ATT_IPACC_BVCI, 0, 2, 0x03, 0x9d, /* BVCI 925 */ - /* all timers in seconds, unless otherwise stated */ - NM_ATT_IPACC_RLC_CFG, 0, 9, - 20, /* T3142 */ - 5, /* T3169 */ - 5, /* T3191 */ - 160, /* T3193 (units of 10ms) */ - 5, /* T3195 */ - 10, /* N3101 */ - 4, /* N3103 */ - 8, /* N3105 */ - 15, /* RLC CV countdown */ - NM_ATT_IPACC_CODING_SCHEMES, 0, 2, 0x0f, 0x00, /* CS1..CS4 */ - NM_ATT_IPACC_RLC_CFG_2, 0, 5, - 0x00, 250, /* T downlink TBF extension (0..500) */ - 0x00, 250, /* T uplink TBF extension (0..500) */ - 2, /* CS2 */ -#if 0 - /* EDGE model only, breaks older models. - * Should inquire the BTS capabilities */ - NM_ATT_IPACC_RLC_CFG_3, 0, 1, - 2, /* MCS2 */ -#endif -}; - -static unsigned char nanobts_attr_nsvc0[] = { - NM_ATT_IPACC_NSVCI, 0, 2, 0x03, 0x9d, /* 925 */ - NM_ATT_IPACC_NS_LINK_CFG, 0, 8, - 0x59, 0xd8, /* remote udp port (23000) */ - 192, 168, 100, 11, /* remote ip address */ - 0x59, 0xd8, /* local udp port (23000) */ -}; - -static void patch_16(uint8_t *data, const uint16_t val) -{ - memcpy(data, &val, sizeof(val)); -} - -static void patch_32(uint8_t *data, const uint32_t val) -{ - memcpy(data, &val, sizeof(val)); -} - -/* - * Patch the various SYSTEM INFORMATION tables to update - * the LAI - */ -static void patch_nm_tables(struct gsm_bts *bts) -{ - uint8_t arfcn_low = bts->c0->arfcn & 0xff; - uint8_t arfcn_high = (bts->c0->arfcn >> 8) & 0x0f; - - /* patch ARFCN into BTS Attributes */ - nanobts_attr_bts[42] &= 0xf0; - nanobts_attr_bts[42] |= arfcn_high; - nanobts_attr_bts[43] = arfcn_low; - - /* patch the RACH attributes */ - if (bts->rach_b_thresh != -1) { - nanobts_attr_bts[33] = bts->rach_b_thresh & 0xff; - } - - if (bts->rach_ldavg_slots != -1) { - uint8_t avg_high = bts->rach_ldavg_slots & 0xff; - uint8_t avg_low = (bts->rach_ldavg_slots >> 8) & 0x0f; - - nanobts_attr_bts[35] = avg_high; - nanobts_attr_bts[36] = avg_low; - } - - /* patch BSIC */ - nanobts_attr_bts[sizeof(nanobts_attr_bts)-11] = bts->bsic; - - /* patch CGI */ - abis_nm_ipaccess_cgi(nanobts_attr_bts+sizeof(nanobts_attr_bts)-7, bts); - - /* patch CON_FAIL_CRIT */ - nanobts_attr_bts[13] = - get_radio_link_timeout(&bts->si_common.cell_options); - - /* patch the power reduction */ - nanobts_attr_radio[1] = bts->c0->max_power_red / 2; - - /* patch NSEI */ - nanobts_attr_nse[3] = bts->gprs.nse.nsei >> 8; - nanobts_attr_nse[4] = bts->gprs.nse.nsei & 0xff; - memcpy(nanobts_attr_nse+8, bts->gprs.nse.timer, - ARRAY_SIZE(bts->gprs.nse.timer)); - memcpy(nanobts_attr_nse+18, bts->gprs.cell.timer, - ARRAY_SIZE(bts->gprs.cell.timer)); - - /* patch NSVCI */ - nanobts_attr_nsvc0[3] = bts->gprs.nsvc[0].nsvci >> 8; - nanobts_attr_nsvc0[4] = bts->gprs.nsvc[0].nsvci & 0xff; - - /* patch IP address as SGSN IP */ - patch_16(nanobts_attr_nsvc0 + 8, - htons(bts->gprs.nsvc[0].remote_port)); - patch_32(nanobts_attr_nsvc0 + 10, - htonl(bts->gprs.nsvc[0].remote_ip)); - patch_16(nanobts_attr_nsvc0 + 14, - htons(bts->gprs.nsvc[0].local_port)); - - /* patch BVCI */ - nanobts_attr_cell[12] = bts->gprs.cell.bvci >> 8; - nanobts_attr_cell[13] = bts->gprs.cell.bvci & 0xff; - /* patch RAC */ - nanobts_attr_cell[3] = bts->gprs.rac; - - if (bts->gprs.mode == BTS_GPRS_EGPRS) { - /* patch EGPRS coding schemes MCS 1..9 */ - nanobts_attr_cell[29] = 0x8f; - nanobts_attr_cell[30] = 0xff; - } -} - -static uint8_t *nanobts_attr_bts_get(struct gsm_bts *bts, size_t *data_len) -{ - patch_nm_tables(bts); - *data_len = sizeof(nanobts_attr_bts); - return nanobts_attr_bts; -} - -static uint8_t *nanobts_attr_nse_get(struct gsm_bts *bts, size_t *data_len) -{ - patch_nm_tables(bts); - *data_len = sizeof(nanobts_attr_nse); - return nanobts_attr_nse; -} - -static uint8_t *nanobts_attr_cell_get(struct gsm_bts *bts, size_t *data_len) -{ - patch_nm_tables(bts); - *data_len = sizeof(nanobts_attr_cell); - return nanobts_attr_cell; -} - -static uint8_t *nanobts_attr_nscv_get(struct gsm_bts *bts, size_t *data_len) -{ - patch_nm_tables(bts); - *data_len = sizeof(nanobts_attr_nsvc0); - return nanobts_attr_nsvc0; -} - -static uint8_t *nanobts_attr_radio_get(struct gsm_bts *bts, size_t *data_len) -{ - patch_nm_tables(bts); - *data_len = sizeof(nanobts_attr_radio); - return nanobts_attr_radio; -} /* Callback function to be called whenever we get a GSM 12.21 state change event */ static int nm_statechg_event(int evt, struct nm_statechg_signal_data *nsd) @@ -318,8 +114,7 @@ struct gsm_bts_trx_ts *ts; struct gsm_bts_gprs_nsvc *nsvc; - uint8_t *data; - size_t data_len; + struct msgb *msgb; if (!is_ipaccess_bts(nsd->bts)) return 0; @@ -343,8 +138,9 @@ case NM_OC_BTS: bts = obj; if (new_state->availability == NM_AVSTATE_DEPENDENCY) { - data = nanobts_attr_bts_get(bts, &data_len); - abis_nm_set_bts_attr(bts, data, data_len); + msgb = nanobts_attr_bts_get(bts); + abis_nm_set_bts_attr(bts, msgb->data, msgb->len); + msgb_free(msgb); abis_nm_chg_adm_state(bts, obj_class, bts->bts_nr, 0xff, 0xff, NM_STATE_UNLOCKED); @@ -385,9 +181,11 @@ if (bts->gprs.mode == BTS_GPRS_NONE) break; if (new_state->availability == NM_AVSTATE_DEPENDENCY) { - data = nanobts_attr_nse_get(bts, &data_len); + msgb = nanobts_attr_nse_get(bts); abis_nm_ipaccess_set_attr(bts, obj_class, bts->bts_nr, - 0xff, 0xff, data, data_len); + 0xff, 0xff, msgb->data, + msgb->len); + msgb_free(msgb); abis_nm_opstart(bts, obj_class, bts->bts_nr, 0xff, 0xff); } @@ -397,9 +195,11 @@ if (bts->gprs.mode == BTS_GPRS_NONE) break; if (new_state->availability == NM_AVSTATE_DEPENDENCY) { - data = nanobts_attr_cell_get(bts, &data_len); + msgb = nanobts_attr_cell_get(bts); abis_nm_ipaccess_set_attr(bts, obj_class, bts->bts_nr, - 0, 0xff, data, data_len); + 0, 0xff, msgb->data, + msgb->len); + msgb_free(msgb); abis_nm_opstart(bts, obj_class, bts->bts_nr, 0, 0xff); abis_nm_chg_adm_state(bts, obj_class, bts->bts_nr, @@ -418,10 +218,11 @@ break; if ((new_state->availability == NM_AVSTATE_OFF_LINE) || (new_state->availability == NM_AVSTATE_DEPENDENCY)) { - data = nanobts_attr_nscv_get(bts, &data_len); + msgb = nanobts_attr_nscv_get(bts); abis_nm_ipaccess_set_attr(bts, obj_class, bts->bts_nr, nsvc->id, 0xff, - data, data_len); + msgb->data, msgb->len); + msgb_free(msgb); abis_nm_opstart(bts, obj_class, bts->bts_nr, nsvc->id, 0xff); abis_nm_chg_adm_state(bts, obj_class, bts->bts_nr, @@ -471,12 +272,9 @@ */ int rc_state = trx->mo.nm_state.administrative; /* Patch ARFCN into radio attribute */ - size_t data_len; - uint8_t *data = nanobts_attr_radio_get(trx->bts, &data_len); - data[5] &= 0xf0; - data[5] |= trx->arfcn >> 8; - data[6] = trx->arfcn & 0xff; - abis_nm_set_radio_attr(trx, data, data_len); + struct msgb *msgb = nanobts_attr_radio_get(trx->bts, trx); + abis_nm_set_radio_attr(trx, msgb->data, msgb->len); + msgb_free(msgb); abis_nm_chg_adm_state(trx->bts, foh->obj_class, trx->bts->bts_nr, trx->nr, 0xff, rc_state); diff --git a/openbsc/src/libbsc/bts_ipaccess_nanobts_omlattr.c b/openbsc/src/libbsc/bts_ipaccess_nanobts_omlattr.c new file mode 100644 index 0000000..0291129 --- /dev/null +++ b/openbsc/src/libbsc/bts_ipaccess_nanobts_omlattr.c @@ -0,0 +1,232 @@ +/* ip.access nanoBTS specific code, OML attribute table generator */ + +/* (C) 2016 by sysmocom s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * 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 + +static void patch_16(uint8_t *data, const uint16_t val) +{ + memcpy(data, &val, sizeof(val)); +} + +static void patch_32(uint8_t *data, const uint32_t val) +{ + memcpy(data, &val, sizeof(val)); +} + +struct msgb *nanobts_attr_bts_get(struct gsm_bts *bts) +{ + struct msgb *msgb; + uint8_t buf[256]; + msgb = msgb_alloc(1024, "nanobts_attr_bts"); + + memcpy(buf, "\x55\x5b\x61\x67\x6d\x73", 6); + msgb_tv_fixed_put(msgb, NM_ATT_INTERF_BOUND, 6, buf); + + /* interference avg. period in numbers of SACCH multifr */ + msgb_tv_put(msgb, NM_ATT_INTAVE_PARAM, 0x06); + + /* conn fail based on SACCH error rate */ + buf[0] = 0x01; + buf[1] = get_radio_link_timeout(&bts->si_common.cell_options); + msgb_tl16v_put(msgb, NM_ATT_CONN_FAIL_CRIT, 2, buf); + + memcpy(buf, "\x1e\x24\x24\xa8\x34\x21\xa8", 7); + msgb_tv_fixed_put(msgb, NM_ATT_T200, 7, buf); + + msgb_tv_put(msgb, NM_ATT_MAX_TA, 0x3f); + + /* seconds */ + memcpy(buf, "\x00\x01\x0a", 3); + msgb_tv_fixed_put(msgb, NM_ATT_OVERL_PERIOD, 3, buf); + + /* percent */ + msgb_tv_put(msgb, NM_ATT_CCCH_L_T, 10); + + /* seconds */ + msgb_tv_put(msgb, NM_ATT_CCCH_L_I_P, 1); + + /* busy threshold in - dBm */ + buf[0] = 10; + if (bts->rach_b_thresh != -1) + buf[0] = bts->rach_b_thresh & 0xff; + msgb_tv_put(msgb, NM_ATT_RACH_B_THRESH, buf[0]); + + /* rach load averaging 1000 slots */ + buf[0] = 0x03; + buf[1] = 0xe8; + if (bts->rach_ldavg_slots != -1) { + buf[0] = (bts->rach_ldavg_slots >> 8) & 0x0f; + buf[1] = bts->rach_ldavg_slots & 0xff; + } + msgb_tv_fixed_put(msgb, NM_ATT_LDAVG_SLOTS, 2, buf); + + /* miliseconds */ + msgb_tv_put(msgb, NM_ATT_BTS_AIR_TIMER, 128); + + /* 10 retransmissions of physical config */ + msgb_tv_put(msgb, NM_ATT_NY1, 10); + + buf[0] = (bts->c0->arfcn >> 8) & 0x0f; + buf[1] = bts->c0->arfcn & 0xff; + msgb_tv_fixed_put(msgb, NM_ATT_BCCH_ARFCN, 2, buf); + + msgb_tv_put(msgb, NM_ATT_BSIC, bts->bsic); + + abis_nm_ipaccess_cgi(buf, bts); + msgb_tl16v_put(msgb, NM_ATT_IPACC_CGI, 7, buf); + + return msgb; +} + +struct msgb *nanobts_attr_nse_get(struct gsm_bts *bts) +{ + struct msgb *msgb; + uint8_t buf[256]; + msgb = msgb_alloc(1024, "nanobts_attr_bts"); + + /* NSEI 925 */ + buf[0] = bts->gprs.nse.nsei >> 8; + buf[1] = bts->gprs.nse.nsei & 0xff; + msgb_tl16v_put(msgb, NM_ATT_IPACC_NSEI, 2, buf); + + /* all timers in seconds */ + OSMO_ASSERT(ARRAY_SIZE(bts->gprs.nse.timer) < sizeof(buf)); + memcpy(buf, bts->gprs.nse.timer, ARRAY_SIZE(bts->gprs.nse.timer)); + msgb_tl16v_put(msgb, NM_ATT_IPACC_NS_CFG, 7, buf); + + /* all timers in seconds */ + buf[0] = 3; /* blockimg timer (T1) */ + buf[1] = 3; /* blocking retries */ + buf[2] = 3; /* unblocking retries */ + buf[3] = 3; /* reset timer (T2) */ + buf[4] = 3; /* reset retries */ + buf[5] = 10; /* suspend timer (T3) in 100ms */ + buf[6] = 3; /* suspend retries */ + buf[7] = 10; /* resume timer (T4) in 100ms */ + buf[8] = 3; /* resume retries */ + buf[9] = 10; /* capability update timer (T5) */ + buf[10] = 3; /* capability update retries */ + + OSMO_ASSERT(ARRAY_SIZE(bts->gprs.cell.timer) < sizeof(buf)); + memcpy(buf, bts->gprs.cell.timer, ARRAY_SIZE(bts->gprs.cell.timer)); + msgb_tl16v_put(msgb, NM_ATT_IPACC_BSSGP_CFG, 11, buf); + + return msgb; +} + +struct msgb *nanobts_attr_cell_get(struct gsm_bts *bts) +{ + struct msgb *msgb; + uint8_t buf[256]; + msgb = msgb_alloc(1024, "nanobts_attr_bts"); + + /* routing area code */ + buf[0] = bts->gprs.rac; + msgb_tl16v_put(msgb, NM_ATT_IPACC_RAC, 1, buf); + + buf[0] = 5; /* repeat time (50ms) */ + buf[1] = 3; /* repeat count */ + msgb_tl16v_put(msgb, NM_ATT_IPACC_GPRS_PAGING_CFG, 2, buf); + + /* BVCI 925 */ + buf[0] = bts->gprs.cell.bvci >> 8; + buf[1] = bts->gprs.cell.bvci & 0xff; + msgb_tl16v_put(msgb, NM_ATT_IPACC_BVCI, 2, buf); + + /* all timers in seconds, unless otherwise stated */ + buf[0] = 20; /* T3142 */ + buf[1] = 5; /* T3169 */ + buf[2] = 5; /* T3191 */ + buf[3] = 160; /* T3193 (units of 10ms) */ + buf[4] = 5; /* T3195 */ + buf[5] = 10; /* N3101 */ + buf[6] = 4; /* N3103 */ + buf[7] = 8; /* N3105 */ + buf[8] = 15; /* RLC CV countdown */ + msgb_tl16v_put(msgb, NM_ATT_IPACC_RLC_CFG, 9, buf); + + if (bts->gprs.mode == BTS_GPRS_EGPRS) { + buf[0] = 0x8f; + buf[1] = 0xff; + } else { + buf[0] = 0x0f; + buf[1] = 0x00; + } + msgb_tl16v_put(msgb, NM_ATT_IPACC_CODING_SCHEMES, 2, buf); + + buf[0] = 0; /* T downlink TBF extension (0..500, high byte) */ + buf[1] = 250; /* T downlink TBF extension (0..500, low byte) */ + buf[2] = 0; /* T uplink TBF extension (0..500, high byte) */ + buf[3] = 250; /* T uplink TBF extension (0..500, low byte) */ + buf[4] = 2; /* CS2 */ + msgb_tl16v_put(msgb, NM_ATT_IPACC_RLC_CFG_2, 5, buf); + +#if 0 + /* EDGE model only, breaks older models. + * Should inquire the BTS capabilities */ + buf[0] = 2; /* MCS2 */ + msgb_tl16v_put(msgb, NM_ATT_IPACC_RLC_CFG_3, 1, buf); +#endif + + return msgb; +} + +struct msgb *nanobts_attr_nscv_get(struct gsm_bts *bts) +{ + struct msgb *msgb; + uint8_t buf[256]; + msgb = msgb_alloc(1024, "nanobts_attr_bts"); + + /* 925 */ + buf[0] = bts->gprs.nsvc[0].nsvci >> 8; + buf[1] = bts->gprs.nsvc[0].nsvci & 0xff; + msgb_tl16v_put(msgb, NM_ATT_IPACC_NSVCI, 2, buf); + + /* remote udp port */ + patch_16(&buf[0], htons(bts->gprs.nsvc[0].remote_port)); + /* remote ip address */ + patch_32(&buf[2], htonl(bts->gprs.nsvc[0].remote_ip)); + /* local udp port */ + patch_16(&buf[6], htons(bts->gprs.nsvc[0].local_port)); + msgb_tl16v_put(msgb, NM_ATT_IPACC_NS_LINK_CFG, 8, buf); + + return msgb; +} + +struct msgb *nanobts_attr_radio_get(struct gsm_bts *bts, + struct gsm_bts_trx *trx) +{ + struct msgb *msgb; + uint8_t buf[256]; + msgb = msgb_alloc(1024, "nanobts_attr_bts"); + + /* number of -2dB reduction steps / Pn */ + msgb_tv_put(msgb, NM_ATT_RF_MAXPOWR_R, trx->max_power_red / 2); + + buf[0] = trx->arfcn >> 8; + buf[1] = trx->arfcn & 0xff; + msgb_tl16v_put(msgb, NM_ATT_ARFCN_LIST, 2, buf); + + return msgb; +} diff --git a/openbsc/tests/Makefile.am b/openbsc/tests/Makefile.am index 468edd2..9cbc1c1 100644 --- a/openbsc/tests/Makefile.am +++ b/openbsc/tests/Makefile.am @@ -9,6 +9,7 @@ trau \ subscr \ mm_auth \ + nanobts_omlattr \ $(NULL) if BUILD_NAT diff --git a/openbsc/tests/nanobts_omlattr/Makefile.am b/openbsc/tests/nanobts_omlattr/Makefile.am new file mode 100644 index 0000000..b03d50c --- /dev/null +++ b/openbsc/tests/nanobts_omlattr/Makefile.am @@ -0,0 +1,34 @@ +AM_CPPFLAGS = \ + $(all_includes) \ + -I$(top_srcdir)/include \ + $(NULL) + +AM_CFLAGS = \ + -Wall \ + $(LIBOSMOCORE_CFLAGS) \ + $(LIBOSMOGSM_CFLAGS) \ + $(LIBOSMOABIS_CFLAGS) \ + $(NULL) + +noinst_PROGRAMS = \ + nanobts_omlattr_test \ + $(NULL) + +EXTRA_DIST = \ + nanobts_omlattr_test.ok \ + $(NULL) + +nanobts_omlattr_test_SOURCES = \ + nanobts_omlattr_test.c \ + $(NULL) + +nanobts_omlattr_test_LDADD = \ + $(top_builddir)/src/libbsc/libbsc.a \ + $(top_builddir)/src/libmsc/libmsc.a \ + $(top_builddir)/src/libtrau/libtrau.a \ + $(top_builddir)/src/libcommon/libcommon.a \ + $(LIBOSMOCORE_LIBS) \ + $(LIBOSMOGSM_LIBS) \ + $(LIBOSMOABIS_LIBS) \ + -ldbi \ + $(NULL) diff --git a/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c b/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c new file mode 100644 index 0000000..ee138b8 --- /dev/null +++ b/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.c @@ -0,0 +1,284 @@ +/* Test OML attribute generator */ + +/* (C) 2016 by sysmocom s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Philipp Maier + * + * 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 + +#include +#include + +struct gsm_bts_model bts_model_nanobts = { + .type = GSM_BTS_TYPE_NANOBTS, + .name = "nanobts", + .start = NULL, + .oml_rcvmsg = NULL, + .e1line_bind_ops = NULL, + .nm_att_tlvdef = { + .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 void test_nanobts_attr_bts_get(struct gsm_bts *bts, uint8_t *expected) +{ + struct msgb *msgb; + + printf("Testing nanobts_attr_bts_get()...\n"); + + msgb = nanobts_attr_bts_get(bts); + printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len)); + printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len)); + OSMO_ASSERT(memcmp(msgb->data, expected, msgb->len) == 0); + msgb_free(msgb); + + printf("ok.\n"); + printf("\n"); +} + +static void test_nanobts_attr_nse_get(struct gsm_bts *bts, uint8_t *expected) +{ + struct msgb *msgb; + + printf("Testing nanobts_attr_nse_get()...\n"); + + msgb = nanobts_attr_nse_get(bts); + printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len)); + printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len)); + OSMO_ASSERT(memcmp(msgb->data, expected, msgb->len) == 0); + msgb_free(msgb); + + printf("ok.\n"); + printf("\n"); +} + +static void test_nanobts_attr_cell_get(struct gsm_bts *bts, uint8_t *expected) +{ + struct msgb *msgb; + + printf("Testing nanobts_attr_cell_get()...\n"); + + msgb = nanobts_attr_cell_get(bts); + printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len)); + printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len)); + OSMO_ASSERT(memcmp(msgb->data, expected, msgb->len) == 0); + msgb_free(msgb); + + printf("ok.\n"); + printf("\n"); +} + +static void test_nanobts_attr_nscv_get(struct gsm_bts *bts, uint8_t *expected) +{ + struct msgb *msgb; + + printf("Testing nanobts_attr_nscv_get()...\n"); + + msgb = nanobts_attr_nscv_get(bts); + printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len)); + printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len)); + OSMO_ASSERT(memcmp(msgb->data, expected, msgb->len) == 0); + msgb_free(msgb); + + printf("ok.\n"); + printf("\n"); +} + +static void test_nanobts_attr_radio_get(struct gsm_bts *bts, + struct gsm_bts_trx *trx, + uint8_t *expected) +{ + struct msgb *msgb; + + printf("Testing nanobts_attr_nscv_get()...\n"); + + msgb = nanobts_attr_radio_get(bts, trx); + printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len)); + printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len)); + OSMO_ASSERT(memcmp(msgb->data, expected, msgb->len) == 0); + msgb_free(msgb); + + printf("ok.\n"); + printf("\n"); +} + +int main(int argc, char **argv) +{ + void *ctx; + + struct gsm_bts *bts; + struct gsm_network *net; + struct gsm_bts_trx *trx; + + ctx = talloc_named_const(NULL, 0, "ctx"); + + /* Allocate environmental structs (bts, net, trx) */ + net = talloc_zero(ctx, struct gsm_network); + INIT_LLIST_HEAD(&net->bts_list); + gsm_bts_model_register(&bts_model_nanobts); + bts = gsm_bts_alloc_register(net, GSM_BTS_TYPE_NANOBTS, 63); + OSMO_ASSERT(bts); + trx = talloc_zero(ctx, struct gsm_bts_trx); + + /* Parameters needed by nanobts_attr_bts_get() */ + bts->rach_b_thresh = -1; + bts->rach_ldavg_slots = -1; + bts->c0->arfcn = 866; + bts->cell_identity = 1337; + bts->network->country_code = 1; + bts->network->network_code = 1; + bts->location_area_code = 1; + bts->gprs.rac = 0; + uint8_t attr_bts_expected[] = + { 0x19, 0x55, 0x5b, 0x61, 0x67, 0x6d, 0x73, 0x18, 0x06, 0x0e, 0x00, + 0x02, 0x01, 0x20, 0x33, 0x1e, 0x24, 0x24, 0xa8, 0x34, 0x21, + 0xa8, 0x1f, 0x3f, 0x25, + 0x00, 0x01, 0x0a, 0x0c, 0x0a, 0x0b, 0x01, 0x2a, 0x0a, 0x2b, + 0x03, 0xe8, 0x0a, 0x80, + 0x23, 0x0a, 0x08, 0x03, 0x62, 0x09, 0x3f, 0x99, 0x00, 0x07, + 0x00, 0xf1, 0x10, 0x00, + 0x01, 0x05, 0x39 + }; + + /* Parameters needed to test nanobts_attr_nse_get() */ + bts->gprs.nse.nsei = 101; + uint8_t attr_nse_expected[] = + { 0x9d, 0x00, 0x02, 0x00, 0x65, 0xa0, 0x00, 0x07, 0x03, 0x03, 0x03, + 0x03, 0x1e, 0x03, 0x0a, 0xa1, 0x00, 0x0b, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x0a, 0x03, + 0x0a, 0x03, 0x0a, 0x03 + }; + + /* Parameters needed to test nanobts_attr_cell_get() */ + bts->gprs.rac = 0x00; + bts->gprs.cell.bvci = 2; + bts->gprs.mode = BTS_GPRS_GPRS; + uint8_t attr_cell_expected[] = + { 0x9a, 0x00, 0x01, 0x00, 0x9c, 0x00, 0x02, 0x05, 0x03, 0x9e, 0x00, + 0x02, 0x00, 0x02, 0xa3, 0x00, 0x09, 0x14, 0x05, 0x05, 0xa0, + 0x05, 0x0a, 0x04, 0x08, + 0x0f, 0xa8, 0x00, 0x02, 0x0f, 0x00, 0xa9, 0x00, 0x05, 0x00, + 0xfa, 0x00, 0xfa, 0x02 + }; + + /* Parameters needed to test nanobts_attr_nscv_get() */ + bts->gprs.nsvc[0].nsvci = 0x65; + bts->gprs.nsvc[0].remote_port = 0x59d8; + bts->gprs.nsvc[0].remote_ip = 0x0a090165; + bts->gprs.nsvc[0].local_port = 0x5a3c; + uint8_t attr_nscv_expected[] = + { 0x9f, 0x00, 0x02, 0x00, 0x65, 0xa2, 0x00, 0x08, 0x59, 0xd8, 0x0a, + 0x09, 0x01, 0x65, 0x5a, 0x3c + }; + + /* Parameters needed to test nanobts_attr_radio_get() */ + trx->arfcn = 866; + trx->max_power_red = 22; + bts->c0->max_power_red = 22; + uint8_t attr_radio_expected[] = + { 0x2d, 0x0b, 0x05, 0x00, 0x02, 0x03, 0x62 }; + + /* Run tests */ + test_nanobts_attr_bts_get(bts, attr_bts_expected); + test_nanobts_attr_nse_get(bts, attr_nse_expected); + test_nanobts_attr_cell_get(bts, attr_cell_expected); + test_nanobts_attr_nscv_get(bts, attr_nscv_expected); + test_nanobts_attr_radio_get(bts, trx, attr_radio_expected); + + printf("Done\n"); + talloc_free(bts); + talloc_free(net); + talloc_free(trx); + talloc_report_full(ctx, stderr); + OSMO_ASSERT(talloc_total_blocks(ctx) == 1); + return 0; +} + +/* stubs */ +struct osmo_prim_hdr; +int bssgp_prim_cb(struct osmo_prim_hdr *oph, void *ctx) +{ + abort(); +} diff --git a/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.ok b/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.ok new file mode 100644 index 0000000..91b655f --- /dev/null +++ b/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test.ok @@ -0,0 +1,26 @@ +Testing nanobts_attr_bts_get()... +result= 19555b61676d7318060e00020120331e2424a83421a81f3f2500010a0c0a0b012a0a2b03e80a80230a080362093f99000700f11000010539 +expected=19555b61676d7318060e00020120331e2424a83421a81f3f2500010a0c0a0b012a0a2b03e80a80230a080362093f99000700f11000010539 +ok. + +Testing nanobts_attr_nse_get()... +result= 9d00020065a00007030303031e030aa1000b03030303030a030a030a03 +expected=9d00020065a00007030303031e030aa1000b03030303030a030a030a03 +ok. + +Testing nanobts_attr_cell_get()... +result= 9a0001009c000205039e00020002a30009140505a0050a04080fa800020f00a9000500fa00fa02 +expected=9a0001009c000205039e00020002a30009140505a0050a04080fa800020f00a9000500fa00fa02 +ok. + +Testing nanobts_attr_nscv_get()... +result= 9f00020065a2000859d80a0901655a3c +expected=9f00020065a2000859d80a0901655a3c +ok. + +Testing nanobts_attr_nscv_get()... +result= 2d0b0500020362 +expected=2d0b0500020362 +ok. + +Done diff --git a/openbsc/tests/testsuite.at b/openbsc/tests/testsuite.at index 4905cd1..b44d595 100644 --- a/openbsc/tests/testsuite.at +++ b/openbsc/tests/testsuite.at @@ -151,3 +151,9 @@ cat $abs_srcdir/v42bis/v42bis_test.ok > expout AT_CHECK([$abs_top_builddir/tests/v42bis/v42bis_test], [], [expout], [ignore]) AT_CLEANUP + +AT_SETUP([nanobts_omlattr]) +AT_KEYWORDS([nanobts_omlattr]) +cat $abs_srcdir/nanobts_omlattr/nanobts_omlattr_test.ok > expout +AT_CHECK([$abs_top_builddir/tests/nanobts_omlattr/nanobts_omlattr_test], [], [expout], [ignore]) +AT_CLEANUP -- To view, visit https://gerrit.osmocom.org/973 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibeb34a84912d6cf695f553a34c69320fca7d08fa Gerrit-PatchSet: 4 Gerrit-Project: openbsc 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 Oct 13 15:24:23 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 13 Oct 2016 15:24:23 +0000 Subject: [PATCH] openbsc[master]: gsm0408: Adding log output for 3g specific RR messages 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/1037 to look at the new patch set (#6). gsm0408: Adding log output for 3g specific RR messages GSM 04.18, which is the successor of GSM 04.08, describes additional RR 3g specific message types. This commit adds log output for those messages. The behaviour is not changed all affected message types are still forwared to the MSC as they were before. See also 3GPP TS 04.18, section 10.4, table 10.4.1 The change requires to update libosmocore as well, see also commit f48fdb3a108da0dc23d7af4ac021e98e11f07152 in libosmocore.git for details. Change-Id: I41f2242fdf59c3eb4b3f8f7f003c17f7e0df01aa --- M openbsc/src/libbsc/bsc_api.c M openbsc/src/libmsc/gsm_04_08.c 2 files changed, 11 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/37/1037/6 diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c index cc12e9f..207e12a 100644 --- a/openbsc/src/libbsc/bsc_api.c +++ b/openbsc/src/libbsc/bsc_api.c @@ -34,6 +34,7 @@ #include #include +#include #include @@ -587,11 +588,13 @@ case GSM48_PDISC_RR: switch (msg_type) { case GSM48_MT_RR_GPRS_SUSP_REQ: - DEBUGP(DRR, "GRPS SUSPEND REQUEST\n"); + DEBUGP(DRR, "%s\n", + gsm48_rr_msg_name(GSM48_MT_RR_GPRS_SUSP_REQ)); break; case GSM48_MT_RR_STATUS: - LOGP(DRR, LOGL_NOTICE, "RR STATUS (cause: %s)\n", - rr_cause_name(gh->data[0])); + LOGP(DRR, LOGL_NOTICE, "%s (cause: %s)\n", + gsm48_rr_msg_name(GSM48_MT_RR_GPRS_SUSP_REQ), + rr_cause_name(gh->data[0])); break; case GSM48_MT_RR_MEAS_REP: /* This shouldn't actually end up here, as RSL treats @@ -643,8 +646,9 @@ /* Normally, a MSC should never receive RR * messages, but we'd rather forward what we * don't know than drop it... */ - LOGP(DRR, LOGL_NOTICE, "BSC: Passing unknown 04.08 " - "RR message type 0x%02x to MSC\n", msg_type); + LOGP(DRR, LOGL_NOTICE, + "BSC: Passing %s 04.08 RR message to MSC\n", + gsm48_rr_msg_name(msg_type)); if (api->dtap) api->dtap(conn, link_id, msg); } diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index be1b260..6a760ba 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -1270,8 +1270,8 @@ rc = gsm48_rx_rr_app_info(conn, msg); break; default: - LOGP(DRR, LOGL_NOTICE, "MSC: Unimplemented " - "GSM 04.08 RR msg type 0x%02x\n", gh->msg_type); + LOGP(DRR, LOGL_NOTICE, "MSC: Unimplemented %s GSM 04.08 RR " + "message\n", gsm48_rr_msg_name(gh->msg_type)); break; } -- To view, visit https://gerrit.osmocom.org/1037 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I41f2242fdf59c3eb4b3f8f7f003c17f7e0df01aa Gerrit-PatchSet: 6 Gerrit-Project: openbsc 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 Fri Oct 14 04:19:01 2016 From: gerrit-no-reply at lists.osmocom.org (pravin) Date: Fri, 14 Oct 2016 04:19:01 +0000 Subject: [PATCH] osmo-pcu[master]: EGPRS: Add EPDAN CRBB Tree based decoding In-Reply-To: References: Message-ID: Hello Max, Neels Hofmeyr, arvind.sirsikar, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/416 to look at the new patch set (#28). EGPRS: Add EPDAN CRBB Tree based decoding Implemented tree based algorithm to decode compressed bitmap in EPDAN as described in section 9.1.10 of 3GPP 44.060. This algorithm intends to improve the performance over existing method. New Regression test is added under bitcomp directory. Test case is added to validate decompressed result of the bitmap Present in EPDAN. Test is done for multiple bitmaps of varying length. Invalid inputs are also part of the test vector. Change-Id: Ieae1992ed4b02bb1e09eec2d3de1a030eabd16ce --- M src/Makefile.am M src/decoding.cpp A src/egprs_rlc_compression.cpp A src/egprs_rlc_compression.h M tests/Makefile.am A tests/bitcomp/BitcompTest.cpp A tests/bitcomp/BitcompTest.err A tests/bitcomp/BitcompTest.ok M tests/testsuite.at 9 files changed, 788 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/16/416/28 diff --git a/src/Makefile.am b/src/Makefile.am index 9bdec2f..9b047e7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -62,7 +62,8 @@ rlc.cpp \ osmobts_sock.cpp \ gprs_codel.c \ - gprs_coding_scheme.cpp + gprs_coding_scheme.cpp \ + egprs_rlc_compression.cpp bin_PROGRAMS = \ osmo-pcu @@ -94,7 +95,8 @@ pcu_utils.h \ cxx_linuxlist.h \ gprs_codel.h \ - gprs_coding_scheme.h + gprs_coding_scheme.h \ + egprs_rlc_compression.h osmo_pcu_SOURCES = pcu_main.cpp diff --git a/src/decoding.cpp b/src/decoding.cpp index 3f5c4d2..6ae4b16 100644 --- a/src/decoding.cpp +++ b/src/decoding.cpp @@ -20,6 +20,7 @@ #include #include #include +#include extern "C" { #include @@ -692,21 +693,17 @@ if (crbb_len > 0) { int old_len = bits->cur_bit; - struct bitvec crbb; - crbb.data = (uint8_t *)desc->CRBB; - crbb.data_len = sizeof(desc->CRBB); - crbb.cur_bit = desc->CRBB_LENGTH; - - rc = osmo_t4_decode(&crbb, desc->CRBB_STARTING_COLOR_CODE, - bits); - + LOGP(DRLCMACDL, LOGL_DEBUG, "Compress bitmap exists, " + "CRBB LEN = %d and Starting color code = %d", + desc->CRBB_LENGTH, desc->CRBB_STARTING_COLOR_CODE); + rc = egprs_compress::decompress_crbb(desc->CRBB_LENGTH, + desc->CRBB_STARTING_COLOR_CODE, desc->CRBB, bits); if (rc < 0) { LOGP(DRLCMACUL, LOGL_NOTICE, - "Failed to decode CRBB: " - "length %d, data '%s'\n", - desc->CRBB_LENGTH, - osmo_hexdump(crbb.data, crbb.data_len)); + "Failed to decode CRBB: length %d, data '%s'\n", + desc->CRBB_LENGTH, osmo_hexdump( + desc->CRBB, (desc->CRBB_LENGTH + 7)/8)); /* We don't know the SSN offset for the URBB, * return what we have so far and assume the * bitmap has stopped here */ diff --git a/src/egprs_rlc_compression.cpp b/src/egprs_rlc_compression.cpp new file mode 100644 index 0000000..b7e68da --- /dev/null +++ b/src/egprs_rlc_compression.cpp @@ -0,0 +1,362 @@ +/* egprs_rlc_compression.h +* Routines for EGPRS RLC bitmap compression handling +*/ +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +#define EGPRS_CODEWORDS 79 /* total number of codewords */ + +struct egprs_compress_node{ + struct egprs_compress_node *left; + struct egprs_compress_node *right; + int run_length; +}; + +extern void *tall_pcu_ctx; + +egprs_compress *egprs_compress::s_instance = 0; + +egprs_compress_node *egprs_compress::create_tree_node(void *parent) +{ + egprs_compress_node *new_node; + + new_node = talloc_zero(parent, egprs_compress_node); + new_node->left = NULL; + new_node->right = NULL; + new_node->run_length = -1; + return new_node; +} + +egprs_compress *egprs_compress::instance() +{ + if (!egprs_compress::s_instance) + egprs_compress::s_instance = new egprs_compress; + return egprs_compress::s_instance; +} + +/* Expands the given tree by incorporating + * the given codewords. + * \param root[in] Root of ones or zeros tree + * \param cdwd[in] Array of code words + * number of codewords is EGPRS_CODEWORDS + */ +void egprs_compress::build_codewords(egprs_compress_node *root, const char *cdwd[]) +{ + egprs_compress_node *iter; + int len; + int i; + int idx; + + for (idx = 0; idx < EGPRS_CODEWORDS; idx++) { + len = strlen((const char *)cdwd[idx]); + iter = root; + for (i = 0; i < len; i++) { + if (cdwd[idx][i] == '0') { + if (!iter->left) + iter->left = create_tree_node(root); + iter = iter->left; + } else { + if (!iter->right) + iter->right = create_tree_node(root); + iter = iter->right; + } + } + if (iter) { + /* The first 64 run lengths are 0, 1, 2, ..., 63 + * and the following ones are 64, 128, 192 described in + * section 9.1.10 of 3gpp 44.060 */ + if (idx < 64) + iter->run_length = idx; + else + iter->run_length = (idx - 63) * 64; + } + } +} + +/* 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", + "000111", + "0111", + "1000", + "1011", + "1100", + "1110", + "1111", + "10011", + "10100", + "00111", + "01000", + "001000", + "000011", + "110100", + "110101", + "101010", + "101011", + "0100111", + "0001100", + "0001000", + "0010111", + "0000011", + "0000100", + "0101000", + "0101011", + "0010011", + "0100100", + "0011000", + "00000010", + "00000011", + "00011010", + "00011011", + "00010010", + "00010011", + "00010100", + "00010101", + "00010110", + "00010111", + "00101000", + "00101001", + "00101010", + "00101011", + "00101100", + "00101101", + "00000100", + "00000101", + "00001010", + "00001011", + "01010010", + "01010011", + "01010100", + "01010101", + "00100100", + "00100101", + "01011000", + "01011001", + "01011010", + "01011011", + "01001010", + "01001011", + "00110010", + "00110011", + "00110100", + "11011", + "10010", + "010111", + "0110111", + "00110110", + "00110111", + "01100100", + "01100101", + "01101000", + "01100111", + "011001100", + "011001101", + "011010010", + "011010011", + "011010100" +}; + +const char *zero_run_len_code_list[EGPRS_CODEWORDS] = { + "0000110111", + "10", + "11", + "010", + "011", + "0011", + "0010", + "00011", + "000101", + "000100", + "0000100", + "0000101", + "0000111", + "00000100", + "00000111", + "000011000", + "0000010111", + "0000011000", + "0000001000", + "00001100111", + "00001101000", + "00001101100", + "00000110111", + "00000101000", + "00000010111", + "00000011000", + "000011001010", + "000011001011", + "000011001100", + "000011001101", + "000001101000", + "000001101001", + "000001101010", + "000001101011", + "000011010010", + "000011010011", + "000011010100", + "000011010101", + "000011010110", + "000011010111", + "000001101100", + "000001101101", + "000011011010", + "000011011011", + "000001010100", + "000001010101", + "000001010110", + "000001010111", + "000001100100", + "000001100101", + "000001010010", + "000001010011", + "000000100100", + "000000110111", + "000000111000", + "000000100111", + "000000101000", + "000001011000", + "000001011001", + "000000101011", + "000000101100", + "000001011010", + "000001100110", + "000001100111", + "0000001111", + "000011001000", + "000011001001", + "000001011011", + "000000110011", + "000000110100", + "000000110101", + "0000001101100", + "0000001101101", + "0000001001010", + "0000001001011", + "0000001001100", + "0000001001101", + "0000001110010", + "0000001110011" +}; + +/* Calculate runlength of a codeword + * \param root[in] Root of Ones or Zeros tree + * \param bmbuf[in] Received compressed bitmap buf + * \param bit_pos[in] The start bit pos to read codeword + * \param len_codewd[in] Length of code word + * \param rlen[out] Calculated run length + */ +static int search_runlen( + egprs_compress_node *root, + const uint8_t *bmbuf, + uint8_t bit_pos, + uint8_t *len_codewd, + uint16_t *rlen) +{ + egprs_compress_node *iter; + uint8_t dir; + + iter = root; + *len_codewd = 0; + + while (iter->run_length == -1) { + if ((!iter->left) && (!iter->right)) + return -1; + /* get the bit value at the bitpos and put it in right most of dir */ + dir = (bmbuf[bit_pos/8] >> (7 - (bit_pos & 0x07))) & 0x01; + bit_pos++; + (*len_codewd)++; + if (!dir && (iter->left != NULL)) + iter = iter->left; + else if (dir && (iter->right != NULL)) + iter = iter->right; + else + return -1; + } + LOGP(DRLCMACUL, LOGL_DEBUG, "Run_length = %d\n", iter->run_length); + *rlen = iter->run_length; + return 1; +} + +/* Decompress received block bitmap + * \param compress_bmap_len[in] Compressed bitmap length + * \param start[in] Starting Color Code, true if bitmap + * starts with a run length of ones, false if zeros. + * as described in section 9.1.10 of 3gpp 44.060. + * \param orig_crbb_buf[in] Received block crbb bitmap + * \param dest[out] Uncompressed bitvector + */ +int egprs_compress::decompress_crbb( + int8_t compress_bmap_len, + bool start, + const uint8_t *orig_crbb_buf, + bitvec *dest) +{ + + uint8_t bit_pos = 0; + uint8_t data; + egprs_compress_node *list = NULL; + uint8_t nbits = 0; /* number of bits of codeword */ + uint16_t run_length = 0; + uint16_t cbmaplen = 0; /* compressed bitmap part after decompression */ + unsigned wp = dest->cur_bit; + int rc = 0; + egprs_compress *compress = instance(); + + while (compress_bmap_len > 0) { + if (start) { + data = 0xff; + list = compress->ones_list; + } else { + data = 0x00; + list = compress->zeros_list; + } + rc = search_runlen(list, orig_crbb_buf, + bit_pos, &nbits, &run_length); + if (rc == -1) + return -1; + /* If run length > 64, need makeup and terminating code */ + if (run_length < 64) + start = !start; + cbmaplen = cbmaplen + run_length; + /* put run length of Ones in uncompressed bitmap */ + while (run_length != 0) { + if (run_length > 8) { + bitvec_write_field(dest, wp, data, 8); + run_length = run_length - 8; + } else { + bitvec_write_field(dest, wp, data, run_length); + run_length = 0; + } + } + bit_pos = bit_pos + nbits; + compress_bmap_len = compress_bmap_len - nbits; + } + return 0; +} + +void egprs_compress::decode_tree_init() +{ + ones_list = create_tree_node(tall_pcu_ctx); + zeros_list = create_tree_node(tall_pcu_ctx); + build_codewords(ones_list, one_run_len_code_list); + build_codewords(zeros_list, zero_run_len_code_list); +} + +egprs_compress::egprs_compress() +{ + decode_tree_init(); +} + diff --git a/src/egprs_rlc_compression.h b/src/egprs_rlc_compression.h new file mode 100644 index 0000000..c5f0f1a --- /dev/null +++ b/src/egprs_rlc_compression.h @@ -0,0 +1,29 @@ +/* egprs_rlc_compression.h + * Routines for EGPRS RLC bitmap compression handling + */ + +#pragma once + +struct egprs_compress_node; + +/* Singleton to manage the EGPRS compression algorithm. */ +class egprs_compress +{ +public: + static int decompress_crbb(int8_t compress_bmap_len, + bool start, const uint8_t *orig_buf, + bitvec *dest); + egprs_compress(); + +private: + egprs_compress_node *ones_list; + egprs_compress_node *zeros_list; + + void decode_tree_init(void); + static egprs_compress *s_instance; + static egprs_compress*instance(); + egprs_compress_node *create_tree_node(void *); + void build_codewords(egprs_compress_node *root, const char *cdwd[]); + /* singleton class, so this private destructor is left unimplemented. */ + ~egprs_compress(); +}; diff --git a/tests/Makefile.am b/tests/Makefile.am index 2a3415e..a24f4ea 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,7 +1,7 @@ AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGB_CFLAGS) $(LIBOSMOGSM_CFLAGS) -I$(top_srcdir)/src/ AM_LDFLAGS = -lrt -check_PROGRAMS = rlcmac/RLCMACTest alloc/AllocTest tbf/TbfTest types/TypesTest ms/MsTest llist/LListTest llc/LlcTest codel/codel_test edge/EdgeTest +check_PROGRAMS = rlcmac/RLCMACTest alloc/AllocTest tbf/TbfTest types/TypesTest ms/MsTest llist/LListTest llc/LlcTest codel/codel_test edge/EdgeTest bitcomp/BitcompTest noinst_PROGRAMS = emu/pcu_emu rlcmac_RLCMACTest_SOURCES = rlcmac/RLCMACTest.cpp @@ -23,6 +23,11 @@ $(top_builddir)/src/libgprs.la \ $(LIBOSMOGB_LIBS) \ $(LIBOSMOGSM_LIBS) \ + $(LIBOSMOCORE_LIBS) \ + $(COMMON_LA) + +bitcomp_BitcompTest_SOURCES = bitcomp/BitcompTest.cpp ../src/egprs_rlc_compression.cpp +bitcomp_BitcompTest_LDADD = \ $(LIBOSMOCORE_LIBS) \ $(COMMON_LA) @@ -108,6 +113,7 @@ rlcmac/RLCMACTest.ok rlcmac/RLCMACTest.err \ alloc/AllocTest.ok alloc/AllocTest.err \ tbf/TbfTest.ok tbf/TbfTest.err \ + bitcomp/BitcompTest.ok bitcomp/BitcompTest.err \ types/TypesTest.ok types/TypesTest.err \ ms/MsTest.ok ms/MsTest.err \ llc/LlcTest.ok llc/LlcTest.err \ diff --git a/tests/bitcomp/BitcompTest.cpp b/tests/bitcomp/BitcompTest.cpp new file mode 100644 index 0000000..fd3b0df --- /dev/null +++ b/tests/bitcomp/BitcompTest.cpp @@ -0,0 +1,236 @@ +#include +#include + +#include "rlc.h" +#include "gprs_debug.h" +#include +#include "egprs_rlc_compression.h" + +extern "C" { +#include +#include +#include +#include +} + +#define NEW 1 +#define MASK(n) (0xFF << (8-n)) +#define MAX_CRBB_LEN 23 +#define MAX_URBB_LEN 40 + +void *tall_pcu_ctx; + +struct test_data { + int8_t crbb_len; + uint8_t cc; + uint8_t crbb_data[MAX_CRBB_LEN]; /* compressed data */ + uint8_t ucmp_data[MAX_URBB_LEN]; /* uncompressed data */ + int ucmp_len; + int verify; +} test[] = { + { .crbb_len = 67, .cc = 1, + .crbb_data = { + 0x02, 0x0c, 0xa0, 0x30, 0xcb, 0x1a, 0x0c, 0xe3, 0x6c + }, + .ucmp_data = { + 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x01, 0xff, 0xff, + 0xff, 0xf8, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xfe, + 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xdb + }, + .ucmp_len = 194, .verify = 1 + }, + { .crbb_len = 40, .cc = 1, + .crbb_data = { + 0x53, 0x06, 0xc5, 0x40, 0x6d + }, + .ucmp_data = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, + 0x00, 0x00, 0x00, 0x00, 0x03 + }, + .ucmp_len = 182, .verify = 1 + }, + { .crbb_len = 8, .cc = 1, + .crbb_data = {0x02}, + .ucmp_data = {0xff, 0xff, 0xff, 0xf8}, + .ucmp_len = 29, .verify = 1 + }, + { .crbb_len = 103, .cc = 1, + .crbb_data = { + 0x02, 0x0c, 0xe0, 0x41, 0xa0, 0x0c, 0x36, 0x0d, 0x03, + 0x71, 0xb0, 0x6e, 0x24 + }, + .ucmp_data = { + 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xff, 0xff, + 0xf8, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xfe, 0x00, 0x00, + 0x0f, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xff, + 0xff, 0xff, 0x80, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff + }, + .ucmp_len = 288, .verify = 1 + }, + /* Test vector from libosmocore test */ + { .crbb_len = 35, .cc = 0, + .crbb_data = {0xde, 0x88, 0x75, 0x65, 0x80}, + .ucmp_data = {0x37, 0x47, 0x81, 0xf0}, + .ucmp_len = 28, .verify = 1 + }, + { .crbb_len = 18, .cc = 1, + .crbb_data = {0xdd, 0x41, 0x00}, + .ucmp_data = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x00, 0x00 + }, + .ucmp_len = 90, .verify = 1 + }, + /*Invalid inputs*/ + { .crbb_len = 18, .cc = 1, + .crbb_data = {0x1E, 0x70, 0xc0}, + .ucmp_data = {0x0}, + .ucmp_len = 0, .verify = 0 + }, + { .crbb_len = 14, .cc = 1, + .crbb_data = {0x00, 0x1E, 0x7c}, + .ucmp_data = {0x0}, + .ucmp_len = 0, .verify = 0 + }, + { .crbb_len = 24, .cc = 0, + .crbb_data = {0x00, 0x00, 0x00}, + .ucmp_data = {0x0}, + .ucmp_len = 0, .verify = 0 + } + }; + +static const struct log_info_cat default_categories[] = { + {"DCSN1", "\033[1;31m", "Concrete Syntax Notation One (CSN1)", LOGL_INFO, 0}, + {"DL1IF", "\033[1;32m", "GPRS PCU L1 interface (L1IF)", LOGL_DEBUG, 1}, + {"DRLCMAC", "\033[0;33m", "GPRS RLC/MAC layer (RLCMAC)", LOGL_DEBUG, 1}, + {"DRLCMACDATA", "\033[0;33m", "GPRS RLC/MAC layer Data (RLCMAC)", LOGL_DEBUG, 1}, + {"DRLCMACDL", "\033[1;33m", "GPRS RLC/MAC layer Downlink (RLCMAC)", LOGL_DEBUG, 1}, + {"DRLCMACUL", "\033[1;36m", "GPRS RLC/MAC layer Uplink (RLCMAC)", LOGL_DEBUG, 1}, + {"DRLCMACSCHED", "\033[0;36m", "GPRS RLC/MAC layer Scheduling (RLCMAC)", LOGL_DEBUG, 1}, + {"DRLCMACMEAS", "\033[1;31m", "GPRS RLC/MAC layer Measurements (RLCMAC)", LOGL_INFO, 1}, + {"DNS", "\033[1;34m", "GPRS Network Service Protocol (NS)", LOGL_INFO, 1}, + {"DBSSGP", "\033[1;34m", "GPRS BSS Gateway Protocol (BSSGP)", LOGL_INFO, 1}, + {"DPCU", "\033[1;35m", "GPRS Packet Control Unit (PCU)", LOGL_NOTICE, 1}, +}; + +static int filter_fn(const struct log_context *ctx, + struct log_target *tar) +{ + return 1; +} + +/* To verify the result with expected result */ +int check_result(bitvec bits, uint8_t *exp_data, int exp_len) +{ + if (bits.cur_bit != exp_len) + return 0; + size_t n = (exp_len / 8); + int rem = (exp_len % 8); + + if (memcmp(exp_data, bits.data, n) == 0) { + if (rem == 0) + return 1; + if ((bits.data[n] & MASK(rem)) == ((*(exp_data + n)) & MASK(rem))) + return 1; + else + return 0; + } else + return 0; +} + +/* To test decoding of compressed bitmap by Tree based method + * and to verify the result with expected result + * for invalid input verfication is suppressed + */ +static void test_EPDAN_decode_tree(void) +{ + bitvec dest; + int init_flag = 1; + int itr; + int rc; + uint8_t bits_data[RLC_EGPRS_MAX_WS/8]; + + printf("=== start %s ===\n", __func__); + + for (itr = 0 ; itr < (sizeof(test) / sizeof(test_data)) ; itr++) { + dest.data = bits_data; + dest.data_len = sizeof(bits_data); + dest.cur_bit = 0; + memset(dest.data, 0, sizeof(bits_data)); + LOGP(DRLCMACDL, LOGL_DEBUG, "\nTest:%d\nTree based decoding:" + "\nuncompressed data = %s\nlen = %d\n", itr + 1, + osmo_hexdump(test[itr].crbb_data, + (test[itr].crbb_len + 7)/8), test[itr].crbb_len + ); + rc = egprs_compress::decompress_crbb(test[itr].crbb_len, + test[itr].cc, test[itr].crbb_data, &dest); + if (rc < 0) { + LOGP(DRLCMACUL, LOGL_NOTICE, + "\nFailed to decode CRBB: length %d, data %s", + test[itr].crbb_len, osmo_hexdump( + test[itr].crbb_data, (test[itr].crbb_len + 7)/8)); + } + if (init_flag) + init_flag = 0; + if (test[itr].verify) { + if (check_result(dest, test[itr].ucmp_data, + test[itr].ucmp_len) == 0) { + LOGP(DRLCMACDL, LOGL_DEBUG, "\nTree based decoding" + ":Error\nexpected data = %s\nexpected" + " len = %d\ndecoded data = %s\n" + "decoded len = %d\n", + osmo_hexdump(test[itr].ucmp_data, + (test[itr].ucmp_len + 7)/8), + test[itr].ucmp_len, osmo_hexdump(dest.data, + (dest.cur_bit + 7)/8), dest.cur_bit + ); + OSMO_ASSERT(0); + } + } + LOGP(DRLCMACDL, LOGL_DEBUG, "\nexpected data = %s\nexpected len = %d" + "\ndecoded data = %s\ndecoded len = %d\n", + osmo_hexdump(test[itr].ucmp_data, + (test[itr].ucmp_len + 7)/8), + test[itr].ucmp_len, osmo_hexdump(dest.data, + (dest.cur_bit + 7)/8), dest.cur_bit + ); + } + + printf("=== end %s ===\n", __func__); +} + +const struct log_info debug_log_info = { + filter_fn, + (struct log_info_cat *)default_categories, + ARRAY_SIZE(default_categories), +}; + +int main(int argc, char **argv) +{ + osmo_init_logging(&debug_log_info); + log_set_use_color(osmo_stderr_target, 0); + log_set_print_filename(osmo_stderr_target, 0); + + tall_pcu_ctx = talloc_named_const(NULL, 1, "moiji-mobile bitcompTest context"); + if (!tall_pcu_ctx) + abort(); + + test_EPDAN_decode_tree(); + + if (getenv("TALLOC_REPORT_FULL")) + talloc_report_full(tall_pcu_ctx, stderr); + talloc_free(tall_pcu_ctx); + return EXIT_SUCCESS; +} + +/* + * stubs that should not be reached + */ +extern "C" { +void l1if_pdch_req() { abort(); } +void l1if_connect_pdch() { abort(); } +void l1if_close_pdch() { abort(); } +void l1if_open_pdch() { abort(); } +} + diff --git a/tests/bitcomp/BitcompTest.err b/tests/bitcomp/BitcompTest.err new file mode 100644 index 0000000..7481d72 --- /dev/null +++ b/tests/bitcomp/BitcompTest.err @@ -0,0 +1,132 @@ + +Test:1 +Tree based decoding: +uncompressed data = 02 0c a0 30 cb 1a 0c e3 6c +len = 67 +Run_length = 29 +Run_length = 26 +Run_length = 30 +Run_length = 27 +Run_length = 31 +Run_length = 19 +Run_length = 32 + +expected data = ff ff ff f8 00 00 01 ff ff ff f8 00 00 00 ff ff ff fe 00 00 3f ff ff ff db +expected len = 194 +decoded data = ff ff ff f8 00 00 01 ff ff ff f8 00 00 00 ff ff ff fe 00 00 3f ff ff ff db +decoded len = 194 + +Test:2 +Tree based decoding: +uncompressed data = 53 06 c5 40 6d +len = 40 +Run_length = 50 +Run_length = 40 +Run_length = 51 +Run_length = 41 + +expected data = ff ff ff ff ff ff c0 00 00 00 00 3f ff ff ff ff ff f8 00 00 00 00 03 +expected len = 182 +decoded data = ff ff ff ff ff ff c0 00 00 00 00 3f ff ff ff ff ff f8 00 00 00 00 03 +decoded len = 182 + +Test:3 +Tree based decoding: +uncompressed data = 02 +len = 8 +Run_length = 29 + +expected data = ff ff ff f8 +expected len = 29 +decoded data = ff ff ff f8 +decoded len = 29 + +Test:4 +Tree based decoding: +uncompressed data = 02 0c e0 41 a0 0c 36 0d 03 71 b0 6e 24 +len = 103 +Run_length = 29 +Run_length = 19 +Run_length = 29 +Run_length = 20 +Run_length = 30 +Run_length = 21 +Run_length = 31 +Run_length = 22 +Run_length = 32 +Run_length = 22 +Run_length = 33 + +expected data = ff ff ff f8 00 00 ff ff ff f8 00 00 7f ff ff fe 00 00 0f ff ff ff e0 00 00 7f ff ff ff 80 00 01 ff ff ff ff +expected len = 288 +decoded data = ff ff ff f8 00 00 ff ff ff f8 00 00 7f ff ff fe 00 00 0f ff ff ff e0 00 00 7f ff ff ff 80 00 01 ff ff ff ff +decoded len = 288 + +Test:5 +Tree based decoding: +uncompressed data = de 88 75 65 80 +len = 35 +Run_length = 2 +Run_length = 2 +Run_length = 1 +Run_length = 3 +Run_length = 1 +Run_length = 1 +Run_length = 3 +Run_length = 4 +Run_length = 6 +Run_length = 5 + +expected data = 37 47 81 f0 +expected len = 28 +decoded data = 37 47 81 f0 +decoded len = 28 + +Test:6 +Tree based decoding: +uncompressed data = dd 41 00 +len = 18 +Run_length = 64 +Run_length = 16 +Run_length = 10 + +expected data = ff ff ff ff ff ff ff ff ff ff 00 00 +expected len = 90 +decoded data = ff ff ff ff ff ff ff ff ff ff 00 00 +decoded len = 90 + +Test:7 +Tree based decoding: +uncompressed data = 1e 70 c0 +len = 18 +Run_length = 1 +Run_length = 1 +Run_length = 2 +Run_length = 15 + +expected data = +expected len = 0 +decoded data = +decoded len = 19 + +Test:8 +Tree based decoding: +uncompressed data = 00 1e +len = 14 + +Failed to decode CRBB: length 14, data 00 1e +expected data = +expected len = 0 +decoded data = +decoded len = 0 + +Test:9 +Tree based decoding: +uncompressed data = 00 00 00 +len = 24 + +Failed to decode CRBB: length 24, data 00 00 00 +expected data = +expected len = 0 +decoded data = +decoded len = 0 diff --git a/tests/bitcomp/BitcompTest.ok b/tests/bitcomp/BitcompTest.ok new file mode 100644 index 0000000..f7720fc --- /dev/null +++ b/tests/bitcomp/BitcompTest.ok @@ -0,0 +1,2 @@ +=== start test_EPDAN_decode_tree === +=== end test_EPDAN_decode_tree === diff --git a/tests/testsuite.at b/tests/testsuite.at index 1049b31..e42a0fd 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -23,6 +23,13 @@ AT_CHECK([$OSMO_QEMU $abs_top_builddir/tests/tbf/TbfTest], [0], [expout], [experr]) AT_CLEANUP +AT_SETUP([bitcomp]) +AT_KEYWORDS([bitcomp]) +cat $abs_srcdir/bitcomp/BitcompTest.ok > expout +cat $abs_srcdir/bitcomp/BitcompTest.err > experr +AT_CHECK([$OSMO_QEMU $abs_top_builddir/tests/bitcomp/BitcompTest], [0], [expout], [experr]) +AT_CLEANUP + AT_SETUP([edge]) AT_KEYWORDS([edge]) cat $abs_srcdir/edge/EdgeTest.ok > expout -- To view, visit https://gerrit.osmocom.org/416 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ieae1992ed4b02bb1e09eec2d3de1a030eabd16ce Gerrit-PatchSet: 28 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: pravin Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: pravin From gerrit-no-reply at lists.osmocom.org Fri Oct 14 04:25:03 2016 From: gerrit-no-reply at lists.osmocom.org (pravin) Date: Fri, 14 Oct 2016 04:25:03 +0000 Subject: osmo-pcu[master]: EGPRS: Add EPDAN CRBB Tree based decoding In-Reply-To: References: Message-ID: Patch Set 28: > (1 comment) > > one last detail... I have modified the variable name as you suggested. Thanks, Pravin -- To view, visit https://gerrit.osmocom.org/416 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieae1992ed4b02bb1e09eec2d3de1a030eabd16ce Gerrit-PatchSet: 28 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: pravin Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: pravin Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Oct 14 11:23:05 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 14 Oct 2016 11:23:05 +0000 Subject: [PATCH] osmo-bts[master]: DTX HR - fix array size calculation Message-ID: Review at https://gerrit.osmocom.org/1063 DTX HR - fix array size calculation Use ARRAY_SIZE macro for each pointer separately. Fix suggested by Neels Hofmeyr . Change-Id: I68ec1be33fb743977121d654187d85d6b8451e2b Fixes: Coverity CID 150132 --- M src/common/msg_utils.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/63/1063/1 diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 09596f3..9743530 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -259,7 +259,8 @@ return fn_chk(f, fn, ARRAY_SIZE(f)); else return fn_chk(lchan->nr ? h1 : h0, fn, - ARRAY_SIZE(lchan->nr ? h1 : h0)); + lchan->nr ? ARRAY_SIZE(h1) : + ARRAY_SIZE(h0)); } return false; } -- To view, visit https://gerrit.osmocom.org/1063 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I68ec1be33fb743977121d654187d85d6b8451e2b Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Oct 14 11:23:06 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 14 Oct 2016 11:23:06 +0000 Subject: [PATCH] osmo-bts[master]: DTX AMR - fix buffer length check Message-ID: Review at https://gerrit.osmocom.org/1064 DTX AMR - fix buffer length check Consider AMR-specific prefix in computing max length to avoid triggering coverity check. Change-Id: I2fbc468caedf08f26893457db7c7fbacef5b860c Fixes: Coverity CID 150133 --- M src/common/msg_utils.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/64/1064/1 diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 9743530..90dbcb8 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -112,7 +112,8 @@ size_t length, uint32_t fn, int update) { size_t amr = (update < 0) ? 0 : 2, - copy_len = OSMO_MIN(length + 1, ARRAY_SIZE(lchan->tch.dtx.cache)); + copy_len = OSMO_MIN(length + 1 + amr, + ARRAY_SIZE(lchan->tch.dtx.cache)); lchan->tch.dtx.len = copy_len + amr; lchan->tch.dtx.fn = fn; -- To view, visit https://gerrit.osmocom.org/1064 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2fbc468caedf08f26893457db7c7fbacef5b860c Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Oct 14 11:35:22 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Fri, 14 Oct 2016 11:35:22 +0000 Subject: osmo-pcu[master]: tbf: add llc_queue_size() to check llc_queue is valid before... In-Reply-To: References: Message-ID: Patch Set 2: > New code can easily again use llc_queue()->size() by accident, > where C++ would technically have the tools in place to make > unwanted > access private. > > AFAICT all callers of llc_queue() are now private, right? > So we could make llc_queue() private altogether. The few private > callers > could then add an explicit null pointer check. > > (not to be confused with GprsMs::llc_queue()). I agree, but that would be another commit. -- To view, visit https://gerrit.osmocom.org/724 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I88cc3180f8f86785e3f07981895dabddf50b60a2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Oct 14 11:39:49 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 14 Oct 2016 11:39:49 +0000 Subject: [MERGED] openggsn[master]: fix gsn_restart file buffer overflow and missing path sep In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: fix gsn_restart file buffer overflow and missing path sep ...................................................................... fix gsn_restart file buffer overflow and missing path sep Fix errors during gsn_restart file path composition: - possible buffer overflow because the wrong remaining length was fed to strncat(). - missing path separator: put restart file in dir/gsn_restart instead of ../dirgsn_restart. This assumes that the path separator is '/'. Use talloc_asprintf() to fix all filename length problems and shorten the code. In order to free the allocated path, add a free_filename label, and jump there instead of returning from the fopen("w") failure branch. Also don't return from "fclose failed" branch in order to free the path, remove the if {} braces. Change-Id: Idf0a64ff45720aa818f2f9de1e8ba2fe2c82631b --- M gtp/gtp.c 1 file changed, 7 insertions(+), 9 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/gtp/gtp.c b/gtp/gtp.c index 12cb492..ccb2611 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -646,13 +646,11 @@ FILE *f; int i, rc; int counter = 0; - char filename[NAMESIZE]; - - filename[NAMESIZE - 1] = 0; /* No null term. guarantee by strncpy */ - strncpy(filename, gsn->statedir, NAMESIZE - 1); - strncat(filename, RESTART_FILE, NAMESIZE - 1 - sizeof(RESTART_FILE)); + char *filename; i = umask(022); + filename = talloc_asprintf(NULL, "%s/%s", gsn->statedir, RESTART_FILE); + OSMO_ASSERT(filename); /* We try to open file. On failure we will later try to create file */ if (!(f = fopen(filename, "r"))) { @@ -680,17 +678,17 @@ LOGP(DLGTP, LOGL_ERROR, "fopen(path=%s, mode=%s) failed: Error = %s\n", filename, "w", strerror(errno)); - return; + goto free_filename; } umask(i); fprintf(f, "%d\n", gsn->restart_counter); close_file: - if (fclose(f)) { + if (fclose(f)) LOGP(DLGTP, LOGL_ERROR, "fclose failed: Error = %s\n", strerror(errno)); - return; - } +free_filename: + talloc_free(filename); } int gtp_new(struct gsn_t **gsn, char *statedir, struct in_addr *listen, -- To view, visit https://gerrit.osmocom.org/1013 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idf0a64ff45720aa818f2f9de1e8ba2fe2c82631b Gerrit-PatchSet: 4 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 14 11:39:50 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 14 Oct 2016 11:39:50 +0000 Subject: [MERGED] openggsn[master]: gsn_restart file: wrap umask change tightly around file crea... In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: gsn_restart file: wrap umask change tightly around file creation ...................................................................... gsn_restart file: wrap umask change tightly around file creation An fopen("w") error used to omit the umask() call to reinstate the previous umask. Also an fopen("r") at the top will never create a file and hence does not need a umask set. Instead, wrap the umask change and change-back tightly around the single fopen("w") call. Change-Id: If7d948e2f2ba47ecebba5614f18235a53b273d14 --- M gtp/gtp.c 1 file changed, 6 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/gtp/gtp.c b/gtp/gtp.c index ccb2611..dcbe777 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -648,7 +648,6 @@ int counter = 0; char *filename; - i = umask(022); filename = talloc_asprintf(NULL, "%s/%s", gsn->statedir, RESTART_FILE); OSMO_ASSERT(filename); @@ -658,7 +657,6 @@ "State information file (%s) not found. Creating new file.\n", filename); } else { - umask(i); rc = fscanf(f, "%d", &counter); if (rc != 1) { LOGP(DLGTP, LOGL_ERROR, @@ -674,14 +672,18 @@ gsn->restart_counter = (unsigned char)counter; gsn->restart_counter++; - if (!(f = fopen(filename, "w"))) { + /* Keep the umask closely wrapped around our fopen() call in case the + * log outputs cause file creation. */ + i = umask(022); + f = fopen(filename, "w"); + umask(i); + if (!f) { LOGP(DLGTP, LOGL_ERROR, "fopen(path=%s, mode=%s) failed: Error = %s\n", filename, "w", strerror(errno)); goto free_filename; } - umask(i); fprintf(f, "%d\n", gsn->restart_counter); close_file: if (fclose(f)) -- To view, visit https://gerrit.osmocom.org/1014 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If7d948e2f2ba47ecebba5614f18235a53b273d14 Gerrit-PatchSet: 5 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 14 11:39:59 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 14 Oct 2016 11:39:59 +0000 Subject: [MERGED] osmo-bts[master]: msgb ctx: use new msgb_talloc_ctx_init() in various main()s In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: msgb ctx: use new msgb_talloc_ctx_init() in various main()s ...................................................................... msgb ctx: use new msgb_talloc_ctx_init() in various main()s Change-Id: I31d62d5e1f0b272985fdef5013270d385c4b988a --- M src/common/main.c M src/osmo-bts-litecell15/misc/lc15bts_mgr.c M src/osmo-bts-sysmo/misc/sysmobts_mgr.c M tests/agch/agch_test.c M tests/cipher/cipher_test.c M tests/handover/handover_test.c M tests/paging/paging_test.c 7 files changed, 7 insertions(+), 24 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/main.c b/src/common/main.c index 99febe0..60839df 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -219,14 +219,12 @@ struct gsm_bts_role_bts *btsb; struct gsm_bts_trx *trx; struct e1inp_line *line; - void *tall_msgb_ctx; int rc, i; printf("((*))\n |\n / \\ OsmoBTS\n"); tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context"); - tall_msgb_ctx = talloc_pool(tall_bts_ctx, 100*1024); - msgb_set_talloc_ctx(tall_msgb_ctx); + msgb_talloc_ctx_init(tall_bts_ctx, 100*1024); bts_log_init(NULL); diff --git a/src/osmo-bts-litecell15/misc/lc15bts_mgr.c b/src/osmo-bts-litecell15/misc/lc15bts_mgr.c index c97525c..193e108 100644 --- a/src/osmo-bts-litecell15/misc/lc15bts_mgr.c +++ b/src/osmo-bts-litecell15/misc/lc15bts_mgr.c @@ -222,13 +222,11 @@ int main(int argc, char **argv) { - void *tall_msgb_ctx; int rc; tall_mgr_ctx = talloc_named_const(NULL, 1, "bts manager"); - tall_msgb_ctx = talloc_named_const(tall_mgr_ctx, 1, "msgb"); - msgb_set_talloc_ctx(tall_msgb_ctx); + msgb_talloc_ctx_init(tall_mgr_ctx); mgr_log_init(); diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr.c b/src/osmo-bts-sysmo/misc/sysmobts_mgr.c index ccb84d8..f126db2 100644 --- a/src/osmo-bts-sysmo/misc/sysmobts_mgr.c +++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr.c @@ -245,13 +245,11 @@ int main(int argc, char **argv) { - void *tall_msgb_ctx; int rc; tall_mgr_ctx = talloc_named_const(NULL, 1, "bts manager"); - tall_msgb_ctx = talloc_named_const(tall_mgr_ctx, 1, "msgb"); - msgb_set_talloc_ctx(tall_msgb_ctx); + msgb_talloc_ctx_init(tall_mgr_ctx, 0); mgr_log_init(); if (classify_bts() != 0) diff --git a/tests/agch/agch_test.c b/tests/agch/agch_test.c index 4175bdd..e275c64 100644 --- a/tests/agch/agch_test.c +++ b/tests/agch/agch_test.c @@ -224,11 +224,8 @@ int main(int argc, char **argv) { - void *tall_msgb_ctx; - tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context"); - tall_msgb_ctx = talloc_named_const(tall_bts_ctx, 1, "msgb"); - msgb_set_talloc_ctx(tall_msgb_ctx); + msgb_talloc_ctx_init(tall_bts_ctx, 0); bts_log_init(NULL); diff --git a/tests/cipher/cipher_test.c b/tests/cipher/cipher_test.c index a175012..c913925 100644 --- a/tests/cipher/cipher_test.c +++ b/tests/cipher/cipher_test.c @@ -66,11 +66,8 @@ int main(int argc, char **argv) { - void *tall_msgb_ctx; - tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context"); - tall_msgb_ctx = talloc_named_const(tall_bts_ctx, 1, "msgb"); - msgb_set_talloc_ctx(tall_msgb_ctx); + msgb_talloc_ctx_init(tall_bts_ctx, 0); bts_log_init(NULL); diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c index e1f4d86..d1dc34a 100644 --- a/tests/handover/handover_test.c +++ b/tests/handover/handover_test.c @@ -58,7 +58,6 @@ { struct gsm_bts_role_bts *btsb; void *tall_bts_ctx; - void *tall_msgb_ctx; struct e1inp_line *line; struct gsm_lchan *lchan; struct osmo_phsap_prim nl1sap; @@ -67,8 +66,7 @@ int i; tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context"); - tall_msgb_ctx = talloc_named_const(tall_bts_ctx, 1, "msgb"); - msgb_set_talloc_ctx(tall_msgb_ctx); + msgb_talloc_ctx_init(tall_bts_ctx, 0); bts_log_init(NULL); osmo_stderr_target->categories[DHO].loglevel = LOGL_DEBUG; diff --git a/tests/paging/paging_test.c b/tests/paging/paging_test.c index de839e4..1d5f216 100644 --- a/tests/paging/paging_test.c +++ b/tests/paging/paging_test.c @@ -112,11 +112,8 @@ int main(int argc, char **argv) { - void *tall_msgb_ctx; - tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context"); - tall_msgb_ctx = talloc_named_const(tall_bts_ctx, 1, "msgb"); - msgb_set_talloc_ctx(tall_msgb_ctx); + msgb_talloc_ctx_init(tall_bts_ctx, 0); bts_log_init(NULL); -- To view, visit https://gerrit.osmocom.org/1055 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I31d62d5e1f0b272985fdef5013270d385c4b988a Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts 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 Fri Oct 14 11:40:24 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 14 Oct 2016 11:40:24 +0000 Subject: [PATCH] openggsn[master]: Only send TRAP for defined PDP peer Message-ID: Review at https://gerrit.osmocom.org/1065 Only send TRAP for defined PDP peer Do not attempt to send TRAP message on PDP context deletion if peer is unknown. Change-Id: I5e02c1d42bb7aaf1ef81a9824aab7b12047cdd3e Fixes: Coverity CID 150135 --- M ggsn/ggsn.c 1 file changed, 7 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openggsn refs/changes/65/1065/1 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 9609d52..be408b3 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -138,10 +138,14 @@ DEBUGP(DGGSN, "Deleting PDP context\n"); struct ippoolm_t *member = pdp->peer; char v[NAMESIZE]; - snprintf(v, sizeof(v), "%" PRIu64 ",%s", pdp->imsi, inet_ntoa(member->addr)); - if (pdp->peer) + + if (pdp->peer) { + snprintf(v, sizeof(v), "%" PRIu64 ",%s", pdp->imsi, + inet_ntoa(member->addr)); + if (ctrl_cmd_send_trap(gsn->ctrl, "imsi-rem-ip", v) < 0) + LOGP(DGGSN, LOGL_ERROR, "Trap creation failed.\n"); ippool_freeip(ippool, (struct ippoolm_t *)pdp->peer); - else + } else SYS_ERR(DGGSN, LOGL_ERROR, 0, "Peer not defined!"); if (gtp_kernel_tunnel_del(pdp)) { @@ -149,9 +153,6 @@ "Cannot delete tunnel from kernel: %s\n", strerror(errno)); } -/* FIXME: naming? */ - if (ctrl_cmd_send_trap(gsn->ctrl, "imsi-rem-ip", v) < 0) - LOGP(DGGSN, LOGL_ERROR, "Trap creation failed.\n"); return 0; } -- To view, visit https://gerrit.osmocom.org/1065 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5e02c1d42bb7aaf1ef81a9824aab7b12047cdd3e Gerrit-PatchSet: 1 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Oct 14 11:51:13 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 14 Oct 2016 11:51:13 +0000 Subject: osmo-bts[master]: DTX AMR - fix buffer length check In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/1064/1/src/common/msg_utils.c File src/common/msg_utils.c: Line 122: memcpy(lchan->tch.dtx.cache + amr, l1_payload, copy_len); I don't think this is a fix yet. dtx.cache is 20 bytes long, and you are writing max 20 bytes, but at index cache[amr]. Maybe this? copy_len = OSMO_MIN(length + 1, ARRAY_SIZE(lchan->tch.dtx.cache) - amr); -- To view, visit https://gerrit.osmocom.org/1064 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2fbc468caedf08f26893457db7c7fbacef5b860c Gerrit-PatchSet: 1 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 Fri Oct 14 11:53:58 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 14 Oct 2016 11:53:58 +0000 Subject: [PATCH] osmo-bts[master]: Fix AGCH/PCH proportional static allocation 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/1047 to look at the new patch set (#4). Fix AGCH/PCH proportional static allocation Do not assume that 1 == BS_AG_BLKS_RES but take that information from SI3. Note: this implements static variant - changing BS_AG_BLKS_RES on OpenBSC side will not affect BTS after initial value has been acquired. Change-Id: Ib9e0705234ef53d2c70bea6b6dd542176e58145d Related: OS#1575 --- M include/osmo-bts/bts.h M src/common/l1sap.c M src/common/paging.c M src/common/sysinfo.c M src/osmo-bts-litecell15/l1_if.c M src/osmo-bts-litecell15/oml.c M src/osmo-bts-octphy/l1_if.c M src/osmo-bts-sysmo/l1_if.c M src/osmo-bts-sysmo/oml.c 9 files changed, 24 insertions(+), 50 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/47/1047/4 diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h index ec58edd..1e4ace8 100644 --- a/include/osmo-bts/bts.h +++ b/include/osmo-bts/bts.h @@ -36,7 +36,7 @@ int lchan_init_lapdm(struct gsm_lchan *lchan); void load_timer_start(struct gsm_bts *bts); - +uint8_t num_agch(struct gsm_bts_trx *trx); void bts_update_status(enum bts_global_status which, int on); int trx_ms_pwr_ctrl_is_osmo(struct gsm_bts_trx *trx); diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 0b9930e..12870fb 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -205,7 +205,8 @@ /* send primitive as gsmtap */ static int gsmtap_ph_data(struct osmo_phsap_prim *l1sap, uint8_t *chan_type, - uint8_t *ss, uint32_t fn, uint8_t **data, int *len) + uint8_t *ss, uint32_t fn, uint8_t **data, int *len, + uint8_t num_agch) { struct msgb *msg = l1sap->oph.msg; uint8_t chan_nr, link_id; @@ -229,10 +230,9 @@ } else if (L1SAP_IS_CHAN_BCCH(chan_nr)) { *chan_type = GSMTAP_CHANNEL_BCCH; } else if (L1SAP_IS_CHAN_AGCH_PCH(chan_nr)) { -#warning Set BS_AG_BLKS_RES /* The sapi depends on DSP configuration, not * on the actual SYSTEM INFORMATION 3. */ - if (L1SAP_FN2CCCHBLOCK(fn) >= 1) + if (L1SAP_FN2CCCHBLOCK(fn) >= num_agch) *chan_type = GSMTAP_CHANNEL_PCH; else *chan_type = GSMTAP_CHANNEL_AGCH; @@ -312,7 +312,7 @@ &len); else rc = gsmtap_ph_data(l1sap, &chan_type, &ss, fn, &data, - &len); + &len, num_agch(trx)); break; case OSMO_PRIM(PRIM_PH_RACH, PRIM_OP_INDICATION): rc = gsmtap_ph_rach(l1sap, &chan_type, &tn, &ss, &fn, &data, @@ -617,10 +617,8 @@ } } else if (L1SAP_IS_CHAN_AGCH_PCH(chan_nr)) { p = msgb_put(msg, GSM_MACBLOCK_LEN); -#warning "TODO: Yet another assumption that BS_AG_BLKS_RES=1" - /* if CCCH block is 0, it is AGCH */ rc = bts_ccch_copy_msg(trx->bts, p, &g_time, - (L1SAP_FN2CCCHBLOCK(fn) < 1)); + (L1SAP_FN2CCCHBLOCK(fn) < num_agch(trx))); if (rc <= 0) memcpy(p, fill_frame, GSM_MACBLOCK_LEN); } diff --git a/src/common/paging.c b/src/common/paging.c index f75f12d..957d609 100644 --- a/src/common/paging.c +++ b/src/common/paging.c @@ -538,12 +538,6 @@ struct paging_state *ps = btsb->paging_state; struct gsm48_system_information_type_3 *si3 = (void *) bts->si_buf[SYSINFO_TYPE_3]; -#warning "TODO: Remove this when setting u8NbrOfAgch is implemented properly" - if (si3->control_channel_desc.bs_ag_blks_res != 1) - LOGP(DPAG, LOGL_ERROR, - "Paging: BS_AG_BLKS_RES = %d != 1 not fully supported\n", - si3->control_channel_desc.bs_ag_blks_res); - paging_si_update(ps, &si3->control_channel_desc); } return 0; diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c index ee42da2..9ab0971 100644 --- a/src/common/sysinfo.c +++ b/src/common/sysinfo.c @@ -22,6 +22,7 @@ #include #include +#include #include #define BTS_HAS_SI(bts, sinum) ((bts)->si_valid & (1 << sinum)) @@ -132,6 +133,19 @@ return NULL; } +uint8_t num_agch(struct gsm_bts_trx *trx) +{ + struct gsm_bts *b = trx->bts; + struct gsm48_system_information_type_3 *si3; + if (BTS_HAS_SI(b, SYSINFO_TYPE_3)) { + si3 = GSM_BTS_SI(b, SYSINFO_TYPE_3); + return si3->control_channel_desc.bs_ag_blks_res; + } + LOGP(DL1P, LOGL_NOTICE, "Unable to determine actual BS_AG_BLKS_RES" + "value as SI3 is not available yet, fallback to 1\n"); + return 1; +} + uint8_t *lchan_sacch_get(struct gsm_lchan *lchan) { uint32_t tmp; diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index f47634e..af50343 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -1107,22 +1107,6 @@ return l1if_handle_ind(fl1h, msg); } -#if 0 -/* called by RSL if the BCCH SI has been modified */ -int sysinfo_has_changed(struct gsm_bts *bts, int si) -{ - /* FIXME: Determine BS_AG_BLKS_RES and - * * set cfgParams.u.agch.u8NbrOfAgch - * * determine implications on paging - */ - /* FIXME: Check for Extended BCCH presence */ - /* FIXME: Check for CCCH_CONF */ - /* FIXME: Check for BS_PA_MFRMS: update paging */ - - return 0; -} -#endif - static int activate_rf_compl_cb(struct gsm_bts_trx *trx, struct msgb *resp, void *data) { diff --git a/src/osmo-bts-litecell15/oml.c b/src/osmo-bts-litecell15/oml.c index 634c236..8fdf136 100644 --- a/src/osmo-bts-litecell15/oml.c +++ b/src/osmo-bts-litecell15/oml.c @@ -1024,8 +1024,7 @@ lch_par->rach.u8Bsic = lchan->ts->trx->bts->bsic; break; case GsmL1_Sapi_Agch: -#warning Set BS_AG_BLKS_RES - lch_par->agch.u8NbrOfAgch = 1; + lch_par->agch.u8NbrOfAgch = num_agch(lchan->ts->trx); break; case GsmL1_Sapi_TchH: case GsmL1_Sapi_TchF: diff --git a/src/osmo-bts-octphy/l1_if.c b/src/osmo-bts-octphy/l1_if.c index c4105ac..2f28cd6 100644 --- a/src/osmo-bts-octphy/l1_if.c +++ b/src/osmo-bts-octphy/l1_if.c @@ -487,6 +487,8 @@ sapi = cOCTVC1_GSM_SAPI_ENUM_BCCH; } else if (L1SAP_IS_CHAN_AGCH_PCH(chan_nr)) { #warning Set BS_AG_BLKS_RES + /* FIXME: how does octphy differentiate between AGCH and PCH? + How to supply num_of_agch properly? */ sapi = cOCTVC1_GSM_SAPI_ENUM_PCH_AGCH; } else { LOGP(DL1C, LOGL_NOTICE, "unknown prim %d op %d " diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index bef2d30..8ae2ff5 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -1132,22 +1132,6 @@ return l1if_handle_ind(fl1h, msg); } -#if 0 -/* called by RSL if the BCCH SI has been modified */ -int sysinfo_has_changed(struct gsm_bts *bts, int si) -{ - /* FIXME: Determine BS_AG_BLKS_RES and - * * set cfgParams.u.agch.u8NbrOfAgch - * * determine implications on paging - */ - /* FIXME: Check for Extended BCCH presence */ - /* FIXME: Check for CCCH_CONF */ - /* FIXME: Check for BS_PA_MFRMS: update paging */ - - return 0; -} -#endif - static int activate_rf_compl_cb(struct gsm_bts_trx *trx, struct msgb *resp, void *data) { diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c index c1f1e0b..e7e7690 100644 --- a/src/osmo-bts-sysmo/oml.c +++ b/src/osmo-bts-sysmo/oml.c @@ -1039,8 +1039,7 @@ lch_par->rach.u8Bsic = lchan->ts->trx->bts->bsic; break; case GsmL1_Sapi_Agch: -#warning Set BS_AG_BLKS_RES - lch_par->agch.u8NbrOfAgch = 1; + lch_par->agch.u8NbrOfAgch = num_agch(lchan->ts->trx); break; case GsmL1_Sapi_TchH: case GsmL1_Sapi_TchF: -- To view, visit https://gerrit.osmocom.org/1047 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib9e0705234ef53d2c70bea6b6dd542176e58145d Gerrit-PatchSet: 4 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 Oct 14 11:58:02 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 14 Oct 2016 11:58:02 +0000 Subject: [PATCH] osmo-bts[master]: DTX AMR - fix buffer length check 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/1064 to look at the new patch set (#2). DTX AMR - fix buffer length check Consider AMR-specific prefix in computing max length to avoid triggering coverity check. Change-Id: I2fbc468caedf08f26893457db7c7fbacef5b860c Fixes: Coverity CID 150133 --- M src/common/msg_utils.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/64/1064/2 diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 9743530..393ae90 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -112,7 +112,8 @@ size_t length, uint32_t fn, int update) { size_t amr = (update < 0) ? 0 : 2, - copy_len = OSMO_MIN(length + 1, ARRAY_SIZE(lchan->tch.dtx.cache)); + copy_len = OSMO_MIN(length + 1, + ARRAY_SIZE(lchan->tch.dtx.cache) - amr); lchan->tch.dtx.len = copy_len + amr; lchan->tch.dtx.fn = fn; -- To view, visit https://gerrit.osmocom.org/1064 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2fbc468caedf08f26893457db7c7fbacef5b860c Gerrit-PatchSet: 2 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 Oct 14 12:04:48 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 14 Oct 2016 12:04:48 +0000 Subject: osmo-pcu[master]: EGPRS: Add EPDAN CRBB Tree based decoding In-Reply-To: References: Message-ID: Patch Set 28: Code-Review+1 (1 comment) So you've chosen to go on for one more cycle ;) https://gerrit.osmocom.org/#/c/416/28/src/egprs_rlc_compression.cpp File src/egprs_rlc_compression.cpp: Line 297: * as described in section 9.1.10 of 3gpp 44.060. As before, please use the 80 characters width of space! Please check your sentences, here you end with a period in the middle of a sentence! '3GPP' in capital letters. It is a bit odd that I seem to write the changes as comments for you to apply them 1:1, but a nice fit including some indent would be * \param start[in] Starting Color Code, true if bitmap starts with a run * length of ones, false if zeros; see 9.1.10, 3GPP 44.060. -- To view, visit https://gerrit.osmocom.org/416 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieae1992ed4b02bb1e09eec2d3de1a030eabd16ce Gerrit-PatchSet: 28 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: pravin Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: pravin Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Oct 14 12:05:30 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Fri, 14 Oct 2016 12:05:30 +0000 Subject: [PATCH] openbsc[master]: fix mistypes, spaces and tabs In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/792 to look at the new patch set (#2). fix mistypes, spaces and tabs Change-Id: I651473f638365bbd333c4c80d223cdd023dd2c51 --- M openbsc/src/libbsc/chan_alloc.c M openbsc/src/libmsc/gsm_04_08.c M openbsc/src/libmsc/mncc_builtin.c 3 files changed, 17 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/92/792/2 diff --git a/openbsc/src/libbsc/chan_alloc.c b/openbsc/src/libbsc/chan_alloc.c index 7b0c3e6..367139c 100644 --- a/openbsc/src/libbsc/chan_alloc.c +++ b/openbsc/src/libbsc/chan_alloc.c @@ -303,7 +303,7 @@ } break; case GSM_LCHAN_TCH_H: - lchan =_lc_find_bts(bts, GSM_PCHAN_TCH_H); + lchan = _lc_find_bts(bts, GSM_PCHAN_TCH_H); /* If we don't have TCH/H available, fall-back to TCH/F */ if (!lchan) { lchan = _lc_find_bts(bts, GSM_PCHAN_TCH_F); diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index be1b260..a22e3c2 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -464,7 +464,7 @@ LOGP(DMM, LOGL_ERROR, "Failed to create msg for LOCATION UPDATING REJECT.\n"); return -1; } - + msg->lchan = conn->lchan; LOGP(DMM, LOGL_INFO, "Subscriber %s: LOCATION UPDATING REJECT " @@ -481,7 +481,7 @@ struct gsm48_hdr *gh; struct gsm48_loc_area_id *lai; uint8_t *mid; - + msg->lchan = conn->lchan; gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); @@ -693,7 +693,7 @@ /* no sim card... FIXME: what to do ? */ DEBUGPC(DMM, "unimplemented mobile identity type\n"); break; - default: + default: DEBUGPC(DMM, "unknown mobile identity type\n"); break; } @@ -1075,7 +1075,7 @@ /* no sim card... FIXME: what to do ? */ DEBUGPC(DMM, ": unimplemented mobile identity type\n"); break; - default: + default: DEBUGPC(DMM, ": unknown mobile identity type\n"); break; } @@ -1249,7 +1249,7 @@ apdu_id_flags = gh->data[0]; apdu_len = gh->data[1]; apdu_data = gh->data+2; - + DEBUGP(DRR, "RX APPLICATION INFO id/flags=0x%02x apdu_len=%u apdu=%s", apdu_id_flags, apdu_len, osmo_hexdump(apdu_data, apdu_len)); @@ -1285,10 +1285,10 @@ struct gsm48_hdr *gh; msg->lchan = conn->lchan; - + DEBUGP(DRR, "TX APPLICATION INFO id=0x%02x, len=%u\n", apdu_id, apdu_len); - + gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh) + 2 + apdu_len); gh->proto_discr = GSM48_PDISC_RR; gh->msg_type = GSM48_MT_RR_APP_INFO; @@ -1419,7 +1419,7 @@ "Sending '%s' to MNCC.\n", get_mncc_name(msg_type)); mncc->msg_type = msg_type; - + msg = msgb_alloc(sizeof(struct gsm_mncc), "MNCC"); if (!msg) return -ENOMEM; @@ -2061,7 +2061,7 @@ trans_free(trans); return rc; } - + /* Get free transaction_id */ trans_id = trans_assign_trans_id(trans->net, trans->subscr, GSM48_PDISC_CC, 0); @@ -2104,7 +2104,7 @@ /* signal */ if (setup->fields & MNCC_F_SIGNAL) gsm48_encode_signal(msg, setup->signal); - + new_cc_state(trans, GSM_CSTATE_CALL_PRESENT); rate_ctr_inc(&trans->net->msc_ctrs->ctr[MSC_CTR_CALL_MT_SETUP]); @@ -2192,7 +2192,7 @@ unsigned int payload_len = msgb_l3len(msg) - sizeof(*gh); struct tlv_parsed tp; struct gsm_mncc alerting; - + gsm48_stop_cc_timer(trans); gsm48_start_cc_timer(trans, 0x301, GSM48_T301); @@ -2244,7 +2244,7 @@ gsm48_encode_useruser(msg, 0, &alerting->useruser); new_cc_state(trans, GSM_CSTATE_CALL_DELIVERED); - + return gsm48_conn_sendmsg(msg, trans->conn, trans); } @@ -2347,7 +2347,7 @@ new_cc_state(trans, GSM_CSTATE_ACTIVE); rate_ctr_inc(&trans->net->msc_ctrs->ctr[MSC_CTR_CALL_MO_CONNECT_ACK]); - + memset(&connect_ack, 0, sizeof(struct gsm_mncc)); connect_ack.callref = trans->callref; @@ -2611,7 +2611,7 @@ gh->msg_type = GSM48_MT_CC_RELEASE_COMPL; trans->callref = 0; - + gsm48_stop_cc_timer(trans); /* cause */ @@ -3697,7 +3697,7 @@ LOGP(DRLL, LOGL_DEBUG, "Dispatching 04.08 message, pdisc=%d\n", pdisc); if (silent_call_reroute(conn, msg)) return silent_call_rx(conn, msg); - + switch (pdisc) { case GSM48_PDISC_CC: release_anchor(conn); diff --git a/openbsc/src/libmsc/mncc_builtin.c b/openbsc/src/libmsc/mncc_builtin.c index ee98d2d..716cfe0 100644 --- a/openbsc/src/libmsc/mncc_builtin.c +++ b/openbsc/src/libmsc/mncc_builtin.c @@ -1,6 +1,5 @@ /* mncc_builtin.c - default, minimal built-in MNCC Application for - * standalone bsc_hack (netowrk-in-the-box mode) */ - + * standalone bsc_hack (network-in-the-box mode) */ /* (C) 2008-2010 by Harald Welte * (C) 2009 by Andreas Eversberg * All Rights Reserved -- To view, visit https://gerrit.osmocom.org/792 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I651473f638365bbd333c4c80d223cdd023dd2c51 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Fri Oct 14 12:16:02 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 14 Oct 2016 12:16:02 +0000 Subject: osmo-pcu[master]: tbf: add llc_queue_size() to check llc_queue is valid before... In-Reply-To: References: Message-ID: Patch Set 1: > I agree, but that would be another commit. from the API it would make sense to have it in the same commit; I think so because the new function should be *the* way to get the size that all callers should use, other ways should be disallowed. The patch has been around for pretty long, it's hardly any effort to do it properly. Why not just take the minute and be done with it :) -- if you like I can do it, too -- To view, visit https://gerrit.osmocom.org/724 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I88cc3180f8f86785e3f07981895dabddf50b60a2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Oct 14 12:20:10 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 14 Oct 2016 12:20:10 +0000 Subject: openbsc[master]: fix mistypes, spaces and tabs In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/792/2/openbsc/src/libmsc/mncc_builtin.c File openbsc/src/libmsc/mncc_builtin.c: Line 2: * standalone bsc_hack (network-in-the-box mode) */ we do have a lot of .h files with this kind of header comment, including a blank line between the file description and the copyright comment block. So I'd actually keep the blank line here. I think I'll just do it in gerrit here. -- To view, visit https://gerrit.osmocom.org/792 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I651473f638365bbd333c4c80d223cdd023dd2c51 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Oct 14 12:20:44 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 14 Oct 2016 12:20:44 +0000 Subject: [PATCH] openbsc[master]: fix mistypes, spaces and tabs In-Reply-To: References: Message-ID: Hello lynxis lazus, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/792 to look at the new patch set (#3). fix mistypes, spaces and tabs Change-Id: I651473f638365bbd333c4c80d223cdd023dd2c51 --- M openbsc/src/libbsc/chan_alloc.c M openbsc/src/libmsc/gsm_04_08.c M openbsc/src/libmsc/mncc_builtin.c 3 files changed, 17 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/92/792/3 diff --git a/openbsc/src/libbsc/chan_alloc.c b/openbsc/src/libbsc/chan_alloc.c index 7b0c3e6..367139c 100644 --- a/openbsc/src/libbsc/chan_alloc.c +++ b/openbsc/src/libbsc/chan_alloc.c @@ -303,7 +303,7 @@ } break; case GSM_LCHAN_TCH_H: - lchan =_lc_find_bts(bts, GSM_PCHAN_TCH_H); + lchan = _lc_find_bts(bts, GSM_PCHAN_TCH_H); /* If we don't have TCH/H available, fall-back to TCH/F */ if (!lchan) { lchan = _lc_find_bts(bts, GSM_PCHAN_TCH_F); diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index be1b260..a22e3c2 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -464,7 +464,7 @@ LOGP(DMM, LOGL_ERROR, "Failed to create msg for LOCATION UPDATING REJECT.\n"); return -1; } - + msg->lchan = conn->lchan; LOGP(DMM, LOGL_INFO, "Subscriber %s: LOCATION UPDATING REJECT " @@ -481,7 +481,7 @@ struct gsm48_hdr *gh; struct gsm48_loc_area_id *lai; uint8_t *mid; - + msg->lchan = conn->lchan; gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); @@ -693,7 +693,7 @@ /* no sim card... FIXME: what to do ? */ DEBUGPC(DMM, "unimplemented mobile identity type\n"); break; - default: + default: DEBUGPC(DMM, "unknown mobile identity type\n"); break; } @@ -1075,7 +1075,7 @@ /* no sim card... FIXME: what to do ? */ DEBUGPC(DMM, ": unimplemented mobile identity type\n"); break; - default: + default: DEBUGPC(DMM, ": unknown mobile identity type\n"); break; } @@ -1249,7 +1249,7 @@ apdu_id_flags = gh->data[0]; apdu_len = gh->data[1]; apdu_data = gh->data+2; - + DEBUGP(DRR, "RX APPLICATION INFO id/flags=0x%02x apdu_len=%u apdu=%s", apdu_id_flags, apdu_len, osmo_hexdump(apdu_data, apdu_len)); @@ -1285,10 +1285,10 @@ struct gsm48_hdr *gh; msg->lchan = conn->lchan; - + DEBUGP(DRR, "TX APPLICATION INFO id=0x%02x, len=%u\n", apdu_id, apdu_len); - + gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh) + 2 + apdu_len); gh->proto_discr = GSM48_PDISC_RR; gh->msg_type = GSM48_MT_RR_APP_INFO; @@ -1419,7 +1419,7 @@ "Sending '%s' to MNCC.\n", get_mncc_name(msg_type)); mncc->msg_type = msg_type; - + msg = msgb_alloc(sizeof(struct gsm_mncc), "MNCC"); if (!msg) return -ENOMEM; @@ -2061,7 +2061,7 @@ trans_free(trans); return rc; } - + /* Get free transaction_id */ trans_id = trans_assign_trans_id(trans->net, trans->subscr, GSM48_PDISC_CC, 0); @@ -2104,7 +2104,7 @@ /* signal */ if (setup->fields & MNCC_F_SIGNAL) gsm48_encode_signal(msg, setup->signal); - + new_cc_state(trans, GSM_CSTATE_CALL_PRESENT); rate_ctr_inc(&trans->net->msc_ctrs->ctr[MSC_CTR_CALL_MT_SETUP]); @@ -2192,7 +2192,7 @@ unsigned int payload_len = msgb_l3len(msg) - sizeof(*gh); struct tlv_parsed tp; struct gsm_mncc alerting; - + gsm48_stop_cc_timer(trans); gsm48_start_cc_timer(trans, 0x301, GSM48_T301); @@ -2244,7 +2244,7 @@ gsm48_encode_useruser(msg, 0, &alerting->useruser); new_cc_state(trans, GSM_CSTATE_CALL_DELIVERED); - + return gsm48_conn_sendmsg(msg, trans->conn, trans); } @@ -2347,7 +2347,7 @@ new_cc_state(trans, GSM_CSTATE_ACTIVE); rate_ctr_inc(&trans->net->msc_ctrs->ctr[MSC_CTR_CALL_MO_CONNECT_ACK]); - + memset(&connect_ack, 0, sizeof(struct gsm_mncc)); connect_ack.callref = trans->callref; @@ -2611,7 +2611,7 @@ gh->msg_type = GSM48_MT_CC_RELEASE_COMPL; trans->callref = 0; - + gsm48_stop_cc_timer(trans); /* cause */ @@ -3697,7 +3697,7 @@ LOGP(DRLL, LOGL_DEBUG, "Dispatching 04.08 message, pdisc=%d\n", pdisc); if (silent_call_reroute(conn, msg)) return silent_call_rx(conn, msg); - + switch (pdisc) { case GSM48_PDISC_CC: release_anchor(conn); diff --git a/openbsc/src/libmsc/mncc_builtin.c b/openbsc/src/libmsc/mncc_builtin.c index ee98d2d..9b25ede 100644 --- a/openbsc/src/libmsc/mncc_builtin.c +++ b/openbsc/src/libmsc/mncc_builtin.c @@ -1,5 +1,5 @@ /* mncc_builtin.c - default, minimal built-in MNCC Application for - * standalone bsc_hack (netowrk-in-the-box mode) */ + * standalone bsc_hack (network-in-the-box mode) */ /* (C) 2008-2010 by Harald Welte * (C) 2009 by Andreas Eversberg -- To view, visit https://gerrit.osmocom.org/792 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I651473f638365bbd333c4c80d223cdd023dd2c51 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Fri Oct 14 12:20:58 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 14 Oct 2016 12:20:58 +0000 Subject: openbsc[master]: fix mistypes, spaces and tabs In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/792 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I651473f638365bbd333c4c80d223cdd023dd2c51 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Oct 14 12:24:24 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 14 Oct 2016 12:24:24 +0000 Subject: osmo-bts[master]: DTX AMR - fix buffer length check In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/1064/2/src/common/msg_utils.c File src/common/msg_utils.c: Line 116: ARRAY_SIZE(lchan->tch.dtx.cache) - amr); curiosity: what happens if less than length + 1 are written? Does data get lost? Is that supposed to never happen? -- To view, visit https://gerrit.osmocom.org/1064 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2fbc468caedf08f26893457db7c7fbacef5b860c 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 Fri Oct 14 12:28:03 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Fri, 14 Oct 2016 12:28:03 +0000 Subject: [PATCH] openbsc[master]: bsc: count the usage of codec by setting the lchan active Message-ID: Review at https://gerrit.osmocom.org/1066 bsc: count the usage of codec by setting the lchan active We count the codec when the channel was successful setted up Using sign_link->trx->bts instead of msg->trx to get the bts. Add OSMO_ASSERT for bts within count_codecs() Change-Id: Ib49c7c337980a7d6f189d7a0551ca2e4c3822f45 --- M openbsc/include/openbsc/gsm_data.h M openbsc/src/libbsc/abis_rsl.c 2 files changed, 47 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/66/1066/1 diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index c7e2347..70c08c3 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -168,6 +168,11 @@ BSC_CTR_CHAN_RLL_ERR, BSC_CTR_BTS_OML_FAIL, BSC_CTR_BTS_RSL_FAIL, + BSC_CTR_CODEC_AMR_F, + BSC_CTR_CODEC_AMR_H, + BSC_CTR_CODEC_EFR, + BSC_CTR_CODEC_V1_FR, + BSC_CTR_CODEC_V1_HR, }; static const struct rate_ctr_desc bsc_ctr_description[] = { @@ -186,6 +191,11 @@ [BSC_CTR_CHAN_RLL_ERR] = {"chan.rll_err", "Received a RLL failure with T200 cause from BTS."}, [BSC_CTR_BTS_OML_FAIL] = {"bts.oml_fail", "Received a TEI down on a OML link."}, [BSC_CTR_BTS_RSL_FAIL] = {"bts.rsl_fail", "Received a TEI down on a OML link."}, + [BSC_CTR_CODEC_AMR_F] = {"bts.codec_amr_f", "Count the usage of AMR/F codec by channel mode requested."}, + [BSC_CTR_CODEC_AMR_H] = {"bts.codec_amr_h", "Count the usage of AMR/H codec by channel mode requested."}, + [BSC_CTR_CODEC_EFR] = {"bts.codec_efr", "Count the usage of EFR codec by channel mode requested."}, + [BSC_CTR_CODEC_V1_FR] = {"bts.codec_fr", "Count the usage of FR codec by channel mode requested."}, + [BSC_CTR_CODEC_V1_HR] = {"bts.codec_hr", "Count the usage of HR codec by channel mode requested."}, }; enum { diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c index 316fc3f..9656961 100644 --- a/openbsc/src/libbsc/abis_rsl.c +++ b/openbsc/src/libbsc/abis_rsl.c @@ -82,6 +82,41 @@ lchan_free(lchan); } +static void count_codecs(struct gsm_bts *bts, struct gsm_lchan *lchan) +{ + OSMO_ASSERT(bts); + + if (lchan->type == GSM_LCHAN_TCH_H) { + switch (lchan->tch_mode) { + case GSM48_CMODE_SPEECH_AMR: + rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_AMR_H]); + break; + case GSM48_CMODE_SPEECH_V1: + rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_V1_HR]); + break; + default: + break; + } + } else if (lchan->type == GSM_LCHAN_TCH_F) { + switch (lchan->tch_mode) { + case GSM48_CMODE_SPEECH_AMR: + rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_AMR_F]); + break; + case GSM48_CMODE_SPEECH_V1: + rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_V1_FR]); + break; + case GSM48_CMODE_SPEECH_EFR: + rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_EFR]); + break; + default: + break; + } + } else { + LOGP(DRSL, LOGL_ERROR, "count_codecs unknown lchan->type %x on channel %s\n", + lchan->type, gsm_ts_and_pchan_name(lchan->ts)); + } +} + static uint8_t mdisc_by_msgtype(uint8_t msg_type) { /* mask off the transparent bit ? */ @@ -1464,6 +1499,7 @@ case RSL_MT_CHAN_ACTIV_ACK: DEBUGP(DRSL, "%s CHANNEL ACTIVATE ACK\n", ts_name); rc = rsl_rx_chan_act_ack(msg); + count_codecs(sign_link->trx->bts, msg->lchan); break; case RSL_MT_CHAN_ACTIV_NACK: rc = rsl_rx_chan_act_nack(msg); @@ -1481,6 +1517,7 @@ rc = rsl_rx_rf_chan_rel_ack(msg->lchan); break; case RSL_MT_MODE_MODIFY_ACK: + count_codecs(sign_link->trx->bts, msg->lchan); DEBUGP(DRSL, "%s CHANNEL MODE MODIFY ACK\n", ts_name); break; case RSL_MT_MODE_MODIFY_NACK: -- To view, visit https://gerrit.osmocom.org/1066 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib49c7c337980a7d6f189d7a0551ca2e4c3822f45 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Fri Oct 14 12:29:09 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Fri, 14 Oct 2016 12:29:09 +0000 Subject: openbsc[master]: bsc: count the usage of codec by setting the lchan active In-Reply-To: References: Message-ID: Patch Set 1: in reply to the revert of https://gerrit.osmocom.org/#/c/794/ -- To view, visit https://gerrit.osmocom.org/1066 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib49c7c337980a7d6f189d7a0551ca2e4c3822f45 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Oct 14 13:18:22 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 14 Oct 2016 13:18:22 +0000 Subject: [PATCH] osmo-trx[master]: add contrib/jenkins.sh, for gerrit build bot Message-ID: Review at https://gerrit.osmocom.org/1067 add contrib/jenkins.sh, for gerrit build bot Change-Id: If8887525b0062090e9445a35e32b03e3b8e7eede --- A contrib/jenkins.sh 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/67/1067/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh new file mode 100755 index 0000000..e8714f9 --- /dev/null +++ b/contrib/jenkins.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +set -ex +autoreconf --install --force +./configure +$MAKE $PARALLEL_MAKE +$MAKE check \ + || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/1067 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If8887525b0062090e9445a35e32b03e3b8e7eede Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 14 14:11:47 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 14 Oct 2016 14:11:47 +0000 Subject: osmo-bts[master]: DTX AMR - fix buffer length check In-Reply-To: References: Message-ID: Patch Set 2: As length of RTP packet payload and L1-specific data is fixed, this indeed not supposed to happen unless smth goes horribly wrong in some other place. -- To view, visit https://gerrit.osmocom.org/1064 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2fbc468caedf08f26893457db7c7fbacef5b860c Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts 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 Fri Oct 14 14:28:41 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Fri, 14 Oct 2016 14:28:41 +0000 Subject: openbsc[master]: bsc: count the usage of codec by setting the lchan active In-Reply-To: References: Message-ID: Patch Set 1: not yet tested. -- To view, visit https://gerrit.osmocom.org/1066 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib49c7c337980a7d6f189d7a0551ca2e4c3822f45 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Oct 14 15:36:48 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 14 Oct 2016 15:36:48 +0000 Subject: [ABANDON] osmo-bts[master]: Fix AGCH/PCH proportional static allocation In-Reply-To: References: Message-ID: Max has abandoned this change. Change subject: Fix AGCH/PCH proportional static allocation ...................................................................... Abandoned Needs more testing -- To view, visit https://gerrit.osmocom.org/1047 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ib9e0705234ef53d2c70bea6b6dd542176e58145d Gerrit-PatchSet: 5 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 Oct 14 15:39:59 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Fri, 14 Oct 2016 15:39:59 +0000 Subject: [PATCH] libosmocore[master]: vty/show asciidoc: add version info line Message-ID: Review at https://gerrit.osmocom.org/1068 vty/show asciidoc: add version info line Change-Id: Ie0f1b3894361c58386da9defb225979fa0ee6a18 --- M src/vty/stats_vty.c 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/68/1068/1 diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c index 59befd2..b0e0f50 100644 --- a/src/vty/stats_vty.c +++ b/src/vty/stats_vty.c @@ -41,6 +41,9 @@ #define SHOW_STATS_STR "Show statistical values\n" +/* containing version info */ +extern struct host host; + struct cmd_node cfg_stats_node = { CFG_STATS_NODE, "%s(config-stats)# ", @@ -484,6 +487,10 @@ "show asciidoc counters", SHOW_STR "Asciidoc generation\n" "Generate table of all registered counters\n") { + vty_out(vty, "// show asciidoc counters%s", VTY_NEWLINE); + vty_out(vty, "// %s %s (%s).%s", host.app_info->name, + host.app_info->version, + host.app_info->name ? host.app_info->name : "", VTY_NEWLINE); vty_out(vty, "// generating tables for rate_ctr_group%s", VTY_NEWLINE); rate_ctr_for_each_group(asciidoc_rate_ctr_group_handler, vty); -- To view, visit https://gerrit.osmocom.org/1068 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie0f1b3894361c58386da9defb225979fa0ee6a18 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Fri Oct 14 15:39:59 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Fri, 14 Oct 2016 15:39:59 +0000 Subject: [PATCH] libosmocore[master]: vty/show asciidoc: add [options=header] to every table header Message-ID: Review at https://gerrit.osmocom.org/1069 vty/show asciidoc: add [options=header] to every table header Change-Id: Ic84cf7448c88821e4e422561aaa7d8719573db84 --- M src/vty/stats_vty.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/69/1069/1 diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c index b0e0f50..ac28253 100644 --- a/src/vty/stats_vty.c +++ b/src/vty/stats_vty.c @@ -383,6 +383,7 @@ { vty_out(vty, "// ungrouped osmo_counters%s", VTY_NEWLINE); vty_out(vty, ".ungrouped osmo counters%s", VTY_NEWLINE); + vty_out(vty, "[options=\"header\"]%s", VTY_NEWLINE); vty_out(vty, "|===%s", VTY_NEWLINE); vty_out(vty, "| name | This document & | description%s", VTY_NEWLINE); osmo_counters_for_each(asciidoc_handle_counter, vty); @@ -423,6 +424,7 @@ vty_out(vty, "// rate_ctr_group table %s%s", group_description, VTY_NEWLINE); vty_out(vty, ".%s - %s %s", group_name_prefix, group_description, VTY_NEWLINE); + vty_out(vty, "[options=\"header\"]%s", VTY_NEWLINE); vty_out(vty, "|===%s", VTY_NEWLINE); vty_out(vty, "| name | This document & | description%s", VTY_NEWLINE); rate_ctr_for_each_counter(ctrg, asciidoc_rate_ctr_handler, sctx_); @@ -471,6 +473,7 @@ vty_out(vty, "// osmo_stat_item_group table %s%s", group_description ? group_description : "", VTY_NEWLINE); vty_out(vty, ".%s - %s %s", group_name_prefix, group_description ? group_description : "", VTY_NEWLINE); + vty_out(vty, "[options=\"header\"]%s", VTY_NEWLINE); vty_out(vty, "|===%s", VTY_NEWLINE); vty_out(vty, "| name | This document & | description | unit%s", VTY_NEWLINE); osmo_stat_item_for_each_item(statg, asciidoc_osmo_stat_item_handler, sctx_); -- To view, visit https://gerrit.osmocom.org/1069 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic84cf7448c88821e4e422561aaa7d8719573db84 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Fri Oct 14 15:39:59 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Fri, 14 Oct 2016 15:39:59 +0000 Subject: [PATCH] libosmocore[master]: vty/show asciidoc: rename reference field into "Reference" Message-ID: Review at https://gerrit.osmocom.org/1070 vty/show asciidoc: rename reference field into "Reference" Change-Id: I71c01d8497663bda8e5004d8dabd5cec4756ea6e --- M src/vty/stats_vty.c 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/70/1070/1 diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c index ac28253..f1a6811 100644 --- a/src/vty/stats_vty.c +++ b/src/vty/stats_vty.c @@ -385,7 +385,7 @@ vty_out(vty, ".ungrouped osmo counters%s", VTY_NEWLINE); vty_out(vty, "[options=\"header\"]%s", VTY_NEWLINE); vty_out(vty, "|===%s", VTY_NEWLINE); - vty_out(vty, "| name | This document & | description%s", VTY_NEWLINE); + vty_out(vty, "| name | Reference | description%s", VTY_NEWLINE); osmo_counters_for_each(asciidoc_handle_counter, vty); vty_out(vty, "|===%s", VTY_NEWLINE); } @@ -426,7 +426,7 @@ vty_out(vty, ".%s - %s %s", group_name_prefix, group_description, VTY_NEWLINE); vty_out(vty, "[options=\"header\"]%s", VTY_NEWLINE); vty_out(vty, "|===%s", VTY_NEWLINE); - vty_out(vty, "| name | This document & | description%s", VTY_NEWLINE); + vty_out(vty, "| name | Reference | description%s", VTY_NEWLINE); rate_ctr_for_each_counter(ctrg, asciidoc_rate_ctr_handler, sctx_); vty_out(vty, "|===%s", VTY_NEWLINE); @@ -446,7 +446,7 @@ char *group_name_prefix = osmo_asciidoc_escape(statg->desc->group_name_prefix); char *unit = osmo_asciidoc_escape(item->desc->unit); - /* | name | This document & | description | unit | */ + /* | name | Reference | description | unit | */ vty_out(vty, "| %s | <<%s_%s>> | %s | %s%s", name, group_name_prefix, @@ -475,7 +475,7 @@ vty_out(vty, ".%s - %s %s", group_name_prefix, group_description ? group_description : "", VTY_NEWLINE); vty_out(vty, "[options=\"header\"]%s", VTY_NEWLINE); vty_out(vty, "|===%s", VTY_NEWLINE); - vty_out(vty, "| name | This document & | description | unit%s", VTY_NEWLINE); + vty_out(vty, "| name | Reference | description | unit%s", VTY_NEWLINE); osmo_stat_item_for_each_item(statg, asciidoc_osmo_stat_item_handler, sctx_); vty_out(vty, "|===%s", VTY_NEWLINE); -- To view, visit https://gerrit.osmocom.org/1070 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I71c01d8497663bda8e5004d8dabd5cec4756ea6e Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Fri Oct 14 15:39:59 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Fri, 14 Oct 2016 15:39:59 +0000 Subject: [PATCH] libosmocore[master]: vty/show asciidoc: capilize table header field names Message-ID: Review at https://gerrit.osmocom.org/1071 vty/show asciidoc: capilize table header field names Change-Id: Id1cf5db84ab3c07613769e800a1b183eb8084563 --- M src/vty/stats_vty.c 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/71/1071/1 diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c index f1a6811..5a2001e 100644 --- a/src/vty/stats_vty.c +++ b/src/vty/stats_vty.c @@ -385,7 +385,7 @@ vty_out(vty, ".ungrouped osmo counters%s", VTY_NEWLINE); vty_out(vty, "[options=\"header\"]%s", VTY_NEWLINE); vty_out(vty, "|===%s", VTY_NEWLINE); - vty_out(vty, "| name | Reference | description%s", VTY_NEWLINE); + vty_out(vty, "| Name | Reference | Description%s", VTY_NEWLINE); osmo_counters_for_each(asciidoc_handle_counter, vty); vty_out(vty, "|===%s", VTY_NEWLINE); } @@ -399,7 +399,7 @@ char *description = osmo_asciidoc_escape(desc->description); char *group_name_prefix = osmo_asciidoc_escape(ctrg->desc->group_name_prefix); - /* | name | This document & | description | */ + /* | Name | This document & | Description | */ vty_out(vty, "| %s | <<%s_%s>> | %s%s", name, group_name_prefix, @@ -426,7 +426,7 @@ vty_out(vty, ".%s - %s %s", group_name_prefix, group_description, VTY_NEWLINE); vty_out(vty, "[options=\"header\"]%s", VTY_NEWLINE); vty_out(vty, "|===%s", VTY_NEWLINE); - vty_out(vty, "| name | Reference | description%s", VTY_NEWLINE); + vty_out(vty, "| Name | Reference | Description%s", VTY_NEWLINE); rate_ctr_for_each_counter(ctrg, asciidoc_rate_ctr_handler, sctx_); vty_out(vty, "|===%s", VTY_NEWLINE); @@ -446,7 +446,7 @@ char *group_name_prefix = osmo_asciidoc_escape(statg->desc->group_name_prefix); char *unit = osmo_asciidoc_escape(item->desc->unit); - /* | name | Reference | description | unit | */ + /* | Name | Reference | Description | Unit | */ vty_out(vty, "| %s | <<%s_%s>> | %s | %s%s", name, group_name_prefix, @@ -475,7 +475,7 @@ vty_out(vty, ".%s - %s %s", group_name_prefix, group_description ? group_description : "", VTY_NEWLINE); vty_out(vty, "[options=\"header\"]%s", VTY_NEWLINE); vty_out(vty, "|===%s", VTY_NEWLINE); - vty_out(vty, "| name | Reference | description | unit%s", VTY_NEWLINE); + vty_out(vty, "| Name | Reference | Description | Unit%s", VTY_NEWLINE); osmo_stat_item_for_each_item(statg, asciidoc_osmo_stat_item_handler, sctx_); vty_out(vty, "|===%s", VTY_NEWLINE); -- To view, visit https://gerrit.osmocom.org/1071 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id1cf5db84ab3c07613769e800a1b183eb8084563 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Fri Oct 14 15:39:59 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Fri, 14 Oct 2016 15:39:59 +0000 Subject: [PATCH] libosmocore[master]: vty/show asciidoc: add user readable description of the version Message-ID: Review at https://gerrit.osmocom.org/1072 vty/show asciidoc: add user readable description of the version Change-Id: Idc6f9bac5febac540f5be022065c53b798b46f04 --- M src/vty/stats_vty.c 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/72/1072/1 diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c index 5a2001e..dafb7d0 100644 --- a/src/vty/stats_vty.c +++ b/src/vty/stats_vty.c @@ -490,8 +490,9 @@ "show asciidoc counters", SHOW_STR "Asciidoc generation\n" "Generate table of all registered counters\n") { - vty_out(vty, "// show asciidoc counters%s", VTY_NEWLINE); - vty_out(vty, "// %s %s (%s).%s", host.app_info->name, + vty_out(vty, "// autogenerated by show asciidoc counters%s", VTY_NEWLINE); + vty_out(vty, "These counters and their description based on %s %s (%s).%s", + host.app_info->name, host.app_info->version, host.app_info->name ? host.app_info->name : "", VTY_NEWLINE); vty_out(vty, "// generating tables for rate_ctr_group%s", VTY_NEWLINE); -- To view, visit https://gerrit.osmocom.org/1072 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idc6f9bac5febac540f5be022065c53b798b46f04 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Fri Oct 14 15:41:37 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Fri, 14 Oct 2016 15:41:37 +0000 Subject: [PATCH] libosmocore[master]: vty/show asciidoc: add user readable description of the version In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1068 to look at the new patch set (#2). vty/show asciidoc: add user readable description of the version Change-Id: Ie0f1b3894361c58386da9defb225979fa0ee6a18 --- M src/vty/stats_vty.c 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/68/1068/2 diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c index 59befd2..b2143bd 100644 --- a/src/vty/stats_vty.c +++ b/src/vty/stats_vty.c @@ -41,6 +41,9 @@ #define SHOW_STATS_STR "Show statistical values\n" +/* containing version info */ +extern struct host host; + struct cmd_node cfg_stats_node = { CFG_STATS_NODE, "%s(config-stats)# ", @@ -484,6 +487,11 @@ "show asciidoc counters", SHOW_STR "Asciidoc generation\n" "Generate table of all registered counters\n") { + vty_out(vty, "// autogenerated by show asciidoc counters%s", VTY_NEWLINE); + vty_out(vty, "These counters and their description based on %s %s (%s).%s", + host.app_info->name, + host.app_info->version, + host.app_info->name ? host.app_info->name : "", VTY_NEWLINE); vty_out(vty, "// generating tables for rate_ctr_group%s", VTY_NEWLINE); rate_ctr_for_each_group(asciidoc_rate_ctr_group_handler, vty); -- To view, visit https://gerrit.osmocom.org/1068 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie0f1b3894361c58386da9defb225979fa0ee6a18 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Oct 14 15:41:56 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Fri, 14 Oct 2016 15:41:56 +0000 Subject: [ABANDON] libosmocore[master]: vty/show asciidoc: add user readable description of the version In-Reply-To: References: Message-ID: lynxis lazus has abandoned this change. Change subject: vty/show asciidoc: add user readable description of the version ...................................................................... Abandoned superseeded by #1068 -- To view, visit https://gerrit.osmocom.org/1072 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Idc6f9bac5febac540f5be022065c53b798b46f04 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Fri Oct 14 15:49:35 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Fri, 14 Oct 2016 15:49:35 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: build/Makefile: set LIBOSMO_DIR UPLOAD_PATH only if not exists Message-ID: Review at https://gerrit.osmocom.org/1073 build/Makefile: set LIBOSMO_DIR UPLOAD_PATH only if not exists Allows the user to set by env or argument Change-Id: Ibc2c9ff6e61fd8cb59b908a9586ad5841d698924 --- M build/Makefile.inc 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/73/1073/1 diff --git a/build/Makefile.inc b/build/Makefile.inc index e317131..3905cb0 100644 --- a/build/Makefile.inc +++ b/build/Makefile.inc @@ -1,9 +1,9 @@ # XSL stylesheets downloaded from http://docbook.sourceforge.net/release/xsl/current/html/ # Makefile from BitBake/OpenEmbedded manuals -LIBOSMO_DIR := ~/source/gsm/libosmocore +LIBOSMO_DIR ?= ~/source/gsm/libosmocore MERGE_DOC := $(LIBOSMO_DIR)/doc/vty/merge_doc.xsl -UPLOAD_PATH := generic at sysmocom-downloads:documents +UPLOAD_PATH ?= generic at sysmocom-downloads:documents pdfs = $(patsubst %.xml,%.pdf,$(manuals)) lint = $(patsubst %.xml,%.xml-lint,$(manuals)) -- To view, visit https://gerrit.osmocom.org/1073 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibc2c9ff6e61fd8cb59b908a9586ad5841d698924 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Fri Oct 14 15:49:35 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Fri, 14 Oct 2016 15:49:35 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoBTS: add vty reference documentation Message-ID: Review at https://gerrit.osmocom.org/1074 OsmoBTS: add vty reference documentation Including the required changes of the Makefile which is now simliar as the other projects Makefile's. Based on: OsmoBTS 0.3.0.283-f869 Change-Id: Id7362ce1c584b1926330b93770d68453e091c71c --- M OsmoBTS/Makefile A OsmoBTS/osmobts-vty-reference.xml A OsmoBTS/vty/bts_vty_additions.xml A OsmoBTS/vty/bts_vty_reference.xml 4 files changed, 1,705 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/74/1074/1 diff --git a/OsmoBTS/Makefile b/OsmoBTS/Makefile index 092856d..01683a7 100644 --- a/OsmoBTS/Makefile +++ b/OsmoBTS/Makefile @@ -1,14 +1,42 @@ +# XSL stylesheets downloaded from http://docbook.sourceforge.net/release/xsl/current/html/ +# Makefile from BitBake/OpenEmbedded manuals + +EXTRA_DEPS = gen-bts-vty-docbook + +topdir = . +bts_reference = $(topdir)/osmobts-vty-reference.xml +manuals = $(bts_reference) +# types = pdf txt rtf ps xhtml html man tex texi dvi +# types = pdf txt +types = $(docbooktotypes) +docbooktotypes = pdf +# htmlcssfile = +# htmlcss = + TOPDIR := .. -ASCIIDOCS := osmobts-usermanual osmobts-abis +ASCIIDOCS := osmobts-usermanual include $(TOPDIR)/build/Makefile.asciidoc.inc - -# for the upload target include $(TOPDIR)/build/Makefile.inc -# dependencies -osmobts-abis.pdf: abis/*.adoc abis/*.msc osmobts-usermanual.pdf: chapters/*.adoc clean: + rm -rf osmobts-usermanual__*.{svg,png} rm -rf $(cleanfiles) + +gen-bts-vty-docbook: FORCE + $(call command,xsltproc -o generated/combined1.xml \ + --stringparam with $(PWD)/../common/vty_additions.xml \ + $(MERGE_DOC) vty/bts_vty_reference.xml, \ + XSLTPROC,Merging Common VTY) + $(call command,xsltproc -o generated/combined2.xml \ + --stringparam with $(PWD)/../common/ns_vty_additions.xml \ + $(MERGE_DOC) generated/combined1.xml, \ + XSLTPROC,Merging Common NS VTY) + $(call command,xsltproc -o generated/combined3.xml \ + --stringparam with $(PWD)/vty/bts_vty_additions.xml \ + $(MERGE_DOC) generated/combined2.xml, \ + XSLTPROC,Merging BTS VTY) + $(call command,xsltproc ../vty_reference.xsl generated/combined3.xml > generated/docbook_vty.xml, \ + XSLTPROC,Converting BTS VTY to DocBook) diff --git a/OsmoBTS/osmobts-vty-reference.xml b/OsmoBTS/osmobts-vty-reference.xml new file mode 100644 index 0000000..0d0454a --- /dev/null +++ b/OsmoBTS/osmobts-vty-reference.xml @@ -0,0 +1,38 @@ + + + + +]> + + + + + + v1 + 13th October 2016 + hw + Initial + + + + OsmoBTS VTY Reference + + + 2016 + + + + This work is copyright by sysmocom - s.f.m.c. GmbH. All rights reserved. + + + + + + &chapter-vty; + + diff --git a/OsmoBTS/vty/bts_vty_additions.xml b/OsmoBTS/vty/bts_vty_additions.xml new file mode 100644 index 0000000..519c4b4 --- /dev/null +++ b/OsmoBTS/vty/bts_vty_additions.xml @@ -0,0 +1 @@ + diff --git a/OsmoBTS/vty/bts_vty_reference.xml b/OsmoBTS/vty/bts_vty_reference.xml new file mode 100644 index 0000000..b50ac1b --- /dev/null +++ b/OsmoBTS/vty/bts_vty_reference.xml @@ -0,0 +1,1633 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- To view, visit https://gerrit.osmocom.org/1074 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id7362ce1c584b1926330b93770d68453e091c71c Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Fri Oct 14 15:50:31 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Fri, 14 Oct 2016 15:50:31 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: add .gitreview Message-ID: Review at https://gerrit.osmocom.org/1075 add .gitreview .gitreview is used by `git review` plugin. Change-Id: Ia60e51f156985f7c3c1f0452d4d3760cb1396f1b --- A .gitreview 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/75/1075/1 diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..c0ec0c0 --- /dev/null +++ b/.gitreview @@ -0,0 +1,3 @@ +[gerrit] +host=gerrit.osmocom.org +project=osmo-gsm-manuals -- To view, visit https://gerrit.osmocom.org/1075 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia60e51f156985f7c3c1f0452d4d3760cb1396f1b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Fri Oct 14 16:09:51 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Fri, 14 Oct 2016 16:09:51 +0000 Subject: [PATCH] libosmocore[master]: vty/show asciidoc: add user readable description of the version In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1068 to look at the new patch set (#3). vty/show asciidoc: add user readable description of the version Change-Id: Ie0f1b3894361c58386da9defb225979fa0ee6a18 --- M src/vty/stats_vty.c 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/68/1068/3 diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c index 59befd2..2ca436a 100644 --- a/src/vty/stats_vty.c +++ b/src/vty/stats_vty.c @@ -41,6 +41,9 @@ #define SHOW_STATS_STR "Show statistical values\n" +/* containing version info */ +extern struct host host; + struct cmd_node cfg_stats_node = { CFG_STATS_NODE, "%s(config-stats)# ", @@ -484,6 +487,13 @@ "show asciidoc counters", SHOW_STR "Asciidoc generation\n" "Generate table of all registered counters\n") { + vty_out(vty, "// autogenerated by show asciidoc counters%s", VTY_NEWLINE); + vty_out(vty, "These counters and their description based on %s %s (%s).%s%s", + host.app_info->name, + host.app_info->version, + host.app_info->name ? host.app_info->name : "", VTY_NEWLINE, VTY_NEWLINE); + /* 2x VTY_NEWLINE are intentional otherwise it would interpret the first table header + * as usual text*/ vty_out(vty, "// generating tables for rate_ctr_group%s", VTY_NEWLINE); rate_ctr_for_each_group(asciidoc_rate_ctr_group_handler, vty); -- To view, visit https://gerrit.osmocom.org/1068 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie0f1b3894361c58386da9defb225979fa0ee6a18 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Oct 14 16:10:18 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 14 Oct 2016 16:10:18 +0000 Subject: [PATCH] openbsc[master]: Cosmetic: Add missing switch to usage help Message-ID: Review at https://gerrit.osmocom.org/1076 Cosmetic: Add missing switch to usage help Adds the -p --pacp option to the help text. Change-Id: I3e763c30ca13bc51c8b72af8a94558c92439f109 --- M openbsc/src/osmo-nitb/bsc_hack.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/76/1076/1 diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c index 28dbb6f..552ab4f 100644 --- a/openbsc/src/osmo-nitb/bsc_hack.c +++ b/openbsc/src/osmo-nitb/bsc_hack.c @@ -108,6 +108,7 @@ printf(" -m --mncc-sock Same as `-M /tmp/bsc_mncc' (deprecated).\n"); printf(" -C --no-dbcounter Disable regular syncing of counters to database.\n"); printf(" -r --rf-ctl PATH A unix domain socket to listen for cmds.\n"); + printf(" -p --pcap PATH Write abis communication to pcap trace file.\n"); } static void handle_options(int argc, char **argv) -- To view, visit https://gerrit.osmocom.org/1076 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3e763c30ca13bc51c8b72af8a94558c92439f109 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Sun Oct 16 13:43:47 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 16 Oct 2016 13:43:47 +0000 Subject: [PATCH] libosmo-abis[master]: remove non-existant e1inp_update_ts() from e1_input.h Message-ID: Review at https://gerrit.osmocom.org/1077 remove non-existant e1inp_update_ts() from e1_input.h This function didn't exist ever since the inception of libomso-abis. Change-Id: Ib471f03a93a73efe18fbd69d6eb1cb35bdb4e9a3 --- M include/osmocom/abis/e1_input.h 1 file changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/77/1077/1 diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h index 4f73749..7cfb3a2 100644 --- a/include/osmocom/abis/e1_input.h +++ b/include/osmocom/abis/e1_input.h @@ -241,9 +241,6 @@ int (*trau_rcv_cb)(struct subch_demux *dmx, int ch, uint8_t *data, int len, void *_priv)); -/* Call from the Stack: configuration of this TS has changed */ -int e1inp_update_ts(struct e1inp_ts *ts); - /* Receive a packet from the E1 driver */ int e1inp_rx_ts(struct e1inp_ts *ts, struct msgb *msg, uint8_t tei, uint8_t sapi); -- To view, visit https://gerrit.osmocom.org/1077 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib471f03a93a73efe18fbd69d6eb1cb35bdb4e9a3 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Oct 16 13:43:48 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 16 Oct 2016 13:43:48 +0000 Subject: [PATCH] libosmo-abis[master]: e1_input: Add E1 timeslot number to input_signal_data Message-ID: Review at https://gerrit.osmocom.org/1078 e1_input: Add E1 timeslot number to input_signal_data It is quite useful for the signal receiver to know on which of the many E1/T1 timeslots a given event (like a 'link down' event) has happened. The line number, TEI and SAPI are isnuficcient in case there are multiple signalling TS in the line. Change-Id: I07f0f79e0cda09766f357032ffb4e7ad643d448a --- M TODO-RELEASE M include/osmocom/abis/e1_input.h M src/e1_input.c M src/input/dahdi.c 4 files changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/78/1078/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index 7ea65b6..3af993e 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -1,2 +1,3 @@ #library what description / commit summary line libosmo-abis API change major: add parameter to rx_cb() callack in osmo_ortp.h +libosmo-abis API change major: add parameter to struct input_signal_data diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h index 7cfb3a2..c175649 100644 --- a/include/osmocom/abis/e1_input.h +++ b/include/osmocom/abis/e1_input.h @@ -288,6 +288,7 @@ int link_type; uint8_t tei; uint8_t sapi; + uint8_t ts_nr; struct gsm_bts_trx *trx; struct e1inp_line *line; }; diff --git a/src/e1_input.c b/src/e1_input.c index 4ba991e..c9ae8e6 100644 --- a/src/e1_input.c +++ b/src/e1_input.c @@ -667,6 +667,7 @@ { struct input_signal_data isd; isd.line = ts->line; + isd.ts_nr = ts->num; isd.link_type = link->type; isd.trx = link->trx; isd.tei = link->tei; diff --git a/src/input/dahdi.c b/src/input/dahdi.c index 9f1f2bb..ab06908 100644 --- a/src/input/dahdi.c +++ b/src/input/dahdi.c @@ -139,6 +139,7 @@ get_value_string(dahdi_evt_names, evt)); isd.line = ts->line; + isd.ts_nr = ts->num; switch (evt) { case DAHDI_EVENT_ALARM: -- To view, visit https://gerrit.osmocom.org/1078 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I07f0f79e0cda09766f357032ffb4e7ad643d448a Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Oct 16 13:43:48 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 16 Oct 2016 13:43:48 +0000 Subject: [PATCH] libosmo-abis[master]: Convert e1inp_{sign, ts}type_name() to use struct value_string Message-ID: Review at https://gerrit.osmocom.org/1079 Convert e1inp_{sign,ts}type_name() to use struct value_string Change-Id: I0546c3f5aefe5e1cc33d8d82f1783fa467e37ff0 --- M include/osmocom/abis/e1_input.h M src/e1_input.c 2 files changed, 16 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/79/1079/1 diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h index c175649..8ef33d5 100644 --- a/include/osmocom/abis/e1_input.h +++ b/include/osmocom/abis/e1_input.h @@ -21,6 +21,7 @@ E1INP_SIGN_OSMO, /* IPA CCM OSMO sub-type */ }; const char *e1inp_signtype_name(enum e1inp_sign_type tp); +const struct value_string e1inp_sign_type_names[5]; enum e1inp_ctr { E1I_CTR_HDLC_ABORT, @@ -65,6 +66,7 @@ E1INP_TS_TYPE_TRAU, }; const char *e1inp_tstype_name(enum e1inp_ts_type tp); +const struct value_string e1inp_ts_type_names[5]; /* A timeslot in the E1 interface */ struct e1inp_ts { diff --git a/src/e1_input.c b/src/e1_input.c index c9ae8e6..df990d5 100644 --- a/src/e1_input.c +++ b/src/e1_input.c @@ -200,30 +200,29 @@ write(pcap_fd, msg->l2h, msgb_l2len(msg)); } -static const char *sign_types[] = { - [E1INP_SIGN_NONE] = "None", - [E1INP_SIGN_OML] = "OML", - [E1INP_SIGN_RSL] = "RSL", - [E1INP_SIGN_OSMO] = "OSMO", +const struct value_string e1inp_sign_type_names[5] = { + { E1INP_SIGN_NONE, "None" }, + { E1INP_SIGN_OML, "OML" }, + { E1INP_SIGN_RSL, "RSL" }, + { E1INP_SIGN_OSMO, "OSMO" }, + { 0, NULL } }; + const char *e1inp_signtype_name(enum e1inp_sign_type tp) { - if (tp >= ARRAY_SIZE(sign_types)) - return "undefined"; - return sign_types[tp]; + return get_value_string(e1inp_sign_type_names, tp); } -static const char *ts_types[] = { - [E1INP_TS_TYPE_NONE] = "None", - [E1INP_TS_TYPE_SIGN] = "Signalling", - [E1INP_TS_TYPE_TRAU] = "TRAU", +const struct value_string e1inp_ts_type_names[5] = { + { E1INP_TS_TYPE_NONE, "None" }, + { E1INP_TS_TYPE_SIGN, "Signalling" }, + { E1INP_TS_TYPE_TRAU, "TRAU" }, + { 0, NULL } }; const char *e1inp_tstype_name(enum e1inp_ts_type tp) { - if (tp >= ARRAY_SIZE(ts_types)) - return "undefined"; - return ts_types[tp]; + return get_value_string(e1inp_ts_type_names, tp); } int abis_sendmsg(struct msgb *msg) -- To view, visit https://gerrit.osmocom.org/1079 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0546c3f5aefe5e1cc33d8d82f1783fa467e37ff0 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Sun Oct 16 19:53:52 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 16 Oct 2016 19:53:52 +0000 Subject: libosmo-abis[master]: remove non-existant e1inp_update_ts() from e1_input.h In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1077 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib471f03a93a73efe18fbd69d6eb1cb35bdb4e9a3 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis 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 Oct 16 19:53:56 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 16 Oct 2016 19:53:56 +0000 Subject: libosmo-abis[master]: e1_input: Add E1 timeslot number to input_signal_data In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1078 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I07f0f79e0cda09766f357032ffb4e7ad643d448a Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis 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 Oct 16 19:54:00 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 16 Oct 2016 19:54:00 +0000 Subject: libosmo-abis[master]: Convert e1inp_{sign, ts}type_name() to use struct value_string In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1079 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0546c3f5aefe5e1cc33d8d82f1783fa467e37ff0 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis 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 Oct 16 19:54:42 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 16 Oct 2016 19:54:42 +0000 Subject: libosmocore[master]: vty/show asciidoc: add user readable description of the version In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1068 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie0f1b3894361c58386da9defb225979fa0ee6a18 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Oct 16 19:55:21 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 16 Oct 2016 19:55:21 +0000 Subject: libosmocore[master]: vty/show asciidoc: capilize table header field names In-Reply-To: References: Message-ID: Patch Set 3: it might make sense to squash all four commits in one and re-submit. -- To view, visit https://gerrit.osmocom.org/1071 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id1cf5db84ab3c07613769e800a1b183eb8084563 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Oct 16 19:56:17 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 16 Oct 2016 19:56:17 +0000 Subject: openbsc[master]: Cosmetic: Add missing switch to usage help In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1076 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3e763c30ca13bc51c8b72af8a94558c92439f109 Gerrit-PatchSet: 1 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 Sun Oct 16 19:56:27 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 16 Oct 2016 19:56:27 +0000 Subject: osmo-gsm-manuals[master]: add .gitreview In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1075 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia60e51f156985f7c3c1f0452d4d3760cb1396f1b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Oct 16 19:57:02 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 16 Oct 2016 19:57:02 +0000 Subject: osmo-gsm-manuals[master]: OsmoBTS: add vty reference documentation In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1074 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id7362ce1c584b1926330b93770d68453e091c71c Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Oct 16 19:57:14 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 16 Oct 2016 19:57:14 +0000 Subject: osmo-trx[master]: add contrib/jenkins.sh, for gerrit build bot In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1067 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If8887525b0062090e9445a35e32b03e3b8e7eede Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx 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 Oct 16 21:41:09 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 16 Oct 2016 21:41:09 +0000 Subject: [MERGED] openbsc[master]: fix mistypes, spaces and tabs In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: fix mistypes, spaces and tabs ...................................................................... fix mistypes, spaces and tabs Change-Id: I651473f638365bbd333c4c80d223cdd023dd2c51 --- M openbsc/src/libbsc/chan_alloc.c M openbsc/src/libmsc/gsm_04_08.c M openbsc/src/libmsc/mncc_builtin.c 3 files changed, 17 insertions(+), 17 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/libbsc/chan_alloc.c b/openbsc/src/libbsc/chan_alloc.c index 7b0c3e6..367139c 100644 --- a/openbsc/src/libbsc/chan_alloc.c +++ b/openbsc/src/libbsc/chan_alloc.c @@ -303,7 +303,7 @@ } break; case GSM_LCHAN_TCH_H: - lchan =_lc_find_bts(bts, GSM_PCHAN_TCH_H); + lchan = _lc_find_bts(bts, GSM_PCHAN_TCH_H); /* If we don't have TCH/H available, fall-back to TCH/F */ if (!lchan) { lchan = _lc_find_bts(bts, GSM_PCHAN_TCH_F); diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index be1b260..a22e3c2 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -464,7 +464,7 @@ LOGP(DMM, LOGL_ERROR, "Failed to create msg for LOCATION UPDATING REJECT.\n"); return -1; } - + msg->lchan = conn->lchan; LOGP(DMM, LOGL_INFO, "Subscriber %s: LOCATION UPDATING REJECT " @@ -481,7 +481,7 @@ struct gsm48_hdr *gh; struct gsm48_loc_area_id *lai; uint8_t *mid; - + msg->lchan = conn->lchan; gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); @@ -693,7 +693,7 @@ /* no sim card... FIXME: what to do ? */ DEBUGPC(DMM, "unimplemented mobile identity type\n"); break; - default: + default: DEBUGPC(DMM, "unknown mobile identity type\n"); break; } @@ -1075,7 +1075,7 @@ /* no sim card... FIXME: what to do ? */ DEBUGPC(DMM, ": unimplemented mobile identity type\n"); break; - default: + default: DEBUGPC(DMM, ": unknown mobile identity type\n"); break; } @@ -1249,7 +1249,7 @@ apdu_id_flags = gh->data[0]; apdu_len = gh->data[1]; apdu_data = gh->data+2; - + DEBUGP(DRR, "RX APPLICATION INFO id/flags=0x%02x apdu_len=%u apdu=%s", apdu_id_flags, apdu_len, osmo_hexdump(apdu_data, apdu_len)); @@ -1285,10 +1285,10 @@ struct gsm48_hdr *gh; msg->lchan = conn->lchan; - + DEBUGP(DRR, "TX APPLICATION INFO id=0x%02x, len=%u\n", apdu_id, apdu_len); - + gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh) + 2 + apdu_len); gh->proto_discr = GSM48_PDISC_RR; gh->msg_type = GSM48_MT_RR_APP_INFO; @@ -1419,7 +1419,7 @@ "Sending '%s' to MNCC.\n", get_mncc_name(msg_type)); mncc->msg_type = msg_type; - + msg = msgb_alloc(sizeof(struct gsm_mncc), "MNCC"); if (!msg) return -ENOMEM; @@ -2061,7 +2061,7 @@ trans_free(trans); return rc; } - + /* Get free transaction_id */ trans_id = trans_assign_trans_id(trans->net, trans->subscr, GSM48_PDISC_CC, 0); @@ -2104,7 +2104,7 @@ /* signal */ if (setup->fields & MNCC_F_SIGNAL) gsm48_encode_signal(msg, setup->signal); - + new_cc_state(trans, GSM_CSTATE_CALL_PRESENT); rate_ctr_inc(&trans->net->msc_ctrs->ctr[MSC_CTR_CALL_MT_SETUP]); @@ -2192,7 +2192,7 @@ unsigned int payload_len = msgb_l3len(msg) - sizeof(*gh); struct tlv_parsed tp; struct gsm_mncc alerting; - + gsm48_stop_cc_timer(trans); gsm48_start_cc_timer(trans, 0x301, GSM48_T301); @@ -2244,7 +2244,7 @@ gsm48_encode_useruser(msg, 0, &alerting->useruser); new_cc_state(trans, GSM_CSTATE_CALL_DELIVERED); - + return gsm48_conn_sendmsg(msg, trans->conn, trans); } @@ -2347,7 +2347,7 @@ new_cc_state(trans, GSM_CSTATE_ACTIVE); rate_ctr_inc(&trans->net->msc_ctrs->ctr[MSC_CTR_CALL_MO_CONNECT_ACK]); - + memset(&connect_ack, 0, sizeof(struct gsm_mncc)); connect_ack.callref = trans->callref; @@ -2611,7 +2611,7 @@ gh->msg_type = GSM48_MT_CC_RELEASE_COMPL; trans->callref = 0; - + gsm48_stop_cc_timer(trans); /* cause */ @@ -3697,7 +3697,7 @@ LOGP(DRLL, LOGL_DEBUG, "Dispatching 04.08 message, pdisc=%d\n", pdisc); if (silent_call_reroute(conn, msg)) return silent_call_rx(conn, msg); - + switch (pdisc) { case GSM48_PDISC_CC: release_anchor(conn); diff --git a/openbsc/src/libmsc/mncc_builtin.c b/openbsc/src/libmsc/mncc_builtin.c index ee98d2d..9b25ede 100644 --- a/openbsc/src/libmsc/mncc_builtin.c +++ b/openbsc/src/libmsc/mncc_builtin.c @@ -1,5 +1,5 @@ /* mncc_builtin.c - default, minimal built-in MNCC Application for - * standalone bsc_hack (netowrk-in-the-box mode) */ + * standalone bsc_hack (network-in-the-box mode) */ /* (C) 2008-2010 by Harald Welte * (C) 2009 by Andreas Eversberg -- To view, visit https://gerrit.osmocom.org/792 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I651473f638365bbd333c4c80d223cdd023dd2c51 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Sun Oct 16 21:46:26 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 16 Oct 2016 21:46:26 +0000 Subject: [MERGED] libosmo-abis[master]: remove non-existant e1inp_update_ts() from e1_input.h In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: remove non-existant e1inp_update_ts() from e1_input.h ...................................................................... remove non-existant e1inp_update_ts() from e1_input.h This function didn't exist ever since the inception of libomso-abis. Change-Id: Ib471f03a93a73efe18fbd69d6eb1cb35bdb4e9a3 --- M include/osmocom/abis/e1_input.h 1 file changed, 0 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h index 4f73749..7cfb3a2 100644 --- a/include/osmocom/abis/e1_input.h +++ b/include/osmocom/abis/e1_input.h @@ -241,9 +241,6 @@ int (*trau_rcv_cb)(struct subch_demux *dmx, int ch, uint8_t *data, int len, void *_priv)); -/* Call from the Stack: configuration of this TS has changed */ -int e1inp_update_ts(struct e1inp_ts *ts); - /* Receive a packet from the E1 driver */ int e1inp_rx_ts(struct e1inp_ts *ts, struct msgb *msg, uint8_t tei, uint8_t sapi); -- To view, visit https://gerrit.osmocom.org/1077 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib471f03a93a73efe18fbd69d6eb1cb35bdb4e9a3 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Oct 16 22:02:14 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 16 Oct 2016 22:02:14 +0000 Subject: osmo-bts[master]: DTX AMR - fix buffer length check In-Reply-To: References: Message-ID: Patch Set 2: > As length of RTP packet payload and L1-specific data is fixed, this > indeed not supposed to happen unless smth goes horribly wrong in > some other place. Right now it looks like having too much data is a valid case. IMHO an OSMO_ASSERT or an error log would be more fitting than to carry on with a bad length. (An assertion only when the length depends entirely on osmo-bts, if it is based on incoming data the binary should not crash on this but error log instead.) I'm still +ing this patch because it does fix the memory corruption in case too much data shows up. A follow-up would be nice. -- To view, visit https://gerrit.osmocom.org/1064 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2fbc468caedf08f26893457db7c7fbacef5b860c Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts 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 Sun Oct 16 22:09:16 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 16 Oct 2016 22:09:16 +0000 Subject: libosmocore[master]: vty/show asciidoc: add user readable description of the version In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/1068/3/src/vty/stats_vty.c File src/vty/stats_vty.c: Line 491: vty_out(vty, "These counters and their description based on %s %s (%s).%s%s", should this line also start with '//'? should it be visible in the generated doc? -- To view, visit https://gerrit.osmocom.org/1068 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie0f1b3894361c58386da9defb225979fa0ee6a18 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-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sun Oct 16 22:13:46 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 16 Oct 2016 22:13:46 +0000 Subject: [MERGED] libosmo-abis[master]: e1_input: Add E1 timeslot number to input_signal_data In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: e1_input: Add E1 timeslot number to input_signal_data ...................................................................... e1_input: Add E1 timeslot number to input_signal_data It is quite useful for the signal receiver to know on which of the many E1/T1 timeslots a given event (like a 'link down' event) has happened. The line number, TEI and SAPI are isnuficcient in case there are multiple signalling TS in the line. Change-Id: I07f0f79e0cda09766f357032ffb4e7ad643d448a --- M TODO-RELEASE M include/osmocom/abis/e1_input.h M src/e1_input.c M src/input/dahdi.c 4 files changed, 4 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/TODO-RELEASE b/TODO-RELEASE index 7ea65b6..3af993e 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -1,2 +1,3 @@ #library what description / commit summary line libosmo-abis API change major: add parameter to rx_cb() callack in osmo_ortp.h +libosmo-abis API change major: add parameter to struct input_signal_data diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h index 7cfb3a2..c175649 100644 --- a/include/osmocom/abis/e1_input.h +++ b/include/osmocom/abis/e1_input.h @@ -288,6 +288,7 @@ int link_type; uint8_t tei; uint8_t sapi; + uint8_t ts_nr; struct gsm_bts_trx *trx; struct e1inp_line *line; }; diff --git a/src/e1_input.c b/src/e1_input.c index 4ba991e..c9ae8e6 100644 --- a/src/e1_input.c +++ b/src/e1_input.c @@ -667,6 +667,7 @@ { struct input_signal_data isd; isd.line = ts->line; + isd.ts_nr = ts->num; isd.link_type = link->type; isd.trx = link->trx; isd.tei = link->tei; diff --git a/src/input/dahdi.c b/src/input/dahdi.c index 9f1f2bb..ab06908 100644 --- a/src/input/dahdi.c +++ b/src/input/dahdi.c @@ -139,6 +139,7 @@ get_value_string(dahdi_evt_names, evt)); isd.line = ts->line; + isd.ts_nr = ts->num; switch (evt) { case DAHDI_EVENT_ALARM: -- To view, visit https://gerrit.osmocom.org/1078 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I07f0f79e0cda09766f357032ffb4e7ad643d448a Gerrit-PatchSet: 3 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Oct 16 22:14:50 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 16 Oct 2016 22:14:50 +0000 Subject: [MERGED] libosmo-abis[master]: Convert e1inp_{sign, ts}type_name() to use struct value_string In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Convert e1inp_{sign,ts}type_name() to use struct value_string ...................................................................... Convert e1inp_{sign,ts}type_name() to use struct value_string Change-Id: I0546c3f5aefe5e1cc33d8d82f1783fa467e37ff0 --- M include/osmocom/abis/e1_input.h M src/e1_input.c 2 files changed, 16 insertions(+), 15 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h index c175649..8ef33d5 100644 --- a/include/osmocom/abis/e1_input.h +++ b/include/osmocom/abis/e1_input.h @@ -21,6 +21,7 @@ E1INP_SIGN_OSMO, /* IPA CCM OSMO sub-type */ }; const char *e1inp_signtype_name(enum e1inp_sign_type tp); +const struct value_string e1inp_sign_type_names[5]; enum e1inp_ctr { E1I_CTR_HDLC_ABORT, @@ -65,6 +66,7 @@ E1INP_TS_TYPE_TRAU, }; const char *e1inp_tstype_name(enum e1inp_ts_type tp); +const struct value_string e1inp_ts_type_names[5]; /* A timeslot in the E1 interface */ struct e1inp_ts { diff --git a/src/e1_input.c b/src/e1_input.c index c9ae8e6..df990d5 100644 --- a/src/e1_input.c +++ b/src/e1_input.c @@ -200,30 +200,29 @@ write(pcap_fd, msg->l2h, msgb_l2len(msg)); } -static const char *sign_types[] = { - [E1INP_SIGN_NONE] = "None", - [E1INP_SIGN_OML] = "OML", - [E1INP_SIGN_RSL] = "RSL", - [E1INP_SIGN_OSMO] = "OSMO", +const struct value_string e1inp_sign_type_names[5] = { + { E1INP_SIGN_NONE, "None" }, + { E1INP_SIGN_OML, "OML" }, + { E1INP_SIGN_RSL, "RSL" }, + { E1INP_SIGN_OSMO, "OSMO" }, + { 0, NULL } }; + const char *e1inp_signtype_name(enum e1inp_sign_type tp) { - if (tp >= ARRAY_SIZE(sign_types)) - return "undefined"; - return sign_types[tp]; + return get_value_string(e1inp_sign_type_names, tp); } -static const char *ts_types[] = { - [E1INP_TS_TYPE_NONE] = "None", - [E1INP_TS_TYPE_SIGN] = "Signalling", - [E1INP_TS_TYPE_TRAU] = "TRAU", +const struct value_string e1inp_ts_type_names[5] = { + { E1INP_TS_TYPE_NONE, "None" }, + { E1INP_TS_TYPE_SIGN, "Signalling" }, + { E1INP_TS_TYPE_TRAU, "TRAU" }, + { 0, NULL } }; const char *e1inp_tstype_name(enum e1inp_ts_type tp) { - if (tp >= ARRAY_SIZE(ts_types)) - return "undefined"; - return ts_types[tp]; + return get_value_string(e1inp_ts_type_names, tp); } int abis_sendmsg(struct msgb *msg) -- To view, visit https://gerrit.osmocom.org/1079 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0546c3f5aefe5e1cc33d8d82f1783fa467e37ff0 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Oct 16 22:16:47 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 16 Oct 2016 22:16:47 +0000 Subject: osmo-gsm-manuals[master]: build/Makefile: set LIBOSMO_DIR UPLOAD_PATH only if not exists In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1073 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibc2c9ff6e61fd8cb59b908a9586ad5841d698924 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Oct 16 22:42:03 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 16 Oct 2016 22:42:03 +0000 Subject: libosmo-abis[master]: remove non-existant e1inp_update_ts() from e1_input.h In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/1077/2//COMMIT_MSG Commit Message: Line 7: remove non-existant e1inp_update_ts() from e1_input.h "non-existent" :) -- To view, visit https://gerrit.osmocom.org/1077 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib471f03a93a73efe18fbd69d6eb1cb35bdb4e9a3 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sun Oct 16 22:47:44 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 16 Oct 2016 22:47:44 +0000 Subject: libosmo-abis[master]: e1_input: Add E1 timeslot number to input_signal_data In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/1078/3//COMMIT_MSG Commit Message: Line 11: The line number, TEI and SAPI are isnuficcient in case there are one of the funnier typos :) http://the-post-bar.blogspot.de/2012/07/world-snuff-championship.html -- To view, visit https://gerrit.osmocom.org/1078 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I07f0f79e0cda09766f357032ffb4e7ad643d448a Gerrit-PatchSet: 3 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sun Oct 16 22:50:50 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 16 Oct 2016 22:50:50 +0000 Subject: libosmo-abis[master]: remove non-existant e1inp_update_ts() from e1_input.h In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/1077/2//COMMIT_MSG Commit Message: Line 7: remove non-existant e1inp_update_ts() from e1_input.h > "non-existent" :) https://en.wiktionary.org/wiki/existant "English: Alternative spelling of existent" -- To view, visit https://gerrit.osmocom.org/1077 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib471f03a93a73efe18fbd69d6eb1cb35bdb4e9a3 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sun Oct 16 23:27:48 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 16 Oct 2016 23:27:48 +0000 Subject: openbsc[master]: Cosmetic: Add missing switch to usage help In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) build failure: parent is #1037 which depends on #1056 https://gerrit.osmocom.org/#/c/1076/1//COMMIT_MSG Commit Message: Line 9: Adds the -p --pacp option to the help text. typo -- To view, visit https://gerrit.osmocom.org/1076 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3e763c30ca13bc51c8b72af8a94558c92439f109 Gerrit-PatchSet: 1 Gerrit-Project: openbsc 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 Sun Oct 16 23:32:23 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 16 Oct 2016 23:32:23 +0000 Subject: libosmocore[master]: gsm0408: Completing GSM 04.08 RR message types In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 (2 comments) https://gerrit.osmocom.org/#/c/1056/2/src/gsm/gsm48.c File src/gsm/gsm48.c: Line 165: const char *rr_cause_name(uint8_t cause) So this function was previously already declared in gsm48.h but never defined? This fix should be in a separate commit, and the fix should also add rr_cause_name to the .map file. Since there are so far no callers, we might also want to rename it to gsm48_rr_cause_name while we still can? (All in a separate commit.) Line 357: { 0, NULL } I'd either drop the tabs or make it line up. This is neither... -- To view, visit https://gerrit.osmocom.org/1056 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3ceb070bf4dc8f5a071a5d43c6aa2d4e84c2dec6 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore 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 Sun Oct 16 23:38:32 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 16 Oct 2016 23:38:32 +0000 Subject: osmo-gsm-manuals[master]: build/Makefile: set LIBOSMO_DIR UPLOAD_PATH only if not exists In-Reply-To: References: Message-ID: Patch Set 1: Actually I just found this in the manuals' jenkins job: make LIBOSMO_DIR=$PWD/libosmocore So it seems passing by argument is already possible. However, it's convenient to be able to set by env as well (~/.bashrc), which only works with this patch applied. -- To view, visit https://gerrit.osmocom.org/1073 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibc2c9ff6e61fd8cb59b908a9586ad5841d698924 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Oct 16 23:46:59 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 16 Oct 2016 23:46:59 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: add jenkins.sh script for jenkins build job Message-ID: Review at https://gerrit.osmocom.org/1080 add jenkins.sh script for jenkins build job Change-Id: I6c3d959202f510f0c9780d0fa28c769ea9d721e8 --- A contrib/jenkins.sh 1 file changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/80/1080/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh new file mode 100755 index 0000000..2e1d617 --- /dev/null +++ b/contrib/jenkins.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -ex + +base="$PWD" +deps="$base/deps" + +mkdir "$deps" || true + +cd "$deps" +osmo-deps.sh libosmocore + +cd "$base" +$MAKE $PARALLEL_MAKE LIBOSMO_DIR="$deps/libosmocore" -- To view, visit https://gerrit.osmocom.org/1080 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6c3d959202f510f0c9780d0fa28c769ea9d721e8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 17 00:26:38 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 00:26:38 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: portability: use py script instead of 'date -d @1234' Message-ID: Review at https://gerrit.osmocom.org/1081 portability: use py script instead of 'date -d @1234' On FreeBSD, the 'date' command's -d option has a completely different meaning. Instead, use a small python script to do the date format conversion, which should be more portable. As a side effect, we now also use UTC instead of the build server's timezone, which may be considered a more international choice. Add build/unix-time-to-fmt.py, call in build/Makefile.asciidoc.inc. Change-Id: I91a40656184f553ee375216d8ba5c7788fe9990d --- M build/Makefile.asciidoc.inc A build/unix-time-to-fmt.py 2 files changed, 19 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/81/1081/1 diff --git a/build/Makefile.asciidoc.inc b/build/Makefile.asciidoc.inc index 1a77419..7def592 100644 --- a/build/Makefile.asciidoc.inc +++ b/build/Makefile.asciidoc.inc @@ -1,7 +1,7 @@ BUILDDIR = $(TOPDIR)/build GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always --tags) -GIT_DATE := $(shell date -d @`git log -n 1 "--pretty=%at" ../.` "+%Y-%b-%e") +GIT_DATE := $(shell $(TOPDIR)/build/unix-time-to-fmt.py `git log -n 1 "--pretty=%at" ../.`) # prepend the document name with the version numbe suffix #DOCS_VER = $(foreach P, $(ASCIIDOCS), $(P)-v$(shell xmllint --recover --xpath "//revnumber[position()=last()]/text()" $(P)-docinfo.xml 2>/dev/null)) diff --git a/build/unix-time-to-fmt.py b/build/unix-time-to-fmt.py new file mode 100755 index 0000000..2b4745e --- /dev/null +++ b/build/unix-time-to-fmt.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python2 +""" +Usage: + + unix-time-to-fmt.py 1234567 [%Y-%m-%d[...]] + +Convert unix timestamp to a string of the given format in UTC, according to + https://docs.python.org/2/library/time.html +Default is '%Y-%b-%d' --> 2016-Jan-01 +""" + +import sys, time + +fmt = '%Y-%b-%d' +if len(sys.argv) > 2: + fmt = sys.argv[2] + +print time.strftime(fmt, time.gmtime(float(sys.argv[1]))) -- To view, visit https://gerrit.osmocom.org/1081 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I91a40656184f553ee375216d8ba5c7788fe9990d Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 17 04:19:50 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 04:19:50 +0000 Subject: osmo-gsm-manuals[master]: add jenkins.sh script for jenkins build job In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1080 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6c3d959202f510f0c9780d0fa28c769ea9d721e8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals 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 Oct 17 04:20:01 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 04:20:01 +0000 Subject: osmo-gsm-manuals[master]: portability: use py script instead of 'date -d @1234' In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1081 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I91a40656184f553ee375216d8ba5c7788fe9990d Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals 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 Oct 17 04:53:56 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 04:53:56 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoBTS/abis/rsl.adoc: fix missing section header Message-ID: Review at https://gerrit.osmocom.org/1082 OsmoBTS/abis/rsl.adoc: fix missing section header In effect, this fixes the dangling references from the table of RSL messages with additions/limitations to the Chan Act message description. Change-Id: Ic6f83f016ce9ec90af7eb0af1b1f71a10263915d --- M OsmoBTS/abis/rsl.adoc 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/82/1082/1 diff --git a/OsmoBTS/abis/rsl.adoc b/OsmoBTS/abis/rsl.adoc index a78afc5..827e353 100644 --- a/OsmoBTS/abis/rsl.adoc +++ b/OsmoBTS/abis/rsl.adoc @@ -118,6 +118,7 @@ === Message Limitation Details [[CHANNEL_ACTIVATION]] +==== Channel Activation When used on a timeslot using the non-standard channel combination 'NM_CHANC_OSMO_TCHFull_TCHHalf_PDCH' as configured by OML, the regular -- To view, visit https://gerrit.osmocom.org/1082 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic6f83f016ce9ec90af7eb0af1b1f71a10263915d Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 17 04:53:56 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 04:53:56 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoBTS/chapters/dynamic-timeslots.adoc: Remove obsolete links Message-ID: Review at https://gerrit.osmocom.org/1083 OsmoBTS/chapters/dynamic-timeslots.adoc: Remove obsolete links Those file never existed and the ladder diagrams are instead at OsmoBTS/abis/dyn_ts*msc. Change-Id: Icbae85b959e80afe7f272a11f33064a3e594da53 --- M OsmoBTS/chapters/dynamic-timeslots.adoc 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/83/1083/1 diff --git a/OsmoBTS/chapters/dynamic-timeslots.adoc b/OsmoBTS/chapters/dynamic-timeslots.adoc index 68d6fe1..29dff5b 100644 --- a/OsmoBTS/chapters/dynamic-timeslots.adoc +++ b/OsmoBTS/chapters/dynamic-timeslots.adoc @@ -15,7 +15,3 @@ * _osmo-bts-trx_ See also <>. - -include::../../common/snippets/dyn_pdch_ladder.adoc[] - -include::../../common/snippets/dyn_ts_ladder_TCH_H.adoc[] -- To view, visit https://gerrit.osmocom.org/1083 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icbae85b959e80afe7f272a11f33064a3e594da53 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 17 04:53:57 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 04:53:57 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: osmobts-usermanual.adoc: fix link to abis.adoc chapter Message-ID: Review at https://gerrit.osmocom.org/1084 osmobts-usermanual.adoc: fix link to abis.adoc chapter The chapter is in ../common/chapters, not in ./chapters Change-Id: I698d83e96cb77900b99a0bd383587b1b68182efb --- M OsmoBTS/osmobts-usermanual.adoc 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/84/1084/1 diff --git a/OsmoBTS/osmobts-usermanual.adoc b/OsmoBTS/osmobts-usermanual.adoc index a05becd..4d47b1c 100644 --- a/OsmoBTS/osmobts-usermanual.adoc +++ b/OsmoBTS/osmobts-usermanual.adoc @@ -6,7 +6,7 @@ include::chapters/overview.adoc[] -include::chapters/abis.adoc[] +include::../common/chapters/abis.adoc[] include::chapters/interfaces.adoc[] -- To view, visit https://gerrit.osmocom.org/1084 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I698d83e96cb77900b99a0bd383587b1b68182efb Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 17 04:53:57 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 04:53:57 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoBTS/chapters/configuration.adoc: fix index numbering Message-ID: Review at https://gerrit.osmocom.org/1085 OsmoBTS/chapters/configuration.adoc: fix index numbering Change-Id: Ibe507fe36e0130377dec361d56fd75596ca64e75 --- M OsmoBTS/chapters/configuration.adoc 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/85/1085/1 diff --git a/OsmoBTS/chapters/configuration.adoc b/OsmoBTS/chapters/configuration.adoc index 4362166..b91d8ac 100644 --- a/OsmoBTS/chapters/configuration.adoc +++ b/OsmoBTS/chapters/configuration.adoc @@ -99,7 +99,7 @@ <2> You must configure at least one PHY instance in the PHY link <3> There is always exactly one BTS (`bts 0`) configured in OsmoBTS <4> The `ipa unit-id` is what is used to identify this BTS to the BSC -<6> The OML Remote IP is the IP address of the BSC, to which the BTS shall connect to. +<5> The OML Remote IP is the IP address of the BSC, to which the BTS shall connect to. <6> There must be at least one trx (`trx 0`) in each BTS <7> Every TRX must be mapped to a specific PHY instance this way -- To view, visit https://gerrit.osmocom.org/1085 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibe507fe36e0130377dec361d56fd75596ca64e75 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 17 04:53:57 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 04:53:57 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoBTS/abis/rsl: cosmetic: 'IPA style' Message-ID: Review at https://gerrit.osmocom.org/1086 OsmoBTS/abis/rsl: cosmetic: 'IPA style' Consistently name the PDCH act methid 'IPA style', name ip.access only once in the 'IPA Style Dynamic Channels' section. Consistently write 'IPA style' without hyphen (not 'IPA-style'). Capitalize section headers ('IPA Style'). Change-Id: I91112c2d8af9424ebe7e1972fd4ef9c77d24a7b4 --- M OsmoBTS/abis/rsl.adoc 1 file changed, 15 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/86/1086/1 diff --git a/OsmoBTS/abis/rsl.adoc b/OsmoBTS/abis/rsl.adoc index 827e353..30a7d77 100644 --- a/OsmoBTS/abis/rsl.adoc +++ b/OsmoBTS/abis/rsl.adoc @@ -349,9 +349,9 @@ [[ipa_style_pdch_mgmt]] -=== IPA style PDCH Management +=== IPA Style PDCH Management -When using an IPA-style dynamic TCH/F+PDCH channel type on an +When using an IPA style dynamic TCH/F+PDCH channel type on an on-air timeslot, there are a couple of non-standard RSL messages used in order to activate or deactivate this timeslot in PDCH mode. @@ -366,7 +366,7 @@ ==== PDCH Activate This procedure is used by the BSC to request the BTS to activate an -IPA-style dynamic TCH/F+PDCH channel in PDCH mode. +IPA style dynamic TCH/F+PDCH channel in PDCH mode. The operation is not supported on any other physical channel type. @@ -376,7 +376,7 @@ ==== PDCH Deactivate This procedure is used by the BSC to request the BTS to deactivate an -active PDCH on any an IPA-style dynamic TCH/F+PDCH channel. +active PDCH on any an IPA style dynamic TCH/F+PDCH channel. The operation is not supported on any other physical channel type. @@ -581,7 +581,7 @@ ==== PDCH Activate This message is sent by the BSC to request the activation of a PDCH on -a IPA-style dynamic TCH/F+PDCH channel. +a IPA style dynamic TCH/F+PDCH channel. [options="header"] [cols="30%,25%,15%,15%,15%"] @@ -598,7 +598,7 @@ ==== PDCH Activate ACK This message is sent by the BTS to confirm the successful activation -of a PDCH on a IPA-style dynamic TCH/F+PDCH channel. +of a PDCH on a IPA style dynamic TCH/F+PDCH channel. [options="header"] [cols="30%,25%,15%,15%,15%"] @@ -616,7 +616,7 @@ ==== PDCH Activate NACK This message is sent by the BTS to reject the successful activation -of a PDCH on a IPA-style dynamic TCH/F+PDCH channel. +of a PDCH on a IPA style dynamic TCH/F+PDCH channel. [options="header"] [cols="30%,25%,15%,15%,15%"] @@ -634,7 +634,7 @@ ==== PDCH Deactivate This message is sent by the BSC to request the deactivation of a PDCH -on a IPA-style dynamic TCH/F+PDCH channel. +on a IPA style dynamic TCH/F+PDCH channel. [options="header"] [cols="30%,25%,15%,15%,15%"] @@ -651,7 +651,7 @@ ==== PDCH Deactivate ACK This message is sent by the BTS to confirm the successful deactivation -of a PDCH on a IPA-style dynamic TCH/F+PDCH channel. +of a PDCH on a IPA style dynamic TCH/F+PDCH channel. [options="header"] [cols="30%,25%,15%,15%,15%"] @@ -668,7 +668,7 @@ ==== PDCH Deactivate NACK This message is sent by the BTS to reject the deactivation of a PDCH -on a IPA-style dynamic TCH/F+PDCH channel. +on a IPA style dynamic TCH/F+PDCH channel. [options="header"] [cols="30%,25%,15%,15%,15%"] @@ -876,17 +876,19 @@ There are two variants implemented in the OsmoBTS A-bis dialect: -==== ip.access style Dynamic Channels +==== IPA Style Dynamic Channels This method is used when OML uses 'NM_CHANC_IPAC_TCHFull_PDCH' (0x80) as channel combination for the given time-slot. -When the ip.access style dynamic channel combination _TCH/F or PDCH_ +'IPA style' refers to 'ip.access' compatible PDCH activation and deactivation. + +When the IPA style dynamic channel combination _TCH/F or PDCH_ is set, the non-standard 'PDCH ACTIVATE' (<>) and 'PDCH DEACTIVATE' (<>) procedures are used for switching an idle channel into PDCH mode and back into idle mode. -.Example for dynamic channel switchover, for ip.access style dynamic timeslots +.Example for dynamic channel switchover, for IPA style dynamic timeslots ["mscgen"] ---- include::dyn_ts_ipa_style.msc[] -- To view, visit https://gerrit.osmocom.org/1086 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I91112c2d8af9424ebe7e1972fd4ef9c77d24a7b4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 17 04:53:57 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 04:53:57 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoBTS/abis/rsl: add missing info for Osmocom Dyn Channels Message-ID: Review at https://gerrit.osmocom.org/1087 OsmoBTS/abis/rsl: add missing info for Osmocom Dyn Channels The section 'Osmocom Style Dynamic Channels' ended in mid-sentence without naming any of the hard facts. Complete that. Add section links. Change-Id: Ib92895fe1bb89fb1b14dc8fcbd88b98bbb6edeee --- M OsmoBTS/abis/rsl.adoc 1 file changed, 29 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/87/1087/1 diff --git a/OsmoBTS/abis/rsl.adoc b/OsmoBTS/abis/rsl.adoc index 30a7d77..c9bb555 100644 --- a/OsmoBTS/abis/rsl.adoc +++ b/OsmoBTS/abis/rsl.adoc @@ -125,8 +125,10 @@ RSL channel activation procedures can not only be used for activation of circuit-switched channels, but also for activation of a PDCH. -NOTE:: Do not confuse this with the ip.access style _PDCH ACT_ type -dynamic PDCH protocol employed by nanoBTS devices. +See <>. + +NOTE:: Do not confuse this with the IPA style _PDCH ACT_ type +dynamic PDCH protocol employed by nanoBTS devices (<>). [[MEASUREMENT_RESULT]] ==== Measurement Result @@ -894,14 +896,35 @@ include::dyn_ts_ipa_style.msc[] ---- -==== Osmocom style Dynamic Channels +[[OSMOCOM_DYN_TS]] +==== Osmocom Style Dynamic Channels This method is in use when OML uses 'NM_CHANC_OSMO_TCHFull_TCHHalf_PDCH' (0x90) for the given time-slot. -The activation of PDCH is performed by using the regular 'RSL CHANNEL -ACTIVATE' procedure according to <>, with the -exception that the 'cbits' part of the ' +The activation of PDCH is performed by using the regular 'RSL CHANNEL ACTIVATE' +procedure according to <>, with these modifications: + +* The 'C-bits' part of the 'Channel Number' IE take the non-standard binary + value 11000 (C5 thru C1 as seen in 3GPP TS 08.58 ? 9.3.1). +* The 'A-bits' part of the 'Activation Type' IE take the non-standard binary + value 1111, with an additional fourth bit (add A4 to A3 thru A1 as seen in + 3GPP TS 08.58 ? 9.3.3; all remaining reserved bits as well as the 'R' bit are + coded as zero). +* The normally mandatory 'Channel Mode' IE is omitted; none of the optional IEs + are included. + +Hence the message consists of exactly these IEs: + +.PDCH type _Channel Activation_ message IEs +[options="header",cols="10%,30%,60%"] +|=== +| TS 08.58 ? | IE Name | Handling +| 9.1 | Message discriminator | Dedicated Channel Management +| 9.2 | Message type | CHANnel ACTIVation +| 9.3.1 | Channel number | 'C-bits' 11000, plus TS bits as usual +| 9.3.3 | Activation type | 'A-bits' 1111 +|=== .Example for dynamic channel switchover, for Osmocom style dynamic timeslots ["mscgen"] -- To view, visit https://gerrit.osmocom.org/1087 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib92895fe1bb89fb1b14dc8fcbd88b98bbb6edeee Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 17 04:53:57 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 04:53:57 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: make clean: also remove generated image files Message-ID: Review at https://gerrit.osmocom.org/1088 make clean: also remove generated image files Change-Id: I80798e79b4ccee64f26f58f9754de02b2958e33e --- M OsmoBSC/Makefile M OsmoBTS/Makefile M OsmoNITB/Makefile M OsmoPCU/Makefile 4 files changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/88/1088/1 diff --git a/OsmoBSC/Makefile b/OsmoBSC/Makefile index e2c464c..fb5e269 100644 --- a/OsmoBSC/Makefile +++ b/OsmoBSC/Makefile @@ -24,6 +24,7 @@ clean: rm -rf $(cleanfiles) + rm -rf osmobsc-usermanual__*.{svg,png} gen-bsc-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoBTS/Makefile b/OsmoBTS/Makefile index 092856d..5ef9afa 100644 --- a/OsmoBTS/Makefile +++ b/OsmoBTS/Makefile @@ -12,3 +12,5 @@ clean: rm -rf $(cleanfiles) + rm -rf osmobts-abis__*.{svg,png} + rm -rf osmobts-usermanual__*.{svg,png} diff --git a/OsmoNITB/Makefile b/OsmoNITB/Makefile index 29d9c51..d3bf5c8 100644 --- a/OsmoNITB/Makefile +++ b/OsmoNITB/Makefile @@ -23,6 +23,7 @@ clean: rm -rf $(cleanfiles) + rm -rf osmonitb-usermanual__*.{svg,png} gen-nitb-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoPCU/Makefile b/OsmoPCU/Makefile index ef80327..6b4ecb8 100644 --- a/OsmoPCU/Makefile +++ b/OsmoPCU/Makefile @@ -25,6 +25,7 @@ clean: rm -rf $(cleanfiles) rm -rf gen-vty-docbook + rm -rf osmopcu-usermanual__*.{svg,png} gen-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ -- To view, visit https://gerrit.osmocom.org/1088 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I80798e79b4ccee64f26f58f9754de02b2958e33e Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 17 04:53:57 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 04:53:57 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: add 'make check' target Message-ID: Review at https://gerrit.osmocom.org/1089 add 'make check' target Generate *.check files from asciidoc output and grep for WARNINGs. Add *.check files to gitignore and to 'make clean'. Change-Id: Ibccc83a3415930a528f2e8e4e4dda3b81c6d0b64 --- M .gitignore M Makefile M OsmoBSC/Makefile M OsmoBTS/Makefile M OsmoNITB/Makefile M OsmoPCU/Makefile M OsmoSGSN/Makefile M build/Makefile.asciidoc.inc 8 files changed, 24 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/89/1089/1 diff --git a/.gitignore b/.gitignore index 6455215..67c2f69 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ *.html *__*.png *__*.svg +*.check generated/ diff --git a/Makefile b/Makefile index cfe7fc0..9110013 100644 --- a/Makefile +++ b/Makefile @@ -24,3 +24,12 @@ cd OsmoSGSN; $(MAKE) upload cd OsmoNAT; $(MAKE) upload cd OsmoPCU; $(MAKE) upload + +check: + cd OsmoBTS; $(MAKE) check + cd OsmoNITB; $(MAKE) check + cd OsmoBSC; $(MAKE) check + #cd OsmoMGCP; $(MAKE) check + cd OsmoSGSN; $(MAKE) check + #cd OsmoNAT; $(MAKE) check + cd OsmoPCU; $(MAKE) check diff --git a/OsmoBSC/Makefile b/OsmoBSC/Makefile index fb5e269..9fc6f26 100644 --- a/OsmoBSC/Makefile +++ b/OsmoBSC/Makefile @@ -24,7 +24,7 @@ clean: rm -rf $(cleanfiles) - rm -rf osmobsc-usermanual__*.{svg,png} + rm -rf osmobsc-usermanual__*.{svg,png,check} gen-bsc-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoBTS/Makefile b/OsmoBTS/Makefile index 5ef9afa..0587de8 100644 --- a/OsmoBTS/Makefile +++ b/OsmoBTS/Makefile @@ -12,5 +12,5 @@ clean: rm -rf $(cleanfiles) - rm -rf osmobts-abis__*.{svg,png} - rm -rf osmobts-usermanual__*.{svg,png} + rm -rf osmobts-abis__*.{svg,png,check} + rm -rf osmobts-usermanual__*.{svg,png,check} diff --git a/OsmoNITB/Makefile b/OsmoNITB/Makefile index d3bf5c8..e68b9b0 100644 --- a/OsmoNITB/Makefile +++ b/OsmoNITB/Makefile @@ -23,7 +23,7 @@ clean: rm -rf $(cleanfiles) - rm -rf osmonitb-usermanual__*.{svg,png} + rm -rf osmonitb-usermanual__*.{svg,png,check} gen-nitb-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoPCU/Makefile b/OsmoPCU/Makefile index 6b4ecb8..1f06183 100644 --- a/OsmoPCU/Makefile +++ b/OsmoPCU/Makefile @@ -25,7 +25,7 @@ clean: rm -rf $(cleanfiles) rm -rf gen-vty-docbook - rm -rf osmopcu-usermanual__*.{svg,png} + rm -rf osmopcu-usermanual__*.{svg,png,check} gen-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoSGSN/Makefile b/OsmoSGSN/Makefile index 612c10f..7df5168 100644 --- a/OsmoSGSN/Makefile +++ b/OsmoSGSN/Makefile @@ -22,7 +22,7 @@ osmosgsn-usermanual.pdf: chapters/*.adoc clean: - rm -rf osmosgsn-usermanual__*.{svg,png} + rm -rf osmosgsn-usermanual__*.{svg,png,check} rm -rf $(cleanfiles) gen-sgsn-vty-docbook: FORCE diff --git a/build/Makefile.asciidoc.inc b/build/Makefile.asciidoc.inc index 7def592..07e4045 100644 --- a/build/Makefile.asciidoc.inc +++ b/build/Makefile.asciidoc.inc @@ -9,6 +9,7 @@ # generate list of PDFs that we're supposed to render ASCIIDOCPDFS = $(ASCIIDOCS:%=%.pdf) +ASCIIDOC_CHECKS = $(ASCIIDOCS:%=%.check) ASCIIDOCSTYLE ?= $(BUILDDIR)/custom-dblatex.sty @@ -30,3 +31,10 @@ $(ASCIIDOCPDFS): %.pdf: %.adoc %-docinfo.xml $(ASCIIDOCSTYLE) $(TOPDIR)/common/chapters/*.adoc a2x $(A2X_OPTS) $< || asciidoc -f $(BUILDDIR)/mscgen-filter.conf -f $(BUILDDIR)/diag-filter.conf $< + +check: $(ASCIIDOC_CHECKS) + +$(ASCIIDOC_CHECKS): %.check: %.adoc %-docinfo.xml $(ASCIIDOCSTYLE) $(TOPDIR)/common/chapters/*.adoc chapters/*.adoc + asciidoc -v $(ASCIIDOC_OPTS) $< > $@ 2>&1 + touch "$@" + @grep WARNING $@ && exit 1 || exit 0 -- To view, visit https://gerrit.osmocom.org/1089 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibccc83a3415930a528f2e8e4e4dda3b81c6d0b64 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 17 04:53:57 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 04:53:57 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoBTS/abis/rsl: combine separate dyn ts sections Message-ID: Review at https://gerrit.osmocom.org/1090 OsmoBTS/abis/rsl: combine separate dyn ts sections There were two separate sections saying basically the same. Move the entire 'Dynamic Channel Combinations' section further above and combine with the 'IPA Style PDCH Management' section to avoid repetition. Change-Id: Ic370ba34de5cb14f0194ff8c8661e45d7ca98e2b --- M OsmoBTS/abis/rsl.adoc 1 file changed, 78 insertions(+), 80 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/90/1090/1 diff --git a/OsmoBTS/abis/rsl.adoc b/OsmoBTS/abis/rsl.adoc index c9bb555..ed8676e 100644 --- a/OsmoBTS/abis/rsl.adoc +++ b/OsmoBTS/abis/rsl.adoc @@ -350,12 +350,36 @@ See <> -[[ipa_style_pdch_mgmt]] -=== IPA Style PDCH Management +[[rsl-dynamic-channels]] +=== Dynamic Channel Combinations -When using an IPA style dynamic TCH/F+PDCH channel type on an -on-air timeslot, there are a couple of non-standard RSL messages used -in order to activate or deactivate this timeslot in PDCH mode. +In the classic data model established by ETSI/3GPP for A-bis, each +timeslot (channel) is configured using a static channel combination by +means of A-bis OML. Particularly in presence of GPRS services, this +is very unflexible and leads to inefficient use of air interface +resources. + +As such, several methods have been implemented to overcome this +limitation. The fundamental operation can be outlined like this: + +* Configuration of a particular _dynamic_ channel combination via OML +* activation of TCH works like on a classic TCH channel combination +* activation of PDCH requires some specific PDCH activation procedure + +There are two variants implemented in the OsmoBTS A-bis dialect: + +[[ipa_style_pdch_mgmt]] +==== IPA Style Dynamic Channels + +This method is used when OML uses 'NM_CHANC_IPAC_TCHFull_PDCH' (0x80) +as channel combination for the given time-slot. + +'IPA style' refers to 'ip.access' compatible PDCH activation and deactivation. + +When the IPA style dynamic channel combination _TCH/F or PDCH_ +is set, the non-standard 'PDCH ACTIVATE' (<>) and 'PDCH +DEACTIVATE' (<>) procedures are used for switching an idle +channel into PDCH mode and back into idle mode. When the channel is used as TCH/F, regular circuit-switched activation is performed, like on any traditional TCH/F. However, the BSC must @@ -365,7 +389,7 @@ related procedures are used to enable the PDCH. [[pdch_act]] -==== PDCH Activate +===== PDCH Activate This procedure is used by the BSC to request the BTS to activate an IPA style dynamic TCH/F+PDCH channel in PDCH mode. @@ -375,7 +399,7 @@ See <>, <>, <> [[pdch_deact]] -==== PDCH Deactivate +===== PDCH Deactivate This procedure is used by the BSC to request the BTS to deactivate an active PDCH on any an IPA style dynamic TCH/F+PDCH channel. @@ -383,6 +407,53 @@ The operation is not supported on any other physical channel type. See <>, <>, <> + +===== IPA Style Dynamic Switchover Example + +.Example for dynamic channel switchover, for IPA style dynamic timeslots +["mscgen"] +---- +include::dyn_ts_ipa_style.msc[] +---- + + +[[OSMOCOM_DYN_TS]] +==== Osmocom Style Dynamic Channels + +This method is in use when OML uses +'NM_CHANC_OSMO_TCHFull_TCHHalf_PDCH' (0x90) for the given time-slot. + +The activation of PDCH is performed by using the regular 'RSL CHANNEL ACTIVATE' +procedure according to <>, with these modifications: + +* The 'C-bits' part of the 'Channel Number' IE take the non-standard binary + value 11000 (C5 thru C1 as seen in 3GPP TS 08.58 ? 9.3.1). +* The 'A-bits' part of the 'Activation Type' IE take the non-standard binary + value 1111, with an additional fourth bit (add A4 to A3 thru A1 as seen in + 3GPP TS 08.58 ? 9.3.3; all remaining reserved bits as well as the 'R' bit are + coded as zero). +* The normally mandatory 'Channel Mode' IE is omitted; none of the optional IEs + are included. + +Hence the message consists of exactly these IEs: + +.PDCH type _Channel Activation_ message IEs +[options="header",cols="10%,30%,60%"] +|=== +| TS 08.58 ? | IE Name | Handling +| 9.1 | Message discriminator | Dedicated Channel Management +| 9.2 | Message type | CHANnel ACTIVation +| 9.3.1 | Channel number | 'C-bits' 11000, plus TS bits as usual +| 9.3.3 | Activation type | 'A-bits' 1111 +|=== + +===== Osmocom Style Dynamic Switchover Example + +.Example for dynamic channel switchover, for Osmocom style dynamic timeslots +["mscgen"] +---- +include::dyn_ts_osmocom_style.msc[] +---- === Message Formats and Contents @@ -859,77 +930,4 @@ illustrated by the differences of <> and <>. Since the secondary TRX has no BCCH, it does not (need to) receive any 'RSL BCCH INFORMATION' messages from the BSC. - -[[rsl-dynamic-channels]] -=== Dynamic Channel Combinations - -In the classic data model established by ETSI/3GPP for A-bis, each -timeslot (channel) is configured using a static channel combination by -means of A-bis OML. Particularly in presence of GPRS services, this -is very unflexible and leads to inefficient use of air interface -resources. - -As such, several methods have been implemented to overcome this -limitation. The fundamental operation can be outlined like this: - -* Configuration of a particular _dynamic_ channel combination via OML -* activation of TCH works like on a classic TCH channel combination -* activation of PDCH requires some specific PDCH activation procedure - -There are two variants implemented in the OsmoBTS A-bis dialect: - -==== IPA Style Dynamic Channels - -This method is used when OML uses 'NM_CHANC_IPAC_TCHFull_PDCH' (0x80) -as channel combination for the given time-slot. - -'IPA style' refers to 'ip.access' compatible PDCH activation and deactivation. - -When the IPA style dynamic channel combination _TCH/F or PDCH_ -is set, the non-standard 'PDCH ACTIVATE' (<>) and 'PDCH -DEACTIVATE' (<>) procedures are used for switching an idle -channel into PDCH mode and back into idle mode. - -.Example for dynamic channel switchover, for IPA style dynamic timeslots -["mscgen"] ----- -include::dyn_ts_ipa_style.msc[] ----- - -[[OSMOCOM_DYN_TS]] -==== Osmocom Style Dynamic Channels - -This method is in use when OML uses -'NM_CHANC_OSMO_TCHFull_TCHHalf_PDCH' (0x90) for the given time-slot. - -The activation of PDCH is performed by using the regular 'RSL CHANNEL ACTIVATE' -procedure according to <>, with these modifications: - -* The 'C-bits' part of the 'Channel Number' IE take the non-standard binary - value 11000 (C5 thru C1 as seen in 3GPP TS 08.58 ? 9.3.1). -* The 'A-bits' part of the 'Activation Type' IE take the non-standard binary - value 1111, with an additional fourth bit (add A4 to A3 thru A1 as seen in - 3GPP TS 08.58 ? 9.3.3; all remaining reserved bits as well as the 'R' bit are - coded as zero). -* The normally mandatory 'Channel Mode' IE is omitted; none of the optional IEs - are included. - -Hence the message consists of exactly these IEs: - -.PDCH type _Channel Activation_ message IEs -[options="header",cols="10%,30%,60%"] -|=== -| TS 08.58 ? | IE Name | Handling -| 9.1 | Message discriminator | Dedicated Channel Management -| 9.2 | Message type | CHANnel ACTIVation -| 9.3.1 | Channel number | 'C-bits' 11000, plus TS bits as usual -| 9.3.3 | Activation type | 'A-bits' 1111 -|=== - -.Example for dynamic channel switchover, for Osmocom style dynamic timeslots -["mscgen"] ----- -include::dyn_ts_osmocom_style.msc[] ----- - -- To view, visit https://gerrit.osmocom.org/1090 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic370ba34de5cb14f0194ff8c8661e45d7ca98e2b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 17 04:53:57 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 04:53:57 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoBTS/abis/rsl: split dyn TS ladder diagrams to fit on pag... Message-ID: Review at https://gerrit.osmocom.org/1091 OsmoBTS/abis/rsl: split dyn TS ladder diagrams to fit on page Split both of the lengthy mscgen generated ladder diagrams in two so that the diagrams are split over two pages and don't bleed into the page footer. Change-Id: If90250123a85cd275f07c69ee64c6e10a7269f06 --- D OsmoBTS/abis/dyn_ts_ipa_style.msc A OsmoBTS/abis/dyn_ts_ipa_style1.msc A OsmoBTS/abis/dyn_ts_ipa_style2.msc D OsmoBTS/abis/dyn_ts_osmocom_style.msc A OsmoBTS/abis/dyn_ts_osmocom_style1.msc A OsmoBTS/abis/dyn_ts_osmocom_style2.msc M OsmoBTS/abis/rsl.adoc 7 files changed, 125 insertions(+), 103 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/91/1091/1 diff --git a/OsmoBTS/abis/dyn_ts_ipa_style.msc b/OsmoBTS/abis/dyn_ts_ipa_style.msc deleted file mode 100644 index ae7c0d0..0000000 --- a/OsmoBTS/abis/dyn_ts_ipa_style.msc +++ /dev/null @@ -1,39 +0,0 @@ -msc { - hscale = "1.2"; - phy,bts,pcu,bsc; - - phy box bsc [ label = "PDCH Deactivation" ]; - bsc => bts [ label = "IPAC PDCH DEACT" ]; - --- [ label = "Disconnect PDTCH" ]; - bts => pcu [ label = "info ind (Deactivate)" ]; - pcu => bts [ label = "chan Deactivate request" ]; - bts => phy [ label = "L1 chan Deactivate PDTCH SAPIs" ]; - phy -> bts [ label = "L1 chan Deactivate SAPIs confirm" ]; - bts => phy [ label = "L1 chan Disconnect PDTCH" ]; - phy -> bts [ label = "L1 chan Disconnect confirm" ]; - --- [ label = "Connect TCH" ]; - bts => phy [ label = "L1 chan Connect TCH" ]; - phy -> bts [ label = "L1 chan Connect confirm" ]; - bts => bsc [ label = "IPAC PDCH DEACT ACK" ]; - - phy box bsc [ label = "Now BSC may use TCH (example)" ]; - bsc => bts [ label = "Activate TCH/F" ]; - bts => phy [ label = "L1 chan Activate SAPIs" ]; - --- [ label = "Voice call..." ]; - bsc => bts [ label = "Deactivate TCH/F" ]; - bts => phy [ label = "L1 chan Deactivate SAPIs" ]; - - phy box bsc [ label = "PDCH Activation" ]; - bsc => bts [ label = "IPAC PDCH ACT" ]; - --- [ label = "Disconnect TCH" ]; - bts => phy [ label = "L1 chan Disconnect TCH" ]; - phy -> bts [ label = "L1 chan Disconnect confirm" ]; - --- [ label = "Connect PDTCH" ]; - bts => phy [ label = "L1 chan Connect PDTCH" ]; - phy -> bts [ label = "L1 chan Connect confirm" ]; - bts => pcu [ label = "info ind (Activate)" ]; - pcu => bts [ label = "chan Activate request" ]; - bts => phy [ label = "L1 chan Activate PDTCH SAPIs" ]; - phy -> bts [ label = "L1 chan Activate SAPIs confirm" ]; - bts => bsc [ label = "IPAC PDCH ACT ACK" ]; -} diff --git a/OsmoBTS/abis/dyn_ts_ipa_style1.msc b/OsmoBTS/abis/dyn_ts_ipa_style1.msc new file mode 100644 index 0000000..ee91795 --- /dev/null +++ b/OsmoBTS/abis/dyn_ts_ipa_style1.msc @@ -0,0 +1,23 @@ +msc { + hscale = "1.2"; + phy,bts,pcu,bsc; + + phy box bsc [ label = "PDCH Deactivation" ]; + bsc => bts [ label = "IPAC PDCH DEACT" ]; + --- [ label = "Disconnect PDTCH" ]; + bts => pcu [ label = "info ind (Deactivate)" ]; + pcu => bts [ label = "chan Deactivate request" ]; + bts => phy [ label = "L1 chan Deactivate PDTCH SAPIs" ]; + phy -> bts [ label = "L1 chan Deactivate SAPIs confirm" ]; + bts => phy [ label = "L1 chan Disconnect PDTCH" ]; + phy -> bts [ label = "L1 chan Disconnect confirm" ]; + --- [ label = "Connect TCH" ]; + bts => phy [ label = "L1 chan Connect TCH" ]; + phy -> bts [ label = "L1 chan Connect confirm" ]; + bts => bsc [ label = "IPAC PDCH DEACT ACK" ]; + + phy box bsc [ label = "Now BSC may use TCH (example)" ]; + bsc => bts [ label = "Activate TCH/F" ]; + bts => phy [ label = "L1 chan Activate SAPIs" ]; + --- [ label = "Voice call..." ]; +} diff --git a/OsmoBTS/abis/dyn_ts_ipa_style2.msc b/OsmoBTS/abis/dyn_ts_ipa_style2.msc new file mode 100644 index 0000000..c287789 --- /dev/null +++ b/OsmoBTS/abis/dyn_ts_ipa_style2.msc @@ -0,0 +1,22 @@ +msc { + hscale = "1.2"; + phy,bts,pcu,bsc; + + --- [ label = "...Voice call ends" ]; + bsc => bts [ label = "Deactivate TCH/F" ]; + bts => phy [ label = "L1 chan Deactivate SAPIs" ]; + + phy box bsc [ label = "PDCH Activation" ]; + bsc => bts [ label = "IPAC PDCH ACT" ]; + --- [ label = "Disconnect TCH" ]; + bts => phy [ label = "L1 chan Disconnect TCH" ]; + phy -> bts [ label = "L1 chan Disconnect confirm" ]; + --- [ label = "Connect PDTCH" ]; + bts => phy [ label = "L1 chan Connect PDTCH" ]; + phy -> bts [ label = "L1 chan Connect confirm" ]; + bts => pcu [ label = "info ind (Activate)" ]; + pcu => bts [ label = "chan Activate request" ]; + bts => phy [ label = "L1 chan Activate PDTCH SAPIs" ]; + phy -> bts [ label = "L1 chan Activate SAPIs confirm" ]; + bts => bsc [ label = "IPAC PDCH ACT ACK" ]; +} diff --git a/OsmoBTS/abis/dyn_ts_osmocom_style.msc b/OsmoBTS/abis/dyn_ts_osmocom_style.msc deleted file mode 100644 index c929648..0000000 --- a/OsmoBTS/abis/dyn_ts_osmocom_style.msc +++ /dev/null @@ -1,60 +0,0 @@ -msc { - hscale = "1.5"; - phy,bts,pcu,bsc; - - bts => bsc [ label = "RSL Chan Requested" ]; - phy box bsc [ label = "TS is in PDCH mode, deactivate" ]; - bsc => bts [ label = "RSL RF Channel Release (PDCH)" ]; - bts => pcu [ label = "Info Ind (Deactivate)" ]; - pcu => bts [ label = "Chan Deactivate request" ]; - bts => phy [ label = "L1 chan Deactivate PDTCH SAPIs" ]; - phy -> bts [ label = "L1 chan Deactivate SAPIs confirm" ]; - bts -> bsc [ label = "RSL RF Channel Release Ack (PDCH)" ]; - - phy box bsc [ label = "Activate TCH/H" ]; - bsc => bts [ label = "RSL Channel Activation (TCH/H)" ]; - --- [ label = "BTS notices: chan still connected as PDTCH, reconnect" ]; - bts => phy [ label = "L1 chan Disconnect PDTCH" ]; - phy -> bts [ label = "L1 chan Disconnect confirm" ]; - bts => phy [ label = "L1 chan Connect TCH/H" ]; - phy -> bts [ label = "L1 chan Connect confirm" ]; - --- [ label = "chan reconnect as TCH/H complete" ]; - bts => phy [ label = "L1 chan Activate SAPIs" ]; - bts -> bsc [ label = "RSL Channel Activation Ack (TCH/H)" ]; - --- [ label = "Voice call 1 commences..." ]; - - phy box bsc [ label = "A second voice call is requested" ]; - bts => bsc [ label = "RSL Chan Requested" ]; - phy box bsc [ label = "BSC finds second slot on dynamic TS in TCH/H mode" ]; - bsc => bts [ label = "RSL Channel Activation (TCH/H)" ]; - bts => phy [ label = "L1 chan Activate SAPIs" ]; - bts -> bsc [ label = "RSL Channel Activation Ack (TCH/H)" ]; - --- [ label = "Voice call 2 commences..." ]; - - --- [ label = "...Voice call 1 ends" ]; - bts => bsc [ label = "Release Ind" ]; - bsc => bts [ label = "RSL RF Channel Release (TCH/H)" ]; - bts => phy [ label = "L1 chan Deactivate SAPIs" ]; - bts -> bsc [ label = "RSL RF Channel Release Ack (TCH/H)" ]; - --- [ label = "BSC notices: one chan still in use"]; - - --- [ label = "...Voice call 2 ends" ]; - bts => bsc [ label = "Release Ind" ]; - bsc => bts [ label = "RSL RF Channel Release (TCH/H)" ]; - bts => phy [ label = "L1 chan Deactivate SAPIs" ]; - bts -> bsc [ label = "RSL RF Channel Release Ack (TCH/H)" ]; - - phy box bsc [ label = "If all channels on TS are released, PDCH Activation" ]; - bsc => bts [ label = "RSL Channel Activation (PDCH)" ]; - bts -> bsc [ label = "RSL Channel Activation Ack (PDCH) (unconditionally)" ]; - --- [ label = "BTS notices: chan still connected as TCH/H, reconnect" ]; - bts => phy [ label = "L1 chan Disconnect TCH/H" ]; - phy -> bts [ label = "L1 chan Disconnect confirm" ]; - bts => phy [ label = "L1 chan Connect PDTCH" ]; - phy -> bts [ label = "L1 chan Connect confirm" ]; - --- [ label = "chan reconnect as PDTCH complete" ]; - bts => pcu [ label = "Info Ind (Activate)" ]; - pcu => bts [ label = "chan Activate request" ]; - bts => phy [ label = "L1 chan Activate PDTCH SAPIs" ]; - phy -> bts [ label = "L1 chan Activate SAPIs confirm" ]; -} diff --git a/OsmoBTS/abis/dyn_ts_osmocom_style1.msc b/OsmoBTS/abis/dyn_ts_osmocom_style1.msc new file mode 100644 index 0000000..f02f6f6 --- /dev/null +++ b/OsmoBTS/abis/dyn_ts_osmocom_style1.msc @@ -0,0 +1,34 @@ +msc { + hscale = "1.5"; + phy,bts,pcu,bsc; + + bts => bsc [ label = "RSL Chan Requested" ]; + phy box bsc [ label = "TS is in PDCH mode, deactivate" ]; + bsc => bts [ label = "RSL RF Channel Release (PDCH)" ]; + bts => pcu [ label = "Info Ind (Deactivate)" ]; + pcu => bts [ label = "Chan Deactivate request" ]; + bts => phy [ label = "L1 chan Deactivate PDTCH SAPIs" ]; + phy -> bts [ label = "L1 chan Deactivate SAPIs confirm" ]; + bts -> bsc [ label = "RSL RF Channel Release Ack (PDCH)" ]; + + phy box bsc [ label = "Activate TCH/H" ]; + bsc => bts [ label = "RSL Channel Activation (TCH/H)" ]; + --- [ label = "BTS notices: chan still connected as PDTCH, reconnect" ]; + bts => phy [ label = "L1 chan Disconnect PDTCH" ]; + phy -> bts [ label = "L1 chan Disconnect confirm" ]; + bts => phy [ label = "L1 chan Connect TCH/H" ]; + phy -> bts [ label = "L1 chan Connect confirm" ]; + --- [ label = "chan reconnect as TCH/H complete" ]; + bts => phy [ label = "L1 chan Activate SAPIs" ]; + bts -> bsc [ label = "RSL Channel Activation Ack (TCH/H)" ]; + --- [ label = "Voice call 1 commences..." ]; + + phy box bsc [ label = "A second voice call is requested" ]; + bts => bsc [ label = "RSL Chan Requested" ]; + phy box bsc [ label = "BSC finds second slot on dynamic TS in TCH/H mode" ]; + bsc => bts [ label = "RSL Channel Activation (TCH/H)" ]; + bts => phy [ label = "L1 chan Activate SAPIs" ]; + bts -> bsc [ label = "RSL Channel Activation Ack (TCH/H)" ]; + --- [ label = "Voice call 2 commences..." ]; + +} diff --git a/OsmoBTS/abis/dyn_ts_osmocom_style2.msc b/OsmoBTS/abis/dyn_ts_osmocom_style2.msc new file mode 100644 index 0000000..9ea65b6 --- /dev/null +++ b/OsmoBTS/abis/dyn_ts_osmocom_style2.msc @@ -0,0 +1,31 @@ +msc { + hscale = "1.5"; + phy,bts,pcu,bsc; + + --- [ label = "...Voice call 1 ends" ]; + bts => bsc [ label = "Release Ind" ]; + bsc => bts [ label = "RSL RF Channel Release (TCH/H)" ]; + bts => phy [ label = "L1 chan Deactivate SAPIs" ]; + bts -> bsc [ label = "RSL RF Channel Release Ack (TCH/H)" ]; + --- [ label = "BSC notices: one chan still in use"]; + + --- [ label = "...Voice call 2 ends" ]; + bts => bsc [ label = "Release Ind" ]; + bsc => bts [ label = "RSL RF Channel Release (TCH/H)" ]; + bts => phy [ label = "L1 chan Deactivate SAPIs" ]; + bts -> bsc [ label = "RSL RF Channel Release Ack (TCH/H)" ]; + + phy box bsc [ label = "If all channels on TS are released, PDCH Activation" ]; + bsc => bts [ label = "RSL Channel Activation (PDCH)" ]; + bts -> bsc [ label = "RSL Channel Activation Ack (PDCH) (unconditionally)" ]; + --- [ label = "BTS notices: chan still connected as TCH/H, reconnect" ]; + bts => phy [ label = "L1 chan Disconnect TCH/H" ]; + phy -> bts [ label = "L1 chan Disconnect confirm" ]; + bts => phy [ label = "L1 chan Connect PDTCH" ]; + phy -> bts [ label = "L1 chan Connect confirm" ]; + --- [ label = "chan reconnect as PDTCH complete" ]; + bts => pcu [ label = "Info Ind (Activate)" ]; + pcu => bts [ label = "chan Activate request" ]; + bts => phy [ label = "L1 chan Activate PDTCH SAPIs" ]; + phy -> bts [ label = "L1 chan Activate SAPIs confirm" ]; +} diff --git a/OsmoBTS/abis/rsl.adoc b/OsmoBTS/abis/rsl.adoc index ed8676e..33ae26d 100644 --- a/OsmoBTS/abis/rsl.adoc +++ b/OsmoBTS/abis/rsl.adoc @@ -410,10 +410,16 @@ ===== IPA Style Dynamic Switchover Example -.Example for dynamic channel switchover, for IPA style dynamic timeslots +.Part 1: example for dynamic channel switchover, for IPA style dynamic timeslots ["mscgen"] ---- -include::dyn_ts_ipa_style.msc[] +include::dyn_ts_ipa_style1.msc[] +---- + +.Part 2: example for dynamic channel switchover, for IPA style dynamic timeslots +["mscgen"] +---- +include::dyn_ts_ipa_style2.msc[] ---- @@ -449,12 +455,17 @@ ===== Osmocom Style Dynamic Switchover Example -.Example for dynamic channel switchover, for Osmocom style dynamic timeslots +.Part 1: example for dynamic channel switchover, for Osmocom style dynamic timeslots ["mscgen"] ---- -include::dyn_ts_osmocom_style.msc[] +include::dyn_ts_osmocom_style1.msc[] ---- +.Part 2: example for dynamic channel switchover, for Osmocom style dynamic timeslots +["mscgen"] +---- +include::dyn_ts_osmocom_style2.msc[] +---- === Message Formats and Contents -- To view, visit https://gerrit.osmocom.org/1091 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If90250123a85cd275f07c69ee64c6e10a7269f06 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 17 04:53:57 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 04:53:57 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoBSC+NITB/running: fix title levels, one too deep Message-ID: Review at https://gerrit.osmocom.org/1092 OsmoBSC+NITB/running: fix title levels, one too deep Change-Id: If81e44c9a0774e5de39cc536989cef5cb214a224 --- M OsmoBSC/chapters/running.adoc M OsmoNITB/chapters/running.adoc 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/92/1092/1 diff --git a/OsmoBSC/chapters/running.adoc b/OsmoBSC/chapters/running.adoc index 4be6809..6747a29 100644 --- a/OsmoBSC/chapters/running.adoc +++ b/OsmoBSC/chapters/running.adoc @@ -3,11 +3,11 @@ The OsmoBSC executable (`osmo-bsc`) offers the following command-line arguments: -==== SYNOPSIS +=== SYNOPSIS *osmo-bsc* [-h|-V] [-d 'DBGMASK'] [-D] [-c 'CONFIGFILE'] [-s] [-T] [-e 'LOGLEVEL'] [-l 'IP'] [-r 'RFCTL'] -==== OPTIONS +=== OPTIONS *-h, --help*:: Print a short help message about the supported options diff --git a/OsmoNITB/chapters/running.adoc b/OsmoNITB/chapters/running.adoc index 423ecf7..ae2c3fc 100644 --- a/OsmoNITB/chapters/running.adoc +++ b/OsmoNITB/chapters/running.adoc @@ -3,11 +3,11 @@ The OsmoNITB executable (`osmo-nitb`) offers the following command-line arguments: -==== SYNOPSIS +=== SYNOPSIS *osmo-nitb* [-h|-V] [-d 'DBGMASK'] [-D] [-c 'CONFIGFILE'] [-s] [-T] [-e 'LOGLEVEL'] [-l 'DATABASE'] [-a] [-P] [-m] [-C] [-r 'RFCTL'] -==== OPTIONS +=== OPTIONS *-h, --help*:: Print a short help message about the supported options -- To view, visit https://gerrit.osmocom.org/1092 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If81e44c9a0774e5de39cc536989cef5cb214a224 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 17 04:53:58 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 04:53:58 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoBSC: include bts-examples.adoc from OsmoNITB Message-ID: Review at https://gerrit.osmocom.org/1093 OsmoBSC: include bts-examples.adoc from OsmoNITB Change-Id: I6b6d8c413762c710453b228f846216961b578597 --- M OsmoBSC/osmobsc-usermanual.adoc 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/93/1093/1 diff --git a/OsmoBSC/osmobsc-usermanual.adoc b/OsmoBSC/osmobsc-usermanual.adoc index bf1f924..25bd35b 100644 --- a/OsmoBSC/osmobsc-usermanual.adoc +++ b/OsmoBSC/osmobsc-usermanual.adoc @@ -17,7 +17,7 @@ include::../common/chapters/bts.adoc[] -include::chapters/bts-examples.adoc[] +include::../OsmoNITB/chapters/bts-examples.adoc[] include::../common/chapters/bsc.adoc[] -- To view, visit https://gerrit.osmocom.org/1093 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6b6d8c413762c710453b228f846216961b578597 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 17 04:53:58 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 04:53:58 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoNITB: include abis.adoc from common/chapters/ Message-ID: Review at https://gerrit.osmocom.org/1094 OsmoNITB: include abis.adoc from common/chapters/ Change-Id: If3d92fe19d402d77b0db0eb9d00efef0a8d02122 --- M OsmoNITB/osmonitb-usermanual.adoc 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/94/1094/1 diff --git a/OsmoNITB/osmonitb-usermanual.adoc b/OsmoNITB/osmonitb-usermanual.adoc index 8c48476..ec219d9 100644 --- a/OsmoNITB/osmonitb-usermanual.adoc +++ b/OsmoNITB/osmonitb-usermanual.adoc @@ -31,7 +31,7 @@ include::../common/chapters/control_if.adoc[] -include::chapters/abis.adoc[] +include::../common/chapters/abis.adoc[] include::../common/chapters/port_numbers.adoc[] -- To view, visit https://gerrit.osmocom.org/1094 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If3d92fe19d402d77b0db0eb9d00efef0a8d02122 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 17 04:53:58 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 04:53:58 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: jenkins.sh: call 'make check' Message-ID: Review at https://gerrit.osmocom.org/1095 jenkins.sh: call 'make check' Preceding commits have eradicated all warnings found by the 'make check' target being added here. Call from jenkins.sh now that it will no longer fail. Change-Id: I4e1a15b7a7ed50637b1c020dcd962f42d3ced08f --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/95/1095/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 2e1d617..a6f51a8 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -12,3 +12,4 @@ cd "$base" $MAKE $PARALLEL_MAKE LIBOSMO_DIR="$deps/libosmocore" +$MAKE $PARALLEL_MAKE LIBOSMO_DIR="$deps/libosmocore" check -- To view, visit https://gerrit.osmocom.org/1095 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4e1a15b7a7ed50637b1c020dcd962f42d3ced08f Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 17 04:53:58 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 04:53:58 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: fix 'make clean': shell glob, ignore failure Message-ID: Review at https://gerrit.osmocom.org/1096 fix 'make clean': shell glob, ignore failure Unfortunately a glob like osmo-x__*.{svg,png} doesn't work, so have the suffixes in separate globs. Add dashes to indicate that failure should be ignored. Change-Id: I6bc4d9ea72b43a573acbc860c23397f748de2c7b --- M OsmoBSC/Makefile M OsmoBTS/Makefile M OsmoMGCP/Makefile M OsmoNAT/Makefile M OsmoNITB/Makefile M OsmoPCU/Makefile M OsmoSGSN/Makefile 7 files changed, 25 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/96/1096/1 diff --git a/OsmoBSC/Makefile b/OsmoBSC/Makefile index 9fc6f26..284ac3b 100644 --- a/OsmoBSC/Makefile +++ b/OsmoBSC/Makefile @@ -23,8 +23,10 @@ osmobsc-usermanual.pdf: chapters/*.adoc clean: - rm -rf $(cleanfiles) - rm -rf osmobsc-usermanual__*.{svg,png,check} + -rm -rf $(cleanfiles) + -rm osmobsc-usermanual__*.png + -rm osmobsc-usermanual__*.svg + -rm osmobsc-usermanual*.check gen-bsc-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoBTS/Makefile b/OsmoBTS/Makefile index 0587de8..1b4e738 100644 --- a/OsmoBTS/Makefile +++ b/OsmoBTS/Makefile @@ -11,6 +11,10 @@ osmobts-usermanual.pdf: chapters/*.adoc clean: - rm -rf $(cleanfiles) - rm -rf osmobts-abis__*.{svg,png,check} - rm -rf osmobts-usermanual__*.{svg,png,check} + -rm -rf $(cleanfiles) + -rm osmobts-abis__*.png + -rm osmobts-abis__*.svg + -rm osmobts-usermanual__*.png + -rm osmobts-usermanual__*.svg + -rm osmobts-abis*.check + -rm osmobts-usermanual*.check diff --git a/OsmoMGCP/Makefile b/OsmoMGCP/Makefile index aba8e3d..9aff12b 100644 --- a/OsmoMGCP/Makefile +++ b/OsmoMGCP/Makefile @@ -16,7 +16,7 @@ include ../build/Makefile.inc clean: - rm -rf $(cleanfiles) + -rm -rf $(cleanfiles) gen-mgcp-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoNAT/Makefile b/OsmoNAT/Makefile index 3ace4d2..d7302e6 100644 --- a/OsmoNAT/Makefile +++ b/OsmoNAT/Makefile @@ -16,7 +16,7 @@ include ../build/Makefile.inc clean: - rm -rf $(cleanfiles) + -rm -rf $(cleanfiles) gen-nat-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoNITB/Makefile b/OsmoNITB/Makefile index e68b9b0..99cd317 100644 --- a/OsmoNITB/Makefile +++ b/OsmoNITB/Makefile @@ -22,8 +22,10 @@ osmonitb-usermanual.pdf: chapters/*.adoc clean: - rm -rf $(cleanfiles) - rm -rf osmonitb-usermanual__*.{svg,png,check} + -rm -rf $(cleanfiles) + -rm osmonitb-usermanual__*.svg + -rm osmonitb-usermanual__*.png + -rm osmonitb-usermanual.check gen-nitb-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoPCU/Makefile b/OsmoPCU/Makefile index 1f06183..a83b909 100644 --- a/OsmoPCU/Makefile +++ b/OsmoPCU/Makefile @@ -23,9 +23,11 @@ osmopcu-usermanual.pdf: chapters/*.adoc clean: - rm -rf $(cleanfiles) - rm -rf gen-vty-docbook - rm -rf osmopcu-usermanual__*.{svg,png,check} + -rm -rf $(cleanfiles) + -rm -rf gen-vty-docbook + -rm osmopcu-usermanual__*.png + -rm osmopcu-usermanual__*.svg + -rm osmopcu-usermanual.check gen-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoSGSN/Makefile b/OsmoSGSN/Makefile index 7df5168..6f7d28d 100644 --- a/OsmoSGSN/Makefile +++ b/OsmoSGSN/Makefile @@ -22,8 +22,9 @@ osmosgsn-usermanual.pdf: chapters/*.adoc clean: - rm -rf osmosgsn-usermanual__*.{svg,png,check} - rm -rf $(cleanfiles) + -rm -rf $(cleanfiles) + -rm osmosgsn-usermanual__*.svg osmosgsn-usermanual__*.png + -rm osmosgsn-usermanual.check gen-sgsn-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ -- To view, visit https://gerrit.osmocom.org/1096 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6bc4d9ea72b43a573acbc860c23397f748de2c7b Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 17 04:54:49 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 04:54:49 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoBTS/abis/rsl: split dyn TS ladder diagrams to fit on page In-Reply-To: References: Message-ID: OsmoBTS/abis/rsl: split dyn TS ladder diagrams to fit on page Split both of the lengthy mscgen generated ladder diagrams in two so that the diagrams are split over two pages and don't bleed into the page footer. Change-Id: If90250123a85cd275f07c69ee64c6e10a7269f06 --- D OsmoBTS/abis/dyn_ts_ipa_style.msc A OsmoBTS/abis/dyn_ts_ipa_style1.msc A OsmoBTS/abis/dyn_ts_ipa_style2.msc D OsmoBTS/abis/dyn_ts_osmocom_style.msc A OsmoBTS/abis/dyn_ts_osmocom_style1.msc A OsmoBTS/abis/dyn_ts_osmocom_style2.msc M OsmoBTS/abis/rsl.adoc 7 files changed, 125 insertions(+), 103 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/91/1091/2 diff --git a/OsmoBTS/abis/dyn_ts_ipa_style.msc b/OsmoBTS/abis/dyn_ts_ipa_style.msc deleted file mode 100644 index ae7c0d0..0000000 --- a/OsmoBTS/abis/dyn_ts_ipa_style.msc +++ /dev/null @@ -1,39 +0,0 @@ -msc { - hscale = "1.2"; - phy,bts,pcu,bsc; - - phy box bsc [ label = "PDCH Deactivation" ]; - bsc => bts [ label = "IPAC PDCH DEACT" ]; - --- [ label = "Disconnect PDTCH" ]; - bts => pcu [ label = "info ind (Deactivate)" ]; - pcu => bts [ label = "chan Deactivate request" ]; - bts => phy [ label = "L1 chan Deactivate PDTCH SAPIs" ]; - phy -> bts [ label = "L1 chan Deactivate SAPIs confirm" ]; - bts => phy [ label = "L1 chan Disconnect PDTCH" ]; - phy -> bts [ label = "L1 chan Disconnect confirm" ]; - --- [ label = "Connect TCH" ]; - bts => phy [ label = "L1 chan Connect TCH" ]; - phy -> bts [ label = "L1 chan Connect confirm" ]; - bts => bsc [ label = "IPAC PDCH DEACT ACK" ]; - - phy box bsc [ label = "Now BSC may use TCH (example)" ]; - bsc => bts [ label = "Activate TCH/F" ]; - bts => phy [ label = "L1 chan Activate SAPIs" ]; - --- [ label = "Voice call..." ]; - bsc => bts [ label = "Deactivate TCH/F" ]; - bts => phy [ label = "L1 chan Deactivate SAPIs" ]; - - phy box bsc [ label = "PDCH Activation" ]; - bsc => bts [ label = "IPAC PDCH ACT" ]; - --- [ label = "Disconnect TCH" ]; - bts => phy [ label = "L1 chan Disconnect TCH" ]; - phy -> bts [ label = "L1 chan Disconnect confirm" ]; - --- [ label = "Connect PDTCH" ]; - bts => phy [ label = "L1 chan Connect PDTCH" ]; - phy -> bts [ label = "L1 chan Connect confirm" ]; - bts => pcu [ label = "info ind (Activate)" ]; - pcu => bts [ label = "chan Activate request" ]; - bts => phy [ label = "L1 chan Activate PDTCH SAPIs" ]; - phy -> bts [ label = "L1 chan Activate SAPIs confirm" ]; - bts => bsc [ label = "IPAC PDCH ACT ACK" ]; -} diff --git a/OsmoBTS/abis/dyn_ts_ipa_style1.msc b/OsmoBTS/abis/dyn_ts_ipa_style1.msc new file mode 100644 index 0000000..ee91795 --- /dev/null +++ b/OsmoBTS/abis/dyn_ts_ipa_style1.msc @@ -0,0 +1,23 @@ +msc { + hscale = "1.2"; + phy,bts,pcu,bsc; + + phy box bsc [ label = "PDCH Deactivation" ]; + bsc => bts [ label = "IPAC PDCH DEACT" ]; + --- [ label = "Disconnect PDTCH" ]; + bts => pcu [ label = "info ind (Deactivate)" ]; + pcu => bts [ label = "chan Deactivate request" ]; + bts => phy [ label = "L1 chan Deactivate PDTCH SAPIs" ]; + phy -> bts [ label = "L1 chan Deactivate SAPIs confirm" ]; + bts => phy [ label = "L1 chan Disconnect PDTCH" ]; + phy -> bts [ label = "L1 chan Disconnect confirm" ]; + --- [ label = "Connect TCH" ]; + bts => phy [ label = "L1 chan Connect TCH" ]; + phy -> bts [ label = "L1 chan Connect confirm" ]; + bts => bsc [ label = "IPAC PDCH DEACT ACK" ]; + + phy box bsc [ label = "Now BSC may use TCH (example)" ]; + bsc => bts [ label = "Activate TCH/F" ]; + bts => phy [ label = "L1 chan Activate SAPIs" ]; + --- [ label = "Voice call..." ]; +} diff --git a/OsmoBTS/abis/dyn_ts_ipa_style2.msc b/OsmoBTS/abis/dyn_ts_ipa_style2.msc new file mode 100644 index 0000000..c287789 --- /dev/null +++ b/OsmoBTS/abis/dyn_ts_ipa_style2.msc @@ -0,0 +1,22 @@ +msc { + hscale = "1.2"; + phy,bts,pcu,bsc; + + --- [ label = "...Voice call ends" ]; + bsc => bts [ label = "Deactivate TCH/F" ]; + bts => phy [ label = "L1 chan Deactivate SAPIs" ]; + + phy box bsc [ label = "PDCH Activation" ]; + bsc => bts [ label = "IPAC PDCH ACT" ]; + --- [ label = "Disconnect TCH" ]; + bts => phy [ label = "L1 chan Disconnect TCH" ]; + phy -> bts [ label = "L1 chan Disconnect confirm" ]; + --- [ label = "Connect PDTCH" ]; + bts => phy [ label = "L1 chan Connect PDTCH" ]; + phy -> bts [ label = "L1 chan Connect confirm" ]; + bts => pcu [ label = "info ind (Activate)" ]; + pcu => bts [ label = "chan Activate request" ]; + bts => phy [ label = "L1 chan Activate PDTCH SAPIs" ]; + phy -> bts [ label = "L1 chan Activate SAPIs confirm" ]; + bts => bsc [ label = "IPAC PDCH ACT ACK" ]; +} diff --git a/OsmoBTS/abis/dyn_ts_osmocom_style.msc b/OsmoBTS/abis/dyn_ts_osmocom_style.msc deleted file mode 100644 index c929648..0000000 --- a/OsmoBTS/abis/dyn_ts_osmocom_style.msc +++ /dev/null @@ -1,60 +0,0 @@ -msc { - hscale = "1.5"; - phy,bts,pcu,bsc; - - bts => bsc [ label = "RSL Chan Requested" ]; - phy box bsc [ label = "TS is in PDCH mode, deactivate" ]; - bsc => bts [ label = "RSL RF Channel Release (PDCH)" ]; - bts => pcu [ label = "Info Ind (Deactivate)" ]; - pcu => bts [ label = "Chan Deactivate request" ]; - bts => phy [ label = "L1 chan Deactivate PDTCH SAPIs" ]; - phy -> bts [ label = "L1 chan Deactivate SAPIs confirm" ]; - bts -> bsc [ label = "RSL RF Channel Release Ack (PDCH)" ]; - - phy box bsc [ label = "Activate TCH/H" ]; - bsc => bts [ label = "RSL Channel Activation (TCH/H)" ]; - --- [ label = "BTS notices: chan still connected as PDTCH, reconnect" ]; - bts => phy [ label = "L1 chan Disconnect PDTCH" ]; - phy -> bts [ label = "L1 chan Disconnect confirm" ]; - bts => phy [ label = "L1 chan Connect TCH/H" ]; - phy -> bts [ label = "L1 chan Connect confirm" ]; - --- [ label = "chan reconnect as TCH/H complete" ]; - bts => phy [ label = "L1 chan Activate SAPIs" ]; - bts -> bsc [ label = "RSL Channel Activation Ack (TCH/H)" ]; - --- [ label = "Voice call 1 commences..." ]; - - phy box bsc [ label = "A second voice call is requested" ]; - bts => bsc [ label = "RSL Chan Requested" ]; - phy box bsc [ label = "BSC finds second slot on dynamic TS in TCH/H mode" ]; - bsc => bts [ label = "RSL Channel Activation (TCH/H)" ]; - bts => phy [ label = "L1 chan Activate SAPIs" ]; - bts -> bsc [ label = "RSL Channel Activation Ack (TCH/H)" ]; - --- [ label = "Voice call 2 commences..." ]; - - --- [ label = "...Voice call 1 ends" ]; - bts => bsc [ label = "Release Ind" ]; - bsc => bts [ label = "RSL RF Channel Release (TCH/H)" ]; - bts => phy [ label = "L1 chan Deactivate SAPIs" ]; - bts -> bsc [ label = "RSL RF Channel Release Ack (TCH/H)" ]; - --- [ label = "BSC notices: one chan still in use"]; - - --- [ label = "...Voice call 2 ends" ]; - bts => bsc [ label = "Release Ind" ]; - bsc => bts [ label = "RSL RF Channel Release (TCH/H)" ]; - bts => phy [ label = "L1 chan Deactivate SAPIs" ]; - bts -> bsc [ label = "RSL RF Channel Release Ack (TCH/H)" ]; - - phy box bsc [ label = "If all channels on TS are released, PDCH Activation" ]; - bsc => bts [ label = "RSL Channel Activation (PDCH)" ]; - bts -> bsc [ label = "RSL Channel Activation Ack (PDCH) (unconditionally)" ]; - --- [ label = "BTS notices: chan still connected as TCH/H, reconnect" ]; - bts => phy [ label = "L1 chan Disconnect TCH/H" ]; - phy -> bts [ label = "L1 chan Disconnect confirm" ]; - bts => phy [ label = "L1 chan Connect PDTCH" ]; - phy -> bts [ label = "L1 chan Connect confirm" ]; - --- [ label = "chan reconnect as PDTCH complete" ]; - bts => pcu [ label = "Info Ind (Activate)" ]; - pcu => bts [ label = "chan Activate request" ]; - bts => phy [ label = "L1 chan Activate PDTCH SAPIs" ]; - phy -> bts [ label = "L1 chan Activate SAPIs confirm" ]; -} diff --git a/OsmoBTS/abis/dyn_ts_osmocom_style1.msc b/OsmoBTS/abis/dyn_ts_osmocom_style1.msc new file mode 100644 index 0000000..f02f6f6 --- /dev/null +++ b/OsmoBTS/abis/dyn_ts_osmocom_style1.msc @@ -0,0 +1,34 @@ +msc { + hscale = "1.5"; + phy,bts,pcu,bsc; + + bts => bsc [ label = "RSL Chan Requested" ]; + phy box bsc [ label = "TS is in PDCH mode, deactivate" ]; + bsc => bts [ label = "RSL RF Channel Release (PDCH)" ]; + bts => pcu [ label = "Info Ind (Deactivate)" ]; + pcu => bts [ label = "Chan Deactivate request" ]; + bts => phy [ label = "L1 chan Deactivate PDTCH SAPIs" ]; + phy -> bts [ label = "L1 chan Deactivate SAPIs confirm" ]; + bts -> bsc [ label = "RSL RF Channel Release Ack (PDCH)" ]; + + phy box bsc [ label = "Activate TCH/H" ]; + bsc => bts [ label = "RSL Channel Activation (TCH/H)" ]; + --- [ label = "BTS notices: chan still connected as PDTCH, reconnect" ]; + bts => phy [ label = "L1 chan Disconnect PDTCH" ]; + phy -> bts [ label = "L1 chan Disconnect confirm" ]; + bts => phy [ label = "L1 chan Connect TCH/H" ]; + phy -> bts [ label = "L1 chan Connect confirm" ]; + --- [ label = "chan reconnect as TCH/H complete" ]; + bts => phy [ label = "L1 chan Activate SAPIs" ]; + bts -> bsc [ label = "RSL Channel Activation Ack (TCH/H)" ]; + --- [ label = "Voice call 1 commences..." ]; + + phy box bsc [ label = "A second voice call is requested" ]; + bts => bsc [ label = "RSL Chan Requested" ]; + phy box bsc [ label = "BSC finds second slot on dynamic TS in TCH/H mode" ]; + bsc => bts [ label = "RSL Channel Activation (TCH/H)" ]; + bts => phy [ label = "L1 chan Activate SAPIs" ]; + bts -> bsc [ label = "RSL Channel Activation Ack (TCH/H)" ]; + --- [ label = "Voice call 2 commences..." ]; + +} diff --git a/OsmoBTS/abis/dyn_ts_osmocom_style2.msc b/OsmoBTS/abis/dyn_ts_osmocom_style2.msc new file mode 100644 index 0000000..9ea65b6 --- /dev/null +++ b/OsmoBTS/abis/dyn_ts_osmocom_style2.msc @@ -0,0 +1,31 @@ +msc { + hscale = "1.5"; + phy,bts,pcu,bsc; + + --- [ label = "...Voice call 1 ends" ]; + bts => bsc [ label = "Release Ind" ]; + bsc => bts [ label = "RSL RF Channel Release (TCH/H)" ]; + bts => phy [ label = "L1 chan Deactivate SAPIs" ]; + bts -> bsc [ label = "RSL RF Channel Release Ack (TCH/H)" ]; + --- [ label = "BSC notices: one chan still in use"]; + + --- [ label = "...Voice call 2 ends" ]; + bts => bsc [ label = "Release Ind" ]; + bsc => bts [ label = "RSL RF Channel Release (TCH/H)" ]; + bts => phy [ label = "L1 chan Deactivate SAPIs" ]; + bts -> bsc [ label = "RSL RF Channel Release Ack (TCH/H)" ]; + + phy box bsc [ label = "If all channels on TS are released, PDCH Activation" ]; + bsc => bts [ label = "RSL Channel Activation (PDCH)" ]; + bts -> bsc [ label = "RSL Channel Activation Ack (PDCH) (unconditionally)" ]; + --- [ label = "BTS notices: chan still connected as TCH/H, reconnect" ]; + bts => phy [ label = "L1 chan Disconnect TCH/H" ]; + phy -> bts [ label = "L1 chan Disconnect confirm" ]; + bts => phy [ label = "L1 chan Connect PDTCH" ]; + phy -> bts [ label = "L1 chan Connect confirm" ]; + --- [ label = "chan reconnect as PDTCH complete" ]; + bts => pcu [ label = "Info Ind (Activate)" ]; + pcu => bts [ label = "chan Activate request" ]; + bts => phy [ label = "L1 chan Activate PDTCH SAPIs" ]; + phy -> bts [ label = "L1 chan Activate SAPIs confirm" ]; +} diff --git a/OsmoBTS/abis/rsl.adoc b/OsmoBTS/abis/rsl.adoc index ed8676e..33ae26d 100644 --- a/OsmoBTS/abis/rsl.adoc +++ b/OsmoBTS/abis/rsl.adoc @@ -410,10 +410,16 @@ ===== IPA Style Dynamic Switchover Example -.Example for dynamic channel switchover, for IPA style dynamic timeslots +.Part 1: example for dynamic channel switchover, for IPA style dynamic timeslots ["mscgen"] ---- -include::dyn_ts_ipa_style.msc[] +include::dyn_ts_ipa_style1.msc[] +---- + +.Part 2: example for dynamic channel switchover, for IPA style dynamic timeslots +["mscgen"] +---- +include::dyn_ts_ipa_style2.msc[] ---- @@ -449,12 +455,17 @@ ===== Osmocom Style Dynamic Switchover Example -.Example for dynamic channel switchover, for Osmocom style dynamic timeslots +.Part 1: example for dynamic channel switchover, for Osmocom style dynamic timeslots ["mscgen"] ---- -include::dyn_ts_osmocom_style.msc[] +include::dyn_ts_osmocom_style1.msc[] ---- +.Part 2: example for dynamic channel switchover, for Osmocom style dynamic timeslots +["mscgen"] +---- +include::dyn_ts_osmocom_style2.msc[] +---- === Message Formats and Contents -- To view, visit https://gerrit.osmocom.org/1091 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If90250123a85cd275f07c69ee64c6e10a7269f06 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 17 04:54:49 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 04:54:49 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoBSC+NITB/running: fix title levels, one too deep In-Reply-To: References: Message-ID: OsmoBSC+NITB/running: fix title levels, one too deep Change-Id: If81e44c9a0774e5de39cc536989cef5cb214a224 --- M OsmoBSC/chapters/running.adoc M OsmoNITB/chapters/running.adoc 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/92/1092/2 diff --git a/OsmoBSC/chapters/running.adoc b/OsmoBSC/chapters/running.adoc index 4be6809..6747a29 100644 --- a/OsmoBSC/chapters/running.adoc +++ b/OsmoBSC/chapters/running.adoc @@ -3,11 +3,11 @@ The OsmoBSC executable (`osmo-bsc`) offers the following command-line arguments: -==== SYNOPSIS +=== SYNOPSIS *osmo-bsc* [-h|-V] [-d 'DBGMASK'] [-D] [-c 'CONFIGFILE'] [-s] [-T] [-e 'LOGLEVEL'] [-l 'IP'] [-r 'RFCTL'] -==== OPTIONS +=== OPTIONS *-h, --help*:: Print a short help message about the supported options diff --git a/OsmoNITB/chapters/running.adoc b/OsmoNITB/chapters/running.adoc index 423ecf7..ae2c3fc 100644 --- a/OsmoNITB/chapters/running.adoc +++ b/OsmoNITB/chapters/running.adoc @@ -3,11 +3,11 @@ The OsmoNITB executable (`osmo-nitb`) offers the following command-line arguments: -==== SYNOPSIS +=== SYNOPSIS *osmo-nitb* [-h|-V] [-d 'DBGMASK'] [-D] [-c 'CONFIGFILE'] [-s] [-T] [-e 'LOGLEVEL'] [-l 'DATABASE'] [-a] [-P] [-m] [-C] [-r 'RFCTL'] -==== OPTIONS +=== OPTIONS *-h, --help*:: Print a short help message about the supported options -- To view, visit https://gerrit.osmocom.org/1092 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If81e44c9a0774e5de39cc536989cef5cb214a224 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 17 04:54:49 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 04:54:49 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoBSC: include bts-examples.adoc from OsmoNITB In-Reply-To: References: Message-ID: OsmoBSC: include bts-examples.adoc from OsmoNITB Change-Id: I6b6d8c413762c710453b228f846216961b578597 --- M OsmoBSC/osmobsc-usermanual.adoc 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/93/1093/2 diff --git a/OsmoBSC/osmobsc-usermanual.adoc b/OsmoBSC/osmobsc-usermanual.adoc index bf1f924..25bd35b 100644 --- a/OsmoBSC/osmobsc-usermanual.adoc +++ b/OsmoBSC/osmobsc-usermanual.adoc @@ -17,7 +17,7 @@ include::../common/chapters/bts.adoc[] -include::chapters/bts-examples.adoc[] +include::../OsmoNITB/chapters/bts-examples.adoc[] include::../common/chapters/bsc.adoc[] -- To view, visit https://gerrit.osmocom.org/1093 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6b6d8c413762c710453b228f846216961b578597 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 17 04:54:49 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 04:54:49 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoNITB: include abis.adoc from common/chapters/ In-Reply-To: References: Message-ID: OsmoNITB: include abis.adoc from common/chapters/ Change-Id: If3d92fe19d402d77b0db0eb9d00efef0a8d02122 --- M OsmoNITB/osmonitb-usermanual.adoc 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/94/1094/2 diff --git a/OsmoNITB/osmonitb-usermanual.adoc b/OsmoNITB/osmonitb-usermanual.adoc index 8c48476..ec219d9 100644 --- a/OsmoNITB/osmonitb-usermanual.adoc +++ b/OsmoNITB/osmonitb-usermanual.adoc @@ -31,7 +31,7 @@ include::../common/chapters/control_if.adoc[] -include::chapters/abis.adoc[] +include::../common/chapters/abis.adoc[] include::../common/chapters/port_numbers.adoc[] -- To view, visit https://gerrit.osmocom.org/1094 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If3d92fe19d402d77b0db0eb9d00efef0a8d02122 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 17 04:54:49 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 04:54:49 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: jenkins.sh: call 'make check' In-Reply-To: References: Message-ID: jenkins.sh: call 'make check' Preceding commits have eradicated all warnings found by the 'make check' target being added here. Call from jenkins.sh now that it will no longer fail. Change-Id: I4e1a15b7a7ed50637b1c020dcd962f42d3ced08f --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/95/1095/2 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 2e1d617..a6f51a8 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -12,3 +12,4 @@ cd "$base" $MAKE $PARALLEL_MAKE LIBOSMO_DIR="$deps/libosmocore" +$MAKE $PARALLEL_MAKE LIBOSMO_DIR="$deps/libosmocore" check -- To view, visit https://gerrit.osmocom.org/1095 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4e1a15b7a7ed50637b1c020dcd962f42d3ced08f Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 17 04:54:49 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 04:54:49 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: fix 'make clean': shell glob, ignore failure In-Reply-To: References: Message-ID: fix 'make clean': shell glob, ignore failure Unfortunately a glob like osmo-x__*.{svg,png} doesn't work, so have the suffixes in separate globs. Add dashes to indicate that failure should be ignored. Change-Id: I6bc4d9ea72b43a573acbc860c23397f748de2c7b --- M OsmoBSC/Makefile M OsmoBTS/Makefile M OsmoMGCP/Makefile M OsmoNAT/Makefile M OsmoNITB/Makefile M OsmoPCU/Makefile M OsmoSGSN/Makefile 7 files changed, 25 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/96/1096/2 diff --git a/OsmoBSC/Makefile b/OsmoBSC/Makefile index 9fc6f26..284ac3b 100644 --- a/OsmoBSC/Makefile +++ b/OsmoBSC/Makefile @@ -23,8 +23,10 @@ osmobsc-usermanual.pdf: chapters/*.adoc clean: - rm -rf $(cleanfiles) - rm -rf osmobsc-usermanual__*.{svg,png,check} + -rm -rf $(cleanfiles) + -rm osmobsc-usermanual__*.png + -rm osmobsc-usermanual__*.svg + -rm osmobsc-usermanual*.check gen-bsc-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoBTS/Makefile b/OsmoBTS/Makefile index 0587de8..1b4e738 100644 --- a/OsmoBTS/Makefile +++ b/OsmoBTS/Makefile @@ -11,6 +11,10 @@ osmobts-usermanual.pdf: chapters/*.adoc clean: - rm -rf $(cleanfiles) - rm -rf osmobts-abis__*.{svg,png,check} - rm -rf osmobts-usermanual__*.{svg,png,check} + -rm -rf $(cleanfiles) + -rm osmobts-abis__*.png + -rm osmobts-abis__*.svg + -rm osmobts-usermanual__*.png + -rm osmobts-usermanual__*.svg + -rm osmobts-abis*.check + -rm osmobts-usermanual*.check diff --git a/OsmoMGCP/Makefile b/OsmoMGCP/Makefile index aba8e3d..9aff12b 100644 --- a/OsmoMGCP/Makefile +++ b/OsmoMGCP/Makefile @@ -16,7 +16,7 @@ include ../build/Makefile.inc clean: - rm -rf $(cleanfiles) + -rm -rf $(cleanfiles) gen-mgcp-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoNAT/Makefile b/OsmoNAT/Makefile index 3ace4d2..d7302e6 100644 --- a/OsmoNAT/Makefile +++ b/OsmoNAT/Makefile @@ -16,7 +16,7 @@ include ../build/Makefile.inc clean: - rm -rf $(cleanfiles) + -rm -rf $(cleanfiles) gen-nat-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoNITB/Makefile b/OsmoNITB/Makefile index e68b9b0..99cd317 100644 --- a/OsmoNITB/Makefile +++ b/OsmoNITB/Makefile @@ -22,8 +22,10 @@ osmonitb-usermanual.pdf: chapters/*.adoc clean: - rm -rf $(cleanfiles) - rm -rf osmonitb-usermanual__*.{svg,png,check} + -rm -rf $(cleanfiles) + -rm osmonitb-usermanual__*.svg + -rm osmonitb-usermanual__*.png + -rm osmonitb-usermanual.check gen-nitb-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoPCU/Makefile b/OsmoPCU/Makefile index 1f06183..a83b909 100644 --- a/OsmoPCU/Makefile +++ b/OsmoPCU/Makefile @@ -23,9 +23,11 @@ osmopcu-usermanual.pdf: chapters/*.adoc clean: - rm -rf $(cleanfiles) - rm -rf gen-vty-docbook - rm -rf osmopcu-usermanual__*.{svg,png,check} + -rm -rf $(cleanfiles) + -rm -rf gen-vty-docbook + -rm osmopcu-usermanual__*.png + -rm osmopcu-usermanual__*.svg + -rm osmopcu-usermanual.check gen-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoSGSN/Makefile b/OsmoSGSN/Makefile index 7df5168..6f7d28d 100644 --- a/OsmoSGSN/Makefile +++ b/OsmoSGSN/Makefile @@ -22,8 +22,9 @@ osmosgsn-usermanual.pdf: chapters/*.adoc clean: - rm -rf osmosgsn-usermanual__*.{svg,png,check} - rm -rf $(cleanfiles) + -rm -rf $(cleanfiles) + -rm osmosgsn-usermanual__*.svg osmosgsn-usermanual__*.png + -rm osmosgsn-usermanual.check gen-sgsn-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ -- To view, visit https://gerrit.osmocom.org/1096 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6bc4d9ea72b43a573acbc860c23397f748de2c7b Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 17 05:26:14 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 05:26:14 +0000 Subject: osmo-gsm-manuals[master]: add jenkins.sh script for jenkins build job In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1080 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6c3d959202f510f0c9780d0fa28c769ea9d721e8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals 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 Oct 17 05:26:21 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 05:26:21 +0000 Subject: osmo-gsm-manuals[master]: portability: use py script instead of 'date -d @1234' In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1081 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I91a40656184f553ee375216d8ba5c7788fe9990d Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals 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 Oct 17 05:33:04 2016 From: gerrit-no-reply at lists.osmocom.org (pravin) Date: Mon, 17 Oct 2016 05:33:04 +0000 Subject: [PATCH] osmo-pcu[master]: EGPRS: Add EPDAN CRBB Tree based decoding In-Reply-To: References: Message-ID: Hello Max, Neels Hofmeyr, arvind.sirsikar, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/416 to look at the new patch set (#29). EGPRS: Add EPDAN CRBB Tree based decoding Implemented tree based algorithm to decode compressed bitmap in EPDAN as described in section 9.1.10 of 3GPP 44.060. This algorithm intends to improve the performance over existing method. New Regression test is added under bitcomp directory. Test case is added to validate decompressed result of the bitmap Present in EPDAN. Test is done for multiple bitmaps of varying length. Invalid inputs are also part of the test vector. Change-Id: Ieae1992ed4b02bb1e09eec2d3de1a030eabd16ce --- M src/Makefile.am M src/decoding.cpp A src/egprs_rlc_compression.cpp A src/egprs_rlc_compression.h M tests/Makefile.am A tests/bitcomp/BitcompTest.cpp A tests/bitcomp/BitcompTest.err A tests/bitcomp/BitcompTest.ok M tests/testsuite.at 9 files changed, 787 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/16/416/29 diff --git a/src/Makefile.am b/src/Makefile.am index 9bdec2f..9b047e7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -62,7 +62,8 @@ rlc.cpp \ osmobts_sock.cpp \ gprs_codel.c \ - gprs_coding_scheme.cpp + gprs_coding_scheme.cpp \ + egprs_rlc_compression.cpp bin_PROGRAMS = \ osmo-pcu @@ -94,7 +95,8 @@ pcu_utils.h \ cxx_linuxlist.h \ gprs_codel.h \ - gprs_coding_scheme.h + gprs_coding_scheme.h \ + egprs_rlc_compression.h osmo_pcu_SOURCES = pcu_main.cpp diff --git a/src/decoding.cpp b/src/decoding.cpp index 3f5c4d2..6ae4b16 100644 --- a/src/decoding.cpp +++ b/src/decoding.cpp @@ -20,6 +20,7 @@ #include #include #include +#include extern "C" { #include @@ -692,21 +693,17 @@ if (crbb_len > 0) { int old_len = bits->cur_bit; - struct bitvec crbb; - crbb.data = (uint8_t *)desc->CRBB; - crbb.data_len = sizeof(desc->CRBB); - crbb.cur_bit = desc->CRBB_LENGTH; - - rc = osmo_t4_decode(&crbb, desc->CRBB_STARTING_COLOR_CODE, - bits); - + LOGP(DRLCMACDL, LOGL_DEBUG, "Compress bitmap exists, " + "CRBB LEN = %d and Starting color code = %d", + desc->CRBB_LENGTH, desc->CRBB_STARTING_COLOR_CODE); + rc = egprs_compress::decompress_crbb(desc->CRBB_LENGTH, + desc->CRBB_STARTING_COLOR_CODE, desc->CRBB, bits); if (rc < 0) { LOGP(DRLCMACUL, LOGL_NOTICE, - "Failed to decode CRBB: " - "length %d, data '%s'\n", - desc->CRBB_LENGTH, - osmo_hexdump(crbb.data, crbb.data_len)); + "Failed to decode CRBB: length %d, data '%s'\n", + desc->CRBB_LENGTH, osmo_hexdump( + desc->CRBB, (desc->CRBB_LENGTH + 7)/8)); /* We don't know the SSN offset for the URBB, * return what we have so far and assume the * bitmap has stopped here */ diff --git a/src/egprs_rlc_compression.cpp b/src/egprs_rlc_compression.cpp new file mode 100644 index 0000000..f4e6bde --- /dev/null +++ b/src/egprs_rlc_compression.cpp @@ -0,0 +1,361 @@ +/* egprs_rlc_compression.h +* Routines for EGPRS RLC bitmap compression handling +*/ +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +#define EGPRS_CODEWORDS 79 /* total number of codewords */ + +struct egprs_compress_node{ + struct egprs_compress_node *left; + struct egprs_compress_node *right; + int run_length; +}; + +extern void *tall_pcu_ctx; + +egprs_compress *egprs_compress::s_instance = 0; + +egprs_compress_node *egprs_compress::create_tree_node(void *parent) +{ + egprs_compress_node *new_node; + + new_node = talloc_zero(parent, egprs_compress_node); + new_node->left = NULL; + new_node->right = NULL; + new_node->run_length = -1; + return new_node; +} + +egprs_compress *egprs_compress::instance() +{ + if (!egprs_compress::s_instance) + egprs_compress::s_instance = new egprs_compress; + return egprs_compress::s_instance; +} + +/* Expands the given tree by incorporating + * the given codewords. + * \param root[in] Root of ones or zeros tree + * \param cdwd[in] Array of code words + * number of codewords is EGPRS_CODEWORDS + */ +void egprs_compress::build_codewords(egprs_compress_node *root, const char *cdwd[]) +{ + egprs_compress_node *iter; + int len; + int i; + int idx; + + for (idx = 0; idx < EGPRS_CODEWORDS; idx++) { + len = strlen((const char *)cdwd[idx]); + iter = root; + for (i = 0; i < len; i++) { + if (cdwd[idx][i] == '0') { + if (!iter->left) + iter->left = create_tree_node(root); + iter = iter->left; + } else { + if (!iter->right) + iter->right = create_tree_node(root); + iter = iter->right; + } + } + if (iter) { + /* The first 64 run lengths are 0, 1, 2, ..., 63 + * and the following ones are 64, 128, 192 described in + * section 9.1.10 of 3gpp 44.060 */ + if (idx < 64) + iter->run_length = idx; + else + iter->run_length = (idx - 63) * 64; + } + } +} + +/* 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", + "000111", + "0111", + "1000", + "1011", + "1100", + "1110", + "1111", + "10011", + "10100", + "00111", + "01000", + "001000", + "000011", + "110100", + "110101", + "101010", + "101011", + "0100111", + "0001100", + "0001000", + "0010111", + "0000011", + "0000100", + "0101000", + "0101011", + "0010011", + "0100100", + "0011000", + "00000010", + "00000011", + "00011010", + "00011011", + "00010010", + "00010011", + "00010100", + "00010101", + "00010110", + "00010111", + "00101000", + "00101001", + "00101010", + "00101011", + "00101100", + "00101101", + "00000100", + "00000101", + "00001010", + "00001011", + "01010010", + "01010011", + "01010100", + "01010101", + "00100100", + "00100101", + "01011000", + "01011001", + "01011010", + "01011011", + "01001010", + "01001011", + "00110010", + "00110011", + "00110100", + "11011", + "10010", + "010111", + "0110111", + "00110110", + "00110111", + "01100100", + "01100101", + "01101000", + "01100111", + "011001100", + "011001101", + "011010010", + "011010011", + "011010100" +}; + +const char *zero_run_len_code_list[EGPRS_CODEWORDS] = { + "0000110111", + "10", + "11", + "010", + "011", + "0011", + "0010", + "00011", + "000101", + "000100", + "0000100", + "0000101", + "0000111", + "00000100", + "00000111", + "000011000", + "0000010111", + "0000011000", + "0000001000", + "00001100111", + "00001101000", + "00001101100", + "00000110111", + "00000101000", + "00000010111", + "00000011000", + "000011001010", + "000011001011", + "000011001100", + "000011001101", + "000001101000", + "000001101001", + "000001101010", + "000001101011", + "000011010010", + "000011010011", + "000011010100", + "000011010101", + "000011010110", + "000011010111", + "000001101100", + "000001101101", + "000011011010", + "000011011011", + "000001010100", + "000001010101", + "000001010110", + "000001010111", + "000001100100", + "000001100101", + "000001010010", + "000001010011", + "000000100100", + "000000110111", + "000000111000", + "000000100111", + "000000101000", + "000001011000", + "000001011001", + "000000101011", + "000000101100", + "000001011010", + "000001100110", + "000001100111", + "0000001111", + "000011001000", + "000011001001", + "000001011011", + "000000110011", + "000000110100", + "000000110101", + "0000001101100", + "0000001101101", + "0000001001010", + "0000001001011", + "0000001001100", + "0000001001101", + "0000001110010", + "0000001110011" +}; + +/* Calculate runlength of a codeword + * \param root[in] Root of Ones or Zeros tree + * \param bmbuf[in] Received compressed bitmap buf + * \param bit_pos[in] The start bit pos to read codeword + * \param len_codewd[in] Length of code word + * \param rlen[out] Calculated run length + */ +static int search_runlen( + egprs_compress_node *root, + const uint8_t *bmbuf, + uint8_t bit_pos, + uint8_t *len_codewd, + uint16_t *rlen) +{ + egprs_compress_node *iter; + uint8_t dir; + + iter = root; + *len_codewd = 0; + + while (iter->run_length == -1) { + if ((!iter->left) && (!iter->right)) + return -1; + /* get the bit value at the bitpos and put it in right most of dir */ + dir = (bmbuf[bit_pos/8] >> (7 - (bit_pos & 0x07))) & 0x01; + bit_pos++; + (*len_codewd)++; + if (!dir && (iter->left != NULL)) + iter = iter->left; + else if (dir && (iter->right != NULL)) + iter = iter->right; + else + return -1; + } + LOGP(DRLCMACUL, LOGL_DEBUG, "Run_length = %d\n", iter->run_length); + *rlen = iter->run_length; + return 1; +} + +/* Decompress received block bitmap + * \param compress_bmap_len[in] Compressed bitmap length + * \param start[in] Starting Color Code, true if bitmap starts with a run + * length of ones, false if zeros; see 9.1.10, 3GPP 44.060. + * \param orig_crbb_buf[in] Received block crbb bitmap + * \param dest[out] Uncompressed bitvector + */ +int egprs_compress::decompress_crbb( + int8_t compress_bmap_len, + bool start, + const uint8_t *orig_crbb_buf, + bitvec *dest) +{ + + uint8_t bit_pos = 0; + uint8_t data; + egprs_compress_node *list = NULL; + uint8_t nbits = 0; /* number of bits of codeword */ + uint16_t run_length = 0; + uint16_t cbmaplen = 0; /* compressed bitmap part after decompression */ + unsigned wp = dest->cur_bit; + int rc = 0; + egprs_compress *compress = instance(); + + while (compress_bmap_len > 0) { + if (start) { + data = 0xff; + list = compress->ones_list; + } else { + data = 0x00; + list = compress->zeros_list; + } + rc = search_runlen(list, orig_crbb_buf, + bit_pos, &nbits, &run_length); + if (rc == -1) + return -1; + /* If run length > 64, need makeup and terminating code */ + if (run_length < 64) + start = !start; + cbmaplen = cbmaplen + run_length; + /* put run length of Ones in uncompressed bitmap */ + while (run_length != 0) { + if (run_length > 8) { + bitvec_write_field(dest, wp, data, 8); + run_length = run_length - 8; + } else { + bitvec_write_field(dest, wp, data, run_length); + run_length = 0; + } + } + bit_pos = bit_pos + nbits; + compress_bmap_len = compress_bmap_len - nbits; + } + return 0; +} + +void egprs_compress::decode_tree_init() +{ + ones_list = create_tree_node(tall_pcu_ctx); + zeros_list = create_tree_node(tall_pcu_ctx); + build_codewords(ones_list, one_run_len_code_list); + build_codewords(zeros_list, zero_run_len_code_list); +} + +egprs_compress::egprs_compress() +{ + decode_tree_init(); +} + diff --git a/src/egprs_rlc_compression.h b/src/egprs_rlc_compression.h new file mode 100644 index 0000000..c5f0f1a --- /dev/null +++ b/src/egprs_rlc_compression.h @@ -0,0 +1,29 @@ +/* egprs_rlc_compression.h + * Routines for EGPRS RLC bitmap compression handling + */ + +#pragma once + +struct egprs_compress_node; + +/* Singleton to manage the EGPRS compression algorithm. */ +class egprs_compress +{ +public: + static int decompress_crbb(int8_t compress_bmap_len, + bool start, const uint8_t *orig_buf, + bitvec *dest); + egprs_compress(); + +private: + egprs_compress_node *ones_list; + egprs_compress_node *zeros_list; + + void decode_tree_init(void); + static egprs_compress *s_instance; + static egprs_compress*instance(); + egprs_compress_node *create_tree_node(void *); + void build_codewords(egprs_compress_node *root, const char *cdwd[]); + /* singleton class, so this private destructor is left unimplemented. */ + ~egprs_compress(); +}; diff --git a/tests/Makefile.am b/tests/Makefile.am index 2a3415e..a24f4ea 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,7 +1,7 @@ AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGB_CFLAGS) $(LIBOSMOGSM_CFLAGS) -I$(top_srcdir)/src/ AM_LDFLAGS = -lrt -check_PROGRAMS = rlcmac/RLCMACTest alloc/AllocTest tbf/TbfTest types/TypesTest ms/MsTest llist/LListTest llc/LlcTest codel/codel_test edge/EdgeTest +check_PROGRAMS = rlcmac/RLCMACTest alloc/AllocTest tbf/TbfTest types/TypesTest ms/MsTest llist/LListTest llc/LlcTest codel/codel_test edge/EdgeTest bitcomp/BitcompTest noinst_PROGRAMS = emu/pcu_emu rlcmac_RLCMACTest_SOURCES = rlcmac/RLCMACTest.cpp @@ -23,6 +23,11 @@ $(top_builddir)/src/libgprs.la \ $(LIBOSMOGB_LIBS) \ $(LIBOSMOGSM_LIBS) \ + $(LIBOSMOCORE_LIBS) \ + $(COMMON_LA) + +bitcomp_BitcompTest_SOURCES = bitcomp/BitcompTest.cpp ../src/egprs_rlc_compression.cpp +bitcomp_BitcompTest_LDADD = \ $(LIBOSMOCORE_LIBS) \ $(COMMON_LA) @@ -108,6 +113,7 @@ rlcmac/RLCMACTest.ok rlcmac/RLCMACTest.err \ alloc/AllocTest.ok alloc/AllocTest.err \ tbf/TbfTest.ok tbf/TbfTest.err \ + bitcomp/BitcompTest.ok bitcomp/BitcompTest.err \ types/TypesTest.ok types/TypesTest.err \ ms/MsTest.ok ms/MsTest.err \ llc/LlcTest.ok llc/LlcTest.err \ diff --git a/tests/bitcomp/BitcompTest.cpp b/tests/bitcomp/BitcompTest.cpp new file mode 100644 index 0000000..fd3b0df --- /dev/null +++ b/tests/bitcomp/BitcompTest.cpp @@ -0,0 +1,236 @@ +#include +#include + +#include "rlc.h" +#include "gprs_debug.h" +#include +#include "egprs_rlc_compression.h" + +extern "C" { +#include +#include +#include +#include +} + +#define NEW 1 +#define MASK(n) (0xFF << (8-n)) +#define MAX_CRBB_LEN 23 +#define MAX_URBB_LEN 40 + +void *tall_pcu_ctx; + +struct test_data { + int8_t crbb_len; + uint8_t cc; + uint8_t crbb_data[MAX_CRBB_LEN]; /* compressed data */ + uint8_t ucmp_data[MAX_URBB_LEN]; /* uncompressed data */ + int ucmp_len; + int verify; +} test[] = { + { .crbb_len = 67, .cc = 1, + .crbb_data = { + 0x02, 0x0c, 0xa0, 0x30, 0xcb, 0x1a, 0x0c, 0xe3, 0x6c + }, + .ucmp_data = { + 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x01, 0xff, 0xff, + 0xff, 0xf8, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xfe, + 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xdb + }, + .ucmp_len = 194, .verify = 1 + }, + { .crbb_len = 40, .cc = 1, + .crbb_data = { + 0x53, 0x06, 0xc5, 0x40, 0x6d + }, + .ucmp_data = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, + 0x00, 0x00, 0x00, 0x00, 0x03 + }, + .ucmp_len = 182, .verify = 1 + }, + { .crbb_len = 8, .cc = 1, + .crbb_data = {0x02}, + .ucmp_data = {0xff, 0xff, 0xff, 0xf8}, + .ucmp_len = 29, .verify = 1 + }, + { .crbb_len = 103, .cc = 1, + .crbb_data = { + 0x02, 0x0c, 0xe0, 0x41, 0xa0, 0x0c, 0x36, 0x0d, 0x03, + 0x71, 0xb0, 0x6e, 0x24 + }, + .ucmp_data = { + 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xff, 0xff, + 0xf8, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xfe, 0x00, 0x00, + 0x0f, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xff, + 0xff, 0xff, 0x80, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff + }, + .ucmp_len = 288, .verify = 1 + }, + /* Test vector from libosmocore test */ + { .crbb_len = 35, .cc = 0, + .crbb_data = {0xde, 0x88, 0x75, 0x65, 0x80}, + .ucmp_data = {0x37, 0x47, 0x81, 0xf0}, + .ucmp_len = 28, .verify = 1 + }, + { .crbb_len = 18, .cc = 1, + .crbb_data = {0xdd, 0x41, 0x00}, + .ucmp_data = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x00, 0x00 + }, + .ucmp_len = 90, .verify = 1 + }, + /*Invalid inputs*/ + { .crbb_len = 18, .cc = 1, + .crbb_data = {0x1E, 0x70, 0xc0}, + .ucmp_data = {0x0}, + .ucmp_len = 0, .verify = 0 + }, + { .crbb_len = 14, .cc = 1, + .crbb_data = {0x00, 0x1E, 0x7c}, + .ucmp_data = {0x0}, + .ucmp_len = 0, .verify = 0 + }, + { .crbb_len = 24, .cc = 0, + .crbb_data = {0x00, 0x00, 0x00}, + .ucmp_data = {0x0}, + .ucmp_len = 0, .verify = 0 + } + }; + +static const struct log_info_cat default_categories[] = { + {"DCSN1", "\033[1;31m", "Concrete Syntax Notation One (CSN1)", LOGL_INFO, 0}, + {"DL1IF", "\033[1;32m", "GPRS PCU L1 interface (L1IF)", LOGL_DEBUG, 1}, + {"DRLCMAC", "\033[0;33m", "GPRS RLC/MAC layer (RLCMAC)", LOGL_DEBUG, 1}, + {"DRLCMACDATA", "\033[0;33m", "GPRS RLC/MAC layer Data (RLCMAC)", LOGL_DEBUG, 1}, + {"DRLCMACDL", "\033[1;33m", "GPRS RLC/MAC layer Downlink (RLCMAC)", LOGL_DEBUG, 1}, + {"DRLCMACUL", "\033[1;36m", "GPRS RLC/MAC layer Uplink (RLCMAC)", LOGL_DEBUG, 1}, + {"DRLCMACSCHED", "\033[0;36m", "GPRS RLC/MAC layer Scheduling (RLCMAC)", LOGL_DEBUG, 1}, + {"DRLCMACMEAS", "\033[1;31m", "GPRS RLC/MAC layer Measurements (RLCMAC)", LOGL_INFO, 1}, + {"DNS", "\033[1;34m", "GPRS Network Service Protocol (NS)", LOGL_INFO, 1}, + {"DBSSGP", "\033[1;34m", "GPRS BSS Gateway Protocol (BSSGP)", LOGL_INFO, 1}, + {"DPCU", "\033[1;35m", "GPRS Packet Control Unit (PCU)", LOGL_NOTICE, 1}, +}; + +static int filter_fn(const struct log_context *ctx, + struct log_target *tar) +{ + return 1; +} + +/* To verify the result with expected result */ +int check_result(bitvec bits, uint8_t *exp_data, int exp_len) +{ + if (bits.cur_bit != exp_len) + return 0; + size_t n = (exp_len / 8); + int rem = (exp_len % 8); + + if (memcmp(exp_data, bits.data, n) == 0) { + if (rem == 0) + return 1; + if ((bits.data[n] & MASK(rem)) == ((*(exp_data + n)) & MASK(rem))) + return 1; + else + return 0; + } else + return 0; +} + +/* To test decoding of compressed bitmap by Tree based method + * and to verify the result with expected result + * for invalid input verfication is suppressed + */ +static void test_EPDAN_decode_tree(void) +{ + bitvec dest; + int init_flag = 1; + int itr; + int rc; + uint8_t bits_data[RLC_EGPRS_MAX_WS/8]; + + printf("=== start %s ===\n", __func__); + + for (itr = 0 ; itr < (sizeof(test) / sizeof(test_data)) ; itr++) { + dest.data = bits_data; + dest.data_len = sizeof(bits_data); + dest.cur_bit = 0; + memset(dest.data, 0, sizeof(bits_data)); + LOGP(DRLCMACDL, LOGL_DEBUG, "\nTest:%d\nTree based decoding:" + "\nuncompressed data = %s\nlen = %d\n", itr + 1, + osmo_hexdump(test[itr].crbb_data, + (test[itr].crbb_len + 7)/8), test[itr].crbb_len + ); + rc = egprs_compress::decompress_crbb(test[itr].crbb_len, + test[itr].cc, test[itr].crbb_data, &dest); + if (rc < 0) { + LOGP(DRLCMACUL, LOGL_NOTICE, + "\nFailed to decode CRBB: length %d, data %s", + test[itr].crbb_len, osmo_hexdump( + test[itr].crbb_data, (test[itr].crbb_len + 7)/8)); + } + if (init_flag) + init_flag = 0; + if (test[itr].verify) { + if (check_result(dest, test[itr].ucmp_data, + test[itr].ucmp_len) == 0) { + LOGP(DRLCMACDL, LOGL_DEBUG, "\nTree based decoding" + ":Error\nexpected data = %s\nexpected" + " len = %d\ndecoded data = %s\n" + "decoded len = %d\n", + osmo_hexdump(test[itr].ucmp_data, + (test[itr].ucmp_len + 7)/8), + test[itr].ucmp_len, osmo_hexdump(dest.data, + (dest.cur_bit + 7)/8), dest.cur_bit + ); + OSMO_ASSERT(0); + } + } + LOGP(DRLCMACDL, LOGL_DEBUG, "\nexpected data = %s\nexpected len = %d" + "\ndecoded data = %s\ndecoded len = %d\n", + osmo_hexdump(test[itr].ucmp_data, + (test[itr].ucmp_len + 7)/8), + test[itr].ucmp_len, osmo_hexdump(dest.data, + (dest.cur_bit + 7)/8), dest.cur_bit + ); + } + + printf("=== end %s ===\n", __func__); +} + +const struct log_info debug_log_info = { + filter_fn, + (struct log_info_cat *)default_categories, + ARRAY_SIZE(default_categories), +}; + +int main(int argc, char **argv) +{ + osmo_init_logging(&debug_log_info); + log_set_use_color(osmo_stderr_target, 0); + log_set_print_filename(osmo_stderr_target, 0); + + tall_pcu_ctx = talloc_named_const(NULL, 1, "moiji-mobile bitcompTest context"); + if (!tall_pcu_ctx) + abort(); + + test_EPDAN_decode_tree(); + + if (getenv("TALLOC_REPORT_FULL")) + talloc_report_full(tall_pcu_ctx, stderr); + talloc_free(tall_pcu_ctx); + return EXIT_SUCCESS; +} + +/* + * stubs that should not be reached + */ +extern "C" { +void l1if_pdch_req() { abort(); } +void l1if_connect_pdch() { abort(); } +void l1if_close_pdch() { abort(); } +void l1if_open_pdch() { abort(); } +} + diff --git a/tests/bitcomp/BitcompTest.err b/tests/bitcomp/BitcompTest.err new file mode 100644 index 0000000..7481d72 --- /dev/null +++ b/tests/bitcomp/BitcompTest.err @@ -0,0 +1,132 @@ + +Test:1 +Tree based decoding: +uncompressed data = 02 0c a0 30 cb 1a 0c e3 6c +len = 67 +Run_length = 29 +Run_length = 26 +Run_length = 30 +Run_length = 27 +Run_length = 31 +Run_length = 19 +Run_length = 32 + +expected data = ff ff ff f8 00 00 01 ff ff ff f8 00 00 00 ff ff ff fe 00 00 3f ff ff ff db +expected len = 194 +decoded data = ff ff ff f8 00 00 01 ff ff ff f8 00 00 00 ff ff ff fe 00 00 3f ff ff ff db +decoded len = 194 + +Test:2 +Tree based decoding: +uncompressed data = 53 06 c5 40 6d +len = 40 +Run_length = 50 +Run_length = 40 +Run_length = 51 +Run_length = 41 + +expected data = ff ff ff ff ff ff c0 00 00 00 00 3f ff ff ff ff ff f8 00 00 00 00 03 +expected len = 182 +decoded data = ff ff ff ff ff ff c0 00 00 00 00 3f ff ff ff ff ff f8 00 00 00 00 03 +decoded len = 182 + +Test:3 +Tree based decoding: +uncompressed data = 02 +len = 8 +Run_length = 29 + +expected data = ff ff ff f8 +expected len = 29 +decoded data = ff ff ff f8 +decoded len = 29 + +Test:4 +Tree based decoding: +uncompressed data = 02 0c e0 41 a0 0c 36 0d 03 71 b0 6e 24 +len = 103 +Run_length = 29 +Run_length = 19 +Run_length = 29 +Run_length = 20 +Run_length = 30 +Run_length = 21 +Run_length = 31 +Run_length = 22 +Run_length = 32 +Run_length = 22 +Run_length = 33 + +expected data = ff ff ff f8 00 00 ff ff ff f8 00 00 7f ff ff fe 00 00 0f ff ff ff e0 00 00 7f ff ff ff 80 00 01 ff ff ff ff +expected len = 288 +decoded data = ff ff ff f8 00 00 ff ff ff f8 00 00 7f ff ff fe 00 00 0f ff ff ff e0 00 00 7f ff ff ff 80 00 01 ff ff ff ff +decoded len = 288 + +Test:5 +Tree based decoding: +uncompressed data = de 88 75 65 80 +len = 35 +Run_length = 2 +Run_length = 2 +Run_length = 1 +Run_length = 3 +Run_length = 1 +Run_length = 1 +Run_length = 3 +Run_length = 4 +Run_length = 6 +Run_length = 5 + +expected data = 37 47 81 f0 +expected len = 28 +decoded data = 37 47 81 f0 +decoded len = 28 + +Test:6 +Tree based decoding: +uncompressed data = dd 41 00 +len = 18 +Run_length = 64 +Run_length = 16 +Run_length = 10 + +expected data = ff ff ff ff ff ff ff ff ff ff 00 00 +expected len = 90 +decoded data = ff ff ff ff ff ff ff ff ff ff 00 00 +decoded len = 90 + +Test:7 +Tree based decoding: +uncompressed data = 1e 70 c0 +len = 18 +Run_length = 1 +Run_length = 1 +Run_length = 2 +Run_length = 15 + +expected data = +expected len = 0 +decoded data = +decoded len = 19 + +Test:8 +Tree based decoding: +uncompressed data = 00 1e +len = 14 + +Failed to decode CRBB: length 14, data 00 1e +expected data = +expected len = 0 +decoded data = +decoded len = 0 + +Test:9 +Tree based decoding: +uncompressed data = 00 00 00 +len = 24 + +Failed to decode CRBB: length 24, data 00 00 00 +expected data = +expected len = 0 +decoded data = +decoded len = 0 diff --git a/tests/bitcomp/BitcompTest.ok b/tests/bitcomp/BitcompTest.ok new file mode 100644 index 0000000..f7720fc --- /dev/null +++ b/tests/bitcomp/BitcompTest.ok @@ -0,0 +1,2 @@ +=== start test_EPDAN_decode_tree === +=== end test_EPDAN_decode_tree === diff --git a/tests/testsuite.at b/tests/testsuite.at index 1049b31..e42a0fd 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -23,6 +23,13 @@ AT_CHECK([$OSMO_QEMU $abs_top_builddir/tests/tbf/TbfTest], [0], [expout], [experr]) AT_CLEANUP +AT_SETUP([bitcomp]) +AT_KEYWORDS([bitcomp]) +cat $abs_srcdir/bitcomp/BitcompTest.ok > expout +cat $abs_srcdir/bitcomp/BitcompTest.err > experr +AT_CHECK([$OSMO_QEMU $abs_top_builddir/tests/bitcomp/BitcompTest], [0], [expout], [experr]) +AT_CLEANUP + AT_SETUP([edge]) AT_KEYWORDS([edge]) cat $abs_srcdir/edge/EdgeTest.ok > expout -- To view, visit https://gerrit.osmocom.org/416 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ieae1992ed4b02bb1e09eec2d3de1a030eabd16ce Gerrit-PatchSet: 29 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: pravin Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: pravin From gerrit-no-reply at lists.osmocom.org Mon Oct 17 05:33:59 2016 From: gerrit-no-reply at lists.osmocom.org (pravin) Date: Mon, 17 Oct 2016 05:33:59 +0000 Subject: osmo-pcu[master]: EGPRS: Add EPDAN CRBB Tree based decoding In-Reply-To: References: Message-ID: Patch Set 28: (1 comment) https://gerrit.osmocom.org/#/c/416/28/src/egprs_rlc_compression.cpp File src/egprs_rlc_compression.cpp: Line 297: * as described in section 9.1.10 of 3gpp 44.060. > As before, please use the 80 characters width of space! Done -- To view, visit https://gerrit.osmocom.org/416 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieae1992ed4b02bb1e09eec2d3de1a030eabd16ce Gerrit-PatchSet: 28 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: pravin Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: pravin Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Oct 17 08:13:52 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 17 Oct 2016 08:13:52 +0000 Subject: [MERGED] osmo-bts[master]: DTX AMR - fix buffer length check In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: DTX AMR - fix buffer length check ...................................................................... DTX AMR - fix buffer length check Consider AMR-specific prefix in computing max length to avoid triggering coverity check. Change-Id: I2fbc468caedf08f26893457db7c7fbacef5b860c Fixes: Coverity CID 150133 --- M src/common/msg_utils.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 09596f3..f00a71a 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -112,7 +112,8 @@ size_t length, uint32_t fn, int update) { size_t amr = (update < 0) ? 0 : 2, - copy_len = OSMO_MIN(length + 1, ARRAY_SIZE(lchan->tch.dtx.cache)); + copy_len = OSMO_MIN(length + 1, + ARRAY_SIZE(lchan->tch.dtx.cache) - amr); lchan->tch.dtx.len = copy_len + amr; lchan->tch.dtx.fn = fn; -- To view, visit https://gerrit.osmocom.org/1064 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2fbc468caedf08f26893457db7c7fbacef5b860c Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts 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 Oct 17 09:57:31 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 17 Oct 2016 09:57:31 +0000 Subject: [PATCH] openbsc[master]: Cosmetic: Add missing switch to usage help 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/1076 to look at the new patch set (#2). Cosmetic: Add missing switch to usage help Adds the -p --pcap option to the help text. Change-Id: I3e763c30ca13bc51c8b72af8a94558c92439f109 --- M openbsc/src/osmo-nitb/bsc_hack.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/76/1076/2 diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c index 28dbb6f..552ab4f 100644 --- a/openbsc/src/osmo-nitb/bsc_hack.c +++ b/openbsc/src/osmo-nitb/bsc_hack.c @@ -108,6 +108,7 @@ printf(" -m --mncc-sock Same as `-M /tmp/bsc_mncc' (deprecated).\n"); printf(" -C --no-dbcounter Disable regular syncing of counters to database.\n"); printf(" -r --rf-ctl PATH A unix domain socket to listen for cmds.\n"); + printf(" -p --pcap PATH Write abis communication to pcap trace file.\n"); } static void handle_options(int argc, char **argv) -- To view, visit https://gerrit.osmocom.org/1076 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3e763c30ca13bc51c8b72af8a94558c92439f109 Gerrit-PatchSet: 2 Gerrit-Project: openbsc 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 Oct 17 11:07:16 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 17 Oct 2016 11:07:16 +0000 Subject: osmo-bts[master]: Remove duplicated code In-Reply-To: References: Message-ID: Patch Set 4: Code-Review-1 Verified-1 -- To view, visit https://gerrit.osmocom.org/1046 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id0d3b19dbfaa16d1734321a07a6eb0355bfd77c9 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-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Oct 17 14:40:16 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 17 Oct 2016 14:40:16 +0000 Subject: [PATCH] osmo-bts[master]: Remove duplicated code 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/1046 to look at the new patch set (#5). Remove duplicated code * Having duplicated code to fill in fn & tn values makes it harder to read and modify static gsmtap_p* functions. Fix this by removing the duplication and moving the common code one level up. * Remove lchan activation/deactivation related code duplication to facilitate future use for dynamic CCCH re-activation. Change-Id: Id0d3b19dbfaa16d1734321a07a6eb0355bfd77c9 --- M include/osmo-bts/oml.h M src/common/l1sap.c M src/common/oml.c M src/osmo-bts-litecell15/lc15bts_vty.c M src/osmo-bts-litecell15/oml.c M src/osmo-bts-octphy/l1_oml.c M src/osmo-bts-sysmo/oml.c M src/osmo-bts-sysmo/sysmobts_vty.c M tests/handover/handover_test.c M tests/stubs.c 10 files changed, 51 insertions(+), 73 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/46/1046/5 diff --git a/include/osmo-bts/oml.h b/include/osmo-bts/oml.h index 9f49444..1a47cde 100644 --- a/include/osmo-bts/oml.h +++ b/include/osmo-bts/oml.h @@ -18,6 +18,12 @@ int oml_mo_statechg_ack(struct gsm_abis_mo *mo); int oml_mo_statechg_nack(struct gsm_abis_mo *mo, uint8_t nack_cause); +void enqueue_rel_marker(struct gsm_lchan *lchan); +void enqueue_sacch_rel_marker(struct gsm_lchan *lchan); +int lchan_activate(struct gsm_lchan *lchan); +int lchan_deactivate(struct gsm_lchan *lchan); +int lchan_deactivate_sacch(struct gsm_lchan *lchan); + /* Change the state and send STATE CHG REP */ int oml_mo_state_chg(struct gsm_abis_mo *mo, int op_state, int avail_state); diff --git a/src/common/l1sap.c b/src/common/l1sap.c index f3e620e..0b9930e 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -205,15 +205,13 @@ /* send primitive as gsmtap */ static int gsmtap_ph_data(struct osmo_phsap_prim *l1sap, uint8_t *chan_type, - uint8_t *tn, uint8_t *ss, uint32_t *fn, uint8_t **data, int *len) + uint8_t *ss, uint32_t fn, uint8_t **data, int *len) { struct msgb *msg = l1sap->oph.msg; uint8_t chan_nr, link_id; *data = msg->data + sizeof(struct osmo_phsap_prim); *len = msg->len - sizeof(struct osmo_phsap_prim); - *fn = l1sap->u.data.fn; - *tn = L1SAP_CHAN2TS(l1sap->u.data.chan_nr); chan_nr = l1sap->u.data.chan_nr; link_id = l1sap->u.data.link_id; @@ -234,7 +232,7 @@ #warning Set BS_AG_BLKS_RES /* The sapi depends on DSP configuration, not * on the actual SYSTEM INFORMATION 3. */ - if (L1SAP_FN2CCCHBLOCK(*fn) >= 1) + if (L1SAP_FN2CCCHBLOCK(fn) >= 1) *chan_type = GSMTAP_CHANNEL_PCH; else *chan_type = GSMTAP_CHANNEL_AGCH; @@ -246,18 +244,16 @@ } static int gsmtap_pdch(struct osmo_phsap_prim *l1sap, uint8_t *chan_type, - uint8_t *tn, uint8_t *ss, uint32_t *fn, uint8_t **data, int *len) + uint8_t *ss, uint32_t fn, uint8_t **data, int *len) { struct msgb *msg = l1sap->oph.msg; *data = msg->data + sizeof(struct osmo_phsap_prim); *len = msg->len - sizeof(struct osmo_phsap_prim); - *fn = l1sap->u.data.fn; - *tn = L1SAP_CHAN2TS(l1sap->u.data.chan_nr); - if (L1SAP_IS_PTCCH(*fn)) { + if (L1SAP_IS_PTCCH(fn)) { *chan_type = GSMTAP_CHANNEL_PTCCH; - *ss = L1SAP_FN2PTCCHBLOCK(*fn); + *ss = L1SAP_FN2PTCCHBLOCK(fn); if (l1sap->oph.primitive == PRIM_OP_INDICATION) { if ((*data[0]) == 7) @@ -309,12 +305,14 @@ uplink = 0; /* fall through */ case OSMO_PRIM(PRIM_PH_DATA, PRIM_OP_INDICATION): + fn = l1sap->u.data.fn; + tn = L1SAP_CHAN2TS(l1sap->u.data.chan_nr); if (ts_is_pdch(&trx->ts[tn])) - rc = gsmtap_pdch(l1sap, &chan_type, &tn, &ss, &fn, &data, - &len); + rc = gsmtap_pdch(l1sap, &chan_type, &ss, fn, &data, + &len); else - rc = gsmtap_ph_data(l1sap, &chan_type, &tn, &ss, &fn, - &data, &len); + rc = gsmtap_ph_data(l1sap, &chan_type, &ss, fn, &data, + &len); break; case OSMO_PRIM(PRIM_PH_RACH, PRIM_OP_INDICATION): rc = gsmtap_ph_rach(l1sap, &chan_type, &tn, &ss, &fn, &data, diff --git a/src/common/oml.c b/src/common/oml.c index 690a81d..6c42f10 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -453,6 +453,20 @@ return 0; } +int lchan_deactivate(struct gsm_lchan *lchan) +{ + lchan_set_state(lchan, LCHAN_S_REL_REQ); + lchan->ciph_state = 0; + enqueue_rel_marker(lchan); + return 0; +} + +int lchan_deactivate_sacch(struct gsm_lchan *lchan) +{ + enqueue_sacch_rel_marker(lchan); + return 0; +} + /* 8.6.1 Set BTS Attributes has been received */ static int oml_rx_set_bts_attr(struct gsm_bts *bts, struct msgb *msg) { diff --git a/src/osmo-bts-litecell15/lc15bts_vty.c b/src/osmo-bts-litecell15/lc15bts_vty.c index c5d404c..e4773b4 100644 --- a/src/osmo-bts-litecell15/lc15bts_vty.c +++ b/src/osmo-bts-litecell15/lc15bts_vty.c @@ -46,15 +46,12 @@ #include #include #include +#include #include #include "lc15bts.h" #include "l1_if.h" #include "utils.h" - - -extern int lchan_activate(struct gsm_lchan *lchan); -extern int lchan_deactivate(struct gsm_lchan *lchan); #define TRX_STR "Transceiver related commands\n" "TRX number\n" diff --git a/src/osmo-bts-litecell15/oml.c b/src/osmo-bts-litecell15/oml.c index 634c236..5a5d452 100644 --- a/src/osmo-bts-litecell15/oml.c +++ b/src/osmo-bts-litecell15/oml.c @@ -262,8 +262,6 @@ } #endif -int lchan_activate(struct gsm_lchan *lchan); - static int opstart_compl(struct gsm_abis_mo *mo, struct msgb *l1_msg) { GsmL1_Prim_t *l1p = msgb_l1prim(l1_msg); @@ -1645,7 +1643,7 @@ return res; } -static void enqueue_rel_marker(struct gsm_lchan *lchan) +void enqueue_rel_marker(struct gsm_lchan *lchan) { struct sapi_cmd *cmd; @@ -1655,15 +1653,7 @@ queue_sapi_command(lchan, cmd); } -int lchan_deactivate(struct gsm_lchan *lchan) -{ - lchan_set_state(lchan, LCHAN_S_REL_REQ); - lchan->ciph_state = 0; /* FIXME: do this in common/\*.c */ - enqueue_rel_marker(lchan); - return 0; -} - -static void enqueue_sacch_rel_marker(struct gsm_lchan *lchan) +void enqueue_sacch_rel_marker(struct gsm_lchan *lchan) { struct sapi_cmd *cmd; @@ -1671,12 +1661,6 @@ cmd = talloc_zero(lchan->ts->trx, struct sapi_cmd); cmd->type = SAPI_CMD_SACCH_REL_MARKER; queue_sapi_command(lchan, cmd); -} - -static int lchan_deactivate_sacch(struct gsm_lchan *lchan) -{ - enqueue_sacch_rel_marker(lchan); - return 0; } /* callback from OML */ diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c index 74853bf..e7626e8 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -873,7 +873,7 @@ * RSL DEACTIVATE SACCH ***********************************************************************/ -static void enqueue_sacch_rel_marker(struct gsm_lchan *lchan) +void enqueue_sacch_rel_marker(struct gsm_lchan *lchan) { struct sapi_cmd *cmd; @@ -881,12 +881,6 @@ cmd = talloc_zero(lchan->ts->trx, struct sapi_cmd); cmd->type = SAPI_CMD_SACCH_REL_MARKER; queue_sapi_command(lchan, cmd); -} - -static int lchan_deactivate_sacch(struct gsm_lchan *lchan) -{ - enqueue_sacch_rel_marker(lchan); - return 0; } int l1if_rsl_deact_sacch(struct gsm_lchan *lchan) @@ -902,7 +896,7 @@ * RSL CHANNEL RELEASE ***********************************************************************/ -static void enqueue_rel_marker(struct gsm_lchan *lchan) +void enqueue_rel_marker(struct gsm_lchan *lchan) { struct sapi_cmd *cmd; @@ -910,14 +904,6 @@ cmd = talloc_zero(lchan->ts->trx, struct sapi_cmd); cmd->type = SAPI_CMD_REL_MARKER; queue_sapi_command(lchan, cmd); -} - -static int lchan_deactivate(struct gsm_lchan *lchan) -{ - lchan_set_state(lchan, LCHAN_S_REL_REQ); - lchan->ciph_state = 0; /* FIXME: do this in common *.c */ - enqueue_rel_marker(lchan); - return 0; } int l1if_rsl_chan_rel(struct gsm_lchan *lchan) diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c index c1f1e0b..7a07ad1 100644 --- a/src/osmo-bts-sysmo/oml.c +++ b/src/osmo-bts-sysmo/oml.c @@ -261,8 +261,6 @@ } #endif -int lchan_activate(struct gsm_lchan *lchan); - static int opstart_compl(struct gsm_abis_mo *mo, struct msgb *l1_msg) { GsmL1_Prim_t *l1p = msgb_l1prim(l1_msg); @@ -1665,7 +1663,7 @@ return res; } -static void enqueue_rel_marker(struct gsm_lchan *lchan) +void enqueue_rel_marker(struct gsm_lchan *lchan) { struct sapi_cmd *cmd; @@ -1675,15 +1673,7 @@ queue_sapi_command(lchan, cmd); } -int lchan_deactivate(struct gsm_lchan *lchan) -{ - lchan_set_state(lchan, LCHAN_S_REL_REQ); - lchan->ciph_state = 0; /* FIXME: do this in common/\*.c */ - enqueue_rel_marker(lchan); - return 0; -} - -static void enqueue_sacch_rel_marker(struct gsm_lchan *lchan) +void enqueue_sacch_rel_marker(struct gsm_lchan *lchan) { struct sapi_cmd *cmd; @@ -1691,12 +1681,6 @@ cmd = talloc_zero(lchan->ts->trx, struct sapi_cmd); cmd->type = SAPI_CMD_SACCH_REL_MARKER; queue_sapi_command(lchan, cmd); -} - -static int lchan_deactivate_sacch(struct gsm_lchan *lchan) -{ - enqueue_sacch_rel_marker(lchan); - return 0; } /* callback from OML */ diff --git a/src/osmo-bts-sysmo/sysmobts_vty.c b/src/osmo-bts-sysmo/sysmobts_vty.c index c829c49..8140090 100644 --- a/src/osmo-bts-sysmo/sysmobts_vty.c +++ b/src/osmo-bts-sysmo/sysmobts_vty.c @@ -42,15 +42,12 @@ #include #include #include +#include #include #include "femtobts.h" #include "l1_if.h" #include "utils.h" - - -extern int lchan_activate(struct gsm_lchan *lchan); -extern int lchan_deactivate(struct gsm_lchan *lchan); #define TRX_STR "Transceiver related commands\n" "TRX number\n" diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c index d1dc34a..2b11cac 100644 --- a/tests/handover/handover_test.c +++ b/tests/handover/handover_test.c @@ -275,3 +275,9 @@ int bts_model_adjst_ms_pwr(struct gsm_lchan *lchan) { return 0; } int bts_model_ts_disconnect(struct gsm_bts_trx_ts *ts) { return 0; } int bts_model_ts_connect(struct gsm_bts_trx_ts *ts, enum gsm_phys_chan_config as_pchan) { return 0; } +void enqueue_rel_marker(struct gsm_lchan *lchan) +{ return; } +void enqueue_sacch_rel_marker(struct gsm_lchan *lchan) +{ return; } +int lchan_activate(struct gsm_lchan *lchan) +{ return 0; } diff --git a/tests/stubs.c b/tests/stubs.c index c680db0..e406923 100644 --- a/tests/stubs.c +++ b/tests/stubs.c @@ -40,6 +40,12 @@ int l1if_set_txpower(struct femtol1_hdl *fl1h, float tx_power) { return 0; } +void enqueue_rel_marker(struct gsm_lchan *lchan) +{ return; } +void enqueue_sacch_rel_marker(struct gsm_lchan *lchan) +{ return; } +int lchan_activate(struct gsm_lchan *lchan) +{ return 0; } int bts_model_adjst_ms_pwr(struct gsm_lchan *lchan) { return 0; } -- To view, visit https://gerrit.osmocom.org/1046 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id0d3b19dbfaa16d1734321a07a6eb0355bfd77c9 Gerrit-PatchSet: 5 Gerrit-Project: osmo-bts 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 Oct 17 14:40:17 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 17 Oct 2016 14:40:17 +0000 Subject: [PATCH] osmo-bts[master]: Replace magic number with define Message-ID: Review at https://gerrit.osmocom.org/1098 Replace magic number with define SDCCH occupy lchan 0..3 in combined configuration so for CCCH we've always used lchan[4] - replace it with CCCH_LCHAN define and add comment. Change-Id: Ic5d742c292d638f119c6b4672120c1950adeb7f0 --- M include/osmo-bts/gsm_data.h M src/common/l1sap.c M src/common/oml.c M src/osmo-bts-litecell15/oml.c M src/osmo-bts-octphy/l1_oml.c M src/osmo-bts-sysmo/oml.c M src/osmo-bts-trx/l1_if.c 7 files changed, 18 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/98/1098/1 diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h index f1c9601..a2bb641 100644 --- a/include/osmo-bts/gsm_data.h +++ b/include/osmo-bts/gsm_data.h @@ -8,6 +8,9 @@ #include #include +/* lchans 0..3 are SDCCH in combined channel configuration: */ +#define CCCH_LCHAN 4 + #define GSM_FR_BITS 260 #define GSM_EFR_BITS 244 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 0b9930e..10660ee 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -945,7 +945,7 @@ DEBUGP(DL1P, "Rx PH-RA.ind"); - lc = &trx->ts[0].lchan[4].lapdm_ch; + lc = &trx->ts[0].lchan[CCCH_LCHAN].lapdm_ch; /* check for under/overflow / sign */ if (!check_acc_delay(rach_ind, btsb, &acc_delay)) { diff --git a/src/common/oml.c b/src/common/oml.c index 6c42f10..94e8cb6 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -741,7 +741,7 @@ } /* fallthrough */ case GSM_PCHAN_CCCH: - lchan = &ts->lchan[4]; + lchan = &ts->lchan[CCCH_LCHAN]; lchan->type = GSM_LCHAN_CCCH; break; case GSM_PCHAN_TCH_F: diff --git a/src/osmo-bts-litecell15/oml.c b/src/osmo-bts-litecell15/oml.c index 5a5d452..453f53a 100644 --- a/src/osmo-bts-litecell15/oml.c +++ b/src/osmo-bts-litecell15/oml.c @@ -285,8 +285,9 @@ mo->obj_inst.ts_nr == 0) { struct gsm_lchan *cbch = gsm_bts_get_cbch(mo->bts); DEBUGP(DL1C, "====> trying to activate lchans of BCCH\n"); - mo->bts->c0->ts[0].lchan[4].rel_act_kind = LCHAN_REL_ACT_OML; - lchan_activate(&mo->bts->c0->ts[0].lchan[4]); + mo->bts->c0->ts[0].lchan[CCCH_LCHAN].rel_act_kind = + LCHAN_REL_ACT_OML; + lchan_activate(&mo->bts->c0->ts[0].lchan[CCCH_LCHAN]); if (cbch) { cbch->rel_act_kind = LCHAN_REL_ACT_OML; lchan_activate(cbch); diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c index e7626e8..de29345 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -183,8 +183,9 @@ if (mo->obj_class == NM_OC_CHANNEL && mo->obj_inst.trx_nr == 0 && mo->obj_inst.ts_nr == 0) { struct gsm_lchan *cbch = gsm_bts_get_cbch(mo->bts); - mo->bts->c0->ts[0].lchan[4].rel_act_kind = LCHAN_REL_ACT_OML; - lchan_activate(&mo->bts->c0->ts[0].lchan[4]); + mo->bts->c0->ts[0].lchan[CCCH_LCHAN].rel_act_kind = + LCHAN_REL_ACT_OML; + lchan_activate(&mo->bts->c0->ts[0].lchan[CCCH_LCHAN]); if (cbch) { cbch->rel_act_kind = LCHAN_REL_ACT_OML; lchan_activate(cbch); diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c index 7a07ad1..fd03e22 100644 --- a/src/osmo-bts-sysmo/oml.c +++ b/src/osmo-bts-sysmo/oml.c @@ -284,8 +284,9 @@ mo->obj_inst.ts_nr == 0) { struct gsm_lchan *cbch = gsm_bts_get_cbch(mo->bts); DEBUGP(DL1C, "====> trying to activate lchans of BCCH\n"); - mo->bts->c0->ts[0].lchan[4].rel_act_kind = LCHAN_REL_ACT_OML; - lchan_activate(&mo->bts->c0->ts[0].lchan[4]); + mo->bts->c0->ts[0].lchan[CCCH_LCHAN].rel_act_kind = + LCHAN_REL_ACT_OML; + lchan_activate(&mo->bts->c0->ts[0].lchan[CCCH_LCHAN]); if (cbch) { cbch->rel_act_kind = LCHAN_REL_ACT_OML; lchan_activate(cbch); diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c index b89a359..4465f3b 100644 --- a/src/osmo-bts-trx/l1_if.c +++ b/src/osmo-bts-trx/l1_if.c @@ -267,7 +267,7 @@ } if (trx == trx->bts->c0) - lchan_init_lapdm(&trx->ts[0].lchan[4]); + lchan_init_lapdm(&trx->ts[0].lchan[CCCH_LCHAN]); /* Set to Operational State: Enabled */ oml_mo_state_chg(&trx->mo, NM_OPSTATE_ENABLED, NM_AVSTATE_OK); @@ -288,7 +288,7 @@ /* deactivate lchan for CCCH */ if (pchan == GSM_PCHAN_CCCH || pchan == GSM_PCHAN_CCCH_SDCCH4) { - lchan_set_state(&trx->ts[0].lchan[4], LCHAN_S_INACTIVE); + lchan_set_state(&trx->ts[0].lchan[CCCH_LCHAN], LCHAN_S_INACTIVE); } /* power off transceiver, if not already */ @@ -408,8 +408,8 @@ /* activate lchan for CCCH */ if (pchan == GSM_PCHAN_CCCH || pchan == GSM_PCHAN_CCCH_SDCCH4) { - ts->lchan[4].rel_act_kind = LCHAN_REL_ACT_OML; - lchan_set_state(&ts->lchan[4], LCHAN_S_ACTIVE); + ts->lchan[CCCH_LCHAN].rel_act_kind = LCHAN_REL_ACT_OML; + lchan_set_state(&ts->lchan[CCCH_LCHAN], LCHAN_S_ACTIVE); } slottype = transceiver_chan_types[pchan]; -- To view, visit https://gerrit.osmocom.org/1098 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic5d742c292d638f119c6b4672120c1950adeb7f0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Oct 17 14:40:18 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 17 Oct 2016 14:40:18 +0000 Subject: [PATCH] osmo-bts[master]: Fix AGCH/PCH proportional allocation Message-ID: Review at https://gerrit.osmocom.org/1099 Fix AGCH/PCH proportional allocation Do not assume that 1 == BS_AG_BLKS_RES but take that information from SI3. Note: due to current implementation quirks we activate channels before SI3 obtained, than we deactivate channels upon receiving SI3 and activate them again. This might not be necessary once we migrate to proper OML state machines. This affects octphy, lc15 and sysmo hw. Change-Id: I11377b12680ac3b2f77f80e742b6f0af63fc9c1e Related: OS#1575 --- M include/osmo-bts/bts.h M include/osmo-bts/rsl.h M src/common/l1sap.c M src/common/paging.c M src/common/rsl.c M src/common/sysinfo.c M src/osmo-bts-litecell15/l1_if.c M src/osmo-bts-litecell15/oml.c M src/osmo-bts-octphy/l1_if.c M src/osmo-bts-octphy/l1_oml.c M src/osmo-bts-sysmo/l1_if.c M src/osmo-bts-sysmo/oml.c 12 files changed, 52 insertions(+), 50 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/99/1099/1 diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h index ec58edd..567772e 100644 --- a/include/osmo-bts/bts.h +++ b/include/osmo-bts/bts.h @@ -36,7 +36,7 @@ int lchan_init_lapdm(struct gsm_lchan *lchan); void load_timer_start(struct gsm_bts *bts); - +uint8_t num_agch(struct gsm_bts_trx *trx, const char * arg); void bts_update_status(enum bts_global_status which, int on); int trx_ms_pwr_ctrl_is_osmo(struct gsm_bts_trx *trx); diff --git a/include/osmo-bts/rsl.h b/include/osmo-bts/rsl.h index 4311ffd..3ec314a 100644 --- a/include/osmo-bts/rsl.h +++ b/include/osmo-bts/rsl.h @@ -9,6 +9,7 @@ LCHAN_REL_ACT_RSL, LCHAN_REL_ACT_PCU, LCHAN_REL_ACT_OML, + LCHAN_REL_ACT_REACT, }; #define LCHAN_FN_DUMMY 0xFFFFFFFF diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 10660ee..1eea42d 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -205,7 +205,8 @@ /* send primitive as gsmtap */ static int gsmtap_ph_data(struct osmo_phsap_prim *l1sap, uint8_t *chan_type, - uint8_t *ss, uint32_t fn, uint8_t **data, int *len) + uint8_t *ss, uint32_t fn, uint8_t **data, int *len, + uint8_t num_agch) { struct msgb *msg = l1sap->oph.msg; uint8_t chan_nr, link_id; @@ -229,10 +230,9 @@ } else if (L1SAP_IS_CHAN_BCCH(chan_nr)) { *chan_type = GSMTAP_CHANNEL_BCCH; } else if (L1SAP_IS_CHAN_AGCH_PCH(chan_nr)) { -#warning Set BS_AG_BLKS_RES /* The sapi depends on DSP configuration, not * on the actual SYSTEM INFORMATION 3. */ - if (L1SAP_FN2CCCHBLOCK(fn) >= 1) + if (L1SAP_FN2CCCHBLOCK(fn) >= num_agch) *chan_type = GSMTAP_CHANNEL_PCH; else *chan_type = GSMTAP_CHANNEL_AGCH; @@ -312,7 +312,7 @@ &len); else rc = gsmtap_ph_data(l1sap, &chan_type, &ss, fn, &data, - &len); + &len, num_agch(trx, "GSMTAP")); break; case OSMO_PRIM(PRIM_PH_RACH, PRIM_OP_INDICATION): rc = gsmtap_ph_rach(l1sap, &chan_type, &tn, &ss, &fn, &data, @@ -617,10 +617,9 @@ } } else if (L1SAP_IS_CHAN_AGCH_PCH(chan_nr)) { p = msgb_put(msg, GSM_MACBLOCK_LEN); -#warning "TODO: Yet another assumption that BS_AG_BLKS_RES=1" - /* if CCCH block is 0, it is AGCH */ rc = bts_ccch_copy_msg(trx->bts, p, &g_time, - (L1SAP_FN2CCCHBLOCK(fn) < 1)); + (L1SAP_FN2CCCHBLOCK(fn) < + num_agch(trx, "PH-RTS-IND"))); if (rc <= 0) memcpy(p, fill_frame, GSM_MACBLOCK_LEN); } diff --git a/src/common/paging.c b/src/common/paging.c index f75f12d..957d609 100644 --- a/src/common/paging.c +++ b/src/common/paging.c @@ -538,12 +538,6 @@ struct paging_state *ps = btsb->paging_state; struct gsm48_system_information_type_3 *si3 = (void *) bts->si_buf[SYSINFO_TYPE_3]; -#warning "TODO: Remove this when setting u8NbrOfAgch is implemented properly" - if (si3->control_channel_desc.bs_ag_blks_res != 1) - LOGP(DPAG, LOGL_ERROR, - "Paging: BS_AG_BLKS_RES = %d != 1 not fully supported\n", - si3->control_channel_desc.bs_ag_blks_res); - paging_si_update(ps, &si3->control_channel_desc); } return 0; diff --git a/src/common/rsl.c b/src/common/rsl.c index 6c8f5cc..af8939a 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -295,6 +295,14 @@ LOGP(DRSL, LOGL_INFO, " Rx RSL BCCH INFO (SI%s)\n", get_value_string(osmo_sitype_strs, osmo_si)); + if (SYSINFO_TYPE_3 == osmo_si && trx->nr == 0 && + num_agch(trx, "RSL") != 1) { + lchan_deactivate(&trx->bts->c0->ts[0].lchan[CCCH_LCHAN]); + /* will be reactivated by sapi_deactivate_cb() */ + trx->bts->c0->ts[0].lchan[CCCH_LCHAN].rel_act_kind = + LCHAN_REL_ACT_REACT; + } + if (SYSINFO_TYPE_2quater == osmo_si) { si2q = (struct gsm48_system_information_type_2quater *) bts->si_buf[SYSINFO_TYPE_2quater]; diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c index ee42da2..d0a476d 100644 --- a/src/common/sysinfo.c +++ b/src/common/sysinfo.c @@ -22,6 +22,7 @@ #include #include +#include #include #define BTS_HAS_SI(bts, sinum) ((bts)->si_valid & (1 << sinum)) @@ -132,6 +133,19 @@ return NULL; } +uint8_t num_agch(struct gsm_bts_trx *trx, const char * arg) +{ + struct gsm_bts *b = trx->bts; + struct gsm48_system_information_type_3 *si3; + if (BTS_HAS_SI(b, SYSINFO_TYPE_3)) { + si3 = GSM_BTS_SI(b, SYSINFO_TYPE_3); + return si3->control_channel_desc.bs_ag_blks_res; + } + LOGP(DL1P, LOGL_ERROR, "%s: Unable to determine actual BS_AG_BLKS_RES " + "value as SI3 is not available yet, fallback to 1\n", arg); + return 1; +} + uint8_t *lchan_sacch_get(struct gsm_lchan *lchan) { uint32_t tmp; diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index f47634e..af50343 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -1107,22 +1107,6 @@ return l1if_handle_ind(fl1h, msg); } -#if 0 -/* called by RSL if the BCCH SI has been modified */ -int sysinfo_has_changed(struct gsm_bts *bts, int si) -{ - /* FIXME: Determine BS_AG_BLKS_RES and - * * set cfgParams.u.agch.u8NbrOfAgch - * * determine implications on paging - */ - /* FIXME: Check for Extended BCCH presence */ - /* FIXME: Check for CCCH_CONF */ - /* FIXME: Check for BS_PA_MFRMS: update paging */ - - return 0; -} -#endif - static int activate_rf_compl_cb(struct gsm_bts_trx *trx, struct msgb *resp, void *data) { diff --git a/src/osmo-bts-litecell15/oml.c b/src/osmo-bts-litecell15/oml.c index 453f53a..78c1e0f 100644 --- a/src/osmo-bts-litecell15/oml.c +++ b/src/osmo-bts-litecell15/oml.c @@ -1023,8 +1023,7 @@ lch_par->rach.u8Bsic = lchan->ts->trx->bts->bsic; break; case GsmL1_Sapi_Agch: -#warning Set BS_AG_BLKS_RES - lch_par->agch.u8NbrOfAgch = 1; + lch_par->agch.u8NbrOfAgch = num_agch(lchan->ts->trx, "MPH.act"); break; case GsmL1_Sapi_TchH: case GsmL1_Sapi_TchF: @@ -1564,6 +1563,12 @@ lchan_set_state(lchan, LCHAN_S_NONE); mph_info_chan_confirm(lchan, PRIM_INFO_DEACTIVATE, 0); + + /* Reactivate CCCH due to SI3 update in RSL */ + if (lchan->rel_act_kind == LCHAN_REL_ACT_REACT) { + lchan->rel_act_kind = LCHAN_REL_ACT_RSL; + lchan_activate(lchan); + } return 0; } diff --git a/src/osmo-bts-octphy/l1_if.c b/src/osmo-bts-octphy/l1_if.c index c4105ac..2f28cd6 100644 --- a/src/osmo-bts-octphy/l1_if.c +++ b/src/osmo-bts-octphy/l1_if.c @@ -487,6 +487,8 @@ sapi = cOCTVC1_GSM_SAPI_ENUM_BCCH; } else if (L1SAP_IS_CHAN_AGCH_PCH(chan_nr)) { #warning Set BS_AG_BLKS_RES + /* FIXME: how does octphy differentiate between AGCH and PCH? + How to supply num_of_agch properly? */ sapi = cOCTVC1_GSM_SAPI_ENUM_PCH_AGCH; } else { LOGP(DL1C, LOGL_NOTICE, "unknown prim %d op %d " diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c index de29345..728fd32 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -600,6 +600,12 @@ lchan_set_state(lchan, LCHAN_S_NONE); mph_info_chan_confirm(lchan, PRIM_INFO_DEACTIVATE, 0); + + /* Reactivate CCCH due to SI3 update in RSL */ + if (lchan->rel_act_kind == LCHAN_REL_ACT_REACT) { + lchan->rel_act_kind = LCHAN_REL_ACT_RSL; + lchan_activate(lchan); + } return 0; } diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index bef2d30..8ae2ff5 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -1132,22 +1132,6 @@ return l1if_handle_ind(fl1h, msg); } -#if 0 -/* called by RSL if the BCCH SI has been modified */ -int sysinfo_has_changed(struct gsm_bts *bts, int si) -{ - /* FIXME: Determine BS_AG_BLKS_RES and - * * set cfgParams.u.agch.u8NbrOfAgch - * * determine implications on paging - */ - /* FIXME: Check for Extended BCCH presence */ - /* FIXME: Check for CCCH_CONF */ - /* FIXME: Check for BS_PA_MFRMS: update paging */ - - return 0; -} -#endif - static int activate_rf_compl_cb(struct gsm_bts_trx *trx, struct msgb *resp, void *data) { diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c index fd03e22..16e6cd3 100644 --- a/src/osmo-bts-sysmo/oml.c +++ b/src/osmo-bts-sysmo/oml.c @@ -1038,8 +1038,7 @@ lch_par->rach.u8Bsic = lchan->ts->trx->bts->bsic; break; case GsmL1_Sapi_Agch: -#warning Set BS_AG_BLKS_RES - lch_par->agch.u8NbrOfAgch = 1; + lch_par->agch.u8NbrOfAgch = num_agch(lchan->ts->trx, lchan->name); break; case GsmL1_Sapi_TchH: case GsmL1_Sapi_TchF: @@ -1584,6 +1583,12 @@ lchan_set_state(lchan, LCHAN_S_NONE); mph_info_chan_confirm(lchan, PRIM_INFO_DEACTIVATE, 0); + + /* Reactivate CCCH due to SI3 update in RSL */ + if (lchan->rel_act_kind == LCHAN_REL_ACT_REACT) { + lchan->rel_act_kind = LCHAN_REL_ACT_RSL; + lchan_activate(lchan); + } return 0; } -- To view, visit https://gerrit.osmocom.org/1099 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I11377b12680ac3b2f77f80e742b6f0af63fc9c1e Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon Oct 17 14:57:29 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 17 Oct 2016 14:57:29 +0000 Subject: osmo-trx[master]: add contrib/jenkins.sh, for gerrit build bot In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 Do we really use some bash-specific syntax in it? According to 'checkbashisms' command we don't so we can just use /bin/sh shebang to increase portability. -- To view, visit https://gerrit.osmocom.org/1067 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If8887525b0062090e9445a35e32b03e3b8e7eede Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx 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 Mon Oct 17 15:31:48 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 15:31:48 +0000 Subject: osmo-pcu[master]: EGPRS: Add EPDAN CRBB Tree based decoding In-Reply-To: References: Message-ID: Patch Set 29: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/416 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieae1992ed4b02bb1e09eec2d3de1a030eabd16ce Gerrit-PatchSet: 29 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: pravin Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: pravin Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Oct 17 15:51:18 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 15:51:18 +0000 Subject: osmo-trx[master]: add contrib/jenkins.sh, for gerrit build bot In-Reply-To: References: Message-ID: Patch Set 1: > we can just use /bin/sh shebang This is copied from Holger's initial jenkins.sh script(s), who tends to use bash instead of #!/bin/sh. I didn't really notice until now. So you're right, and then again we would do the same in the other ten osmo gits that recently added a jenkins.sh for the gerrit build jobs. Feel free to submit patches :) -- To view, visit https://gerrit.osmocom.org/1067 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If8887525b0062090e9445a35e32b03e3b8e7eede Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx 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 Mon Oct 17 15:53:35 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 15:53:35 +0000 Subject: [PATCH] osmo-trx[master]: add contrib/jenkins.sh, for gerrit build bot 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/1067 to look at the new patch set (#2). add contrib/jenkins.sh, for gerrit build bot Change-Id: If8887525b0062090e9445a35e32b03e3b8e7eede --- A contrib/jenkins.sh 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/67/1067/2 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh new file mode 100755 index 0000000..80d6612 --- /dev/null +++ b/contrib/jenkins.sh @@ -0,0 +1,7 @@ +#!/bin/sh +set -ex +autoreconf --install --force +./configure +$MAKE $PARALLEL_MAKE +$MAKE check \ + || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/1067 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If8887525b0062090e9445a35e32b03e3b8e7eede Gerrit-PatchSet: 2 Gerrit-Project: osmo-trx 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 Mon Oct 17 15:57:13 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 17 Oct 2016 15:57:13 +0000 Subject: libosmocore[master]: utils/conv_gen.py: generate a single file In-Reply-To: References: Message-ID: Patch Set 6: Could you expand commit message please - why this change is desirable? Moving to single output file instead of many serves aesthetic purposes? Helps with readability? Facilitate optimization? Smth else? -- To view, visit https://gerrit.osmocom.org/828 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib4e4ee5fdde38429e68e3b2fa50ec03a18f59daa 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-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Oct 17 15:58:07 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 17 Oct 2016 15:58:07 +0000 Subject: osmo-trx[master]: add contrib/jenkins.sh, for gerrit build bot In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1067 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If8887525b0062090e9445a35e32b03e3b8e7eede Gerrit-PatchSet: 2 Gerrit-Project: osmo-trx 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 Mon Oct 17 16:00:56 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 16:00:56 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: jenkins.sh: use sh instead of bash Message-ID: Review at https://gerrit.osmocom.org/1100 jenkins.sh: use sh instead of bash Change-Id: Ia65e960dc7d74e6bb7a2463316d09622e9788c97 Suggested-by: msuraev --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/00/1100/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index a6f51a8..14af8cc 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh set -ex -- To view, visit https://gerrit.osmocom.org/1100 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia65e960dc7d74e6bb7a2463316d09622e9788c97 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 17 16:26:03 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 16:26:03 +0000 Subject: [PATCH] osmo-pcu[master]: tbf: add llc_queue_size() to check llc_queue is valid before... 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/724 to look at the new patch set (#3). tbf: add llc_queue_size() to check llc_queue is valid before calling size() gcc6 is optimizing if (!this) {CODE} as this is assumed to never be a std::nullptr here. Move the null check to the caller. In preparation of removing the check within llc_queue->size(), all callers must check the object before calling it. Make sure of that: make the llc_queue() access function protected and offer only a public llc_queue_size() function that incorporates the NULL check. All current callers are only interested in the llc_queue_size(). Tweaked-by: nhofmeyr Change-Id: I88cc3180f8f86785e3f07981895dabddf50b60a2 --- M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp 3 files changed, 15 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/24/724/3 diff --git a/src/tbf.cpp b/src/tbf.cpp index 97696cb..48d89b9 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -189,6 +189,13 @@ return m_ms ? m_ms->llc_queue() : NULL; } +int gprs_rlcmac_tbf::llc_queue_size() const +{ + /* m_ms->llc_queue() never returns NULL: GprsMs::m_llc_queue is a + * member instance. */ + return m_ms ? m_ms->llc_queue()->size() : 0; +} + void gprs_rlcmac_tbf::set_ms(GprsMs *ms) { if (m_ms == ms) diff --git a/src/tbf.h b/src/tbf.h index 3a6f42d..37401bf 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -142,8 +142,7 @@ uint8_t ms_class() const; void set_ms_class(uint8_t); GprsCodingScheme current_cs() const; - gprs_llc_queue *llc_queue(); - const gprs_llc_queue *llc_queue() const; + int llc_queue_size() const; time_t created_ts() const; uint8_t dl_slots() const; @@ -231,6 +230,9 @@ int set_tlli_from_ul(uint32_t new_tlli); void merge_and_clear_ms(GprsMs *old_ms); + gprs_llc_queue *llc_queue(); + const gprs_llc_queue *llc_queue() const; + static const char *tbf_state_name[7]; class GprsMs *m_ms; diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 457f2c9..132c57a 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -310,7 +310,7 @@ LOGP(DRLCMACDL, LOGL_NOTICE, "%s Discarding LLC PDU " "because lifetime limit reached, " "count=%u new_queue_size=%zu\n", - tbf_name(this), frames, llc_queue()->size()); + tbf_name(this), frames, llc_queue_size()); if (frames > 0xff) frames = 0xff; if (octets > 0xffffff) @@ -572,7 +572,7 @@ m_llc.frame_length(), frames_since_last_drain(fn)); } - is_final = llc_queue()->size() == 0 && !keep_open(fn); + is_final = llc_queue_size() == 0 && !keep_open(fn); ar = Encoding::rlc_data_to_dl_append(rdbi, cs, &m_llc, &write_offset, &num_chunks, data, is_final, &payload_written); @@ -1050,7 +1050,7 @@ release(); /* check for LLC PDU in the LLC Queue */ - if (llc_queue()->size() > 0) + if (llc_queue() && llc_queue_size() > 0) /* we have more data so we will re-use this tbf */ establish_dl_tbf_on_pacch(); @@ -1168,7 +1168,7 @@ bool gprs_rlcmac_dl_tbf::have_data() const { return m_llc.chunk_size() > 0 || - (llc_queue() && llc_queue()->size() > 0); + (llc_queue_size() > 0); } int gprs_rlcmac_dl_tbf::frames_since_last_poll(unsigned fn) const -- To view, visit https://gerrit.osmocom.org/724 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I88cc3180f8f86785e3f07981895dabddf50b60a2 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Mon Oct 17 16:28:10 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 16:28:10 +0000 Subject: osmo-pcu[master]: tbf: add llc_queue_size() to check llc_queue is valid before... In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 I've hijacked your patch again. Merge it if you agree. Make the llc_queue() private and tweaked a comment as well as the commit log. -- To view, visit https://gerrit.osmocom.org/724 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I88cc3180f8f86785e3f07981895dabddf50b60a2 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Oct 17 16:36:03 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 16:36:03 +0000 Subject: [PATCH] osmo-pcu[master]: tbf: add llc_queue_size() to check llc_queue is valid before... 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/724 to look at the new patch set (#4). tbf: add llc_queue_size() to check llc_queue is valid before calling size() gcc6 is optimizing if (!this) {CODE} as this is assumed to never be a std::nullptr here. Move the null check to the caller. In preparation of removing the check within llc_queue->size(), all callers must check the object before calling it. Make sure of that: make the llc_queue() access function protected and offer only a public llc_queue_size() function that incorporates the NULL check. All current callers are only interested in the llc_queue_size(). Tweaked-by: nhofmeyr Change-Id: I88cc3180f8f86785e3f07981895dabddf50b60a2 --- M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp 3 files changed, 15 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/24/724/4 diff --git a/src/tbf.cpp b/src/tbf.cpp index 97696cb..48d89b9 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -189,6 +189,13 @@ return m_ms ? m_ms->llc_queue() : NULL; } +int gprs_rlcmac_tbf::llc_queue_size() const +{ + /* m_ms->llc_queue() never returns NULL: GprsMs::m_llc_queue is a + * member instance. */ + return m_ms ? m_ms->llc_queue()->size() : 0; +} + void gprs_rlcmac_tbf::set_ms(GprsMs *ms) { if (m_ms == ms) diff --git a/src/tbf.h b/src/tbf.h index 3a6f42d..37401bf 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -142,8 +142,7 @@ uint8_t ms_class() const; void set_ms_class(uint8_t); GprsCodingScheme current_cs() const; - gprs_llc_queue *llc_queue(); - const gprs_llc_queue *llc_queue() const; + int llc_queue_size() const; time_t created_ts() const; uint8_t dl_slots() const; @@ -231,6 +230,9 @@ int set_tlli_from_ul(uint32_t new_tlli); void merge_and_clear_ms(GprsMs *old_ms); + gprs_llc_queue *llc_queue(); + const gprs_llc_queue *llc_queue() const; + static const char *tbf_state_name[7]; class GprsMs *m_ms; diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 457f2c9..c89cd03 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -310,7 +310,7 @@ LOGP(DRLCMACDL, LOGL_NOTICE, "%s Discarding LLC PDU " "because lifetime limit reached, " "count=%u new_queue_size=%zu\n", - tbf_name(this), frames, llc_queue()->size()); + tbf_name(this), frames, llc_queue_size()); if (frames > 0xff) frames = 0xff; if (octets > 0xffffff) @@ -572,7 +572,7 @@ m_llc.frame_length(), frames_since_last_drain(fn)); } - is_final = llc_queue()->size() == 0 && !keep_open(fn); + is_final = llc_queue_size() == 0 && !keep_open(fn); ar = Encoding::rlc_data_to_dl_append(rdbi, cs, &m_llc, &write_offset, &num_chunks, data, is_final, &payload_written); @@ -1050,7 +1050,7 @@ release(); /* check for LLC PDU in the LLC Queue */ - if (llc_queue()->size() > 0) + if (llc_queue_size() > 0) /* we have more data so we will re-use this tbf */ establish_dl_tbf_on_pacch(); @@ -1168,7 +1168,7 @@ bool gprs_rlcmac_dl_tbf::have_data() const { return m_llc.chunk_size() > 0 || - (llc_queue() && llc_queue()->size() > 0); + (llc_queue_size() > 0); } int gprs_rlcmac_dl_tbf::frames_since_last_poll(unsigned fn) const -- To view, visit https://gerrit.osmocom.org/724 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I88cc3180f8f86785e3f07981895dabddf50b60a2 Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Mon Oct 17 16:36:30 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 16:36:30 +0000 Subject: osmo-pcu[master]: tbf: add llc_queue_size() to check llc_queue is valid before... In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 ...and also dropped an obsolete check in gprs_rlcmac_dl_tbf::maybe_start_new_window() -- To view, visit https://gerrit.osmocom.org/724 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I88cc3180f8f86785e3f07981895dabddf50b60a2 Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Oct 17 18:52:24 2016 From: gerrit-no-reply at lists.osmocom.org (Tom Tsou) Date: Mon, 17 Oct 2016 18:52:24 +0000 Subject: osmo-trx[master]: add contrib/jenkins.sh, for gerrit build bot In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1067 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If8887525b0062090e9445a35e32b03e3b8e7eede Gerrit-PatchSet: 2 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte 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 Oct 17 18:56:05 2016 From: gerrit-no-reply at lists.osmocom.org (Tom Tsou) Date: Mon, 17 Oct 2016 18:56:05 +0000 Subject: [MERGED] osmo-trx[master]: add contrib/jenkins.sh, for gerrit build bot In-Reply-To: References: Message-ID: Tom Tsou has submitted this change and it was merged. Change subject: add contrib/jenkins.sh, for gerrit build bot ...................................................................... add contrib/jenkins.sh, for gerrit build bot Change-Id: If8887525b0062090e9445a35e32b03e3b8e7eede --- A contrib/jenkins.sh 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Tom Tsou: Looks good to me, approved Max: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh new file mode 100755 index 0000000..80d6612 --- /dev/null +++ b/contrib/jenkins.sh @@ -0,0 +1,7 @@ +#!/bin/sh +set -ex +autoreconf --install --force +./configure +$MAKE $PARALLEL_MAKE +$MAKE check \ + || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/1067 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If8887525b0062090e9445a35e32b03e3b8e7eede Gerrit-PatchSet: 2 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr 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 Oct 17 20:16:43 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 17 Oct 2016 20:16:43 +0000 Subject: [PATCH] libosmo-abis[master]: Implement new 'raw' input type for E1 timeslots Message-ID: Review at https://gerrit.osmocom.org/1101 Implement new 'raw' input type for E1 timeslots In the past, the A-bis E1 input system only unederstood LAPD signalling time-slots and trau-slots with 16kBps sub-slots. This adds the notion of a 'raw' transparent 64kBps slot, without any furthe de-multiplexing nor any HLDC inside. Change-Id: I0c25c2688eddd0c55c15b280a8c6e8a49629516b --- M include/osmocom/abis/e1_input.h M src/e1_input.c M src/input/dahdi.c M src/input/misdn.c 4 files changed, 214 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/01/1101/1 diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h index 8ef33d5..7568f19 100644 --- a/include/osmocom/abis/e1_input.h +++ b/include/osmocom/abis/e1_input.h @@ -64,6 +64,7 @@ E1INP_TS_TYPE_NONE, E1INP_TS_TYPE_SIGN, E1INP_TS_TYPE_TRAU, + E1INP_TS_TYPE_RAW, }; const char *e1inp_tstype_name(enum e1inp_ts_type tp); const struct value_string e1inp_ts_type_names[5]; @@ -94,6 +95,12 @@ /* subchannel muxer for frames to E1 */ struct subch_mux mux; } trau; + struct { + /* call-back for every received frame */ + void (*recv_cb)(struct e1inp_ts *ts, struct msgb *msg); + /* queue of pending to-be-transmitted msgbs */ + struct llist_head tx_queue; + } raw; }; union { struct { @@ -203,9 +210,6 @@ /* fine a previously registered driver */ struct e1inp_driver *e1inp_driver_find(const char *name); -/* register a line with the E1 core */ -int e1inp_line_register(struct e1inp_line *line); - /* get a line by its ID */ struct e1inp_line *e1inp_line_find(uint8_t e1_nr); @@ -243,6 +247,11 @@ int (*trau_rcv_cb)(struct subch_demux *dmx, int ch, uint8_t *data, int len, void *_priv)); +/* configure and initialize one timeslot dedicated to RAW frames */ +int e1inp_ts_config_raw(struct e1inp_ts *ts, struct e1inp_line *line, + void (*raw_recv_cb)(struct e1inp_ts *ts, + struct msgb *msg)); + /* Receive a packet from the E1 driver */ int e1inp_rx_ts(struct e1inp_ts *ts, struct msgb *msg, uint8_t tei, uint8_t sapi); diff --git a/src/e1_input.c b/src/e1_input.c index df990d5..75ae36e 100644 --- a/src/e1_input.c +++ b/src/e1_input.c @@ -217,6 +217,7 @@ { E1INP_TS_TYPE_NONE, "None" }, { E1INP_TS_TYPE_SIGN, "Signalling" }, { E1INP_TS_TYPE_TRAU, "TRAU" }, + { E1INP_TS_TYPE_RAW, "RAW" }, { 0, NULL } }; @@ -296,6 +297,21 @@ else ts->sign.delay = 100000; INIT_LLIST_HEAD(&ts->sign.sign_links); + return 0; +} + +int e1inp_ts_config_raw(struct e1inp_ts *ts, struct e1inp_line *line, + void (*raw_recv_cb)(struct e1inp_ts *ts, + struct msgb *msg)) +{ + if (ts->type == E1INP_TS_TYPE_RAW && ts->line && line) + return 0; + + ts->type = E1INP_TS_TYPE_RAW; + ts->line = line; + ts->raw.recv_cb = raw_recv_cb; + INIT_LLIST_HEAD(&ts->raw.tx_queue); + return 0; } @@ -531,6 +547,9 @@ ret = subch_demux_in(&ts->trau.demux, msg->l2h, msgb_l2len(msg)); msgb_free(msg); break; + case E1INP_TS_TYPE_RAW: + ts->raw.recv_cb(ts, msg); + break; default: ret = -EINVAL; LOGP(DLMI, LOGL_ERROR, "unknown TS type %u\n", ts->type); @@ -654,6 +673,10 @@ } msgb_put(msg, 40); break; + case E1INP_TS_TYPE_RAW: + /* Get msgb from tx_queue */ + msg = msgb_dequeue(&e1i_ts->raw.tx_queue); + break; default: LOGP(DLMI, LOGL_ERROR, "unsupported E1 TS type %u\n", e1i_ts->type); return NULL; diff --git a/src/input/dahdi.c b/src/input/dahdi.c index ab06908..db00f5f 100644 --- a/src/input/dahdi.c +++ b/src/input/dahdi.c @@ -360,6 +360,79 @@ return ret; } +/* write to a raw channel TS */ +static int handle_ts_raw_write(struct osmo_fd *bfd) +{ + struct e1inp_line *line = bfd->data; + unsigned int ts_nr = bfd->priv_nr; + struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1]; + struct msgb *msg; + int ret; + + /* get the next msg for this timeslot */ + msg = e1inp_tx_ts(e1i_ts, NULL); + if (!msg) + return 0; + + if (msg->len != D_BCHAN_TX_GRAN) { + /* This might lead to a transmit underrun, as we call tx + * from the rx path, as there's no select/poll on dahdi + * */ + LOGP(DLINP, LOGL_NOTICE, "unexpected msg->len = %u, " + "expected %u\n", msg->len, D_BCHAN_TX_GRAN); + } + + DEBUGP(DLMIB, "RAW CHAN TX: %s\n", + osmo_hexdump(msg->data, msg->len)); + + if (0/*invertbits*/) { + flip_buf_bits(msg->data, msg->len); + } + + ret = write(bfd->fd, msg->data, msg->len); + if (ret < msg->len) + LOGP(DLINP, LOGL_DEBUG, "send returns %d instead of %d\n", + ret, msg->len); + msgb_free(msg); + + return ret; +} + +static int handle_ts_raw_read(struct osmo_fd *bfd) +{ + struct e1inp_line *line = bfd->data; + unsigned int ts_nr = bfd->priv_nr; + struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1]; + struct msgb *msg = msgb_alloc(D_TSX_ALLOC_SIZE, "DAHDI Raw TS"); + int ret; + + if (!msg) + return -ENOMEM; + + ret = read(bfd->fd, msg->data, D_TSX_ALLOC_SIZE); + if (ret < 0 || ret != D_TSX_ALLOC_SIZE) { + LOGP(DLINP, LOGL_DEBUG, "read error %d %s\n", + ret, strerror(errno)); + return ret; + } + + if (0/*invertbits*/) { + flip_buf_bits(msg->data, ret); + } + + msgb_put(msg, ret); + + msg->l2h = msg->data; + DEBUGP(DLMIB, "RAW CHAN RX: %s\n", + osmo_hexdump(msgb_l2(msg), ret)); + ret = e1inp_rx_ts(e1i_ts, msg, 0, 0); + /* physical layer indicates that data has been sent, + * we thus can send some more data */ + ret = handle_ts_raw_write(bfd); + + return ret; +} + /* callback from select.c in case one of the fd's can be read/written */ static int dahdi_fd_cb(struct osmo_fd *bfd, unsigned int what) { @@ -385,6 +458,17 @@ rc = handle_tsX_read(bfd); if (what & BSC_FD_WRITE) rc = handle_tsX_write(bfd); + /* We never include the DAHDI B-Channel FD into the + * writeset, since it doesn't support poll() based + * write flow control */ + break; + case E1INP_TS_TYPE_RAW: + if (what & BSC_FD_EXCEPT) + handle_dahdi_exception(e1i_ts); + if (what & BSC_FD_READ) + rc = handle_ts_raw_read(bfd); + if (what & BSC_FD_WRITE) + rc = handle_ts_raw_write(bfd); /* We never include the DAHDI B-Channel FD into the * writeset, since it doesn't support poll() based * write flow control */ @@ -537,6 +621,7 @@ e1i_ts, &lapd_profile_abis); break; case E1INP_TS_TYPE_TRAU: + case E1INP_TS_TYPE_RAW: /* close/release LAPD instance, if any */ if (e1i_ts->lapd) { lapd_instance_free(e1i_ts->lapd); diff --git a/src/input/misdn.c b/src/input/misdn.c index 330e3b3..391cd18 100644 --- a/src/input/misdn.c +++ b/src/input/misdn.c @@ -391,6 +391,92 @@ return ret; } +/* write to a raw channel TS */ +static int handle_ts_raw_write(struct osmo_fd *bfd, unsigned int len) +{ + struct e1inp_line *line = bfd->data; + unsigned int ts_nr = bfd->priv_nr; + struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1]; + struct msgb *msg; + struct mISDNhead *hh; + int ret; + + /* get the next msg for this timeslot */ + msg = e1inp_tx_ts(e1i_ts, NULL); + if (!msg) + return 0; + + if (msg->len != len) { + /* This might lead to a transmit underrun, as we call tx + * from the rx path, as there's no select/poll on dahdi + * */ + LOGP(DLINP, LOGL_NOTICE, "unexpected msg->len = %u, " + "expected %u\n", msg->len, len); + } + + DEBUGP(DLMIB, "RAW CHAN TX: %s\n", + osmo_hexdump(msg->data, msg->len)); + + hh = (struct mISDNhead *) msgb_push(msg, sizeof(*hh)); + hh->prim = PH_DATA_REQ; + hh->id = 0; + + ret = write(bfd->fd, msg->data, msg->len); + if (ret < msg->len) + LOGP(DLINP, LOGL_DEBUG, "send returns %d instead of %d\n", + ret, msg->len); + msgb_free(msg); + + return ret; +} + +static int handle_ts_raw_read(struct osmo_fd *bfd) +{ + struct e1inp_line *line = bfd->data; + unsigned int ts_nr = bfd->priv_nr; + struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1]; + struct msgb *msg = msgb_alloc(TSX_ALLOC_SIZE, "mISDN Tx RAW"); + struct mISDNhead *hh; + int ret; + + if (!msg) + return -ENOMEM; + + hh = (struct mISDNhead *) msg->data; + + ret = recv(bfd->fd, msg->data, TSX_ALLOC_SIZE, 0); + if (ret < 0) { + fprintf(stderr, "recvfrom error %s\n", strerror(errno)); + return ret; + } + + msgb_put(msg, ret); + + if (hh->prim != PH_CONTROL_IND) + DEBUGP(DLMIB, "<= RAW CHAN len = %d, prim(0x%x) id(0x%x): %s\n", + ret, hh->prim, hh->id, + get_value_string(prim_names, hh->prim)); + + switch (hh->prim) { + case PH_DATA_IND: + msg->l2h = msg->data + MISDN_HEADER_LEN; + DEBUGP(DLMIB, "RAW CHAN RX: %s\n", + osmo_hexdump(msgb_l2(msg), ret - MISDN_HEADER_LEN)); + /* the number of bytes received indicates that data to send */ + handle_ts_raw_write(bfd, msgb_l2len(msg)); + return e1inp_rx_ts(e1i_ts, msg, 0, 0); + case PH_ACTIVATE_IND: + case PH_DATA_CNF: + break; + default: + break; + } + /* FIXME: why do we free signalling msgs in the caller, and trau not? */ + msgb_free(msg); + + return ret; +} + /* callback from select.c in case one of the fd's can be read/written */ static int misdn_fd_cb(struct osmo_fd *bfd, unsigned int what) { @@ -413,6 +499,13 @@ /* We never include the mISDN B-Channel FD into the * writeset, since it doesn't support poll() based * write flow control */ + break; + case E1INP_TS_TYPE_RAW: + if (what & BSC_FD_READ) + rc = handle_ts_raw_read(bfd); + /* We never include the mISDN B-Channel FD into the + * writeset, since it doesn't support poll() based + * write flow control */ break; default: fprintf(stderr, "unknown E1 TS type %u\n", e1i_ts->type); @@ -524,6 +617,7 @@ bfd->when = BSC_FD_READ; break; case E1INP_TS_TYPE_TRAU: + case E1INP_TS_TYPE_RAW: bfd->fd = socket(PF_ISDN, SOCK_DGRAM, ISDN_P_B_RAW); /* We never include the mISDN B-Channel FD into the * writeset, since it doesn't support poll() based -- To view, visit https://gerrit.osmocom.org/1101 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0c25c2688eddd0c55c15b280a8c6e8a49629516b Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Mon Oct 17 20:16:44 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 17 Oct 2016 20:16:44 +0000 Subject: [PATCH] libosmo-abis[master]: Add HDLC timeslot mode Message-ID: Review at https://gerrit.osmocom.org/1102 Add HDLC timeslot mode This is useful for protocols that use HDLC framing for signalling on E1 timeslots, but which don't use LAPD inside (our E1INP_TS_TYPE_SIGN). Examples are particularly a MTP2/MTP3 SS7 stack, like it is used on the A interfaces or on the core network interfaces of classic circuit-switched networks. Change-Id: I2d75801df4d7cbb8dad325f4d6689841f0196fa6 --- M include/osmocom/abis/e1_input.h M src/e1_input.c M src/input/dahdi.c M src/input/misdn.c 4 files changed, 110 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/02/1102/1 diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h index 7568f19..c99b133 100644 --- a/include/osmocom/abis/e1_input.h +++ b/include/osmocom/abis/e1_input.h @@ -65,9 +65,10 @@ E1INP_TS_TYPE_SIGN, E1INP_TS_TYPE_TRAU, E1INP_TS_TYPE_RAW, + E1INP_TS_TYPE_HDLC, }; const char *e1inp_tstype_name(enum e1inp_ts_type tp); -const struct value_string e1inp_ts_type_names[5]; +const struct value_string e1inp_ts_type_names[6]; /* A timeslot in the E1 interface */ struct e1inp_ts { @@ -101,6 +102,12 @@ /* queue of pending to-be-transmitted msgbs */ struct llist_head tx_queue; } raw; + struct { + /* call-back for every received frame */ + void (*recv_cb)(struct e1inp_ts *ts, struct msgb *msg); + /* queue of pending to-be-transmitted msgbs */ + struct llist_head tx_queue; + } hdlc; }; union { struct { @@ -252,6 +259,11 @@ void (*raw_recv_cb)(struct e1inp_ts *ts, struct msgb *msg)); +/* configure and initialize one timeslot dedicated to HDLC frames */ +int e1inp_ts_config_hdlc(struct e1inp_ts *ts, struct e1inp_line *line, + void (*hdlc_recv_cb)(struct e1inp_ts *ts, + struct msgb *msg)); + /* Receive a packet from the E1 driver */ int e1inp_rx_ts(struct e1inp_ts *ts, struct msgb *msg, uint8_t tei, uint8_t sapi); diff --git a/src/e1_input.c b/src/e1_input.c index 75ae36e..970bdb9 100644 --- a/src/e1_input.c +++ b/src/e1_input.c @@ -213,11 +213,12 @@ return get_value_string(e1inp_sign_type_names, tp); } -const struct value_string e1inp_ts_type_names[5] = { +const struct value_string e1inp_ts_type_names[6] = { { E1INP_TS_TYPE_NONE, "None" }, { E1INP_TS_TYPE_SIGN, "Signalling" }, { E1INP_TS_TYPE_TRAU, "TRAU" }, { E1INP_TS_TYPE_RAW, "RAW" }, + { E1INP_TS_TYPE_HDLC, "HDLC" }, { 0, NULL } }; @@ -311,6 +312,21 @@ ts->line = line; ts->raw.recv_cb = raw_recv_cb; INIT_LLIST_HEAD(&ts->raw.tx_queue); + + return 0; +} + +int e1inp_ts_config_hdlc(struct e1inp_ts *ts, struct e1inp_line *line, + void (*hdlc_recv_cb)(struct e1inp_ts *ts, + struct msgb *msg)) +{ + if (ts->type == E1INP_TS_TYPE_HDLC && ts->line && line) + return 0; + + ts->type = E1INP_TS_TYPE_HDLC; + ts->line = line; + ts->hdlc.recv_cb = hdlc_recv_cb; + INIT_LLIST_HEAD(&ts->hdlc.tx_queue); return 0; } @@ -550,6 +566,9 @@ case E1INP_TS_TYPE_RAW: ts->raw.recv_cb(ts, msg); break; + case E1INP_TS_TYPE_HDLC: + ts->hdlc.recv_cb(ts, msg); + break; default: ret = -EINVAL; LOGP(DLMI, LOGL_ERROR, "unknown TS type %u\n", ts->type); @@ -677,6 +696,10 @@ /* Get msgb from tx_queue */ msg = msgb_dequeue(&e1i_ts->raw.tx_queue); break; + case E1INP_TS_TYPE_HDLC: + /* Get msgb from tx_queue */ + msg = msgb_dequeue(&e1i_ts->hdlc.tx_queue); + break; default: LOGP(DLMI, LOGL_ERROR, "unsupported E1 TS type %u\n", e1i_ts->type); return NULL; diff --git a/src/input/dahdi.c b/src/input/dahdi.c index db00f5f..0945daa 100644 --- a/src/input/dahdi.c +++ b/src/input/dahdi.c @@ -259,6 +259,51 @@ return 0; } +static void handle_hdlc_write(struct osmo_fd *bfd) +{ + struct e1inp_line *line = bfd->data; + unsigned int ts_nr = bfd->priv_nr; + struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1]; + struct msgb *msg; + int ret; + + /* get the next msg for this timeslot */ + msg = e1inp_tx_ts(e1i_ts, NULL); + if (!msg) + return; + + ret = write(bfd->fd, msg->data, msg->len + 2); + msgb_free(msg); + if (ret == -1) + handle_dahdi_exception(e1i_ts); + else if (ret < 0) + LOGP(DLMI, LOGL_NOTICE, "%s write failed %d\n", __func__, ret); +} + +static int handle_hdlc_read(struct osmo_fd *bfd) +{ + struct e1inp_line *line = bfd->data; + unsigned int ts_nr = bfd->priv_nr; + struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1]; + struct msgb *msg = msgb_alloc(TS1_ALLOC_SIZE, "DAHDI HDLC Rx"); + int ret; + + if (!msg) + return -ENOMEM; + + ret = read(bfd->fd, msg->data, TS1_ALLOC_SIZE - 16); + if (ret == -1) + handle_dahdi_exception(e1i_ts); + else if (ret < 0) { + perror("read "); + } + msgb_put(msg, ret - 2); + if (ret <= 3) { + perror("read "); + } + + return e1inp_rx_ts(e1i_ts, msg, 0, 0); +} static int invertbits = 1; @@ -451,6 +496,14 @@ if (what & BSC_FD_WRITE) rc = handle_ts1_write(bfd); break; + case E1INP_TS_TYPE_HDLC: + if (what & BSC_FD_EXCEPT) + handle_dahdi_exception(e1i_ts); + if (what & BSC_FD_READ) + rc = handle_hdlc_read(bfd); + if (what & BSC_FD_WRITE) + handle_hdlc_write(bfd); + break; case E1INP_TS_TYPE_TRAU: if (what & BSC_FD_EXCEPT) handle_dahdi_exception(e1i_ts); @@ -620,6 +673,20 @@ dahdi_write_msg, bfd, e1inp_dlsap_up, e1i_ts, &lapd_profile_abis); break; + case E1INP_TS_TYPE_HDLC: + if (!bfd->fd) + bfd->fd = open(openstr, O_RDWR | O_NONBLOCK); + if (bfd->fd == -1) { + LOGP(DLINP, LOGL_ERROR, + "%s could not open %s %s\n", + __func__, openstr, strerror(errno)); + return -EIO; + } + bfd->when = BSC_FD_READ | BSC_FD_EXCEPT; + ret = dahdi_set_bufinfo(bfd->fd, 1); + if (ret < 0) + return ret; + break; case E1INP_TS_TYPE_TRAU: case E1INP_TS_TYPE_RAW: /* close/release LAPD instance, if any */ diff --git a/src/input/misdn.c b/src/input/misdn.c index 391cd18..f72b496 100644 --- a/src/input/misdn.c +++ b/src/input/misdn.c @@ -607,6 +607,11 @@ case E1INP_TS_TYPE_NONE: continue; break; + case E1INP_TS_TYPE_HDLC: + bfd->fd = socket(PF_ISDN, SOCK_DGRAM, + ISDN_P_B_HDLC); + bfd->when = BSC_FD_READ; + break; case E1INP_TS_TYPE_SIGN: if (mline->use_userspace_lapd) bfd->fd = socket(PF_ISDN, SOCK_DGRAM, @@ -650,6 +655,7 @@ addr.tei = GROUP_TEI; } break; + case E1INP_TS_TYPE_HDLC: case E1INP_TS_TYPE_TRAU: addr.channel = ts; break; -- To view, visit https://gerrit.osmocom.org/1102 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2d75801df4d7cbb8dad325f4d6689841f0196fa6 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Mon Oct 17 20:36:47 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 17 Oct 2016 20:36:47 +0000 Subject: libosmo-abis[master]: Implement new 'raw' input type for E1 timeslots In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1101 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0c25c2688eddd0c55c15b280a8c6e8a49629516b Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis 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 Mon Oct 17 20:36:51 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 17 Oct 2016 20:36:51 +0000 Subject: libosmo-abis[master]: Add HDLC timeslot mode In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1102 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2d75801df4d7cbb8dad325f4d6689841f0196fa6 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis 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 Mon Oct 17 20:36:52 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 17 Oct 2016 20:36:52 +0000 Subject: [MERGED] libosmo-abis[master]: Add HDLC timeslot mode In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add HDLC timeslot mode ...................................................................... Add HDLC timeslot mode This is useful for protocols that use HDLC framing for signalling on E1 timeslots, but which don't use LAPD inside (our E1INP_TS_TYPE_SIGN). Examples are particularly a MTP2/MTP3 SS7 stack, like it is used on the A interfaces or on the core network interfaces of classic circuit-switched networks. Change-Id: I2d75801df4d7cbb8dad325f4d6689841f0196fa6 --- M include/osmocom/abis/e1_input.h M src/e1_input.c M src/input/dahdi.c M src/input/misdn.c 4 files changed, 110 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h index 7568f19..c99b133 100644 --- a/include/osmocom/abis/e1_input.h +++ b/include/osmocom/abis/e1_input.h @@ -65,9 +65,10 @@ E1INP_TS_TYPE_SIGN, E1INP_TS_TYPE_TRAU, E1INP_TS_TYPE_RAW, + E1INP_TS_TYPE_HDLC, }; const char *e1inp_tstype_name(enum e1inp_ts_type tp); -const struct value_string e1inp_ts_type_names[5]; +const struct value_string e1inp_ts_type_names[6]; /* A timeslot in the E1 interface */ struct e1inp_ts { @@ -101,6 +102,12 @@ /* queue of pending to-be-transmitted msgbs */ struct llist_head tx_queue; } raw; + struct { + /* call-back for every received frame */ + void (*recv_cb)(struct e1inp_ts *ts, struct msgb *msg); + /* queue of pending to-be-transmitted msgbs */ + struct llist_head tx_queue; + } hdlc; }; union { struct { @@ -252,6 +259,11 @@ void (*raw_recv_cb)(struct e1inp_ts *ts, struct msgb *msg)); +/* configure and initialize one timeslot dedicated to HDLC frames */ +int e1inp_ts_config_hdlc(struct e1inp_ts *ts, struct e1inp_line *line, + void (*hdlc_recv_cb)(struct e1inp_ts *ts, + struct msgb *msg)); + /* Receive a packet from the E1 driver */ int e1inp_rx_ts(struct e1inp_ts *ts, struct msgb *msg, uint8_t tei, uint8_t sapi); diff --git a/src/e1_input.c b/src/e1_input.c index 75ae36e..970bdb9 100644 --- a/src/e1_input.c +++ b/src/e1_input.c @@ -213,11 +213,12 @@ return get_value_string(e1inp_sign_type_names, tp); } -const struct value_string e1inp_ts_type_names[5] = { +const struct value_string e1inp_ts_type_names[6] = { { E1INP_TS_TYPE_NONE, "None" }, { E1INP_TS_TYPE_SIGN, "Signalling" }, { E1INP_TS_TYPE_TRAU, "TRAU" }, { E1INP_TS_TYPE_RAW, "RAW" }, + { E1INP_TS_TYPE_HDLC, "HDLC" }, { 0, NULL } }; @@ -311,6 +312,21 @@ ts->line = line; ts->raw.recv_cb = raw_recv_cb; INIT_LLIST_HEAD(&ts->raw.tx_queue); + + return 0; +} + +int e1inp_ts_config_hdlc(struct e1inp_ts *ts, struct e1inp_line *line, + void (*hdlc_recv_cb)(struct e1inp_ts *ts, + struct msgb *msg)) +{ + if (ts->type == E1INP_TS_TYPE_HDLC && ts->line && line) + return 0; + + ts->type = E1INP_TS_TYPE_HDLC; + ts->line = line; + ts->hdlc.recv_cb = hdlc_recv_cb; + INIT_LLIST_HEAD(&ts->hdlc.tx_queue); return 0; } @@ -550,6 +566,9 @@ case E1INP_TS_TYPE_RAW: ts->raw.recv_cb(ts, msg); break; + case E1INP_TS_TYPE_HDLC: + ts->hdlc.recv_cb(ts, msg); + break; default: ret = -EINVAL; LOGP(DLMI, LOGL_ERROR, "unknown TS type %u\n", ts->type); @@ -677,6 +696,10 @@ /* Get msgb from tx_queue */ msg = msgb_dequeue(&e1i_ts->raw.tx_queue); break; + case E1INP_TS_TYPE_HDLC: + /* Get msgb from tx_queue */ + msg = msgb_dequeue(&e1i_ts->hdlc.tx_queue); + break; default: LOGP(DLMI, LOGL_ERROR, "unsupported E1 TS type %u\n", e1i_ts->type); return NULL; diff --git a/src/input/dahdi.c b/src/input/dahdi.c index db00f5f..0945daa 100644 --- a/src/input/dahdi.c +++ b/src/input/dahdi.c @@ -259,6 +259,51 @@ return 0; } +static void handle_hdlc_write(struct osmo_fd *bfd) +{ + struct e1inp_line *line = bfd->data; + unsigned int ts_nr = bfd->priv_nr; + struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1]; + struct msgb *msg; + int ret; + + /* get the next msg for this timeslot */ + msg = e1inp_tx_ts(e1i_ts, NULL); + if (!msg) + return; + + ret = write(bfd->fd, msg->data, msg->len + 2); + msgb_free(msg); + if (ret == -1) + handle_dahdi_exception(e1i_ts); + else if (ret < 0) + LOGP(DLMI, LOGL_NOTICE, "%s write failed %d\n", __func__, ret); +} + +static int handle_hdlc_read(struct osmo_fd *bfd) +{ + struct e1inp_line *line = bfd->data; + unsigned int ts_nr = bfd->priv_nr; + struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1]; + struct msgb *msg = msgb_alloc(TS1_ALLOC_SIZE, "DAHDI HDLC Rx"); + int ret; + + if (!msg) + return -ENOMEM; + + ret = read(bfd->fd, msg->data, TS1_ALLOC_SIZE - 16); + if (ret == -1) + handle_dahdi_exception(e1i_ts); + else if (ret < 0) { + perror("read "); + } + msgb_put(msg, ret - 2); + if (ret <= 3) { + perror("read "); + } + + return e1inp_rx_ts(e1i_ts, msg, 0, 0); +} static int invertbits = 1; @@ -451,6 +496,14 @@ if (what & BSC_FD_WRITE) rc = handle_ts1_write(bfd); break; + case E1INP_TS_TYPE_HDLC: + if (what & BSC_FD_EXCEPT) + handle_dahdi_exception(e1i_ts); + if (what & BSC_FD_READ) + rc = handle_hdlc_read(bfd); + if (what & BSC_FD_WRITE) + handle_hdlc_write(bfd); + break; case E1INP_TS_TYPE_TRAU: if (what & BSC_FD_EXCEPT) handle_dahdi_exception(e1i_ts); @@ -620,6 +673,20 @@ dahdi_write_msg, bfd, e1inp_dlsap_up, e1i_ts, &lapd_profile_abis); break; + case E1INP_TS_TYPE_HDLC: + if (!bfd->fd) + bfd->fd = open(openstr, O_RDWR | O_NONBLOCK); + if (bfd->fd == -1) { + LOGP(DLINP, LOGL_ERROR, + "%s could not open %s %s\n", + __func__, openstr, strerror(errno)); + return -EIO; + } + bfd->when = BSC_FD_READ | BSC_FD_EXCEPT; + ret = dahdi_set_bufinfo(bfd->fd, 1); + if (ret < 0) + return ret; + break; case E1INP_TS_TYPE_TRAU: case E1INP_TS_TYPE_RAW: /* close/release LAPD instance, if any */ diff --git a/src/input/misdn.c b/src/input/misdn.c index 391cd18..f72b496 100644 --- a/src/input/misdn.c +++ b/src/input/misdn.c @@ -607,6 +607,11 @@ case E1INP_TS_TYPE_NONE: continue; break; + case E1INP_TS_TYPE_HDLC: + bfd->fd = socket(PF_ISDN, SOCK_DGRAM, + ISDN_P_B_HDLC); + bfd->when = BSC_FD_READ; + break; case E1INP_TS_TYPE_SIGN: if (mline->use_userspace_lapd) bfd->fd = socket(PF_ISDN, SOCK_DGRAM, @@ -650,6 +655,7 @@ addr.tei = GROUP_TEI; } break; + case E1INP_TS_TYPE_HDLC: case E1INP_TS_TYPE_TRAU: addr.channel = ts; break; -- To view, visit https://gerrit.osmocom.org/1102 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2d75801df4d7cbb8dad325f4d6689841f0196fa6 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Oct 17 20:36:53 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 17 Oct 2016 20:36:53 +0000 Subject: [MERGED] libosmo-abis[master]: Implement new 'raw' input type for E1 timeslots In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Implement new 'raw' input type for E1 timeslots ...................................................................... Implement new 'raw' input type for E1 timeslots In the past, the A-bis E1 input system only unederstood LAPD signalling time-slots and trau-slots with 16kBps sub-slots. This adds the notion of a 'raw' transparent 64kBps slot, without any furthe de-multiplexing nor any HLDC inside. Change-Id: I0c25c2688eddd0c55c15b280a8c6e8a49629516b --- M include/osmocom/abis/e1_input.h M src/e1_input.c M src/input/dahdi.c M src/input/misdn.c 4 files changed, 214 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h index 8ef33d5..7568f19 100644 --- a/include/osmocom/abis/e1_input.h +++ b/include/osmocom/abis/e1_input.h @@ -64,6 +64,7 @@ E1INP_TS_TYPE_NONE, E1INP_TS_TYPE_SIGN, E1INP_TS_TYPE_TRAU, + E1INP_TS_TYPE_RAW, }; const char *e1inp_tstype_name(enum e1inp_ts_type tp); const struct value_string e1inp_ts_type_names[5]; @@ -94,6 +95,12 @@ /* subchannel muxer for frames to E1 */ struct subch_mux mux; } trau; + struct { + /* call-back for every received frame */ + void (*recv_cb)(struct e1inp_ts *ts, struct msgb *msg); + /* queue of pending to-be-transmitted msgbs */ + struct llist_head tx_queue; + } raw; }; union { struct { @@ -203,9 +210,6 @@ /* fine a previously registered driver */ struct e1inp_driver *e1inp_driver_find(const char *name); -/* register a line with the E1 core */ -int e1inp_line_register(struct e1inp_line *line); - /* get a line by its ID */ struct e1inp_line *e1inp_line_find(uint8_t e1_nr); @@ -243,6 +247,11 @@ int (*trau_rcv_cb)(struct subch_demux *dmx, int ch, uint8_t *data, int len, void *_priv)); +/* configure and initialize one timeslot dedicated to RAW frames */ +int e1inp_ts_config_raw(struct e1inp_ts *ts, struct e1inp_line *line, + void (*raw_recv_cb)(struct e1inp_ts *ts, + struct msgb *msg)); + /* Receive a packet from the E1 driver */ int e1inp_rx_ts(struct e1inp_ts *ts, struct msgb *msg, uint8_t tei, uint8_t sapi); diff --git a/src/e1_input.c b/src/e1_input.c index df990d5..75ae36e 100644 --- a/src/e1_input.c +++ b/src/e1_input.c @@ -217,6 +217,7 @@ { E1INP_TS_TYPE_NONE, "None" }, { E1INP_TS_TYPE_SIGN, "Signalling" }, { E1INP_TS_TYPE_TRAU, "TRAU" }, + { E1INP_TS_TYPE_RAW, "RAW" }, { 0, NULL } }; @@ -296,6 +297,21 @@ else ts->sign.delay = 100000; INIT_LLIST_HEAD(&ts->sign.sign_links); + return 0; +} + +int e1inp_ts_config_raw(struct e1inp_ts *ts, struct e1inp_line *line, + void (*raw_recv_cb)(struct e1inp_ts *ts, + struct msgb *msg)) +{ + if (ts->type == E1INP_TS_TYPE_RAW && ts->line && line) + return 0; + + ts->type = E1INP_TS_TYPE_RAW; + ts->line = line; + ts->raw.recv_cb = raw_recv_cb; + INIT_LLIST_HEAD(&ts->raw.tx_queue); + return 0; } @@ -531,6 +547,9 @@ ret = subch_demux_in(&ts->trau.demux, msg->l2h, msgb_l2len(msg)); msgb_free(msg); break; + case E1INP_TS_TYPE_RAW: + ts->raw.recv_cb(ts, msg); + break; default: ret = -EINVAL; LOGP(DLMI, LOGL_ERROR, "unknown TS type %u\n", ts->type); @@ -654,6 +673,10 @@ } msgb_put(msg, 40); break; + case E1INP_TS_TYPE_RAW: + /* Get msgb from tx_queue */ + msg = msgb_dequeue(&e1i_ts->raw.tx_queue); + break; default: LOGP(DLMI, LOGL_ERROR, "unsupported E1 TS type %u\n", e1i_ts->type); return NULL; diff --git a/src/input/dahdi.c b/src/input/dahdi.c index ab06908..db00f5f 100644 --- a/src/input/dahdi.c +++ b/src/input/dahdi.c @@ -360,6 +360,79 @@ return ret; } +/* write to a raw channel TS */ +static int handle_ts_raw_write(struct osmo_fd *bfd) +{ + struct e1inp_line *line = bfd->data; + unsigned int ts_nr = bfd->priv_nr; + struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1]; + struct msgb *msg; + int ret; + + /* get the next msg for this timeslot */ + msg = e1inp_tx_ts(e1i_ts, NULL); + if (!msg) + return 0; + + if (msg->len != D_BCHAN_TX_GRAN) { + /* This might lead to a transmit underrun, as we call tx + * from the rx path, as there's no select/poll on dahdi + * */ + LOGP(DLINP, LOGL_NOTICE, "unexpected msg->len = %u, " + "expected %u\n", msg->len, D_BCHAN_TX_GRAN); + } + + DEBUGP(DLMIB, "RAW CHAN TX: %s\n", + osmo_hexdump(msg->data, msg->len)); + + if (0/*invertbits*/) { + flip_buf_bits(msg->data, msg->len); + } + + ret = write(bfd->fd, msg->data, msg->len); + if (ret < msg->len) + LOGP(DLINP, LOGL_DEBUG, "send returns %d instead of %d\n", + ret, msg->len); + msgb_free(msg); + + return ret; +} + +static int handle_ts_raw_read(struct osmo_fd *bfd) +{ + struct e1inp_line *line = bfd->data; + unsigned int ts_nr = bfd->priv_nr; + struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1]; + struct msgb *msg = msgb_alloc(D_TSX_ALLOC_SIZE, "DAHDI Raw TS"); + int ret; + + if (!msg) + return -ENOMEM; + + ret = read(bfd->fd, msg->data, D_TSX_ALLOC_SIZE); + if (ret < 0 || ret != D_TSX_ALLOC_SIZE) { + LOGP(DLINP, LOGL_DEBUG, "read error %d %s\n", + ret, strerror(errno)); + return ret; + } + + if (0/*invertbits*/) { + flip_buf_bits(msg->data, ret); + } + + msgb_put(msg, ret); + + msg->l2h = msg->data; + DEBUGP(DLMIB, "RAW CHAN RX: %s\n", + osmo_hexdump(msgb_l2(msg), ret)); + ret = e1inp_rx_ts(e1i_ts, msg, 0, 0); + /* physical layer indicates that data has been sent, + * we thus can send some more data */ + ret = handle_ts_raw_write(bfd); + + return ret; +} + /* callback from select.c in case one of the fd's can be read/written */ static int dahdi_fd_cb(struct osmo_fd *bfd, unsigned int what) { @@ -385,6 +458,17 @@ rc = handle_tsX_read(bfd); if (what & BSC_FD_WRITE) rc = handle_tsX_write(bfd); + /* We never include the DAHDI B-Channel FD into the + * writeset, since it doesn't support poll() based + * write flow control */ + break; + case E1INP_TS_TYPE_RAW: + if (what & BSC_FD_EXCEPT) + handle_dahdi_exception(e1i_ts); + if (what & BSC_FD_READ) + rc = handle_ts_raw_read(bfd); + if (what & BSC_FD_WRITE) + rc = handle_ts_raw_write(bfd); /* We never include the DAHDI B-Channel FD into the * writeset, since it doesn't support poll() based * write flow control */ @@ -537,6 +621,7 @@ e1i_ts, &lapd_profile_abis); break; case E1INP_TS_TYPE_TRAU: + case E1INP_TS_TYPE_RAW: /* close/release LAPD instance, if any */ if (e1i_ts->lapd) { lapd_instance_free(e1i_ts->lapd); diff --git a/src/input/misdn.c b/src/input/misdn.c index 330e3b3..391cd18 100644 --- a/src/input/misdn.c +++ b/src/input/misdn.c @@ -391,6 +391,92 @@ return ret; } +/* write to a raw channel TS */ +static int handle_ts_raw_write(struct osmo_fd *bfd, unsigned int len) +{ + struct e1inp_line *line = bfd->data; + unsigned int ts_nr = bfd->priv_nr; + struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1]; + struct msgb *msg; + struct mISDNhead *hh; + int ret; + + /* get the next msg for this timeslot */ + msg = e1inp_tx_ts(e1i_ts, NULL); + if (!msg) + return 0; + + if (msg->len != len) { + /* This might lead to a transmit underrun, as we call tx + * from the rx path, as there's no select/poll on dahdi + * */ + LOGP(DLINP, LOGL_NOTICE, "unexpected msg->len = %u, " + "expected %u\n", msg->len, len); + } + + DEBUGP(DLMIB, "RAW CHAN TX: %s\n", + osmo_hexdump(msg->data, msg->len)); + + hh = (struct mISDNhead *) msgb_push(msg, sizeof(*hh)); + hh->prim = PH_DATA_REQ; + hh->id = 0; + + ret = write(bfd->fd, msg->data, msg->len); + if (ret < msg->len) + LOGP(DLINP, LOGL_DEBUG, "send returns %d instead of %d\n", + ret, msg->len); + msgb_free(msg); + + return ret; +} + +static int handle_ts_raw_read(struct osmo_fd *bfd) +{ + struct e1inp_line *line = bfd->data; + unsigned int ts_nr = bfd->priv_nr; + struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1]; + struct msgb *msg = msgb_alloc(TSX_ALLOC_SIZE, "mISDN Tx RAW"); + struct mISDNhead *hh; + int ret; + + if (!msg) + return -ENOMEM; + + hh = (struct mISDNhead *) msg->data; + + ret = recv(bfd->fd, msg->data, TSX_ALLOC_SIZE, 0); + if (ret < 0) { + fprintf(stderr, "recvfrom error %s\n", strerror(errno)); + return ret; + } + + msgb_put(msg, ret); + + if (hh->prim != PH_CONTROL_IND) + DEBUGP(DLMIB, "<= RAW CHAN len = %d, prim(0x%x) id(0x%x): %s\n", + ret, hh->prim, hh->id, + get_value_string(prim_names, hh->prim)); + + switch (hh->prim) { + case PH_DATA_IND: + msg->l2h = msg->data + MISDN_HEADER_LEN; + DEBUGP(DLMIB, "RAW CHAN RX: %s\n", + osmo_hexdump(msgb_l2(msg), ret - MISDN_HEADER_LEN)); + /* the number of bytes received indicates that data to send */ + handle_ts_raw_write(bfd, msgb_l2len(msg)); + return e1inp_rx_ts(e1i_ts, msg, 0, 0); + case PH_ACTIVATE_IND: + case PH_DATA_CNF: + break; + default: + break; + } + /* FIXME: why do we free signalling msgs in the caller, and trau not? */ + msgb_free(msg); + + return ret; +} + /* callback from select.c in case one of the fd's can be read/written */ static int misdn_fd_cb(struct osmo_fd *bfd, unsigned int what) { @@ -413,6 +499,13 @@ /* We never include the mISDN B-Channel FD into the * writeset, since it doesn't support poll() based * write flow control */ + break; + case E1INP_TS_TYPE_RAW: + if (what & BSC_FD_READ) + rc = handle_ts_raw_read(bfd); + /* We never include the mISDN B-Channel FD into the + * writeset, since it doesn't support poll() based + * write flow control */ break; default: fprintf(stderr, "unknown E1 TS type %u\n", e1i_ts->type); @@ -524,6 +617,7 @@ bfd->when = BSC_FD_READ; break; case E1INP_TS_TYPE_TRAU: + case E1INP_TS_TYPE_RAW: bfd->fd = socket(PF_ISDN, SOCK_DGRAM, ISDN_P_B_RAW); /* We never include the mISDN B-Channel FD into the * writeset, since it doesn't support poll() based -- To view, visit https://gerrit.osmocom.org/1101 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0c25c2688eddd0c55c15b280a8c6e8a49629516b Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Oct 17 20:38:03 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 17 Oct 2016 20:38:03 +0000 Subject: [MERGED] osmo-pcu[master]: EGPRS: Add EPDAN CRBB Tree based decoding In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: EGPRS: Add EPDAN CRBB Tree based decoding ...................................................................... EGPRS: Add EPDAN CRBB Tree based decoding Implemented tree based algorithm to decode compressed bitmap in EPDAN as described in section 9.1.10 of 3GPP 44.060. This algorithm intends to improve the performance over existing method. New Regression test is added under bitcomp directory. Test case is added to validate decompressed result of the bitmap Present in EPDAN. Test is done for multiple bitmaps of varying length. Invalid inputs are also part of the test vector. Change-Id: Ieae1992ed4b02bb1e09eec2d3de1a030eabd16ce --- M src/Makefile.am M src/decoding.cpp A src/egprs_rlc_compression.cpp A src/egprs_rlc_compression.h M tests/Makefile.am A tests/bitcomp/BitcompTest.cpp A tests/bitcomp/BitcompTest.err A tests/bitcomp/BitcompTest.ok M tests/testsuite.at 9 files changed, 787 insertions(+), 15 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/Makefile.am b/src/Makefile.am index 9bdec2f..9b047e7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -62,7 +62,8 @@ rlc.cpp \ osmobts_sock.cpp \ gprs_codel.c \ - gprs_coding_scheme.cpp + gprs_coding_scheme.cpp \ + egprs_rlc_compression.cpp bin_PROGRAMS = \ osmo-pcu @@ -94,7 +95,8 @@ pcu_utils.h \ cxx_linuxlist.h \ gprs_codel.h \ - gprs_coding_scheme.h + gprs_coding_scheme.h \ + egprs_rlc_compression.h osmo_pcu_SOURCES = pcu_main.cpp diff --git a/src/decoding.cpp b/src/decoding.cpp index 3f5c4d2..6ae4b16 100644 --- a/src/decoding.cpp +++ b/src/decoding.cpp @@ -20,6 +20,7 @@ #include #include #include +#include extern "C" { #include @@ -692,21 +693,17 @@ if (crbb_len > 0) { int old_len = bits->cur_bit; - struct bitvec crbb; - crbb.data = (uint8_t *)desc->CRBB; - crbb.data_len = sizeof(desc->CRBB); - crbb.cur_bit = desc->CRBB_LENGTH; - - rc = osmo_t4_decode(&crbb, desc->CRBB_STARTING_COLOR_CODE, - bits); - + LOGP(DRLCMACDL, LOGL_DEBUG, "Compress bitmap exists, " + "CRBB LEN = %d and Starting color code = %d", + desc->CRBB_LENGTH, desc->CRBB_STARTING_COLOR_CODE); + rc = egprs_compress::decompress_crbb(desc->CRBB_LENGTH, + desc->CRBB_STARTING_COLOR_CODE, desc->CRBB, bits); if (rc < 0) { LOGP(DRLCMACUL, LOGL_NOTICE, - "Failed to decode CRBB: " - "length %d, data '%s'\n", - desc->CRBB_LENGTH, - osmo_hexdump(crbb.data, crbb.data_len)); + "Failed to decode CRBB: length %d, data '%s'\n", + desc->CRBB_LENGTH, osmo_hexdump( + desc->CRBB, (desc->CRBB_LENGTH + 7)/8)); /* We don't know the SSN offset for the URBB, * return what we have so far and assume the * bitmap has stopped here */ diff --git a/src/egprs_rlc_compression.cpp b/src/egprs_rlc_compression.cpp new file mode 100644 index 0000000..f4e6bde --- /dev/null +++ b/src/egprs_rlc_compression.cpp @@ -0,0 +1,361 @@ +/* egprs_rlc_compression.h +* Routines for EGPRS RLC bitmap compression handling +*/ +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +#define EGPRS_CODEWORDS 79 /* total number of codewords */ + +struct egprs_compress_node{ + struct egprs_compress_node *left; + struct egprs_compress_node *right; + int run_length; +}; + +extern void *tall_pcu_ctx; + +egprs_compress *egprs_compress::s_instance = 0; + +egprs_compress_node *egprs_compress::create_tree_node(void *parent) +{ + egprs_compress_node *new_node; + + new_node = talloc_zero(parent, egprs_compress_node); + new_node->left = NULL; + new_node->right = NULL; + new_node->run_length = -1; + return new_node; +} + +egprs_compress *egprs_compress::instance() +{ + if (!egprs_compress::s_instance) + egprs_compress::s_instance = new egprs_compress; + return egprs_compress::s_instance; +} + +/* Expands the given tree by incorporating + * the given codewords. + * \param root[in] Root of ones or zeros tree + * \param cdwd[in] Array of code words + * number of codewords is EGPRS_CODEWORDS + */ +void egprs_compress::build_codewords(egprs_compress_node *root, const char *cdwd[]) +{ + egprs_compress_node *iter; + int len; + int i; + int idx; + + for (idx = 0; idx < EGPRS_CODEWORDS; idx++) { + len = strlen((const char *)cdwd[idx]); + iter = root; + for (i = 0; i < len; i++) { + if (cdwd[idx][i] == '0') { + if (!iter->left) + iter->left = create_tree_node(root); + iter = iter->left; + } else { + if (!iter->right) + iter->right = create_tree_node(root); + iter = iter->right; + } + } + if (iter) { + /* The first 64 run lengths are 0, 1, 2, ..., 63 + * and the following ones are 64, 128, 192 described in + * section 9.1.10 of 3gpp 44.060 */ + if (idx < 64) + iter->run_length = idx; + else + iter->run_length = (idx - 63) * 64; + } + } +} + +/* 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", + "000111", + "0111", + "1000", + "1011", + "1100", + "1110", + "1111", + "10011", + "10100", + "00111", + "01000", + "001000", + "000011", + "110100", + "110101", + "101010", + "101011", + "0100111", + "0001100", + "0001000", + "0010111", + "0000011", + "0000100", + "0101000", + "0101011", + "0010011", + "0100100", + "0011000", + "00000010", + "00000011", + "00011010", + "00011011", + "00010010", + "00010011", + "00010100", + "00010101", + "00010110", + "00010111", + "00101000", + "00101001", + "00101010", + "00101011", + "00101100", + "00101101", + "00000100", + "00000101", + "00001010", + "00001011", + "01010010", + "01010011", + "01010100", + "01010101", + "00100100", + "00100101", + "01011000", + "01011001", + "01011010", + "01011011", + "01001010", + "01001011", + "00110010", + "00110011", + "00110100", + "11011", + "10010", + "010111", + "0110111", + "00110110", + "00110111", + "01100100", + "01100101", + "01101000", + "01100111", + "011001100", + "011001101", + "011010010", + "011010011", + "011010100" +}; + +const char *zero_run_len_code_list[EGPRS_CODEWORDS] = { + "0000110111", + "10", + "11", + "010", + "011", + "0011", + "0010", + "00011", + "000101", + "000100", + "0000100", + "0000101", + "0000111", + "00000100", + "00000111", + "000011000", + "0000010111", + "0000011000", + "0000001000", + "00001100111", + "00001101000", + "00001101100", + "00000110111", + "00000101000", + "00000010111", + "00000011000", + "000011001010", + "000011001011", + "000011001100", + "000011001101", + "000001101000", + "000001101001", + "000001101010", + "000001101011", + "000011010010", + "000011010011", + "000011010100", + "000011010101", + "000011010110", + "000011010111", + "000001101100", + "000001101101", + "000011011010", + "000011011011", + "000001010100", + "000001010101", + "000001010110", + "000001010111", + "000001100100", + "000001100101", + "000001010010", + "000001010011", + "000000100100", + "000000110111", + "000000111000", + "000000100111", + "000000101000", + "000001011000", + "000001011001", + "000000101011", + "000000101100", + "000001011010", + "000001100110", + "000001100111", + "0000001111", + "000011001000", + "000011001001", + "000001011011", + "000000110011", + "000000110100", + "000000110101", + "0000001101100", + "0000001101101", + "0000001001010", + "0000001001011", + "0000001001100", + "0000001001101", + "0000001110010", + "0000001110011" +}; + +/* Calculate runlength of a codeword + * \param root[in] Root of Ones or Zeros tree + * \param bmbuf[in] Received compressed bitmap buf + * \param bit_pos[in] The start bit pos to read codeword + * \param len_codewd[in] Length of code word + * \param rlen[out] Calculated run length + */ +static int search_runlen( + egprs_compress_node *root, + const uint8_t *bmbuf, + uint8_t bit_pos, + uint8_t *len_codewd, + uint16_t *rlen) +{ + egprs_compress_node *iter; + uint8_t dir; + + iter = root; + *len_codewd = 0; + + while (iter->run_length == -1) { + if ((!iter->left) && (!iter->right)) + return -1; + /* get the bit value at the bitpos and put it in right most of dir */ + dir = (bmbuf[bit_pos/8] >> (7 - (bit_pos & 0x07))) & 0x01; + bit_pos++; + (*len_codewd)++; + if (!dir && (iter->left != NULL)) + iter = iter->left; + else if (dir && (iter->right != NULL)) + iter = iter->right; + else + return -1; + } + LOGP(DRLCMACUL, LOGL_DEBUG, "Run_length = %d\n", iter->run_length); + *rlen = iter->run_length; + return 1; +} + +/* Decompress received block bitmap + * \param compress_bmap_len[in] Compressed bitmap length + * \param start[in] Starting Color Code, true if bitmap starts with a run + * length of ones, false if zeros; see 9.1.10, 3GPP 44.060. + * \param orig_crbb_buf[in] Received block crbb bitmap + * \param dest[out] Uncompressed bitvector + */ +int egprs_compress::decompress_crbb( + int8_t compress_bmap_len, + bool start, + const uint8_t *orig_crbb_buf, + bitvec *dest) +{ + + uint8_t bit_pos = 0; + uint8_t data; + egprs_compress_node *list = NULL; + uint8_t nbits = 0; /* number of bits of codeword */ + uint16_t run_length = 0; + uint16_t cbmaplen = 0; /* compressed bitmap part after decompression */ + unsigned wp = dest->cur_bit; + int rc = 0; + egprs_compress *compress = instance(); + + while (compress_bmap_len > 0) { + if (start) { + data = 0xff; + list = compress->ones_list; + } else { + data = 0x00; + list = compress->zeros_list; + } + rc = search_runlen(list, orig_crbb_buf, + bit_pos, &nbits, &run_length); + if (rc == -1) + return -1; + /* If run length > 64, need makeup and terminating code */ + if (run_length < 64) + start = !start; + cbmaplen = cbmaplen + run_length; + /* put run length of Ones in uncompressed bitmap */ + while (run_length != 0) { + if (run_length > 8) { + bitvec_write_field(dest, wp, data, 8); + run_length = run_length - 8; + } else { + bitvec_write_field(dest, wp, data, run_length); + run_length = 0; + } + } + bit_pos = bit_pos + nbits; + compress_bmap_len = compress_bmap_len - nbits; + } + return 0; +} + +void egprs_compress::decode_tree_init() +{ + ones_list = create_tree_node(tall_pcu_ctx); + zeros_list = create_tree_node(tall_pcu_ctx); + build_codewords(ones_list, one_run_len_code_list); + build_codewords(zeros_list, zero_run_len_code_list); +} + +egprs_compress::egprs_compress() +{ + decode_tree_init(); +} + diff --git a/src/egprs_rlc_compression.h b/src/egprs_rlc_compression.h new file mode 100644 index 0000000..c5f0f1a --- /dev/null +++ b/src/egprs_rlc_compression.h @@ -0,0 +1,29 @@ +/* egprs_rlc_compression.h + * Routines for EGPRS RLC bitmap compression handling + */ + +#pragma once + +struct egprs_compress_node; + +/* Singleton to manage the EGPRS compression algorithm. */ +class egprs_compress +{ +public: + static int decompress_crbb(int8_t compress_bmap_len, + bool start, const uint8_t *orig_buf, + bitvec *dest); + egprs_compress(); + +private: + egprs_compress_node *ones_list; + egprs_compress_node *zeros_list; + + void decode_tree_init(void); + static egprs_compress *s_instance; + static egprs_compress*instance(); + egprs_compress_node *create_tree_node(void *); + void build_codewords(egprs_compress_node *root, const char *cdwd[]); + /* singleton class, so this private destructor is left unimplemented. */ + ~egprs_compress(); +}; diff --git a/tests/Makefile.am b/tests/Makefile.am index 2a3415e..a24f4ea 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,7 +1,7 @@ AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGB_CFLAGS) $(LIBOSMOGSM_CFLAGS) -I$(top_srcdir)/src/ AM_LDFLAGS = -lrt -check_PROGRAMS = rlcmac/RLCMACTest alloc/AllocTest tbf/TbfTest types/TypesTest ms/MsTest llist/LListTest llc/LlcTest codel/codel_test edge/EdgeTest +check_PROGRAMS = rlcmac/RLCMACTest alloc/AllocTest tbf/TbfTest types/TypesTest ms/MsTest llist/LListTest llc/LlcTest codel/codel_test edge/EdgeTest bitcomp/BitcompTest noinst_PROGRAMS = emu/pcu_emu rlcmac_RLCMACTest_SOURCES = rlcmac/RLCMACTest.cpp @@ -23,6 +23,11 @@ $(top_builddir)/src/libgprs.la \ $(LIBOSMOGB_LIBS) \ $(LIBOSMOGSM_LIBS) \ + $(LIBOSMOCORE_LIBS) \ + $(COMMON_LA) + +bitcomp_BitcompTest_SOURCES = bitcomp/BitcompTest.cpp ../src/egprs_rlc_compression.cpp +bitcomp_BitcompTest_LDADD = \ $(LIBOSMOCORE_LIBS) \ $(COMMON_LA) @@ -108,6 +113,7 @@ rlcmac/RLCMACTest.ok rlcmac/RLCMACTest.err \ alloc/AllocTest.ok alloc/AllocTest.err \ tbf/TbfTest.ok tbf/TbfTest.err \ + bitcomp/BitcompTest.ok bitcomp/BitcompTest.err \ types/TypesTest.ok types/TypesTest.err \ ms/MsTest.ok ms/MsTest.err \ llc/LlcTest.ok llc/LlcTest.err \ diff --git a/tests/bitcomp/BitcompTest.cpp b/tests/bitcomp/BitcompTest.cpp new file mode 100644 index 0000000..fd3b0df --- /dev/null +++ b/tests/bitcomp/BitcompTest.cpp @@ -0,0 +1,236 @@ +#include +#include + +#include "rlc.h" +#include "gprs_debug.h" +#include +#include "egprs_rlc_compression.h" + +extern "C" { +#include +#include +#include +#include +} + +#define NEW 1 +#define MASK(n) (0xFF << (8-n)) +#define MAX_CRBB_LEN 23 +#define MAX_URBB_LEN 40 + +void *tall_pcu_ctx; + +struct test_data { + int8_t crbb_len; + uint8_t cc; + uint8_t crbb_data[MAX_CRBB_LEN]; /* compressed data */ + uint8_t ucmp_data[MAX_URBB_LEN]; /* uncompressed data */ + int ucmp_len; + int verify; +} test[] = { + { .crbb_len = 67, .cc = 1, + .crbb_data = { + 0x02, 0x0c, 0xa0, 0x30, 0xcb, 0x1a, 0x0c, 0xe3, 0x6c + }, + .ucmp_data = { + 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x01, 0xff, 0xff, + 0xff, 0xf8, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xfe, + 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xdb + }, + .ucmp_len = 194, .verify = 1 + }, + { .crbb_len = 40, .cc = 1, + .crbb_data = { + 0x53, 0x06, 0xc5, 0x40, 0x6d + }, + .ucmp_data = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, + 0x00, 0x00, 0x00, 0x00, 0x03 + }, + .ucmp_len = 182, .verify = 1 + }, + { .crbb_len = 8, .cc = 1, + .crbb_data = {0x02}, + .ucmp_data = {0xff, 0xff, 0xff, 0xf8}, + .ucmp_len = 29, .verify = 1 + }, + { .crbb_len = 103, .cc = 1, + .crbb_data = { + 0x02, 0x0c, 0xe0, 0x41, 0xa0, 0x0c, 0x36, 0x0d, 0x03, + 0x71, 0xb0, 0x6e, 0x24 + }, + .ucmp_data = { + 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xff, 0xff, + 0xf8, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xfe, 0x00, 0x00, + 0x0f, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x7f, 0xff, + 0xff, 0xff, 0x80, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff + }, + .ucmp_len = 288, .verify = 1 + }, + /* Test vector from libosmocore test */ + { .crbb_len = 35, .cc = 0, + .crbb_data = {0xde, 0x88, 0x75, 0x65, 0x80}, + .ucmp_data = {0x37, 0x47, 0x81, 0xf0}, + .ucmp_len = 28, .verify = 1 + }, + { .crbb_len = 18, .cc = 1, + .crbb_data = {0xdd, 0x41, 0x00}, + .ucmp_data = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x00, 0x00 + }, + .ucmp_len = 90, .verify = 1 + }, + /*Invalid inputs*/ + { .crbb_len = 18, .cc = 1, + .crbb_data = {0x1E, 0x70, 0xc0}, + .ucmp_data = {0x0}, + .ucmp_len = 0, .verify = 0 + }, + { .crbb_len = 14, .cc = 1, + .crbb_data = {0x00, 0x1E, 0x7c}, + .ucmp_data = {0x0}, + .ucmp_len = 0, .verify = 0 + }, + { .crbb_len = 24, .cc = 0, + .crbb_data = {0x00, 0x00, 0x00}, + .ucmp_data = {0x0}, + .ucmp_len = 0, .verify = 0 + } + }; + +static const struct log_info_cat default_categories[] = { + {"DCSN1", "\033[1;31m", "Concrete Syntax Notation One (CSN1)", LOGL_INFO, 0}, + {"DL1IF", "\033[1;32m", "GPRS PCU L1 interface (L1IF)", LOGL_DEBUG, 1}, + {"DRLCMAC", "\033[0;33m", "GPRS RLC/MAC layer (RLCMAC)", LOGL_DEBUG, 1}, + {"DRLCMACDATA", "\033[0;33m", "GPRS RLC/MAC layer Data (RLCMAC)", LOGL_DEBUG, 1}, + {"DRLCMACDL", "\033[1;33m", "GPRS RLC/MAC layer Downlink (RLCMAC)", LOGL_DEBUG, 1}, + {"DRLCMACUL", "\033[1;36m", "GPRS RLC/MAC layer Uplink (RLCMAC)", LOGL_DEBUG, 1}, + {"DRLCMACSCHED", "\033[0;36m", "GPRS RLC/MAC layer Scheduling (RLCMAC)", LOGL_DEBUG, 1}, + {"DRLCMACMEAS", "\033[1;31m", "GPRS RLC/MAC layer Measurements (RLCMAC)", LOGL_INFO, 1}, + {"DNS", "\033[1;34m", "GPRS Network Service Protocol (NS)", LOGL_INFO, 1}, + {"DBSSGP", "\033[1;34m", "GPRS BSS Gateway Protocol (BSSGP)", LOGL_INFO, 1}, + {"DPCU", "\033[1;35m", "GPRS Packet Control Unit (PCU)", LOGL_NOTICE, 1}, +}; + +static int filter_fn(const struct log_context *ctx, + struct log_target *tar) +{ + return 1; +} + +/* To verify the result with expected result */ +int check_result(bitvec bits, uint8_t *exp_data, int exp_len) +{ + if (bits.cur_bit != exp_len) + return 0; + size_t n = (exp_len / 8); + int rem = (exp_len % 8); + + if (memcmp(exp_data, bits.data, n) == 0) { + if (rem == 0) + return 1; + if ((bits.data[n] & MASK(rem)) == ((*(exp_data + n)) & MASK(rem))) + return 1; + else + return 0; + } else + return 0; +} + +/* To test decoding of compressed bitmap by Tree based method + * and to verify the result with expected result + * for invalid input verfication is suppressed + */ +static void test_EPDAN_decode_tree(void) +{ + bitvec dest; + int init_flag = 1; + int itr; + int rc; + uint8_t bits_data[RLC_EGPRS_MAX_WS/8]; + + printf("=== start %s ===\n", __func__); + + for (itr = 0 ; itr < (sizeof(test) / sizeof(test_data)) ; itr++) { + dest.data = bits_data; + dest.data_len = sizeof(bits_data); + dest.cur_bit = 0; + memset(dest.data, 0, sizeof(bits_data)); + LOGP(DRLCMACDL, LOGL_DEBUG, "\nTest:%d\nTree based decoding:" + "\nuncompressed data = %s\nlen = %d\n", itr + 1, + osmo_hexdump(test[itr].crbb_data, + (test[itr].crbb_len + 7)/8), test[itr].crbb_len + ); + rc = egprs_compress::decompress_crbb(test[itr].crbb_len, + test[itr].cc, test[itr].crbb_data, &dest); + if (rc < 0) { + LOGP(DRLCMACUL, LOGL_NOTICE, + "\nFailed to decode CRBB: length %d, data %s", + test[itr].crbb_len, osmo_hexdump( + test[itr].crbb_data, (test[itr].crbb_len + 7)/8)); + } + if (init_flag) + init_flag = 0; + if (test[itr].verify) { + if (check_result(dest, test[itr].ucmp_data, + test[itr].ucmp_len) == 0) { + LOGP(DRLCMACDL, LOGL_DEBUG, "\nTree based decoding" + ":Error\nexpected data = %s\nexpected" + " len = %d\ndecoded data = %s\n" + "decoded len = %d\n", + osmo_hexdump(test[itr].ucmp_data, + (test[itr].ucmp_len + 7)/8), + test[itr].ucmp_len, osmo_hexdump(dest.data, + (dest.cur_bit + 7)/8), dest.cur_bit + ); + OSMO_ASSERT(0); + } + } + LOGP(DRLCMACDL, LOGL_DEBUG, "\nexpected data = %s\nexpected len = %d" + "\ndecoded data = %s\ndecoded len = %d\n", + osmo_hexdump(test[itr].ucmp_data, + (test[itr].ucmp_len + 7)/8), + test[itr].ucmp_len, osmo_hexdump(dest.data, + (dest.cur_bit + 7)/8), dest.cur_bit + ); + } + + printf("=== end %s ===\n", __func__); +} + +const struct log_info debug_log_info = { + filter_fn, + (struct log_info_cat *)default_categories, + ARRAY_SIZE(default_categories), +}; + +int main(int argc, char **argv) +{ + osmo_init_logging(&debug_log_info); + log_set_use_color(osmo_stderr_target, 0); + log_set_print_filename(osmo_stderr_target, 0); + + tall_pcu_ctx = talloc_named_const(NULL, 1, "moiji-mobile bitcompTest context"); + if (!tall_pcu_ctx) + abort(); + + test_EPDAN_decode_tree(); + + if (getenv("TALLOC_REPORT_FULL")) + talloc_report_full(tall_pcu_ctx, stderr); + talloc_free(tall_pcu_ctx); + return EXIT_SUCCESS; +} + +/* + * stubs that should not be reached + */ +extern "C" { +void l1if_pdch_req() { abort(); } +void l1if_connect_pdch() { abort(); } +void l1if_close_pdch() { abort(); } +void l1if_open_pdch() { abort(); } +} + diff --git a/tests/bitcomp/BitcompTest.err b/tests/bitcomp/BitcompTest.err new file mode 100644 index 0000000..7481d72 --- /dev/null +++ b/tests/bitcomp/BitcompTest.err @@ -0,0 +1,132 @@ + +Test:1 +Tree based decoding: +uncompressed data = 02 0c a0 30 cb 1a 0c e3 6c +len = 67 +Run_length = 29 +Run_length = 26 +Run_length = 30 +Run_length = 27 +Run_length = 31 +Run_length = 19 +Run_length = 32 + +expected data = ff ff ff f8 00 00 01 ff ff ff f8 00 00 00 ff ff ff fe 00 00 3f ff ff ff db +expected len = 194 +decoded data = ff ff ff f8 00 00 01 ff ff ff f8 00 00 00 ff ff ff fe 00 00 3f ff ff ff db +decoded len = 194 + +Test:2 +Tree based decoding: +uncompressed data = 53 06 c5 40 6d +len = 40 +Run_length = 50 +Run_length = 40 +Run_length = 51 +Run_length = 41 + +expected data = ff ff ff ff ff ff c0 00 00 00 00 3f ff ff ff ff ff f8 00 00 00 00 03 +expected len = 182 +decoded data = ff ff ff ff ff ff c0 00 00 00 00 3f ff ff ff ff ff f8 00 00 00 00 03 +decoded len = 182 + +Test:3 +Tree based decoding: +uncompressed data = 02 +len = 8 +Run_length = 29 + +expected data = ff ff ff f8 +expected len = 29 +decoded data = ff ff ff f8 +decoded len = 29 + +Test:4 +Tree based decoding: +uncompressed data = 02 0c e0 41 a0 0c 36 0d 03 71 b0 6e 24 +len = 103 +Run_length = 29 +Run_length = 19 +Run_length = 29 +Run_length = 20 +Run_length = 30 +Run_length = 21 +Run_length = 31 +Run_length = 22 +Run_length = 32 +Run_length = 22 +Run_length = 33 + +expected data = ff ff ff f8 00 00 ff ff ff f8 00 00 7f ff ff fe 00 00 0f ff ff ff e0 00 00 7f ff ff ff 80 00 01 ff ff ff ff +expected len = 288 +decoded data = ff ff ff f8 00 00 ff ff ff f8 00 00 7f ff ff fe 00 00 0f ff ff ff e0 00 00 7f ff ff ff 80 00 01 ff ff ff ff +decoded len = 288 + +Test:5 +Tree based decoding: +uncompressed data = de 88 75 65 80 +len = 35 +Run_length = 2 +Run_length = 2 +Run_length = 1 +Run_length = 3 +Run_length = 1 +Run_length = 1 +Run_length = 3 +Run_length = 4 +Run_length = 6 +Run_length = 5 + +expected data = 37 47 81 f0 +expected len = 28 +decoded data = 37 47 81 f0 +decoded len = 28 + +Test:6 +Tree based decoding: +uncompressed data = dd 41 00 +len = 18 +Run_length = 64 +Run_length = 16 +Run_length = 10 + +expected data = ff ff ff ff ff ff ff ff ff ff 00 00 +expected len = 90 +decoded data = ff ff ff ff ff ff ff ff ff ff 00 00 +decoded len = 90 + +Test:7 +Tree based decoding: +uncompressed data = 1e 70 c0 +len = 18 +Run_length = 1 +Run_length = 1 +Run_length = 2 +Run_length = 15 + +expected data = +expected len = 0 +decoded data = +decoded len = 19 + +Test:8 +Tree based decoding: +uncompressed data = 00 1e +len = 14 + +Failed to decode CRBB: length 14, data 00 1e +expected data = +expected len = 0 +decoded data = +decoded len = 0 + +Test:9 +Tree based decoding: +uncompressed data = 00 00 00 +len = 24 + +Failed to decode CRBB: length 24, data 00 00 00 +expected data = +expected len = 0 +decoded data = +decoded len = 0 diff --git a/tests/bitcomp/BitcompTest.ok b/tests/bitcomp/BitcompTest.ok new file mode 100644 index 0000000..f7720fc --- /dev/null +++ b/tests/bitcomp/BitcompTest.ok @@ -0,0 +1,2 @@ +=== start test_EPDAN_decode_tree === +=== end test_EPDAN_decode_tree === diff --git a/tests/testsuite.at b/tests/testsuite.at index 1049b31..e42a0fd 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -23,6 +23,13 @@ AT_CHECK([$OSMO_QEMU $abs_top_builddir/tests/tbf/TbfTest], [0], [expout], [experr]) AT_CLEANUP +AT_SETUP([bitcomp]) +AT_KEYWORDS([bitcomp]) +cat $abs_srcdir/bitcomp/BitcompTest.ok > expout +cat $abs_srcdir/bitcomp/BitcompTest.err > experr +AT_CHECK([$OSMO_QEMU $abs_top_builddir/tests/bitcomp/BitcompTest], [0], [expout], [experr]) +AT_CLEANUP + AT_SETUP([edge]) AT_KEYWORDS([edge]) cat $abs_srcdir/edge/EdgeTest.ok > expout -- To view, visit https://gerrit.osmocom.org/416 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieae1992ed4b02bb1e09eec2d3de1a030eabd16ce Gerrit-PatchSet: 29 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: pravin Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: pravin From gerrit-no-reply at lists.osmocom.org Mon Oct 17 20:38:36 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 17 Oct 2016 20:38:36 +0000 Subject: osmo-bts[master]: Replace magic number with define In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1098 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic5d742c292d638f119c6b4672120c1950adeb7f0 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 Mon Oct 17 20:39:56 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 17 Oct 2016 20:39:56 +0000 Subject: osmo-bts[master]: Fix AGCH/PCH proportional allocation In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1099 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I11377b12680ac3b2f77f80e742b6f0af63fc9c1e 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 Mon Oct 17 20:42:33 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 17 Oct 2016 20:42:33 +0000 Subject: osmo-bts[master]: Remove duplicated code In-Reply-To: References: Message-ID: Patch Set 5: I'm not entirely sure about this. It exposes the "SAPI queue" concept (which so far has been a private implementation detail of the bts model) to the common core and thereby virtually mandating that all PHY/bts_model implementations must do it this way. Or am I missing something? -- To view, visit https://gerrit.osmocom.org/1046 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id0d3b19dbfaa16d1734321a07a6eb0355bfd77c9 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-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Oct 17 20:56:45 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 17 Oct 2016 20:56:45 +0000 Subject: [PATCH] libosmocore[master]: utils/conv_gen.py: generate a single file 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/828 to look at the new patch set (#7). utils/conv_gen.py: generate a single file Instead of generating every convolutional code into a separate file (such as conv_xcch_gen.c, conv_cs3_gen.c), it is better to have a single file, containing all the tables, because more tables is more files. Change-Id: Ib4e4ee5fdde38429e68e3b2fa50ec03a18f59daa --- M .gitignore M src/gsm/Makefile.am M utils/conv_gen.py 3 files changed, 308 insertions(+), 315 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/28/828/7 diff --git a/.gitignore b/.gitignore index 5165364..90c8c85 100644 --- a/.gitignore +++ b/.gitignore @@ -110,7 +110,7 @@ doc/*.tag src/crc*gen.c -src/gsm/conv*gen.c +src/gsm/gsm0503_conv.c include/osmocom/core/crc*gen.h include/osmocom/core/bit*gen.h diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index 2071413..d60e60e 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -18,16 +18,11 @@ gprs_cipher_core.c gprs_rlc.c gsm0480.c abis_nm.c gsm0502.c \ gsm0411_utils.c gsm0411_smc.c gsm0411_smr.c \ lapd_core.c lapdm.c kasumi.c gsm_04_08_gprs.c \ - conv_cs2_gen.c conv_cs3_gen.c conv_xcch_gen.c \ - conv_tch_afs_12_2_gen.c conv_tch_afs_10_2_gen.c \ - conv_tch_afs_7_95_gen.c conv_tch_afs_7_4_gen.c \ - conv_tch_afs_6_7_gen.c conv_tch_afs_5_9_gen.c \ - conv_tch_afs_5_15_gen.c conv_tch_afs_4_75_gen.c \ auth_core.c auth_comp128v1.c auth_comp128v23.c \ auth_milenage.c milenage/aes-encblock.c gea.c \ 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 + gsup.c gprs_gea.c gsm0503_conv.c libgsmint_la_LDFLAGS = -no-undefined libgsmint_la_LIBADD = $(top_builddir)/src/libosmocore.la @@ -37,5 +32,6 @@ EXTRA_DIST = libosmogsm.map -conv%gen.c: $(top_srcdir)/utils/conv_gen.py +# Convolutional codes generation +gsm0503_conv.c: $(AM_V_GEN)python2 $(top_srcdir)/utils/conv_gen.py diff --git a/utils/conv_gen.py b/utils/conv_gen.py index a4f918f..38ea63b 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -222,325 +222,322 @@ ( G1, 1 ), ] -# xCCH definition -xCCH = ConvolutionalCode( - 224, - CCH_poly, - name = "xcch", - description = [ - "xCCH convolutional code:", - "228 bits blocks, rate 1/2, k = 5", - "G0 = 1 + D3 + D4", - "G1 = 1 + D + D3 + D4", - ] -) +conv_codes = [ + # xCCH definition + ConvolutionalCode( + 224, + CCH_poly, + name = "xcch", + description = [ + "xCCH convolutional code:", + "228 bits blocks, rate 1/2, k = 5", + "G0 = 1 + D3 + D4", + "G1 = 1 + D + D3 + D4", + ] + ), -# CS2 definition -CS2 = ConvolutionalCode( - 290, - CCH_poly, - puncture = [ - 15, 19, 23, 27, 31, 35, 43, 47, 51, 55, 59, 63, 67, 71, - 75, 79, 83, 91, 95, 99, 103, 107, 111, 115, 119, 123, 127, 131, - 139, 143, 147, 151, 155, 159, 163, 167, 171, 175, 179, 187, 191, 195, - 199, 203, 207, 211, 215, 219, 223, 227, 235, 239, 243, 247, 251, 255, - 259, 263, 267, 271, 275, 283, 287, 291, 295, 299, 303, 307, 311, 315, - 319, 323, 331, 335, 339, 343, 347, 351, 355, 359, 363, 367, 371, 379, - 383, 387, 391, 395, 399, 403, 407, 411, 415, 419, 427, 431, 435, 439, - 443, 447, 451, 455, 459, 463, 467, 475, 479, 483, 487, 491, 495, 499, - 503, 507, 511, 515, 523, 527, 531, 535, 539, 543, 547, 551, 555, 559, - 563, 571, 575, 579, 583, 587, -1 - ], - name = "cs2", - description = [ - "CS2 convolutional code:", - "G0 = 1 + D3 + D4", - "G1 = 1 + D + D3 + D4", - ] -) + # CS2 definition + ConvolutionalCode( + 290, + CCH_poly, + puncture = [ + 15, 19, 23, 27, 31, 35, 43, 47, 51, 55, 59, 63, 67, 71, + 75, 79, 83, 91, 95, 99, 103, 107, 111, 115, 119, 123, 127, 131, + 139, 143, 147, 151, 155, 159, 163, 167, 171, 175, 179, 187, 191, 195, + 199, 203, 207, 211, 215, 219, 223, 227, 235, 239, 243, 247, 251, 255, + 259, 263, 267, 271, 275, 283, 287, 291, 295, 299, 303, 307, 311, 315, + 319, 323, 331, 335, 339, 343, 347, 351, 355, 359, 363, 367, 371, 379, + 383, 387, 391, 395, 399, 403, 407, 411, 415, 419, 427, 431, 435, 439, + 443, 447, 451, 455, 459, 463, 467, 475, 479, 483, 487, 491, 495, 499, + 503, 507, 511, 515, 523, 527, 531, 535, 539, 543, 547, 551, 555, 559, + 563, 571, 575, 579, 583, 587, -1 + ], + name = "cs2", + description = [ + "CS2 convolutional code:", + "G0 = 1 + D3 + D4", + "G1 = 1 + D + D3 + D4", + ] + ), -# CS3 definition -CS3 = ConvolutionalCode( - 334, - CCH_poly, - puncture = [ - 15, 17, 21, 23, 27, 29, 33, 35, 39, 41, 45, 47, 51, 53, - 57, 59, 63, 65, 69, 71, 75, 77, 81, 83, 87, 89, 93, 95, - 99, 101, 105, 107, 111, 113, 117, 119, 123, 125, 129, 131, 135, 137, - 141, 143, 147, 149, 153, 155, 159, 161, 165, 167, 171, 173, 177, 179, - 183, 185, 189, 191, 195, 197, 201, 203, 207, 209, 213, 215, 219, 221, - 225, 227, 231, 233, 237, 239, 243, 245, 249, 251, 255, 257, 261, 263, - 267, 269, 273, 275, 279, 281, 285, 287, 291, 293, 297, 299, 303, 305, - 309, 311, 315, 317, 321, 323, 327, 329, 333, 335, 339, 341, 345, 347, - 351, 353, 357, 359, 363, 365, 369, 371, 375, 377, 381, 383, 387, 389, - 393, 395, 399, 401, 405, 407, 411, 413, 417, 419, 423, 425, 429, 431, - 435, 437, 441, 443, 447, 449, 453, 455, 459, 461, 465, 467, 471, 473, - 477, 479, 483, 485, 489, 491, 495, 497, 501, 503, 507, 509, 513, 515, - 519, 521, 525, 527, 531, 533, 537, 539, 543, 545, 549, 551, 555, 557, - 561, 563, 567, 569, 573, 575, 579, 581, 585, 587, 591, 593, 597, 599, - 603, 605, 609, 611, 615, 617, 621, 623, 627, 629, 633, 635, 639, 641, - 645, 647, 651, 653, 657, 659, 663, 665, 669, 671, -1 - ], - name = "cs3", - description = [ - "CS3 convolutional code:", - "G0 = 1 + D3 + D4", - "G1 = 1 + D + D3 + D4", - ] -) + # CS3 definition + ConvolutionalCode( + 334, + CCH_poly, + puncture = [ + 15, 17, 21, 23, 27, 29, 33, 35, 39, 41, 45, 47, 51, 53, + 57, 59, 63, 65, 69, 71, 75, 77, 81, 83, 87, 89, 93, 95, + 99, 101, 105, 107, 111, 113, 117, 119, 123, 125, 129, 131, 135, 137, + 141, 143, 147, 149, 153, 155, 159, 161, 165, 167, 171, 173, 177, 179, + 183, 185, 189, 191, 195, 197, 201, 203, 207, 209, 213, 215, 219, 221, + 225, 227, 231, 233, 237, 239, 243, 245, 249, 251, 255, 257, 261, 263, + 267, 269, 273, 275, 279, 281, 285, 287, 291, 293, 297, 299, 303, 305, + 309, 311, 315, 317, 321, 323, 327, 329, 333, 335, 339, 341, 345, 347, + 351, 353, 357, 359, 363, 365, 369, 371, 375, 377, 381, 383, 387, 389, + 393, 395, 399, 401, 405, 407, 411, 413, 417, 419, 423, 425, 429, 431, + 435, 437, 441, 443, 447, 449, 453, 455, 459, 461, 465, 467, 471, 473, + 477, 479, 483, 485, 489, 491, 495, 497, 501, 503, 507, 509, 513, 515, + 519, 521, 525, 527, 531, 533, 537, 539, 543, 545, 549, 551, 555, 557, + 561, 563, 567, 569, 573, 575, 579, 581, 585, 587, 591, 593, 597, 599, + 603, 605, 609, 611, 615, 617, 621, 623, 627, 629, 633, 635, 639, 641, + 645, 647, 651, 653, 657, 659, 663, 665, 669, 671, -1 + ], + name = "cs3", + description = [ + "CS3 convolutional code:", + "G0 = 1 + D3 + D4", + "G1 = 1 + D + D3 + D4", + ] + ), -# TCH_AFS_12_2 definition -TCH_AFS_12_2 = ConvolutionalCode( - 250, - [ - ( 1, 1 ), - ( G1, G0 ), - ], - puncture = [ - 321, 325, 329, 333, 337, 341, 345, 349, 353, 357, 361, 363, - 365, 369, 373, 377, 379, 381, 385, 389, 393, 395, 397, 401, - 405, 409, 411, 413, 417, 421, 425, 427, 429, 433, 437, 441, - 443, 445, 449, 453, 457, 459, 461, 465, 469, 473, 475, 477, - 481, 485, 489, 491, 493, 495, 497, 499, 501, 503, 505, 507, - -1 - ], - name = 'tch_afs_12_2', - description = [ - "TCH/AFS 12.2 kbits convolutional code:", - "250 bits block, rate 1/2, punctured", - "G0/G0 = 1", - "G1/G0 = 1 + D + D3 + D4 / 1 + D3 + D4", - ] -) + # TCH_AFS_12_2 definition + ConvolutionalCode( + 250, + [ + ( 1, 1 ), + ( G1, G0 ), + ], + puncture = [ + 321, 325, 329, 333, 337, 341, 345, 349, 353, 357, 361, 363, + 365, 369, 373, 377, 379, 381, 385, 389, 393, 395, 397, 401, + 405, 409, 411, 413, 417, 421, 425, 427, 429, 433, 437, 441, + 443, 445, 449, 453, 457, 459, 461, 465, 469, 473, 475, 477, + 481, 485, 489, 491, 493, 495, 497, 499, 501, 503, 505, 507, + -1 + ], + name = 'tch_afs_12_2', + description = [ + "TCH/AFS 12.2 kbits convolutional code:", + "250 bits block, rate 1/2, punctured", + "G0/G0 = 1", + "G1/G0 = 1 + D + D3 + D4 / 1 + D3 + D4", + ] + ), -# TCH_AFS_10_2 definition -TCH_AFS_10_2 = ConvolutionalCode( - 210, - [ - ( G1, G3 ), - ( G2, G3 ), - ( 1, 1 ), - ], - puncture = [ - 1, 4, 7, 10, 16, 19, 22, 28, 31, 34, 40, 43, - 46, 52, 55, 58, 64, 67, 70, 76, 79, 82, 88, 91, - 94, 100, 103, 106, 112, 115, 118, 124, 127, 130, 136, 139, - 142, 148, 151, 154, 160, 163, 166, 172, 175, 178, 184, 187, - 190, 196, 199, 202, 208, 211, 214, 220, 223, 226, 232, 235, - 238, 244, 247, 250, 256, 259, 262, 268, 271, 274, 280, 283, - 286, 292, 295, 298, 304, 307, 310, 316, 319, 322, 325, 328, - 331, 334, 337, 340, 343, 346, 349, 352, 355, 358, 361, 364, - 367, 370, 373, 376, 379, 382, 385, 388, 391, 394, 397, 400, - 403, 406, 409, 412, 415, 418, 421, 424, 427, 430, 433, 436, - 439, 442, 445, 448, 451, 454, 457, 460, 463, 466, 469, 472, - 475, 478, 481, 484, 487, 490, 493, 496, 499, 502, 505, 508, - 511, 514, 517, 520, 523, 526, 529, 532, 535, 538, 541, 544, - 547, 550, 553, 556, 559, 562, 565, 568, 571, 574, 577, 580, - 583, 586, 589, 592, 595, 598, 601, 604, 607, 609, 610, 613, - 616, 619, 621, 622, 625, 627, 628, 631, 633, 634, 636, 637, - 639, 640, -1 - ], - name = 'tch_afs_10_2', - description = [ - "TCH/AFS 10.2 kbits convolutional code:", - "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", - "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", - "G3/G3 = 1", - ] -) + # TCH_AFS_10_2 definition + ConvolutionalCode( + 210, + [ + ( G1, G3 ), + ( G2, G3 ), + ( 1, 1 ), + ], + puncture = [ + 1, 4, 7, 10, 16, 19, 22, 28, 31, 34, 40, 43, + 46, 52, 55, 58, 64, 67, 70, 76, 79, 82, 88, 91, + 94, 100, 103, 106, 112, 115, 118, 124, 127, 130, 136, 139, + 142, 148, 151, 154, 160, 163, 166, 172, 175, 178, 184, 187, + 190, 196, 199, 202, 208, 211, 214, 220, 223, 226, 232, 235, + 238, 244, 247, 250, 256, 259, 262, 268, 271, 274, 280, 283, + 286, 292, 295, 298, 304, 307, 310, 316, 319, 322, 325, 328, + 331, 334, 337, 340, 343, 346, 349, 352, 355, 358, 361, 364, + 367, 370, 373, 376, 379, 382, 385, 388, 391, 394, 397, 400, + 403, 406, 409, 412, 415, 418, 421, 424, 427, 430, 433, 436, + 439, 442, 445, 448, 451, 454, 457, 460, 463, 466, 469, 472, + 475, 478, 481, 484, 487, 490, 493, 496, 499, 502, 505, 508, + 511, 514, 517, 520, 523, 526, 529, 532, 535, 538, 541, 544, + 547, 550, 553, 556, 559, 562, 565, 568, 571, 574, 577, 580, + 583, 586, 589, 592, 595, 598, 601, 604, 607, 609, 610, 613, + 616, 619, 621, 622, 625, 627, 628, 631, 633, 634, 636, 637, + 639, 640, -1 + ], + name = 'tch_afs_10_2', + description = [ + "TCH/AFS 10.2 kbits convolutional code:", + "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", + "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", + "G3/G3 = 1", + ] + ), -# TCH_AFS_7_95 definition -TCH_AFS_7_95 = ConvolutionalCode( - 165, - [ - ( 1, 1 ), - ( G5, G4 ), - ( G6, G4 ), - ], - puncture = [ - 1, 2, 4, 5, 8, 22, 70, 118, 166, 214, 262, 310, - 317, 319, 325, 332, 334, 341, 343, 349, 356, 358, 365, 367, - 373, 380, 382, 385, 389, 391, 397, 404, 406, 409, 413, 415, - 421, 428, 430, 433, 437, 439, 445, 452, 454, 457, 461, 463, - 469, 476, 478, 481, 485, 487, 490, 493, 500, 502, 503, 505, - 506, 508, 509, 511, 512, -1 - ], - name = 'tch_afs_7_95', - description = [ - "TCH/AFS 7.95 kbits convolutional code:", - "G4/G4 = 1", - "G5/G4 = 1 + D + D4 + D6 / 1 + D2 + D3 + D5 + D6", - "G6/G4 = 1 + D + D2 + D3 + D4 + D6 / 1 + D2 + D3 + D5 + D6", - ] -) + # TCH_AFS_7_95 definition + ConvolutionalCode( + 165, + [ + ( 1, 1 ), + ( G5, G4 ), + ( G6, G4 ), + ], + puncture = [ + 1, 2, 4, 5, 8, 22, 70, 118, 166, 214, 262, 310, + 317, 319, 325, 332, 334, 341, 343, 349, 356, 358, 365, 367, + 373, 380, 382, 385, 389, 391, 397, 404, 406, 409, 413, 415, + 421, 428, 430, 433, 437, 439, 445, 452, 454, 457, 461, 463, + 469, 476, 478, 481, 485, 487, 490, 493, 500, 502, 503, 505, + 506, 508, 509, 511, 512, -1 + ], + name = 'tch_afs_7_95', + description = [ + "TCH/AFS 7.95 kbits convolutional code:", + "G4/G4 = 1", + "G5/G4 = 1 + D + D4 + D6 / 1 + D2 + D3 + D5 + D6", + "G6/G4 = 1 + D + D2 + D3 + D4 + D6 / 1 + D2 + D3 + D5 + D6", + ] + ), -# TCH_AFS_7_4 definition -TCH_AFS_7_4 = ConvolutionalCode( - 154, - [ - ( G1, G3 ), - ( G2, G3 ), - ( 1, 1 ), - ], - puncture = [ - 0, 355, 361, 367, 373, 379, 385, 391, 397, 403, 409, 415, - 421, 427, 433, 439, 445, 451, 457, 460, 463, 466, 468, 469, - 471, 472, -1 - ], - name = 'tch_afs_7_4', - description = [ - "TCH/AFS 7.4 kbits convolutional code:", - "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", - "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", - "G3/G3 = 1", - ] -) + # TCH_AFS_7_4 definition + ConvolutionalCode( + 154, + [ + ( G1, G3 ), + ( G2, G3 ), + ( 1, 1 ), + ], + puncture = [ + 0, 355, 361, 367, 373, 379, 385, 391, 397, 403, 409, 415, + 421, 427, 433, 439, 445, 451, 457, 460, 463, 466, 468, 469, + 471, 472, -1 + ], + name = 'tch_afs_7_4', + description = [ + "TCH/AFS 7.4 kbits convolutional code:", + "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", + "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", + "G3/G3 = 1", + ] + ), -# TCH_AFS_6_7 definition -TCH_AFS_6_7 = ConvolutionalCode( - 140, - [ - ( G1, G3 ), - ( G2, G3 ), - ( 1, 1 ), - ( 1, 1 ), - ], - puncture = [ - 1, 3, 7, 11, 15, 27, 39, 55, 67, 79, 95, 107, - 119, 135, 147, 159, 175, 187, 199, 215, 227, 239, 255, 267, - 279, 287, 291, 295, 299, 303, 307, 311, 315, 319, 323, 327, - 331, 335, 339, 343, 347, 351, 355, 359, 363, 367, 369, 371, - 375, 377, 379, 383, 385, 387, 391, 393, 395, 399, 401, 403, - 407, 409, 411, 415, 417, 419, 423, 425, 427, 431, 433, 435, - 439, 441, 443, 447, 449, 451, 455, 457, 459, 463, 465, 467, - 471, 473, 475, 479, 481, 483, 487, 489, 491, 495, 497, 499, - 503, 505, 507, 511, 513, 515, 519, 521, 523, 527, 529, 531, - 535, 537, 539, 543, 545, 547, 549, 551, 553, 555, 557, 559, - 561, 563, 565, 567, 569, 571, 573, 575, -1 - ], - name = 'tch_afs_6_7', - description = [ - "TCH/AFS 6.7 kbits convolutional code:", - "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", - "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", - "G3/G3 = 1", - "G3/G3 = 1", - ] -) + # TCH_AFS_6_7 definition + ConvolutionalCode( + 140, + [ + ( G1, G3 ), + ( G2, G3 ), + ( 1, 1 ), + ( 1, 1 ), + ], + puncture = [ + 1, 3, 7, 11, 15, 27, 39, 55, 67, 79, 95, 107, + 119, 135, 147, 159, 175, 187, 199, 215, 227, 239, 255, 267, + 279, 287, 291, 295, 299, 303, 307, 311, 315, 319, 323, 327, + 331, 335, 339, 343, 347, 351, 355, 359, 363, 367, 369, 371, + 375, 377, 379, 383, 385, 387, 391, 393, 395, 399, 401, 403, + 407, 409, 411, 415, 417, 419, 423, 425, 427, 431, 433, 435, + 439, 441, 443, 447, 449, 451, 455, 457, 459, 463, 465, 467, + 471, 473, 475, 479, 481, 483, 487, 489, 491, 495, 497, 499, + 503, 505, 507, 511, 513, 515, 519, 521, 523, 527, 529, 531, + 535, 537, 539, 543, 545, 547, 549, 551, 553, 555, 557, 559, + 561, 563, 565, 567, 569, 571, 573, 575, -1 + ], + name = 'tch_afs_6_7', + description = [ + "TCH/AFS 6.7 kbits convolutional code:", + "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", + "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", + "G3/G3 = 1", + "G3/G3 = 1", + ] + ), -# TCH_AFS_5_9 definition -TCH_AFS_5_9 = ConvolutionalCode( - 124, - [ - ( G4, G6 ), - ( G5, G6 ), - ( 1, 1), - ( 1, 1), - ], - puncture = [ - 0, 1, 3, 5, 7, 11, 15, 31, 47, 63, 79, 95, - 111, 127, 143, 159, 175, 191, 207, 223, 239, 255, 271, 287, - 303, 319, 327, 331, 335, 343, 347, 351, 359, 363, 367, 375, - 379, 383, 391, 395, 399, 407, 411, 415, 423, 427, 431, 439, - 443, 447, 455, 459, 463, 467, 471, 475, 479, 483, 487, 491, - 495, 499, 503, 507, 509, 511, 512, 513, 515, 516, 517, 519, - -1 - ], - name = 'tch_afs_5_9', - description = [ - "TCH/AFS 5.9 kbits convolutional code:", - "124 bits", - "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", - "G5/G6 = 1 + D + D4 + D6 / 1 + D + D2 + D3 + D4 + D6", - "G6/G6 = 1", - "G6/G6 = 1", - ] -) + # TCH_AFS_5_9 definition + ConvolutionalCode( + 124, + [ + ( G4, G6 ), + ( G5, G6 ), + ( 1, 1), + ( 1, 1), + ], + puncture = [ + 0, 1, 3, 5, 7, 11, 15, 31, 47, 63, 79, 95, + 111, 127, 143, 159, 175, 191, 207, 223, 239, 255, 271, 287, + 303, 319, 327, 331, 335, 343, 347, 351, 359, 363, 367, 375, + 379, 383, 391, 395, 399, 407, 411, 415, 423, 427, 431, 439, + 443, 447, 455, 459, 463, 467, 471, 475, 479, 483, 487, 491, + 495, 499, 503, 507, 509, 511, 512, 513, 515, 516, 517, 519, + -1 + ], + name = 'tch_afs_5_9', + description = [ + "TCH/AFS 5.9 kbits convolutional code:", + "124 bits", + "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", + "G5/G6 = 1 + D + D4 + D6 / 1 + D + D2 + D3 + D4 + D6", + "G6/G6 = 1", + "G6/G6 = 1", + ] + ), -# TCH_AFS_5_15 definition -TCH_AFS_5_15 = ConvolutionalCode( - 109, - [ - ( G1, G3 ), - ( G1, G3 ), - ( G2, G3 ), - ( 1, 1 ), - ( 1, 1 ), - ], - puncture = [ - 0, 4, 5, 9, 10, 14, 15, 20, 25, 30, 35, 40, - 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, - 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, - 290, 300, 310, 315, 320, 325, 330, 334, 335, 340, 344, 345, - 350, 354, 355, 360, 364, 365, 370, 374, 375, 380, 384, 385, - 390, 394, 395, 400, 404, 405, 410, 414, 415, 420, 424, 425, - 430, 434, 435, 440, 444, 445, 450, 454, 455, 460, 464, 465, - 470, 474, 475, 480, 484, 485, 490, 494, 495, 500, 504, 505, - 510, 514, 515, 520, 524, 525, 529, 530, 534, 535, 539, 540, - 544, 545, 549, 550, 554, 555, 559, 560, 564, -1 - ], - name = 'tch_afs_5_15', - description = [ - "TCH/AFS 5.15 kbits convolutional code:", - "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", - "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", - "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", - "G3/G3 = 1", - "G3/G3 = 1", - ] -) + # TCH_AFS_5_15 definition + ConvolutionalCode( + 109, + [ + ( G1, G3 ), + ( G1, G3 ), + ( G2, G3 ), + ( 1, 1 ), + ( 1, 1 ), + ], + puncture = [ + 0, 4, 5, 9, 10, 14, 15, 20, 25, 30, 35, 40, + 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, + 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, + 290, 300, 310, 315, 320, 325, 330, 334, 335, 340, 344, 345, + 350, 354, 355, 360, 364, 365, 370, 374, 375, 380, 384, 385, + 390, 394, 395, 400, 404, 405, 410, 414, 415, 420, 424, 425, + 430, 434, 435, 440, 444, 445, 450, 454, 455, 460, 464, 465, + 470, 474, 475, 480, 484, 485, 490, 494, 495, 500, 504, 505, + 510, 514, 515, 520, 524, 525, 529, 530, 534, 535, 539, 540, + 544, 545, 549, 550, 554, 555, 559, 560, 564, -1 + ], + name = 'tch_afs_5_15', + description = [ + "TCH/AFS 5.15 kbits convolutional code:", + "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", + "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", + "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", + "G3/G3 = 1", + "G3/G3 = 1", + ] + ), -# TCH_AFS_4_75 definition -TCH_AFS_4_75 = ConvolutionalCode( - 101, - [ - ( G4, G6 ), - ( G4, G6 ), - ( G5, G6 ), - ( 1, 1 ), - ( 1, 1 ), - ], - puncture = [ - 0, 1, 2, 4, 5, 7, 9, 15, 25, 35, 45, 55, - 65, 75, 85, 95, 105, 115, 125, 135, 145, 155, 165, 175, - 185, 195, 205, 215, 225, 235, 245, 255, 265, 275, 285, 295, - 305, 315, 325, 335, 345, 355, 365, 375, 385, 395, 400, 405, - 410, 415, 420, 425, 430, 435, 440, 445, 450, 455, 459, 460, - 465, 470, 475, 479, 480, 485, 490, 495, 499, 500, 505, 509, - 510, 515, 517, 519, 520, 522, 524, 525, 526, 527, 529, 530, - 531, 532, 534, -1 - ], - name = 'tch_afs_4_75', - description = [ - "TCH/AFS 4.75 kbits convolutional code:", - "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", - "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", - "G5/G6 = 1 + D + D4 + D6 / 1 + D + D2 + D3 + D4 + D6", - "G6/G6 = 1", - "G6/G6 = 1", - ] -) + # TCH_AFS_4_75 definition + ConvolutionalCode( + 101, + [ + ( G4, G6 ), + ( G4, G6 ), + ( G5, G6 ), + ( 1, 1 ), + ( 1, 1 ), + ], + puncture = [ + 0, 1, 2, 4, 5, 7, 9, 15, 25, 35, 45, 55, + 65, 75, 85, 95, 105, 115, 125, 135, 145, 155, 165, 175, + 185, 195, 205, 215, 225, 235, 245, 255, 265, 275, 285, 295, + 305, 315, 325, 335, 345, 355, 365, 375, 385, 395, 400, 405, + 410, 415, 420, 425, 430, 435, 440, 445, 450, 455, 459, 460, + 465, 470, 475, 479, 480, 485, 490, 495, 499, 500, 505, 509, + 510, 515, 517, 519, 520, 522, 524, 525, 526, 527, 529, 530, + 531, 532, 534, -1 + ], + name = 'tch_afs_4_75', + description = [ + "TCH/AFS 4.75 kbits convolutional code:", + "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", + "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", + "G5/G6 = 1 + D + D4 + D6 / 1 + D + D2 + D3 + D4 + D6", + "G6/G6 = 1", + "G6/G6 = 1", + ] + ) +] -def gen_c(dest, pref, code): - f = open(os.path.join(dest, 'conv_' + code.name + '_gen.c'), 'w') +if __name__ == '__main__': + path = sys.argv[1] if len(sys.argv) > 1 else os.getcwd() + prefix = "gsm0503" + + print >>sys.stderr, "Generating convolutional codes..." + + # Open a new file for writing + f = open(os.path.join(path, "gsm0503_conv.c"), 'w') print >>f, mod_license print >>f, "#include " print >>f, "#include " - code.gen_tables(pref, f) -if __name__ == '__main__': - print >>sys.stderr, "Generating convolutional codes..." - prefix = "gsm0503" - path = sys.argv[1] if len(sys.argv) > 1 else os.getcwd() - gen_c(path, prefix, xCCH) - gen_c(path, prefix, CS2) - gen_c(path, prefix, CS3) - gen_c(path, prefix, TCH_AFS_12_2) - gen_c(path, prefix, TCH_AFS_10_2) - gen_c(path, prefix, TCH_AFS_7_95) - gen_c(path, prefix, TCH_AFS_7_4) - gen_c(path, prefix, TCH_AFS_6_7) - gen_c(path, prefix, TCH_AFS_5_9) - gen_c(path, prefix, TCH_AFS_5_15) - gen_c(path, prefix, TCH_AFS_4_75) - print >>sys.stderr, "\tdone." + # Generate the tables one by one + for code in conv_codes: + print >>sys.stderr, "Generate '%s' definition" % code.name + code.gen_tables(prefix, f) + + print >>sys.stderr, "Generation complete." -- To view, visit https://gerrit.osmocom.org/828 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib4e4ee5fdde38429e68e3b2fa50ec03a18f59daa Gerrit-PatchSet: 7 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 From gerrit-no-reply at lists.osmocom.org Mon Oct 17 21:17:47 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 17 Oct 2016 21:17:47 +0000 Subject: [ABANDON] libosmocore[master]: libosmocoding: migrate transcoding routines from OsmoBTS In-Reply-To: References: Message-ID: Vadim Yanitskiy has abandoned this change. Change subject: libosmocoding: migrate transcoding routines from OsmoBTS ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/933 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I0c3256b87686d878e4e716d12393cad5924fdfa1 Gerrit-PatchSet: 6 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 Oct 17 21:18:41 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 17 Oct 2016 21:18:41 +0000 Subject: libosmocore[master]: libosmocoding: migrate transcoding routines from OsmoBTS In-Reply-To: References: Message-ID: Vadim Yanitskiy has restored this change. Change subject: libosmocoding: migrate transcoding routines from OsmoBTS ...................................................................... Restored -- To view, visit https://gerrit.osmocom.org/933 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: restore Gerrit-Change-Id: I0c3256b87686d878e4e716d12393cad5924fdfa1 Gerrit-PatchSet: 6 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 Oct 17 22:37:48 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 17 Oct 2016 22:37:48 +0000 Subject: [PATCH] libosmocore[master]: utils/conv_gen.py: fix some typos 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/836 to look at the new patch set (#5). utils/conv_gen.py: fix some typos Change-Id: I3327b92715744af4ef61496ef0121555d9d24799 --- M utils/conv_gen.py 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/36/836/5 diff --git a/utils/conv_gen.py b/utils/conv_gen.py index 9af07b4..f3b3764 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -39,7 +39,7 @@ self.name = name self.description = description - # Handle polynoms (and check for recursion) + # Handle polynomials (and check for recursion) self.polys = [(1, 1) if x[0] == x[1] else x for x in polys] # Determine the polynomial degree @@ -51,11 +51,11 @@ rp = [x[1] for x in self.polys if x[1] != 1] if rp: if not all([x == rp[0] for x in rp]): - raise ValueError("Bad polynoms: " - "Can't have multiple different divider polynoms!") + raise ValueError("Bad polynomials: " + "Can't have multiple different divider polynomials!") if not all([x[0] == 1 for x in polys if x[1] == 1]): - raise ValueError("Bad polynoms: " + raise ValueError("Bad polynomials: " "Can't have a '1' divider with a non '1' dividend " "in a recursive code") @@ -87,7 +87,7 @@ src = (ns & 1) | (state << 1) - # Scan polynoms + # Scan polynomials rv = [] for p_n, p_d in self.polys: if self.recursive and p_d == 1: @@ -106,7 +106,7 @@ src = (ns & 1) | (state << 1) - # Scan polynoms + # Scan polynomials rv = [] for p_n, p_d in self.polys: if self.recursive and p_d == 1: -- To view, visit https://gerrit.osmocom.org/836 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3327b92715744af4ef61496ef0121555d9d24799 Gerrit-PatchSet: 5 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 Oct 17 22:37:48 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 17 Oct 2016 22:37:48 +0000 Subject: [PATCH] libosmocore[master]: utils/conv_gen.py: add EDGE MCS 1-9 definitions 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/837 to look at the new patch set (#5). utils/conv_gen.py: add EDGE MCS 1-9 definitions Change-Id: Ie1452342f524a8b60f2babc07398a1d9c9e06aa3 --- M include/osmocom/gsm/gsm0503.h M src/gsm/libosmogsm.map M utils/conv_gen.py 3 files changed, 301 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/37/837/5 diff --git a/include/osmocom/gsm/gsm0503.h b/include/osmocom/gsm/gsm0503.h index 862dc3f..de28ad2 100644 --- a/include/osmocom/gsm/gsm0503.h +++ b/include/osmocom/gsm/gsm0503.h @@ -112,3 +112,63 @@ /*! \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/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 9eff4d3..a83f92c 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -91,6 +91,21 @@ gsm0503_tch_ahs_5_9; gsm0503_tch_ahs_5_15; gsm0503_tch_ahs_4_75; +gsm0503_mcs1_dl_hdr; +gsm0503_mcs1_ul_hdr; +gsm0503_mcs1; +gsm0503_mcs2; +gsm0503_mcs3; +gsm0503_mcs4; +gsm0503_mcs5_dl_hdr; +gsm0503_mcs5_ul_hdr; +gsm0503_mcs5; +gsm0503_mcs6; +gsm0503_mcs7_dl_hdr; +gsm0503_mcs7_ul_hdr; +gsm0503_mcs7; +gsm0503_mcs8; +gsm0503_mcs9; gsm0808_att_tlvdef; gsm0808_bssap_name; diff --git a/utils/conv_gen.py b/utils/conv_gen.py index f3b3764..1bcbd6a 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -28,12 +28,13 @@ class ConvolutionalCode(object): def __init__(self, block_len, polys, name, - description = None, puncture = []): + description = None, puncture = [], term_type = 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 # Infos self.name = name @@ -227,6 +228,8 @@ print >>fi, "\t.N = %d," % self.rate_inv print >>fi, "\t.K = %d," % self.k print >>fi, "\t.len = %d," % self.block_len + if self.term_type is not None: + print >>fi, "\t.term = %s," % self.term_type print >>fi, "\t.next_output = %s_output," % self.name print >>fi, "\t.next_state = %s_state," % self.name if self.recursive: @@ -256,6 +259,12 @@ CCH_poly = [ ( G0, 1 ), ( G1, 1 ), +] + +MCS_poly = [ + ( G4, 1 ), + ( G7, 1 ), + ( G5, 1 ), ] conv_codes = [ @@ -718,6 +727,222 @@ name = "tch_ahs_4_75", description = ["TCH/AHS 4.75 kbits convolutional code"] ), + + # EDGE MCS1_DL_HDR definition + ConvolutionalCode( + 36, + MCS_poly, + name = "mcs1_dl_hdr", + term_type = "CONV_TERM_TAIL_BITING", + description = [ + "EDGE MCS-1 DL header convolutional code:", + "42 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS1_UL_HDR definition + ConvolutionalCode( + 39, + MCS_poly, + name = "mcs1_ul_hdr", + term_type = "CONV_TERM_TAIL_BITING", + description = [ + "EDGE MCS-1 UL header convolutional code:", + "45 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS1 definition + ConvolutionalCode( + 190, + MCS_poly, + name = "mcs1", + description = [ + "EDGE MCS-1 data convolutional code:", + "196 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS2 definition + ConvolutionalCode( + 238, + MCS_poly, + name = "mcs2", + description = [ + "EDGE MCS-2 data convolutional code:", + "244 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS3 definition + ConvolutionalCode( + 310, + MCS_poly, + name = "mcs3", + description = [ + "EDGE MCS-3 data convolutional code:", + "316 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS4 definition + ConvolutionalCode( + 366, + MCS_poly, + name = "mcs4", + description = [ + "EDGE MCS-4 data convolutional code:", + "372 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS5_DL_HDR definition + ConvolutionalCode( + 33, + MCS_poly, + name = "mcs5_dl_hdr", + term_type = "CONV_TERM_TAIL_BITING", + description = [ + "EDGE MCS-5 DL header convolutional code:", + "39 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS5_UL_HDR definition + ConvolutionalCode( + 45, + MCS_poly, + name = "mcs5_ul_hdr", + term_type = "CONV_TERM_TAIL_BITING", + description = [ + "EDGE MCS-5 UL header convolutional code:", + "51 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS5 definition + ConvolutionalCode( + 462, + MCS_poly, + name = "mcs5", + description = [ + "EDGE MCS-5 data convolutional code:", + "468 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS6 definition + ConvolutionalCode( + 606, + MCS_poly, + name = "mcs6", + description = [ + "EDGE MCS-6 data convolutional code:", + "612 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS7_DL_HDR definition + ConvolutionalCode( + 45, + MCS_poly, + name = "mcs7_dl_hdr", + term_type = "CONV_TERM_TAIL_BITING", + description = [ + "EDGE MCS-7 DL header convolutional code:", + "51 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS7_UL_HDR definition + ConvolutionalCode( + 54, + MCS_poly, + name = "mcs7_ul_hdr", + term_type = "CONV_TERM_TAIL_BITING", + description = [ + "EDGE MCS-7 UL header convolutional code:", + "60 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS7 definition + ConvolutionalCode( + 462, + MCS_poly, + name = "mcs7", + description = [ + "EDGE MCS-7 data convolutional code:", + "468 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS8 definition + ConvolutionalCode( + 558, + MCS_poly, + name = "mcs8", + description = [ + "EDGE MCS-8 data convolutional code:", + "564 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS9 definition + ConvolutionalCode( + 606, + MCS_poly, + name = "mcs9", + description = [ + "EDGE MCS-9 data convolutional code:", + "612 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), ] if __name__ == '__main__': -- To view, visit https://gerrit.osmocom.org/837 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie1452342f524a8b60f2babc07398a1d9c9e06aa3 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Mon Oct 17 22:37:48 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 17 Oct 2016 22:37:48 +0000 Subject: [PATCH] libosmocore[master]: utils/conv_gen.py: generate a single file 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/828 to look at the new patch set (#8). utils/conv_gen.py: generate a single file Instead of generating every convolutional code into a separate file (such as conv_xcch_gen.c, conv_cs3_gen.c), it is better to have a single file, containing all definitions, because more definitions is more files. Change-Id: Ib4e4ee5fdde38429e68e3b2fa50ec03a18f59daa --- M .gitignore M src/gsm/Makefile.am M utils/conv_gen.py 3 files changed, 308 insertions(+), 315 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/28/828/8 diff --git a/.gitignore b/.gitignore index 5165364..90c8c85 100644 --- a/.gitignore +++ b/.gitignore @@ -110,7 +110,7 @@ doc/*.tag src/crc*gen.c -src/gsm/conv*gen.c +src/gsm/gsm0503_conv.c include/osmocom/core/crc*gen.h include/osmocom/core/bit*gen.h diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index 2071413..d60e60e 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -18,16 +18,11 @@ gprs_cipher_core.c gprs_rlc.c gsm0480.c abis_nm.c gsm0502.c \ gsm0411_utils.c gsm0411_smc.c gsm0411_smr.c \ lapd_core.c lapdm.c kasumi.c gsm_04_08_gprs.c \ - conv_cs2_gen.c conv_cs3_gen.c conv_xcch_gen.c \ - conv_tch_afs_12_2_gen.c conv_tch_afs_10_2_gen.c \ - conv_tch_afs_7_95_gen.c conv_tch_afs_7_4_gen.c \ - conv_tch_afs_6_7_gen.c conv_tch_afs_5_9_gen.c \ - conv_tch_afs_5_15_gen.c conv_tch_afs_4_75_gen.c \ auth_core.c auth_comp128v1.c auth_comp128v23.c \ auth_milenage.c milenage/aes-encblock.c gea.c \ 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 + gsup.c gprs_gea.c gsm0503_conv.c libgsmint_la_LDFLAGS = -no-undefined libgsmint_la_LIBADD = $(top_builddir)/src/libosmocore.la @@ -37,5 +32,6 @@ EXTRA_DIST = libosmogsm.map -conv%gen.c: $(top_srcdir)/utils/conv_gen.py +# Convolutional codes generation +gsm0503_conv.c: $(AM_V_GEN)python2 $(top_srcdir)/utils/conv_gen.py diff --git a/utils/conv_gen.py b/utils/conv_gen.py index a4f918f..38ea63b 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -222,325 +222,322 @@ ( G1, 1 ), ] -# xCCH definition -xCCH = ConvolutionalCode( - 224, - CCH_poly, - name = "xcch", - description = [ - "xCCH convolutional code:", - "228 bits blocks, rate 1/2, k = 5", - "G0 = 1 + D3 + D4", - "G1 = 1 + D + D3 + D4", - ] -) +conv_codes = [ + # xCCH definition + ConvolutionalCode( + 224, + CCH_poly, + name = "xcch", + description = [ + "xCCH convolutional code:", + "228 bits blocks, rate 1/2, k = 5", + "G0 = 1 + D3 + D4", + "G1 = 1 + D + D3 + D4", + ] + ), -# CS2 definition -CS2 = ConvolutionalCode( - 290, - CCH_poly, - puncture = [ - 15, 19, 23, 27, 31, 35, 43, 47, 51, 55, 59, 63, 67, 71, - 75, 79, 83, 91, 95, 99, 103, 107, 111, 115, 119, 123, 127, 131, - 139, 143, 147, 151, 155, 159, 163, 167, 171, 175, 179, 187, 191, 195, - 199, 203, 207, 211, 215, 219, 223, 227, 235, 239, 243, 247, 251, 255, - 259, 263, 267, 271, 275, 283, 287, 291, 295, 299, 303, 307, 311, 315, - 319, 323, 331, 335, 339, 343, 347, 351, 355, 359, 363, 367, 371, 379, - 383, 387, 391, 395, 399, 403, 407, 411, 415, 419, 427, 431, 435, 439, - 443, 447, 451, 455, 459, 463, 467, 475, 479, 483, 487, 491, 495, 499, - 503, 507, 511, 515, 523, 527, 531, 535, 539, 543, 547, 551, 555, 559, - 563, 571, 575, 579, 583, 587, -1 - ], - name = "cs2", - description = [ - "CS2 convolutional code:", - "G0 = 1 + D3 + D4", - "G1 = 1 + D + D3 + D4", - ] -) + # CS2 definition + ConvolutionalCode( + 290, + CCH_poly, + puncture = [ + 15, 19, 23, 27, 31, 35, 43, 47, 51, 55, 59, 63, 67, 71, + 75, 79, 83, 91, 95, 99, 103, 107, 111, 115, 119, 123, 127, 131, + 139, 143, 147, 151, 155, 159, 163, 167, 171, 175, 179, 187, 191, 195, + 199, 203, 207, 211, 215, 219, 223, 227, 235, 239, 243, 247, 251, 255, + 259, 263, 267, 271, 275, 283, 287, 291, 295, 299, 303, 307, 311, 315, + 319, 323, 331, 335, 339, 343, 347, 351, 355, 359, 363, 367, 371, 379, + 383, 387, 391, 395, 399, 403, 407, 411, 415, 419, 427, 431, 435, 439, + 443, 447, 451, 455, 459, 463, 467, 475, 479, 483, 487, 491, 495, 499, + 503, 507, 511, 515, 523, 527, 531, 535, 539, 543, 547, 551, 555, 559, + 563, 571, 575, 579, 583, 587, -1 + ], + name = "cs2", + description = [ + "CS2 convolutional code:", + "G0 = 1 + D3 + D4", + "G1 = 1 + D + D3 + D4", + ] + ), -# CS3 definition -CS3 = ConvolutionalCode( - 334, - CCH_poly, - puncture = [ - 15, 17, 21, 23, 27, 29, 33, 35, 39, 41, 45, 47, 51, 53, - 57, 59, 63, 65, 69, 71, 75, 77, 81, 83, 87, 89, 93, 95, - 99, 101, 105, 107, 111, 113, 117, 119, 123, 125, 129, 131, 135, 137, - 141, 143, 147, 149, 153, 155, 159, 161, 165, 167, 171, 173, 177, 179, - 183, 185, 189, 191, 195, 197, 201, 203, 207, 209, 213, 215, 219, 221, - 225, 227, 231, 233, 237, 239, 243, 245, 249, 251, 255, 257, 261, 263, - 267, 269, 273, 275, 279, 281, 285, 287, 291, 293, 297, 299, 303, 305, - 309, 311, 315, 317, 321, 323, 327, 329, 333, 335, 339, 341, 345, 347, - 351, 353, 357, 359, 363, 365, 369, 371, 375, 377, 381, 383, 387, 389, - 393, 395, 399, 401, 405, 407, 411, 413, 417, 419, 423, 425, 429, 431, - 435, 437, 441, 443, 447, 449, 453, 455, 459, 461, 465, 467, 471, 473, - 477, 479, 483, 485, 489, 491, 495, 497, 501, 503, 507, 509, 513, 515, - 519, 521, 525, 527, 531, 533, 537, 539, 543, 545, 549, 551, 555, 557, - 561, 563, 567, 569, 573, 575, 579, 581, 585, 587, 591, 593, 597, 599, - 603, 605, 609, 611, 615, 617, 621, 623, 627, 629, 633, 635, 639, 641, - 645, 647, 651, 653, 657, 659, 663, 665, 669, 671, -1 - ], - name = "cs3", - description = [ - "CS3 convolutional code:", - "G0 = 1 + D3 + D4", - "G1 = 1 + D + D3 + D4", - ] -) + # CS3 definition + ConvolutionalCode( + 334, + CCH_poly, + puncture = [ + 15, 17, 21, 23, 27, 29, 33, 35, 39, 41, 45, 47, 51, 53, + 57, 59, 63, 65, 69, 71, 75, 77, 81, 83, 87, 89, 93, 95, + 99, 101, 105, 107, 111, 113, 117, 119, 123, 125, 129, 131, 135, 137, + 141, 143, 147, 149, 153, 155, 159, 161, 165, 167, 171, 173, 177, 179, + 183, 185, 189, 191, 195, 197, 201, 203, 207, 209, 213, 215, 219, 221, + 225, 227, 231, 233, 237, 239, 243, 245, 249, 251, 255, 257, 261, 263, + 267, 269, 273, 275, 279, 281, 285, 287, 291, 293, 297, 299, 303, 305, + 309, 311, 315, 317, 321, 323, 327, 329, 333, 335, 339, 341, 345, 347, + 351, 353, 357, 359, 363, 365, 369, 371, 375, 377, 381, 383, 387, 389, + 393, 395, 399, 401, 405, 407, 411, 413, 417, 419, 423, 425, 429, 431, + 435, 437, 441, 443, 447, 449, 453, 455, 459, 461, 465, 467, 471, 473, + 477, 479, 483, 485, 489, 491, 495, 497, 501, 503, 507, 509, 513, 515, + 519, 521, 525, 527, 531, 533, 537, 539, 543, 545, 549, 551, 555, 557, + 561, 563, 567, 569, 573, 575, 579, 581, 585, 587, 591, 593, 597, 599, + 603, 605, 609, 611, 615, 617, 621, 623, 627, 629, 633, 635, 639, 641, + 645, 647, 651, 653, 657, 659, 663, 665, 669, 671, -1 + ], + name = "cs3", + description = [ + "CS3 convolutional code:", + "G0 = 1 + D3 + D4", + "G1 = 1 + D + D3 + D4", + ] + ), -# TCH_AFS_12_2 definition -TCH_AFS_12_2 = ConvolutionalCode( - 250, - [ - ( 1, 1 ), - ( G1, G0 ), - ], - puncture = [ - 321, 325, 329, 333, 337, 341, 345, 349, 353, 357, 361, 363, - 365, 369, 373, 377, 379, 381, 385, 389, 393, 395, 397, 401, - 405, 409, 411, 413, 417, 421, 425, 427, 429, 433, 437, 441, - 443, 445, 449, 453, 457, 459, 461, 465, 469, 473, 475, 477, - 481, 485, 489, 491, 493, 495, 497, 499, 501, 503, 505, 507, - -1 - ], - name = 'tch_afs_12_2', - description = [ - "TCH/AFS 12.2 kbits convolutional code:", - "250 bits block, rate 1/2, punctured", - "G0/G0 = 1", - "G1/G0 = 1 + D + D3 + D4 / 1 + D3 + D4", - ] -) + # TCH_AFS_12_2 definition + ConvolutionalCode( + 250, + [ + ( 1, 1 ), + ( G1, G0 ), + ], + puncture = [ + 321, 325, 329, 333, 337, 341, 345, 349, 353, 357, 361, 363, + 365, 369, 373, 377, 379, 381, 385, 389, 393, 395, 397, 401, + 405, 409, 411, 413, 417, 421, 425, 427, 429, 433, 437, 441, + 443, 445, 449, 453, 457, 459, 461, 465, 469, 473, 475, 477, + 481, 485, 489, 491, 493, 495, 497, 499, 501, 503, 505, 507, + -1 + ], + name = 'tch_afs_12_2', + description = [ + "TCH/AFS 12.2 kbits convolutional code:", + "250 bits block, rate 1/2, punctured", + "G0/G0 = 1", + "G1/G0 = 1 + D + D3 + D4 / 1 + D3 + D4", + ] + ), -# TCH_AFS_10_2 definition -TCH_AFS_10_2 = ConvolutionalCode( - 210, - [ - ( G1, G3 ), - ( G2, G3 ), - ( 1, 1 ), - ], - puncture = [ - 1, 4, 7, 10, 16, 19, 22, 28, 31, 34, 40, 43, - 46, 52, 55, 58, 64, 67, 70, 76, 79, 82, 88, 91, - 94, 100, 103, 106, 112, 115, 118, 124, 127, 130, 136, 139, - 142, 148, 151, 154, 160, 163, 166, 172, 175, 178, 184, 187, - 190, 196, 199, 202, 208, 211, 214, 220, 223, 226, 232, 235, - 238, 244, 247, 250, 256, 259, 262, 268, 271, 274, 280, 283, - 286, 292, 295, 298, 304, 307, 310, 316, 319, 322, 325, 328, - 331, 334, 337, 340, 343, 346, 349, 352, 355, 358, 361, 364, - 367, 370, 373, 376, 379, 382, 385, 388, 391, 394, 397, 400, - 403, 406, 409, 412, 415, 418, 421, 424, 427, 430, 433, 436, - 439, 442, 445, 448, 451, 454, 457, 460, 463, 466, 469, 472, - 475, 478, 481, 484, 487, 490, 493, 496, 499, 502, 505, 508, - 511, 514, 517, 520, 523, 526, 529, 532, 535, 538, 541, 544, - 547, 550, 553, 556, 559, 562, 565, 568, 571, 574, 577, 580, - 583, 586, 589, 592, 595, 598, 601, 604, 607, 609, 610, 613, - 616, 619, 621, 622, 625, 627, 628, 631, 633, 634, 636, 637, - 639, 640, -1 - ], - name = 'tch_afs_10_2', - description = [ - "TCH/AFS 10.2 kbits convolutional code:", - "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", - "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", - "G3/G3 = 1", - ] -) + # TCH_AFS_10_2 definition + ConvolutionalCode( + 210, + [ + ( G1, G3 ), + ( G2, G3 ), + ( 1, 1 ), + ], + puncture = [ + 1, 4, 7, 10, 16, 19, 22, 28, 31, 34, 40, 43, + 46, 52, 55, 58, 64, 67, 70, 76, 79, 82, 88, 91, + 94, 100, 103, 106, 112, 115, 118, 124, 127, 130, 136, 139, + 142, 148, 151, 154, 160, 163, 166, 172, 175, 178, 184, 187, + 190, 196, 199, 202, 208, 211, 214, 220, 223, 226, 232, 235, + 238, 244, 247, 250, 256, 259, 262, 268, 271, 274, 280, 283, + 286, 292, 295, 298, 304, 307, 310, 316, 319, 322, 325, 328, + 331, 334, 337, 340, 343, 346, 349, 352, 355, 358, 361, 364, + 367, 370, 373, 376, 379, 382, 385, 388, 391, 394, 397, 400, + 403, 406, 409, 412, 415, 418, 421, 424, 427, 430, 433, 436, + 439, 442, 445, 448, 451, 454, 457, 460, 463, 466, 469, 472, + 475, 478, 481, 484, 487, 490, 493, 496, 499, 502, 505, 508, + 511, 514, 517, 520, 523, 526, 529, 532, 535, 538, 541, 544, + 547, 550, 553, 556, 559, 562, 565, 568, 571, 574, 577, 580, + 583, 586, 589, 592, 595, 598, 601, 604, 607, 609, 610, 613, + 616, 619, 621, 622, 625, 627, 628, 631, 633, 634, 636, 637, + 639, 640, -1 + ], + name = 'tch_afs_10_2', + description = [ + "TCH/AFS 10.2 kbits convolutional code:", + "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", + "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", + "G3/G3 = 1", + ] + ), -# TCH_AFS_7_95 definition -TCH_AFS_7_95 = ConvolutionalCode( - 165, - [ - ( 1, 1 ), - ( G5, G4 ), - ( G6, G4 ), - ], - puncture = [ - 1, 2, 4, 5, 8, 22, 70, 118, 166, 214, 262, 310, - 317, 319, 325, 332, 334, 341, 343, 349, 356, 358, 365, 367, - 373, 380, 382, 385, 389, 391, 397, 404, 406, 409, 413, 415, - 421, 428, 430, 433, 437, 439, 445, 452, 454, 457, 461, 463, - 469, 476, 478, 481, 485, 487, 490, 493, 500, 502, 503, 505, - 506, 508, 509, 511, 512, -1 - ], - name = 'tch_afs_7_95', - description = [ - "TCH/AFS 7.95 kbits convolutional code:", - "G4/G4 = 1", - "G5/G4 = 1 + D + D4 + D6 / 1 + D2 + D3 + D5 + D6", - "G6/G4 = 1 + D + D2 + D3 + D4 + D6 / 1 + D2 + D3 + D5 + D6", - ] -) + # TCH_AFS_7_95 definition + ConvolutionalCode( + 165, + [ + ( 1, 1 ), + ( G5, G4 ), + ( G6, G4 ), + ], + puncture = [ + 1, 2, 4, 5, 8, 22, 70, 118, 166, 214, 262, 310, + 317, 319, 325, 332, 334, 341, 343, 349, 356, 358, 365, 367, + 373, 380, 382, 385, 389, 391, 397, 404, 406, 409, 413, 415, + 421, 428, 430, 433, 437, 439, 445, 452, 454, 457, 461, 463, + 469, 476, 478, 481, 485, 487, 490, 493, 500, 502, 503, 505, + 506, 508, 509, 511, 512, -1 + ], + name = 'tch_afs_7_95', + description = [ + "TCH/AFS 7.95 kbits convolutional code:", + "G4/G4 = 1", + "G5/G4 = 1 + D + D4 + D6 / 1 + D2 + D3 + D5 + D6", + "G6/G4 = 1 + D + D2 + D3 + D4 + D6 / 1 + D2 + D3 + D5 + D6", + ] + ), -# TCH_AFS_7_4 definition -TCH_AFS_7_4 = ConvolutionalCode( - 154, - [ - ( G1, G3 ), - ( G2, G3 ), - ( 1, 1 ), - ], - puncture = [ - 0, 355, 361, 367, 373, 379, 385, 391, 397, 403, 409, 415, - 421, 427, 433, 439, 445, 451, 457, 460, 463, 466, 468, 469, - 471, 472, -1 - ], - name = 'tch_afs_7_4', - description = [ - "TCH/AFS 7.4 kbits convolutional code:", - "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", - "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", - "G3/G3 = 1", - ] -) + # TCH_AFS_7_4 definition + ConvolutionalCode( + 154, + [ + ( G1, G3 ), + ( G2, G3 ), + ( 1, 1 ), + ], + puncture = [ + 0, 355, 361, 367, 373, 379, 385, 391, 397, 403, 409, 415, + 421, 427, 433, 439, 445, 451, 457, 460, 463, 466, 468, 469, + 471, 472, -1 + ], + name = 'tch_afs_7_4', + description = [ + "TCH/AFS 7.4 kbits convolutional code:", + "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", + "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", + "G3/G3 = 1", + ] + ), -# TCH_AFS_6_7 definition -TCH_AFS_6_7 = ConvolutionalCode( - 140, - [ - ( G1, G3 ), - ( G2, G3 ), - ( 1, 1 ), - ( 1, 1 ), - ], - puncture = [ - 1, 3, 7, 11, 15, 27, 39, 55, 67, 79, 95, 107, - 119, 135, 147, 159, 175, 187, 199, 215, 227, 239, 255, 267, - 279, 287, 291, 295, 299, 303, 307, 311, 315, 319, 323, 327, - 331, 335, 339, 343, 347, 351, 355, 359, 363, 367, 369, 371, - 375, 377, 379, 383, 385, 387, 391, 393, 395, 399, 401, 403, - 407, 409, 411, 415, 417, 419, 423, 425, 427, 431, 433, 435, - 439, 441, 443, 447, 449, 451, 455, 457, 459, 463, 465, 467, - 471, 473, 475, 479, 481, 483, 487, 489, 491, 495, 497, 499, - 503, 505, 507, 511, 513, 515, 519, 521, 523, 527, 529, 531, - 535, 537, 539, 543, 545, 547, 549, 551, 553, 555, 557, 559, - 561, 563, 565, 567, 569, 571, 573, 575, -1 - ], - name = 'tch_afs_6_7', - description = [ - "TCH/AFS 6.7 kbits convolutional code:", - "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", - "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", - "G3/G3 = 1", - "G3/G3 = 1", - ] -) + # TCH_AFS_6_7 definition + ConvolutionalCode( + 140, + [ + ( G1, G3 ), + ( G2, G3 ), + ( 1, 1 ), + ( 1, 1 ), + ], + puncture = [ + 1, 3, 7, 11, 15, 27, 39, 55, 67, 79, 95, 107, + 119, 135, 147, 159, 175, 187, 199, 215, 227, 239, 255, 267, + 279, 287, 291, 295, 299, 303, 307, 311, 315, 319, 323, 327, + 331, 335, 339, 343, 347, 351, 355, 359, 363, 367, 369, 371, + 375, 377, 379, 383, 385, 387, 391, 393, 395, 399, 401, 403, + 407, 409, 411, 415, 417, 419, 423, 425, 427, 431, 433, 435, + 439, 441, 443, 447, 449, 451, 455, 457, 459, 463, 465, 467, + 471, 473, 475, 479, 481, 483, 487, 489, 491, 495, 497, 499, + 503, 505, 507, 511, 513, 515, 519, 521, 523, 527, 529, 531, + 535, 537, 539, 543, 545, 547, 549, 551, 553, 555, 557, 559, + 561, 563, 565, 567, 569, 571, 573, 575, -1 + ], + name = 'tch_afs_6_7', + description = [ + "TCH/AFS 6.7 kbits convolutional code:", + "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", + "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", + "G3/G3 = 1", + "G3/G3 = 1", + ] + ), -# TCH_AFS_5_9 definition -TCH_AFS_5_9 = ConvolutionalCode( - 124, - [ - ( G4, G6 ), - ( G5, G6 ), - ( 1, 1), - ( 1, 1), - ], - puncture = [ - 0, 1, 3, 5, 7, 11, 15, 31, 47, 63, 79, 95, - 111, 127, 143, 159, 175, 191, 207, 223, 239, 255, 271, 287, - 303, 319, 327, 331, 335, 343, 347, 351, 359, 363, 367, 375, - 379, 383, 391, 395, 399, 407, 411, 415, 423, 427, 431, 439, - 443, 447, 455, 459, 463, 467, 471, 475, 479, 483, 487, 491, - 495, 499, 503, 507, 509, 511, 512, 513, 515, 516, 517, 519, - -1 - ], - name = 'tch_afs_5_9', - description = [ - "TCH/AFS 5.9 kbits convolutional code:", - "124 bits", - "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", - "G5/G6 = 1 + D + D4 + D6 / 1 + D + D2 + D3 + D4 + D6", - "G6/G6 = 1", - "G6/G6 = 1", - ] -) + # TCH_AFS_5_9 definition + ConvolutionalCode( + 124, + [ + ( G4, G6 ), + ( G5, G6 ), + ( 1, 1), + ( 1, 1), + ], + puncture = [ + 0, 1, 3, 5, 7, 11, 15, 31, 47, 63, 79, 95, + 111, 127, 143, 159, 175, 191, 207, 223, 239, 255, 271, 287, + 303, 319, 327, 331, 335, 343, 347, 351, 359, 363, 367, 375, + 379, 383, 391, 395, 399, 407, 411, 415, 423, 427, 431, 439, + 443, 447, 455, 459, 463, 467, 471, 475, 479, 483, 487, 491, + 495, 499, 503, 507, 509, 511, 512, 513, 515, 516, 517, 519, + -1 + ], + name = 'tch_afs_5_9', + description = [ + "TCH/AFS 5.9 kbits convolutional code:", + "124 bits", + "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", + "G5/G6 = 1 + D + D4 + D6 / 1 + D + D2 + D3 + D4 + D6", + "G6/G6 = 1", + "G6/G6 = 1", + ] + ), -# TCH_AFS_5_15 definition -TCH_AFS_5_15 = ConvolutionalCode( - 109, - [ - ( G1, G3 ), - ( G1, G3 ), - ( G2, G3 ), - ( 1, 1 ), - ( 1, 1 ), - ], - puncture = [ - 0, 4, 5, 9, 10, 14, 15, 20, 25, 30, 35, 40, - 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, - 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, - 290, 300, 310, 315, 320, 325, 330, 334, 335, 340, 344, 345, - 350, 354, 355, 360, 364, 365, 370, 374, 375, 380, 384, 385, - 390, 394, 395, 400, 404, 405, 410, 414, 415, 420, 424, 425, - 430, 434, 435, 440, 444, 445, 450, 454, 455, 460, 464, 465, - 470, 474, 475, 480, 484, 485, 490, 494, 495, 500, 504, 505, - 510, 514, 515, 520, 524, 525, 529, 530, 534, 535, 539, 540, - 544, 545, 549, 550, 554, 555, 559, 560, 564, -1 - ], - name = 'tch_afs_5_15', - description = [ - "TCH/AFS 5.15 kbits convolutional code:", - "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", - "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", - "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", - "G3/G3 = 1", - "G3/G3 = 1", - ] -) + # TCH_AFS_5_15 definition + ConvolutionalCode( + 109, + [ + ( G1, G3 ), + ( G1, G3 ), + ( G2, G3 ), + ( 1, 1 ), + ( 1, 1 ), + ], + puncture = [ + 0, 4, 5, 9, 10, 14, 15, 20, 25, 30, 35, 40, + 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, + 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, + 290, 300, 310, 315, 320, 325, 330, 334, 335, 340, 344, 345, + 350, 354, 355, 360, 364, 365, 370, 374, 375, 380, 384, 385, + 390, 394, 395, 400, 404, 405, 410, 414, 415, 420, 424, 425, + 430, 434, 435, 440, 444, 445, 450, 454, 455, 460, 464, 465, + 470, 474, 475, 480, 484, 485, 490, 494, 495, 500, 504, 505, + 510, 514, 515, 520, 524, 525, 529, 530, 534, 535, 539, 540, + 544, 545, 549, 550, 554, 555, 559, 560, 564, -1 + ], + name = 'tch_afs_5_15', + description = [ + "TCH/AFS 5.15 kbits convolutional code:", + "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", + "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", + "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", + "G3/G3 = 1", + "G3/G3 = 1", + ] + ), -# TCH_AFS_4_75 definition -TCH_AFS_4_75 = ConvolutionalCode( - 101, - [ - ( G4, G6 ), - ( G4, G6 ), - ( G5, G6 ), - ( 1, 1 ), - ( 1, 1 ), - ], - puncture = [ - 0, 1, 2, 4, 5, 7, 9, 15, 25, 35, 45, 55, - 65, 75, 85, 95, 105, 115, 125, 135, 145, 155, 165, 175, - 185, 195, 205, 215, 225, 235, 245, 255, 265, 275, 285, 295, - 305, 315, 325, 335, 345, 355, 365, 375, 385, 395, 400, 405, - 410, 415, 420, 425, 430, 435, 440, 445, 450, 455, 459, 460, - 465, 470, 475, 479, 480, 485, 490, 495, 499, 500, 505, 509, - 510, 515, 517, 519, 520, 522, 524, 525, 526, 527, 529, 530, - 531, 532, 534, -1 - ], - name = 'tch_afs_4_75', - description = [ - "TCH/AFS 4.75 kbits convolutional code:", - "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", - "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", - "G5/G6 = 1 + D + D4 + D6 / 1 + D + D2 + D3 + D4 + D6", - "G6/G6 = 1", - "G6/G6 = 1", - ] -) + # TCH_AFS_4_75 definition + ConvolutionalCode( + 101, + [ + ( G4, G6 ), + ( G4, G6 ), + ( G5, G6 ), + ( 1, 1 ), + ( 1, 1 ), + ], + puncture = [ + 0, 1, 2, 4, 5, 7, 9, 15, 25, 35, 45, 55, + 65, 75, 85, 95, 105, 115, 125, 135, 145, 155, 165, 175, + 185, 195, 205, 215, 225, 235, 245, 255, 265, 275, 285, 295, + 305, 315, 325, 335, 345, 355, 365, 375, 385, 395, 400, 405, + 410, 415, 420, 425, 430, 435, 440, 445, 450, 455, 459, 460, + 465, 470, 475, 479, 480, 485, 490, 495, 499, 500, 505, 509, + 510, 515, 517, 519, 520, 522, 524, 525, 526, 527, 529, 530, + 531, 532, 534, -1 + ], + name = 'tch_afs_4_75', + description = [ + "TCH/AFS 4.75 kbits convolutional code:", + "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", + "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", + "G5/G6 = 1 + D + D4 + D6 / 1 + D + D2 + D3 + D4 + D6", + "G6/G6 = 1", + "G6/G6 = 1", + ] + ) +] -def gen_c(dest, pref, code): - f = open(os.path.join(dest, 'conv_' + code.name + '_gen.c'), 'w') +if __name__ == '__main__': + path = sys.argv[1] if len(sys.argv) > 1 else os.getcwd() + prefix = "gsm0503" + + print >>sys.stderr, "Generating convolutional codes..." + + # Open a new file for writing + f = open(os.path.join(path, "gsm0503_conv.c"), 'w') print >>f, mod_license print >>f, "#include " print >>f, "#include " - code.gen_tables(pref, f) -if __name__ == '__main__': - print >>sys.stderr, "Generating convolutional codes..." - prefix = "gsm0503" - path = sys.argv[1] if len(sys.argv) > 1 else os.getcwd() - gen_c(path, prefix, xCCH) - gen_c(path, prefix, CS2) - gen_c(path, prefix, CS3) - gen_c(path, prefix, TCH_AFS_12_2) - gen_c(path, prefix, TCH_AFS_10_2) - gen_c(path, prefix, TCH_AFS_7_95) - gen_c(path, prefix, TCH_AFS_7_4) - gen_c(path, prefix, TCH_AFS_6_7) - gen_c(path, prefix, TCH_AFS_5_9) - gen_c(path, prefix, TCH_AFS_5_15) - gen_c(path, prefix, TCH_AFS_4_75) - print >>sys.stderr, "\tdone." + # Generate the tables one by one + for code in conv_codes: + print >>sys.stderr, "Generate '%s' definition" % code.name + code.gen_tables(prefix, f) + + print >>sys.stderr, "Generation complete." -- To view, visit https://gerrit.osmocom.org/828 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib4e4ee5fdde38429e68e3b2fa50ec03a18f59daa Gerrit-PatchSet: 8 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 From gerrit-no-reply at lists.osmocom.org Mon Oct 17 22:37:48 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 17 Oct 2016 22:37:48 +0000 Subject: [PATCH] libosmocore[master]: utils/conv_gen.py: improve output formatting 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/829 to look at the new patch set (#6). utils/conv_gen.py: improve output formatting To keep the generated tables readable, line with should be limited. So, now there are the following limitations: - _print_term(): up to 12 numbers per line, - _print_puncture(): up to 12 numbers per line, - _print_x(): up to 4 blocks per line. Change-Id: I95256c4ad402a3c088bdb6c5a5cda8b17c31881c --- M src/gsm/Makefile.am M utils/conv_gen.py 2 files changed, 43 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/29/829/6 diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index d60e60e..3877f78 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -35,3 +35,5 @@ # Convolutional codes generation gsm0503_conv.c: $(AM_V_GEN)python2 $(top_srcdir)/utils/conv_gen.py + +CLEANFILES = gsm0503_conv.c diff --git a/utils/conv_gen.py b/utils/conv_gen.py index 38ea63b..5a519bc 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -129,17 +129,30 @@ return ns, nb def _print_term(self, fi, num_states, pack = False): + # Up to 12 numbers should be placed per line + counter = 0 d = [] + for state in range(num_states): if pack: x = pack(self.next_term_output(state)) else: x = self.next_term_state(state) - d.append("%d, " % x) - print >>fi, "\t%s" % ''.join(d) + if counter == 0: + fi.write("\t") + elif counter % 12 == 0: + fi.write("\n\t") + + fi.write("%3d, " % x) + counter += 1 + + fi.write("\n") def _print_x(self, fi, num_states, pack = False): + # Up to 4 blocks should be placed per line + counter = 0 + for state in range(num_states): if pack: x0 = pack(self.next_output(state, 0)) @@ -148,7 +161,30 @@ x0 = self.next_state(state, 0) x1 = self.next_state(state, 1) - print >>fi, "\t{ %2d, %2d }," % (x0, x1) + if counter == 0: + fi.write("\t") + elif counter % 4 == 0: + fi.write("\n\t") + + fi.write("{ %2d, %2d }, " % (x0, x1)) + counter += 1 + + fi.write("\n") + + def _print_puncture(self, fi): + # Up to 12 numbers should be placed per line + counter = 0 + + for p in self.puncture: + if counter == 0: + fi.write("\t") + elif counter % 12 == 0: + fi.write("\n\t") + + fi.write("%3d, " % p) + counter += 1 + + fi.write("\n") def gen_tables(self, pref, fi): pack = lambda n: \ @@ -173,10 +209,10 @@ self._print_term(fi, num_states, pack) print >>fi, "};" + # Write puncture if preset if len(self.puncture): print >>fi, "\nstatic const int %s_puncture[] = {" % self.name - for p in self.puncture: - print >>fi, "\t%d," % p + self._print_puncture(fi) print >>fi, "};" # Write description as a multi-line comment -- To view, visit https://gerrit.osmocom.org/829 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I95256c4ad402a3c088bdb6c5a5cda8b17c31881c Gerrit-PatchSet: 6 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Oct 17 22:37:48 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 17 Oct 2016 22:37:48 +0000 Subject: [PATCH] libosmocore[master]: gsm/gsm0503.h: fix typo 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/830 to look at the new patch set (#5). gsm/gsm0503.h: fix typo Change-Id: I263d61111544eeb7227e1e0e8f2d14479eae2079 --- M include/osmocom/gsm/gsm0503.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/30/830/5 diff --git a/include/osmocom/gsm/gsm0503.h b/include/osmocom/gsm/gsm0503.h index cf1c976..2da4b16 100644 --- a/include/osmocom/gsm/gsm0503.h +++ b/include/osmocom/gsm/gsm0503.h @@ -26,7 +26,7 @@ #include -/*! \file conv_gen.h +/*! \file gsm0503.h * Osmocom convolutional encoder/decoder for xCCH channels, see 3GPP TS 05.03 */ -- To view, visit https://gerrit.osmocom.org/830 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I263d61111544eeb7227e1e0e8f2d14479eae2079 Gerrit-PatchSet: 5 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 Oct 17 22:37:48 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 17 Oct 2016 22:37:48 +0000 Subject: [PATCH] libosmocore[master]: utils/conv_gen.py: add RACH, SCH and TCH/AHS definitions 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/831 to look at the new patch set (#5). utils/conv_gen.py: add RACH, SCH and TCH/AHS definitions Change-Id: I0ea7151f4e8119a8798a9e129b951559e56b0d93 --- M include/osmocom/gsm/gsm0503.h M src/gsm/libosmogsm.map M utils/conv_gen.py 3 files changed, 212 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/31/831/5 diff --git a/include/osmocom/gsm/gsm0503.h b/include/osmocom/gsm/gsm0503.h index 2da4b16..862dc3f 100644 --- a/include/osmocom/gsm/gsm0503.h +++ b/include/osmocom/gsm/gsm0503.h @@ -36,10 +36,26 @@ */ 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 */ @@ -72,3 +88,27 @@ /*! \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; diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index dc8559f..9eff4d3 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -71,8 +71,12 @@ gsm0502_calc_paging_group; gsm0503_xcch; +gsm0503_rach; +gsm0503_sch; gsm0503_cs2; gsm0503_cs3; +gsm0503_tch_fr; +gsm0503_tch_hr; gsm0503_tch_afs_12_2; gsm0503_tch_afs_10_2; gsm0503_tch_afs_7_95; @@ -81,6 +85,12 @@ gsm0503_tch_afs_5_9; gsm0503_tch_afs_5_15; gsm0503_tch_afs_4_75; +gsm0503_tch_ahs_7_95; +gsm0503_tch_ahs_7_4; +gsm0503_tch_ahs_6_7; +gsm0503_tch_ahs_5_9; +gsm0503_tch_ahs_5_15; +gsm0503_tch_ahs_4_75; gsm0808_att_tlvdef; gsm0808_bssap_name; diff --git a/utils/conv_gen.py b/utils/conv_gen.py index 5a519bc..9af07b4 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -272,6 +272,22 @@ ] ), + # RACH definition + ConvolutionalCode( + 14, + CCH_poly, + name = "rach", + description = ["RACH convolutional code"] + ), + + # SCH definition + ConvolutionalCode( + 35, + CCH_poly, + name = "sch", + description = ["SCH convolutional code"] + ), + # CS2 definition ConvolutionalCode( 290, @@ -556,7 +572,152 @@ "G6/G6 = 1", "G6/G6 = 1", ] - ) + ), + + # TCH_FR definition + ConvolutionalCode( + 185, + CCH_poly, + name = "tch_fr", + description = ["TCH/F convolutional code"] + ), + + # TCH_HR definition + ConvolutionalCode( + 98, + [ + ( G4, 1 ), + ( G5, 1 ), + ( G6, 1 ), + ], + puncture = [ + 1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, + 37, 40, 43, 46, 49, 52, 55, 58, 61, 64, 67, 70, + 73, 76, 79, 82, 85, 88, 91, 94, 97, 100, 103, 106, + 109, 112, 115, 118, 121, 124, 127, 130, 133, 136, 139, 142, + 145, 148, 151, 154, 157, 160, 163, 166, 169, 172, 175, 178, + 181, 184, 187, 190, 193, 196, 199, 202, 205, 208, 211, 214, + 217, 220, 223, 226, 229, 232, 235, 238, 241, 244, 247, 250, + 253, 256, 259, 262, 265, 268, 271, 274, 277, 280, 283, 295, + 298, 301, 304, 307, 310, -1, + ], + name = "tch_hr", + description = ["TCH/H convolutional code"] + ), + + # TCH_AHS_7_95 definition + ConvolutionalCode( + 129, + [ + ( 1, 1 ), + ( G1, G0 ), + ], + puncture = [ + 1, 3, 5, 7, 11, 15, 19, 23, 27, 31, 35, 43, + 47, 51, 55, 59, 63, 67, 71, 79, 83, 87, 91, 95, + 99, 103, 107, 115, 119, 123, 127, 131, 135, 139, 143, 151, + 155, 159, 163, 167, 171, 175, 177, 179, 183, 185, 187, 191, + 193, 195, 197, 199, 203, 205, 207, 211, 213, 215, 219, 221, + 223, 227, 229, 231, 233, 235, 239, 241, 243, 247, 249, 251, + 255, 257, 259, 261, 263, 265, -1, + ], + name = "tch_ahs_7_95", + description = ["TCH/AHS 7.95 kbits convolutional code"] + ), + + # TCH_AHS_7_4 definition + ConvolutionalCode( + 126, + [ + ( 1, 1 ), + ( G1, G0 ), + ], + puncture = [ + 1, 3, 7, 11, 19, 23, 27, 35, 39, 43, 51, 55, + 59, 67, 71, 75, 83, 87, 91, 99, 103, 107, 115, 119, + 123, 131, 135, 139, 143, 147, 151, 155, 159, 163, 167, 171, + 175, 179, 183, 187, 191, 195, 199, 203, 207, 211, 215, 219, + 221, 223, 227, 229, 231, 235, 237, 239, 243, 245, 247, 251, + 253, 255, 257, 259, -1, + ], + name = "tch_ahs_7_4", + description = ["TCH/AHS 7.4 kbits convolutional code"] + ), + + # TCH_AHS_6_7 definition + ConvolutionalCode( + 116, + [ + ( 1, 1 ), + ( G1, G0 ), + ], + puncture = [ + 1, 3, 9, 19, 29, 39, 49, 59, 69, 79, 89, 99, + 109, 119, 129, 139, 149, 159, 167, 169, 177, 179, 187, 189, + 197, 199, 203, 207, 209, 213, 217, 219, 223, 227, 229, 231, + 233, 235, 237, 239, -1, + ], + name = "tch_ahs_6_7", + description = ["TCH/AHS 6.7 kbits convolutional code"] + ), + + # TCH_AHS_5_9 definition + ConvolutionalCode( + 108, + [ + ( 1, 1 ), + ( G1, G0 ), + ], + puncture = [ + 1, 15, 71, 127, 139, 151, 163, 175, 187, 195, 203, 211, + 215, 219, 221, 223, -1, + ], + name = "tch_ahs_5_9", + description = ["TCH/AHS 5.9 kbits convolutional code"] + ), + + # TCH_AHS_5_15 definition + ConvolutionalCode( + 97, + [ + ( G1, G3 ), + ( G2, G3 ), + ( 1, 1 ), + ], + puncture = [ + 0, 1, 3, 4, 6, 9, 12, 15, 18, 21, 27, 33, + 39, 45, 51, 54, 57, 63, 69, 75, 81, 87, 90, 93, + 99, 105, 111, 117, 123, 126, 129, 135, 141, 147, 153, 159, + 162, 165, 168, 171, 174, 177, 180, 183, 186, 189, 192, 195, + 198, 201, 204, 207, 210, 213, 216, 219, 222, 225, 228, 231, + 234, 237, 240, 243, 244, 246, 249, 252, 255, 256, 258, 261, + 264, 267, 268, 270, 273, 276, 279, 280, 282, 285, 288, 289, + 291, 294, 295, 297, 298, 300, 301, -1, + ], + name = "tch_ahs_5_15", + description = ["TCH/AHS 5.15 kbits convolutional code"] + ), + + # TCH_AHS_4_75 definition + ConvolutionalCode( + 89, + [ + ( 1, 1 ), + ( G5, G4 ), + ( G6, G4 ), + ], + puncture = [ + 1, 2, 4, 5, 7, 8, 10, 13, 16, 22, 28, 34, + 40, 46, 52, 58, 64, 70, 76, 82, 88, 94, 100, 106, + 112, 118, 124, 130, 136, 142, 148, 151, 154, 160, 163, 166, + 172, 175, 178, 184, 187, 190, 196, 199, 202, 208, 211, 214, + 220, 223, 226, 232, 235, 238, 241, 244, 247, 250, 253, 256, + 259, 262, 265, 268, 271, 274, 275, 277, 278, 280, 281, 283, + 284, -1, + ], + name = "tch_ahs_4_75", + description = ["TCH/AHS 4.75 kbits convolutional code"] + ), ] if __name__ == '__main__': -- To view, visit https://gerrit.osmocom.org/831 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0ea7151f4e8119a8798a9e129b951559e56b0d93 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Oct 17 22:46:26 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 17 Oct 2016 22:46:26 +0000 Subject: [ABANDON] openbsc[master]: move to hex TMSI representation In-Reply-To: References: Message-ID: Vadim Yanitskiy has abandoned this change. Change subject: move to hex TMSI representation ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/63 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I518c441f11f234b8f34ede5b76671049f06b6599 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Mon Oct 17 22:46:44 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 17 Oct 2016 22:46:44 +0000 Subject: [ABANDON] libosmocore[master]: gsm48.c: move to hex tmsi representation In-Reply-To: References: Message-ID: Vadim Yanitskiy has abandoned this change. Change subject: gsm48.c: move to hex tmsi representation ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/199 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I9d05209e546d8692360860839fa0720fb7349385 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon Oct 17 23:20:02 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 23:20:02 +0000 Subject: libosmocore[master]: utils/conv_gen.py: generate a single file In-Reply-To: References: Message-ID: Patch Set 8: (1 comment) https://gerrit.osmocom.org/#/c/828/8//COMMIT_MSG Commit Message: Line 12: definitions is more files. What do you mean by "more definitions is more files"?? This is still not a reason, it doesn't even mean anything. What is the motivation, the aim? -- To view, visit https://gerrit.osmocom.org/828 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib4e4ee5fdde38429e68e3b2fa50ec03a18f59daa Gerrit-PatchSet: 8 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-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Oct 17 23:31:27 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 17 Oct 2016 23:31:27 +0000 Subject: libosmocore[master]: utils/conv_gen.py: improve output formatting In-Reply-To: References: Message-ID: Patch Set 6: (6 comments) https://gerrit.osmocom.org/#/c/829/6/utils/conv_gen.py File utils/conv_gen.py: Line 142: if counter == 0: counter == 0 will only happen at the very first iteration, so you can put the fi.write('\t') above the for loop (assuming that num_states is never empty). Line 164: if counter == 0: same Line 179: if counter == 0: same Line 185: counter += 1 Actually, the output loop with the 'counter % 12' algorithm and whitespace is duplicated like three times. Can't this be handled by one central function to undup? E.g. each caller composes a list of items that is then passed to one formatting function. Line 212: # Write puncture if preset 'present'? Actually I think this comment states the obvious. Line 214: print >>fi, "\nstatic const int %s_puncture[] = {" % self.name interesting, never saw this 'print >>fi' syntax before -- To view, visit https://gerrit.osmocom.org/829 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I95256c4ad402a3c088bdb6c5a5cda8b17c31881c Gerrit-PatchSet: 6 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Oct 18 09:20:33 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 18 Oct 2016 09:20:33 +0000 Subject: [MERGED] osmo-bts[master]: Replace magic number with define In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Replace magic number with define ...................................................................... Replace magic number with define SDCCH occupy lchan 0..3 in combined configuration so for CCCH we've always used lchan[4] - replace it with CCCH_LCHAN define and add comment. Change-Id: Ic5d742c292d638f119c6b4672120c1950adeb7f0 --- M include/osmo-bts/gsm_data.h M src/common/l1sap.c M src/common/oml.c M src/osmo-bts-litecell15/oml.c M src/osmo-bts-octphy/l1_oml.c M src/osmo-bts-sysmo/oml.c M src/osmo-bts-trx/l1_if.c 7 files changed, 18 insertions(+), 12 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h index f1c9601..a2bb641 100644 --- a/include/osmo-bts/gsm_data.h +++ b/include/osmo-bts/gsm_data.h @@ -8,6 +8,9 @@ #include #include +/* lchans 0..3 are SDCCH in combined channel configuration: */ +#define CCCH_LCHAN 4 + #define GSM_FR_BITS 260 #define GSM_EFR_BITS 244 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index f3e620e..59866a2 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -947,7 +947,7 @@ DEBUGP(DL1P, "Rx PH-RA.ind"); - lc = &trx->ts[0].lchan[4].lapdm_ch; + lc = &trx->ts[0].lchan[CCCH_LCHAN].lapdm_ch; /* check for under/overflow / sign */ if (!check_acc_delay(rach_ind, btsb, &acc_delay)) { diff --git a/src/common/oml.c b/src/common/oml.c index 690a81d..c4f3d7e 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -727,7 +727,7 @@ } /* fallthrough */ case GSM_PCHAN_CCCH: - lchan = &ts->lchan[4]; + lchan = &ts->lchan[CCCH_LCHAN]; lchan->type = GSM_LCHAN_CCCH; break; case GSM_PCHAN_TCH_F: diff --git a/src/osmo-bts-litecell15/oml.c b/src/osmo-bts-litecell15/oml.c index 634c236..689ba70 100644 --- a/src/osmo-bts-litecell15/oml.c +++ b/src/osmo-bts-litecell15/oml.c @@ -287,8 +287,9 @@ mo->obj_inst.ts_nr == 0) { struct gsm_lchan *cbch = gsm_bts_get_cbch(mo->bts); DEBUGP(DL1C, "====> trying to activate lchans of BCCH\n"); - mo->bts->c0->ts[0].lchan[4].rel_act_kind = LCHAN_REL_ACT_OML; - lchan_activate(&mo->bts->c0->ts[0].lchan[4]); + mo->bts->c0->ts[0].lchan[CCCH_LCHAN].rel_act_kind = + LCHAN_REL_ACT_OML; + lchan_activate(&mo->bts->c0->ts[0].lchan[CCCH_LCHAN]); if (cbch) { cbch->rel_act_kind = LCHAN_REL_ACT_OML; lchan_activate(cbch); diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c index 74853bf..db416ba 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -183,8 +183,9 @@ if (mo->obj_class == NM_OC_CHANNEL && mo->obj_inst.trx_nr == 0 && mo->obj_inst.ts_nr == 0) { struct gsm_lchan *cbch = gsm_bts_get_cbch(mo->bts); - mo->bts->c0->ts[0].lchan[4].rel_act_kind = LCHAN_REL_ACT_OML; - lchan_activate(&mo->bts->c0->ts[0].lchan[4]); + mo->bts->c0->ts[0].lchan[CCCH_LCHAN].rel_act_kind = + LCHAN_REL_ACT_OML; + lchan_activate(&mo->bts->c0->ts[0].lchan[CCCH_LCHAN]); if (cbch) { cbch->rel_act_kind = LCHAN_REL_ACT_OML; lchan_activate(cbch); diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c index c1f1e0b..ed02c74 100644 --- a/src/osmo-bts-sysmo/oml.c +++ b/src/osmo-bts-sysmo/oml.c @@ -286,8 +286,9 @@ mo->obj_inst.ts_nr == 0) { struct gsm_lchan *cbch = gsm_bts_get_cbch(mo->bts); DEBUGP(DL1C, "====> trying to activate lchans of BCCH\n"); - mo->bts->c0->ts[0].lchan[4].rel_act_kind = LCHAN_REL_ACT_OML; - lchan_activate(&mo->bts->c0->ts[0].lchan[4]); + mo->bts->c0->ts[0].lchan[CCCH_LCHAN].rel_act_kind = + LCHAN_REL_ACT_OML; + lchan_activate(&mo->bts->c0->ts[0].lchan[CCCH_LCHAN]); if (cbch) { cbch->rel_act_kind = LCHAN_REL_ACT_OML; lchan_activate(cbch); diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c index b89a359..4465f3b 100644 --- a/src/osmo-bts-trx/l1_if.c +++ b/src/osmo-bts-trx/l1_if.c @@ -267,7 +267,7 @@ } if (trx == trx->bts->c0) - lchan_init_lapdm(&trx->ts[0].lchan[4]); + lchan_init_lapdm(&trx->ts[0].lchan[CCCH_LCHAN]); /* Set to Operational State: Enabled */ oml_mo_state_chg(&trx->mo, NM_OPSTATE_ENABLED, NM_AVSTATE_OK); @@ -288,7 +288,7 @@ /* deactivate lchan for CCCH */ if (pchan == GSM_PCHAN_CCCH || pchan == GSM_PCHAN_CCCH_SDCCH4) { - lchan_set_state(&trx->ts[0].lchan[4], LCHAN_S_INACTIVE); + lchan_set_state(&trx->ts[0].lchan[CCCH_LCHAN], LCHAN_S_INACTIVE); } /* power off transceiver, if not already */ @@ -408,8 +408,8 @@ /* activate lchan for CCCH */ if (pchan == GSM_PCHAN_CCCH || pchan == GSM_PCHAN_CCCH_SDCCH4) { - ts->lchan[4].rel_act_kind = LCHAN_REL_ACT_OML; - lchan_set_state(&ts->lchan[4], LCHAN_S_ACTIVE); + ts->lchan[CCCH_LCHAN].rel_act_kind = LCHAN_REL_ACT_OML; + lchan_set_state(&ts->lchan[CCCH_LCHAN], LCHAN_S_ACTIVE); } slottype = transceiver_chan_types[pchan]; -- To view, visit https://gerrit.osmocom.org/1098 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic5d742c292d638f119c6b4672120c1950adeb7f0 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts 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 Tue Oct 18 09:49:57 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 18 Oct 2016 09:49:57 +0000 Subject: [MERGED] osmo-pcu[master]: tbf: add llc_queue_size() to check llc_queue is valid before... In-Reply-To: References: Message-ID: lynxis lazus has submitted this change and it was merged. Change subject: tbf: add llc_queue_size() to check llc_queue is valid before calling size() ...................................................................... tbf: add llc_queue_size() to check llc_queue is valid before calling size() gcc6 is optimizing if (!this) {CODE} as this is assumed to never be a std::nullptr here. Move the null check to the caller. In preparation of removing the check within llc_queue->size(), all callers must check the object before calling it. Make sure of that: make the llc_queue() access function protected and offer only a public llc_queue_size() function that incorporates the NULL check. All current callers are only interested in the llc_queue_size(). Tweaked-by: nhofmeyr Change-Id: I88cc3180f8f86785e3f07981895dabddf50b60a2 --- M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp 3 files changed, 15 insertions(+), 6 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/tbf.cpp b/src/tbf.cpp index 97696cb..48d89b9 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -189,6 +189,13 @@ return m_ms ? m_ms->llc_queue() : NULL; } +int gprs_rlcmac_tbf::llc_queue_size() const +{ + /* m_ms->llc_queue() never returns NULL: GprsMs::m_llc_queue is a + * member instance. */ + return m_ms ? m_ms->llc_queue()->size() : 0; +} + void gprs_rlcmac_tbf::set_ms(GprsMs *ms) { if (m_ms == ms) diff --git a/src/tbf.h b/src/tbf.h index 3a6f42d..37401bf 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -142,8 +142,7 @@ uint8_t ms_class() const; void set_ms_class(uint8_t); GprsCodingScheme current_cs() const; - gprs_llc_queue *llc_queue(); - const gprs_llc_queue *llc_queue() const; + int llc_queue_size() const; time_t created_ts() const; uint8_t dl_slots() const; @@ -231,6 +230,9 @@ int set_tlli_from_ul(uint32_t new_tlli); void merge_and_clear_ms(GprsMs *old_ms); + gprs_llc_queue *llc_queue(); + const gprs_llc_queue *llc_queue() const; + static const char *tbf_state_name[7]; class GprsMs *m_ms; diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 457f2c9..c89cd03 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -310,7 +310,7 @@ LOGP(DRLCMACDL, LOGL_NOTICE, "%s Discarding LLC PDU " "because lifetime limit reached, " "count=%u new_queue_size=%zu\n", - tbf_name(this), frames, llc_queue()->size()); + tbf_name(this), frames, llc_queue_size()); if (frames > 0xff) frames = 0xff; if (octets > 0xffffff) @@ -572,7 +572,7 @@ m_llc.frame_length(), frames_since_last_drain(fn)); } - is_final = llc_queue()->size() == 0 && !keep_open(fn); + is_final = llc_queue_size() == 0 && !keep_open(fn); ar = Encoding::rlc_data_to_dl_append(rdbi, cs, &m_llc, &write_offset, &num_chunks, data, is_final, &payload_written); @@ -1050,7 +1050,7 @@ release(); /* check for LLC PDU in the LLC Queue */ - if (llc_queue()->size() > 0) + if (llc_queue_size() > 0) /* we have more data so we will re-use this tbf */ establish_dl_tbf_on_pacch(); @@ -1168,7 +1168,7 @@ bool gprs_rlcmac_dl_tbf::have_data() const { return m_llc.chunk_size() > 0 || - (llc_queue() && llc_queue()->size() > 0); + (llc_queue_size() > 0); } int gprs_rlcmac_dl_tbf::frames_since_last_poll(unsigned fn) const -- To view, visit https://gerrit.osmocom.org/724 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I88cc3180f8f86785e3f07981895dabddf50b60a2 Gerrit-PatchSet: 5 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Oct 18 09:56:39 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 18 Oct 2016 09:56:39 +0000 Subject: libosmocore[master]: vty/show asciidoc: add user readable description of the version In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/1068/3/src/vty/stats_vty.c File src/vty/stats_vty.c: Line 491: vty_out(vty, "These counters and their description based on %s %s (%s).%s%s", > should this line also start with '//'? should it be visible in the generate this is intended to let the user know which version was used to generate the tables. -- To view, visit https://gerrit.osmocom.org/1068 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie0f1b3894361c58386da9defb225979fa0ee6a18 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: Yes From gerrit-no-reply at lists.osmocom.org Tue Oct 18 10:09:25 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 18 Oct 2016 10:09:25 +0000 Subject: osmo-gsm-manuals[master]: portability: use py script instead of 'date -d @1234' In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/1081/1/build/unix-time-to-fmt.py File build/unix-time-to-fmt.py: Line 18: print time.strftime(fmt, time.gmtime(float(sys.argv[1]))) add parenthesis around print and this is portable between py2 and py3. also replace python2 -> python. -- To view, visit https://gerrit.osmocom.org/1081 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I91a40656184f553ee375216d8ba5c7788fe9990d Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Oct 18 10:09:33 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 18 Oct 2016 10:09:33 +0000 Subject: osmo-gsm-manuals[master]: portability: use py script instead of 'date -d @1234' In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 -- To view, visit https://gerrit.osmocom.org/1081 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I91a40656184f553ee375216d8ba5c7788fe9990d Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Oct 18 10:12:50 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 18 Oct 2016 10:12:50 +0000 Subject: osmo-gsm-manuals[master]: add jenkins.sh script for jenkins build job In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1080 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6c3d959202f510f0c9780d0fa28c769ea9d721e8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Oct 18 10:14:51 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 18 Oct 2016 10:14:51 +0000 Subject: [MERGED] osmo-pcu[master]: llc: remove NULL-pointer check of gprs_llc_queue::size()/oct... In-Reply-To: References: Message-ID: lynxis lazus has submitted this change and it was merged. Change subject: llc: remove NULL-pointer check of gprs_llc_queue::size()/octets() ...................................................................... llc: remove NULL-pointer check of gprs_llc_queue::size()/octets() All callers now check the pointer before calling it. gcc6 is optimizing `if (!this) {CODE}` as this is assumed to never be a std::nullptr here. Change-Id: I918a094e0dc59098a9eb00d152c9ae42d36b3a99 --- M src/llc.h 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/llc.h b/src/llc.h index 94de16e..4883624 100644 --- a/src/llc.h +++ b/src/llc.h @@ -127,10 +127,10 @@ inline size_t gprs_llc_queue::size() const { - return this ? m_queue_size : 0; + return m_queue_size; } inline size_t gprs_llc_queue::octets() const { - return this ? m_queue_octets : 0; + return m_queue_octets; } -- To view, visit https://gerrit.osmocom.org/213 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I918a094e0dc59098a9eb00d152c9ae42d36b3a99 Gerrit-PatchSet: 7 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Oct 18 10:15:06 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 18 Oct 2016 10:15:06 +0000 Subject: [MERGED] libosmocore[master]: stats_statsd: use int64_t instead of int for value and delta. In-Reply-To: References: Message-ID: lynxis lazus has submitted this change and it was merged. Change subject: stats_statsd: use int64_t instead of int for value and delta. ...................................................................... stats_statsd: use int64_t instead of int for value and delta. The stats infrastructure use int64_t for values and delta. So the statsd reporter get call with int64_t. Change-Id: I33df86de60007a64fa853d6d3af9b609877a8fc6 --- M src/stats_statsd.c 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/stats_statsd.c b/src/stats_statsd.c index 2813410..3cecec3 100644 --- a/src/stats_statsd.c +++ b/src/stats_statsd.c @@ -39,7 +39,7 @@ int64_t value, int64_t delta); static int osmo_stats_reporter_statsd_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); struct osmo_stats_reporter *osmo_stats_reporter_create_statsd(const char *name) { @@ -57,7 +57,7 @@ } static int osmo_stats_reporter_statsd_send(struct osmo_stats_reporter *srep, - const char *name1, unsigned int index1, const char *name2, int value, + const char *name1, unsigned int index1, const char *name2, int64_t value, const char *unit) { char *buf; @@ -149,7 +149,7 @@ static int osmo_stats_reporter_statsd_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) { const char *unit = desc->unit; -- To view, visit https://gerrit.osmocom.org/1004 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I33df86de60007a64fa853d6d3af9b609877a8fc6 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Oct 18 10:15:23 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 18 Oct 2016 10:15:23 +0000 Subject: [MERGED] libosmocore[master]: vty/show asciidoc: add user readable description of the version In-Reply-To: References: Message-ID: lynxis lazus has submitted this change and it was merged. Change subject: vty/show asciidoc: add user readable description of the version ...................................................................... vty/show asciidoc: add user readable description of the version Change-Id: Ie0f1b3894361c58386da9defb225979fa0ee6a18 --- M src/vty/stats_vty.c 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c index 59befd2..2ca436a 100644 --- a/src/vty/stats_vty.c +++ b/src/vty/stats_vty.c @@ -41,6 +41,9 @@ #define SHOW_STATS_STR "Show statistical values\n" +/* containing version info */ +extern struct host host; + struct cmd_node cfg_stats_node = { CFG_STATS_NODE, "%s(config-stats)# ", @@ -484,6 +487,13 @@ "show asciidoc counters", SHOW_STR "Asciidoc generation\n" "Generate table of all registered counters\n") { + vty_out(vty, "// autogenerated by show asciidoc counters%s", VTY_NEWLINE); + vty_out(vty, "These counters and their description based on %s %s (%s).%s%s", + host.app_info->name, + host.app_info->version, + host.app_info->name ? host.app_info->name : "", VTY_NEWLINE, VTY_NEWLINE); + /* 2x VTY_NEWLINE are intentional otherwise it would interpret the first table header + * as usual text*/ vty_out(vty, "// generating tables for rate_ctr_group%s", VTY_NEWLINE); rate_ctr_for_each_group(asciidoc_rate_ctr_group_handler, vty); -- To view, visit https://gerrit.osmocom.org/1068 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie0f1b3894361c58386da9defb225979fa0ee6a18 Gerrit-PatchSet: 4 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 Tue Oct 18 10:19:25 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 18 Oct 2016 10:19:25 +0000 Subject: [PATCH] libosmocore[master]: vty/show asciidoc: counters: improve table headers Message-ID: Review at https://gerrit.osmocom.org/1109 vty/show asciidoc: counters: improve table headers add [options=header] to every table header vty/show asciidoc: rename reference field into "Reference" vty/show asciidoc: capilize table header field names Change-Id: Ie991f4db77a60afb86a2a0b35c137586527f6228 --- M src/vty/stats_vty.c 1 file changed, 8 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/09/1109/1 diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c index 2ca436a..c03546b 100644 --- a/src/vty/stats_vty.c +++ b/src/vty/stats_vty.c @@ -383,8 +383,9 @@ { vty_out(vty, "// ungrouped osmo_counters%s", VTY_NEWLINE); vty_out(vty, ".ungrouped osmo counters%s", VTY_NEWLINE); + vty_out(vty, "[options=\"header\"]%s", VTY_NEWLINE); vty_out(vty, "|===%s", VTY_NEWLINE); - vty_out(vty, "| name | This document & | description%s", VTY_NEWLINE); + vty_out(vty, "| Name | Reference | Description%s", VTY_NEWLINE); osmo_counters_for_each(asciidoc_handle_counter, vty); vty_out(vty, "|===%s", VTY_NEWLINE); } @@ -398,7 +399,7 @@ char *description = osmo_asciidoc_escape(desc->description); char *group_name_prefix = osmo_asciidoc_escape(ctrg->desc->group_name_prefix); - /* | name | This document & | description | */ + /* | Name | This document & | Description | */ vty_out(vty, "| %s | <<%s_%s>> | %s%s", name, group_name_prefix, @@ -423,8 +424,9 @@ vty_out(vty, "// rate_ctr_group table %s%s", group_description, VTY_NEWLINE); vty_out(vty, ".%s - %s %s", group_name_prefix, group_description, VTY_NEWLINE); + vty_out(vty, "[options=\"header\"]%s", VTY_NEWLINE); vty_out(vty, "|===%s", VTY_NEWLINE); - vty_out(vty, "| name | This document & | description%s", VTY_NEWLINE); + vty_out(vty, "| Name | Reference | Description%s", VTY_NEWLINE); rate_ctr_for_each_counter(ctrg, asciidoc_rate_ctr_handler, sctx_); vty_out(vty, "|===%s", VTY_NEWLINE); @@ -444,7 +446,7 @@ char *group_name_prefix = osmo_asciidoc_escape(statg->desc->group_name_prefix); char *unit = osmo_asciidoc_escape(item->desc->unit); - /* | name | This document & | description | unit | */ + /* | Name | Reference | Description | Unit | */ vty_out(vty, "| %s | <<%s_%s>> | %s | %s%s", name, group_name_prefix, @@ -471,8 +473,9 @@ vty_out(vty, "// osmo_stat_item_group table %s%s", group_description ? group_description : "", VTY_NEWLINE); vty_out(vty, ".%s - %s %s", group_name_prefix, group_description ? group_description : "", VTY_NEWLINE); + vty_out(vty, "[options=\"header\"]%s", VTY_NEWLINE); vty_out(vty, "|===%s", VTY_NEWLINE); - vty_out(vty, "| name | This document & | description | unit%s", VTY_NEWLINE); + vty_out(vty, "| Name | Reference | Description | Unit%s", VTY_NEWLINE); osmo_stat_item_for_each_item(statg, asciidoc_osmo_stat_item_handler, sctx_); vty_out(vty, "|===%s", VTY_NEWLINE); -- To view, visit https://gerrit.osmocom.org/1109 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie991f4db77a60afb86a2a0b35c137586527f6228 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Oct 18 10:20:29 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 18 Oct 2016 10:20:29 +0000 Subject: [ABANDON] libosmocore[master]: vty/show asciidoc: rename reference field into "Reference" In-Reply-To: References: Message-ID: lynxis lazus has abandoned this change. Change subject: vty/show asciidoc: rename reference field into "Reference" ...................................................................... Abandoned squashed into https://gerrit.osmocom.org/#/c/1109/ -- To view, visit https://gerrit.osmocom.org/1070 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I71c01d8497663bda8e5004d8dabd5cec4756ea6e Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 18 10:20:32 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 18 Oct 2016 10:20:32 +0000 Subject: [ABANDON] libosmocore[master]: vty/show asciidoc: add [options=header] to every table header In-Reply-To: References: Message-ID: lynxis lazus has abandoned this change. Change subject: vty/show asciidoc: add [options=header] to every table header ...................................................................... Abandoned squashed into https://gerrit.osmocom.org/#/c/1109/ -- To view, visit https://gerrit.osmocom.org/1069 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ic84cf7448c88821e4e422561aaa7d8719573db84 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 18 10:20:38 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 18 Oct 2016 10:20:38 +0000 Subject: [ABANDON] libosmocore[master]: vty/show asciidoc: capilize table header field names In-Reply-To: References: Message-ID: lynxis lazus has abandoned this change. Change subject: vty/show asciidoc: capilize table header field names ...................................................................... Abandoned squashed into https://gerrit.osmocom.org/#/c/1109/ -- To view, visit https://gerrit.osmocom.org/1071 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Id1cf5db84ab3c07613769e800a1b183eb8084563 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 18 10:48:32 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 10:48:32 +0000 Subject: osmo-gsm-manuals[master]: portability: use py script instead of 'date -d @1234' In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/1081/1/build/unix-time-to-fmt.py File build/unix-time-to-fmt.py: Line 18: print time.strftime(fmt, time.gmtime(float(sys.argv[1]))) > add parenthesis around print and this is portable between py2 and py3. also yeah well, the point is that our freebsd slave doesn't work with #!/usr/bin/env python, it needs python2 explicitly. Same situation e.g. in libosmocore/utils/conv_gen.py -- To view, visit https://gerrit.osmocom.org/1081 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I91a40656184f553ee375216d8ba5c7788fe9990d Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Oct 18 12:33:43 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 12:33:43 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: portability: use py script instead of 'date -d @1234' In-Reply-To: References: Message-ID: Hello lynxis lazus, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1081 to look at the new patch set (#2). portability: use py script instead of 'date -d @1234' On FreeBSD, the 'date' command's -d option has a completely different meaning. Instead, use a small python script to do the date format conversion, which should be more portable. As a side effect, we now also use UTC instead of the build server's timezone, which may be considered a more international choice. Add build/unix-time-to-fmt.py, call in build/Makefile.asciidoc.inc. Change-Id: I91a40656184f553ee375216d8ba5c7788fe9990d --- M build/Makefile.asciidoc.inc A build/unix-time-to-fmt.py 2 files changed, 19 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/81/1081/2 diff --git a/build/Makefile.asciidoc.inc b/build/Makefile.asciidoc.inc index 1a77419..7def592 100644 --- a/build/Makefile.asciidoc.inc +++ b/build/Makefile.asciidoc.inc @@ -1,7 +1,7 @@ BUILDDIR = $(TOPDIR)/build GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always --tags) -GIT_DATE := $(shell date -d @`git log -n 1 "--pretty=%at" ../.` "+%Y-%b-%e") +GIT_DATE := $(shell $(TOPDIR)/build/unix-time-to-fmt.py `git log -n 1 "--pretty=%at" ../.`) # prepend the document name with the version numbe suffix #DOCS_VER = $(foreach P, $(ASCIIDOCS), $(P)-v$(shell xmllint --recover --xpath "//revnumber[position()=last()]/text()" $(P)-docinfo.xml 2>/dev/null)) diff --git a/build/unix-time-to-fmt.py b/build/unix-time-to-fmt.py new file mode 100755 index 0000000..d081797 --- /dev/null +++ b/build/unix-time-to-fmt.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 +""" +Usage: + + unix-time-to-fmt.py 1234567 [%Y-%m-%d[...]] + +Convert unix timestamp to a string of the given format in UTC, according to + https://docs.python.org/2/library/time.html +Default is '%Y-%b-%d' --> 2016-Jan-01 +""" + +import sys, time + +fmt = '%Y-%b-%d' +if len(sys.argv) > 2: + fmt = sys.argv[2] + +print(time.strftime(fmt, time.gmtime(float(sys.argv[1])))) -- To view, visit https://gerrit.osmocom.org/1081 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I91a40656184f553ee375216d8ba5c7788fe9990d Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Oct 18 12:35:08 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 12:35:08 +0000 Subject: osmo-gsm-manuals[master]: add jenkins.sh script for jenkins build job In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1080 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6c3d959202f510f0c9780d0fa28c769ea9d721e8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Oct 18 12:35:17 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 12:35:17 +0000 Subject: osmo-gsm-manuals[master]: portability: use py script instead of 'date -d @1234' In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1081 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I91a40656184f553ee375216d8ba5c7788fe9990d Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Oct 18 12:41:40 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 12:41:40 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: portability: use py script instead of 'date -d @1234' In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: portability: use py script instead of 'date -d @1234' ...................................................................... portability: use py script instead of 'date -d @1234' On FreeBSD, the 'date' command's -d option has a completely different meaning. Instead, use a small python script to do the date format conversion, which should be more portable. As a side effect, we now also use UTC instead of the build server's timezone, which may be considered a more international choice. Add build/unix-time-to-fmt.py, call in build/Makefile.asciidoc.inc. Change-Id: I91a40656184f553ee375216d8ba5c7788fe9990d --- M build/Makefile.asciidoc.inc A build/unix-time-to-fmt.py 2 files changed, 19 insertions(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/build/Makefile.asciidoc.inc b/build/Makefile.asciidoc.inc index 1a77419..7def592 100644 --- a/build/Makefile.asciidoc.inc +++ b/build/Makefile.asciidoc.inc @@ -1,7 +1,7 @@ BUILDDIR = $(TOPDIR)/build GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always --tags) -GIT_DATE := $(shell date -d @`git log -n 1 "--pretty=%at" ../.` "+%Y-%b-%e") +GIT_DATE := $(shell $(TOPDIR)/build/unix-time-to-fmt.py `git log -n 1 "--pretty=%at" ../.`) # prepend the document name with the version numbe suffix #DOCS_VER = $(foreach P, $(ASCIIDOCS), $(P)-v$(shell xmllint --recover --xpath "//revnumber[position()=last()]/text()" $(P)-docinfo.xml 2>/dev/null)) diff --git a/build/unix-time-to-fmt.py b/build/unix-time-to-fmt.py new file mode 100755 index 0000000..d081797 --- /dev/null +++ b/build/unix-time-to-fmt.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 +""" +Usage: + + unix-time-to-fmt.py 1234567 [%Y-%m-%d[...]] + +Convert unix timestamp to a string of the given format in UTC, according to + https://docs.python.org/2/library/time.html +Default is '%Y-%b-%d' --> 2016-Jan-01 +""" + +import sys, time + +fmt = '%Y-%b-%d' +if len(sys.argv) > 2: + fmt = sys.argv[2] + +print(time.strftime(fmt, time.gmtime(float(sys.argv[1])))) -- To view, visit https://gerrit.osmocom.org/1081 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I91a40656184f553ee375216d8ba5c7788fe9990d Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Oct 18 12:44:45 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 18 Oct 2016 12:44:45 +0000 Subject: libosmocore[master]: vty/show asciidoc: counters: improve table headers In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1109 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie991f4db77a60afb86a2a0b35c137586527f6228 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Oct 18 12:46:35 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 18 Oct 2016 12:46:35 +0000 Subject: osmo-gsm-manuals[master]: jenkins.sh: call 'make check' In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/1095/3//COMMIT_MSG Commit Message: PS3, Line 9: target too long text. Please try to wrap it with email standards (IIRC < 80?) -- To view, visit https://gerrit.osmocom.org/1095 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4e1a15b7a7ed50637b1c020dcd962f42d3ced08f Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals 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 Oct 18 12:46:53 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 18 Oct 2016 12:46:53 +0000 Subject: osmo-gsm-manuals[master]: OsmoNITB: include abis.adoc from common/chapters/ In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1094 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If3d92fe19d402d77b0db0eb9d00efef0a8d02122 Gerrit-PatchSet: 3 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 Oct 18 12:47:13 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 18 Oct 2016 12:47:13 +0000 Subject: osmo-gsm-manuals[master]: OsmoBSC: include bts-examples.adoc from OsmoNITB In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1093 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6b6d8c413762c710453b228f846216961b578597 Gerrit-PatchSet: 3 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 Oct 18 12:47:38 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 18 Oct 2016 12:47:38 +0000 Subject: osmo-gsm-manuals[master]: OsmoBSC+NITB/running: fix title levels, one too deep In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1092 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If81e44c9a0774e5de39cc536989cef5cb214a224 Gerrit-PatchSet: 3 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 Oct 18 12:48:59 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 12:48:59 +0000 Subject: [PATCH] osmo-pcu[master]: Revert "tbf: Add state WAIT_ASSIGN" 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/218 to look at the new patch set (#5). Revert "tbf: Add state WAIT_ASSIGN" This reverts commit f1a7b8fc6651f92a8b7f3f27b7ca05d07f4e44e0. Conflicts: tests/tbf/TbfTest.err The commit broke GPRS service at least for osmo-bts-sysmo on a SysmoBTS 1002 with current master of osmo-bts (ef30f50d5d6d5f863fc147d05ccdceb89284934e). The error observed is the following log output (was viewing both osmo-bts-sysmo and osmo-pcu logs interleaved): <0002> tbf.cpp:874 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=WAIT ASSIGN) T3169 timeout during transsmission <0002> tbf.cpp:893 - Assignment was on CCCH <0002> tbf.cpp:899 - No uplink data received yet <0007> l1sap.c:904 RACH for packet access <0001> pcu_l1_if.cpp:311 RACH request received: sapi=1 qta=0, ra=121, fn=13653 [repeat] When removing this single commit from current osmo-pcu master, GPRS service works well on SysmoBTS, with current osmo-bts master. The TbfTest.err expected output needed adjustment after the revert. Disclaimer: I am not aware of adverse effects this commit may have. I have no idea what the WAIT_ASSIGN state is used for -- further review is required. Change-Id: I1532f8e93194368cdc1e3846f82afa6d68cd5fbd --- M src/bts.cpp M src/tbf.cpp M src/tbf.h M tests/tbf/TbfTest.cpp M tests/tbf/TbfTest.err 5 files changed, 134 insertions(+), 191 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/18/218/5 diff --git a/src/bts.cpp b/src/bts.cpp index 73ec1f7..35da307 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -558,11 +558,8 @@ m_bts.trx[trx_no].arfcn, ts_no, tsc, usf, 0, sb_fn, m_bts.alpha, m_bts.gamma, -1, burst_type, sb); - if (plen >= 0) { + if (plen >= 0) pcu_l1if_tx_agch(immediate_assignment, plen); - if (tbf) - tbf->set_state(GPRS_RLCMAC_WAIT_ASSIGN); - } bitvec_free(immediate_assignment); @@ -687,10 +684,8 @@ (tbf->pdch[ts]->last_rts_fn + 21216) % 2715648, tbf->ta(), tbf->trx->arfcn, ts, tbf->tsc(), 7, poll, tbf->poll_fn, m_bts.alpha, m_bts.gamma, -1); - if (plen >= 0) { + if (plen >= 0) pcu_l1if_tx_pch(immediate_assignment, plen, imsi); - tbf->set_state(GPRS_RLCMAC_WAIT_ASSIGN); - } bitvec_free(immediate_assignment); } diff --git a/src/tbf.cpp b/src/tbf.cpp index 48d89b9..0ac8ace 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -408,7 +408,6 @@ const char *gprs_rlcmac_tbf::tbf_state_name[] = { "NULL", "ASSIGN", - "WAIT ASSIGN", "FLOW", "FINISHED", "WAIT RELEASE", @@ -827,12 +826,6 @@ if ((state_flags & (1 << GPRS_RLCMAC_FLAG_PACCH))) { if (state_is(GPRS_RLCMAC_ASSIGN)) { LOGP(DRLCMAC, LOGL_NOTICE, "%s releasing due to " - "PACCH assignment timeout (not yet sent).\n", - tbf_name(this)); - tbf_free(this); - return; - } else if (state_is(GPRS_RLCMAC_WAIT_ASSIGN)) { - LOGP(DRLCMAC, LOGL_NOTICE, "%s releasing due to " "PACCH assignment timeout.\n", tbf_name(this)); tbf_free(this); return; @@ -843,7 +836,7 @@ if ((state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))) { gprs_rlcmac_dl_tbf *dl_tbf = as_dl_tbf(this); dl_tbf->m_wait_confirm = 0; - if (dl_tbf->state_is(GPRS_RLCMAC_WAIT_ASSIGN)) { + if (dl_tbf->state_is(GPRS_RLCMAC_ASSIGN)) { tbf_assign_control_ts(dl_tbf); if (!dl_tbf->upgrade_to_multislot) { @@ -1004,8 +997,6 @@ if (poll_ass_dl) { set_polling(new_poll_fn, ts); - if (new_dl_tbf->state_is(GPRS_RLCMAC_ASSIGN)) - new_dl_tbf->set_state(GPRS_RLCMAC_WAIT_ASSIGN); dl_ass_state = GPRS_RLCMAC_DL_ASS_WAIT_ACK; LOGP(DRLCMACDL, LOGL_INFO, "%s Scheduled DL Assignment polling on FN=%d, TS=%d\n", @@ -1078,8 +1069,6 @@ set_polling(new_poll_fn, ts); ul_ass_state = GPRS_RLCMAC_UL_ASS_WAIT_ACK; - if (new_tbf->state_is(GPRS_RLCMAC_ASSIGN)) - new_tbf->set_state(GPRS_RLCMAC_WAIT_ASSIGN); LOGP(DRLCMACDL, LOGL_INFO, "%s Scheduled UL Assignment polling on FN=%d, TS=%d\n", name(), poll_fn, poll_ts); diff --git a/src/tbf.h b/src/tbf.h index 37401bf..3205f6e 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -43,8 +43,7 @@ enum gprs_rlcmac_tbf_state { GPRS_RLCMAC_NULL = 0, /* new created TBF */ - GPRS_RLCMAC_ASSIGN, /* wait for DL transmission */ - GPRS_RLCMAC_WAIT_ASSIGN,/* wait for confirmation */ + GPRS_RLCMAC_ASSIGN, /* wait for downlink assignment */ GPRS_RLCMAC_FLOW, /* RLC/MAC flow, resource needed */ GPRS_RLCMAC_FINISHED, /* flow finished, wait for release */ GPRS_RLCMAC_WAIT_RELEASE,/* wait for release or restart of DL TBF */ @@ -233,7 +232,7 @@ gprs_llc_queue *llc_queue(); const gprs_llc_queue *llc_queue() const; - static const char *tbf_state_name[7]; + static const char *tbf_state_name[6]; class GprsMs *m_ms; @@ -318,7 +317,10 @@ { /* The TBF is established or has been assigned by a IMM.ASS for * download */ - return state > GPRS_RLCMAC_ASSIGN; + return state > GPRS_RLCMAC_ASSIGN || + (direction == GPRS_RLCMAC_DL_TBF && + state == GPRS_RLCMAC_ASSIGN && + (state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))); } inline uint8_t gprs_rlcmac_tbf::tfi() const diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 3e17d8f..c716a55 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -1669,7 +1669,7 @@ ms2 = the_bts.ms_by_tlli(tlli1); OSMO_ASSERT(ms2 == ms1); OSMO_ASSERT(ms2->dl_tbf()); - OSMO_ASSERT(ms2->dl_tbf()->state_is(GPRS_RLCMAC_WAIT_ASSIGN)); + OSMO_ASSERT(ms2->dl_tbf()->state_is(GPRS_RLCMAC_ASSIGN)); dl_tbf2 = ms2->dl_tbf(); diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 0c9c877..8c6b78c 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -602,8 +602,7 @@ TX: START TBF(TFI=0 TLLI=0xc0000000 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 30 30 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 08 00 03 2b 2b 2b 2b -TBF(TFI=0 TLLI=0xc0000000 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xc0000000 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=0 TLLI=0xc0000000 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -629,8 +628,7 @@ TX: START TBF(TFI=1 TLLI=0xc0000001 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 30 31 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 18 40 03 2b 2b 2b 2b -TBF(TFI=1 TLLI=0xc0000001 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=1 TLLI=0xc0000001 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=1 TLLI=0xc0000001 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -656,8 +654,7 @@ TX: START TBF(TFI=2 TLLI=0xc0000002 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 30 32 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 28 80 03 2b 2b 2b 2b -TBF(TFI=2 TLLI=0xc0000002 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=2 TLLI=0xc0000002 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=2 TLLI=0xc0000002 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -683,8 +680,7 @@ TX: START TBF(TFI=3 TLLI=0xc0000003 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 30 33 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 38 c0 03 2b 2b 2b 2b -TBF(TFI=3 TLLI=0xc0000003 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=3 TLLI=0xc0000003 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=3 TLLI=0xc0000003 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -710,8 +706,7 @@ TX: START TBF(TFI=4 TLLI=0xc0000004 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 30 34 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 49 00 03 2b 2b 2b 2b -TBF(TFI=4 TLLI=0xc0000004 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=4 TLLI=0xc0000004 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=4 TLLI=0xc0000004 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -737,8 +732,7 @@ TX: START TBF(TFI=5 TLLI=0xc0000005 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 30 35 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 59 40 03 2b 2b 2b 2b -TBF(TFI=5 TLLI=0xc0000005 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=5 TLLI=0xc0000005 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=5 TLLI=0xc0000005 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -764,8 +758,7 @@ TX: START TBF(TFI=6 TLLI=0xc0000006 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 30 36 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 69 80 03 2b 2b 2b 2b -TBF(TFI=6 TLLI=0xc0000006 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=6 TLLI=0xc0000006 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=6 TLLI=0xc0000006 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -791,8 +784,7 @@ TX: START TBF(TFI=7 TLLI=0xc0000007 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 30 37 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 79 c0 03 2b 2b 2b 2b -TBF(TFI=7 TLLI=0xc0000007 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=7 TLLI=0xc0000007 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=7 TLLI=0xc0000007 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -818,8 +810,7 @@ TX: START TBF(TFI=8 TLLI=0xc0000008 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 30 38 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 8a 00 03 2b 2b 2b 2b -TBF(TFI=8 TLLI=0xc0000008 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=8 TLLI=0xc0000008 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=8 TLLI=0xc0000008 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -845,8 +836,7 @@ TX: START TBF(TFI=9 TLLI=0xc0000009 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 30 39 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 9a 40 03 2b 2b 2b 2b -TBF(TFI=9 TLLI=0xc0000009 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=9 TLLI=0xc0000009 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=9 TLLI=0xc0000009 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -872,8 +862,7 @@ TX: START TBF(TFI=10 TLLI=0xc000000a DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 31 30 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 aa 80 03 2b 2b 2b 2b -TBF(TFI=10 TLLI=0xc000000a DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=10 TLLI=0xc000000a DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=10 TLLI=0xc000000a DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -899,8 +888,7 @@ TX: START TBF(TFI=11 TLLI=0xc000000b DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 31 31 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 ba c0 03 2b 2b 2b 2b -TBF(TFI=11 TLLI=0xc000000b DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=11 TLLI=0xc000000b DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=11 TLLI=0xc000000b DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -926,8 +914,7 @@ TX: START TBF(TFI=12 TLLI=0xc000000c DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 31 32 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 cb 00 03 2b 2b 2b 2b -TBF(TFI=12 TLLI=0xc000000c DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=12 TLLI=0xc000000c DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=12 TLLI=0xc000000c DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -953,8 +940,7 @@ TX: START TBF(TFI=13 TLLI=0xc000000d DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 31 33 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 db 40 03 2b 2b 2b 2b -TBF(TFI=13 TLLI=0xc000000d DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=13 TLLI=0xc000000d DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=13 TLLI=0xc000000d DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -980,8 +966,7 @@ TX: START TBF(TFI=14 TLLI=0xc000000e DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 31 34 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 eb 80 03 2b 2b 2b 2b -TBF(TFI=14 TLLI=0xc000000e DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=14 TLLI=0xc000000e DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=14 TLLI=0xc000000e DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1007,8 +992,7 @@ TX: START TBF(TFI=15 TLLI=0xc000000f DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 31 35 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 fb c0 03 2b 2b 2b 2b -TBF(TFI=15 TLLI=0xc000000f DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=15 TLLI=0xc000000f DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=15 TLLI=0xc000000f DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1034,8 +1018,7 @@ TX: START TBF(TFI=16 TLLI=0xc0000010 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 31 36 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 0c 00 03 2b 2b 2b 2b -TBF(TFI=16 TLLI=0xc0000010 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=16 TLLI=0xc0000010 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=16 TLLI=0xc0000010 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1061,8 +1044,7 @@ TX: START TBF(TFI=17 TLLI=0xc0000011 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 31 37 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 1c 40 03 2b 2b 2b 2b -TBF(TFI=17 TLLI=0xc0000011 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=17 TLLI=0xc0000011 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=17 TLLI=0xc0000011 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1088,8 +1070,7 @@ TX: START TBF(TFI=18 TLLI=0xc0000012 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 31 38 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 2c 80 03 2b 2b 2b 2b -TBF(TFI=18 TLLI=0xc0000012 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=18 TLLI=0xc0000012 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=18 TLLI=0xc0000012 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1115,8 +1096,7 @@ TX: START TBF(TFI=19 TLLI=0xc0000013 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 31 39 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 3c c0 03 2b 2b 2b 2b -TBF(TFI=19 TLLI=0xc0000013 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=19 TLLI=0xc0000013 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=19 TLLI=0xc0000013 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1142,8 +1122,7 @@ TX: START TBF(TFI=20 TLLI=0xc0000014 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 32 30 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 4d 00 03 2b 2b 2b 2b -TBF(TFI=20 TLLI=0xc0000014 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=20 TLLI=0xc0000014 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=20 TLLI=0xc0000014 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1169,8 +1148,7 @@ TX: START TBF(TFI=21 TLLI=0xc0000015 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 32 31 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 5d 40 03 2b 2b 2b 2b -TBF(TFI=21 TLLI=0xc0000015 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=21 TLLI=0xc0000015 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=21 TLLI=0xc0000015 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1196,8 +1174,7 @@ TX: START TBF(TFI=22 TLLI=0xc0000016 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 32 32 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 6d 80 03 2b 2b 2b 2b -TBF(TFI=22 TLLI=0xc0000016 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=22 TLLI=0xc0000016 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=22 TLLI=0xc0000016 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1223,8 +1200,7 @@ TX: START TBF(TFI=23 TLLI=0xc0000017 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 32 33 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 7d c0 03 2b 2b 2b 2b -TBF(TFI=23 TLLI=0xc0000017 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=23 TLLI=0xc0000017 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=23 TLLI=0xc0000017 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1250,8 +1226,7 @@ TX: START TBF(TFI=24 TLLI=0xc0000018 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 32 34 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 8e 00 03 2b 2b 2b 2b -TBF(TFI=24 TLLI=0xc0000018 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=24 TLLI=0xc0000018 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=24 TLLI=0xc0000018 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1277,8 +1252,7 @@ TX: START TBF(TFI=25 TLLI=0xc0000019 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 32 35 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 9e 40 03 2b 2b 2b 2b -TBF(TFI=25 TLLI=0xc0000019 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=25 TLLI=0xc0000019 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=25 TLLI=0xc0000019 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1304,8 +1278,7 @@ TX: START TBF(TFI=26 TLLI=0xc000001a DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 32 36 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 ae 80 03 2b 2b 2b 2b -TBF(TFI=26 TLLI=0xc000001a DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=26 TLLI=0xc000001a DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=26 TLLI=0xc000001a DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1331,8 +1304,7 @@ TX: START TBF(TFI=27 TLLI=0xc000001b DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 32 37 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 be c0 03 2b 2b 2b 2b -TBF(TFI=27 TLLI=0xc000001b DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=27 TLLI=0xc000001b DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=27 TLLI=0xc000001b DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1358,8 +1330,7 @@ TX: START TBF(TFI=28 TLLI=0xc000001c DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 32 38 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 cf 00 03 2b 2b 2b 2b -TBF(TFI=28 TLLI=0xc000001c DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=28 TLLI=0xc000001c DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=28 TLLI=0xc000001c DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1385,8 +1356,7 @@ TX: START TBF(TFI=29 TLLI=0xc000001d DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 32 39 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 df 40 03 2b 2b 2b 2b -TBF(TFI=29 TLLI=0xc000001d DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=29 TLLI=0xc000001d DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=29 TLLI=0xc000001d DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1412,8 +1382,7 @@ TX: START TBF(TFI=30 TLLI=0xc000001e DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 33 30 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 ef 80 03 2b 2b 2b 2b -TBF(TFI=30 TLLI=0xc000001e DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=30 TLLI=0xc000001e DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=30 TLLI=0xc000001e DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1439,8 +1408,7 @@ TX: START TBF(TFI=31 TLLI=0xc000001f DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 33 31 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 ff c0 03 2b 2b 2b 2b -TBF(TFI=31 TLLI=0xc000001f DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=31 TLLI=0xc000001f DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=31 TLLI=0xc000001f DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1474,11 +1442,10 @@ TX: START TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=34 35 36 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 01 23 45 68 00 03 2b 2b 2b 2b -TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) append Modifying MS object, TLLI = 0xc0123456, TA 220 -> 0 -TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN) append -TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN) changes state from WAIT ASSIGN to RELEASING +TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) append +TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) changes state from ASSIGN to RELEASING TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=RELEASING) free PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=RELEASING), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xc0123456, TBF = TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=RELEASING) @@ -1504,37 +1471,36 @@ TX: START TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=0 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=34 35 36 2d 06 3f 30 0c 00 00 7d 80 00 00 00 dc 01 23 45 68 00 23 2b 2b 2b 2b -TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN) append -TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN) downlink (V(A)==0 .. V(S)==0) +TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) append +TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) downlink (V(A)==0 .. V(S)==0) - Sending new block at BSN 0, CS=CS-1 -- Dequeue next LLC for TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN) (len=19) +- Dequeue next LLC for TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) (len=19) -- Chunk with length 19 is less than remaining space (20): add length header to to delimit LLC frame -- No space left, so we are done. -Complete DL frame for TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN)len=19 -- Dequeue next LLC for TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN) (len=19) +Complete DL frame for TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN)len=19 +- Dequeue next LLC for TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) (len=19) data block (BSN 0, CS-1): 4d 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 - need_padding 0 spb_status 0 spb 0(BSN1 0 BSN2 -1) - Copying data unit 0 (BSN 0) msg block (BSN 0, CS-1): 07 00 00 4d 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 MSG = 07 00 00 4d 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN) downlink (V(A)==0 .. V(S)==1) +TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) downlink (V(A)==0 .. V(S)==1) - Sending new block at BSN 1, CS=CS-1 -- Chunk with length 19 is less than remaining space (20): add length header to to delimit LLC frame -- No space left, so we are done. -Complete DL frame for TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN)len=19 -- Dequeue next LLC for TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN) (len=19) +Complete DL frame for TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN)len=19 +- Dequeue next LLC for TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) (len=19) data block (BSN 1, CS-1): 4d 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 - need_padding 0 spb_status 0 spb 0(BSN1 1 BSN2 -1) - Copying data unit 0 (BSN 1) msg block (BSN 1, CS-1): 07 00 02 4d 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 MSG = 07 00 02 4d 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN) downlink (V(A)==0 .. V(S)==2) +TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) downlink (V(A)==0 .. V(S)==2) - Sending new block at BSN 2, CS=CS-1 -- Chunk with length 19 is less than remaining space (20): add length header to to delimit LLC frame -- Final block, so we done. -Complete DL frame for TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN)len=19 -TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN) changes state from WAIT ASSIGN to FINISHED +Complete DL frame for TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN)len=19 +TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) changes state from ASSIGN to FINISHED data block (BSN 2, CS-1): 4d 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 - need_padding 0 spb_status 0 spb 0(BSN1 2 BSN2 -1) - Copying data unit 0 (BSN 2) @@ -1569,26 +1535,29 @@ 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 03 8b 29 07 00 c8 00 10 0b 2b 2b 2b 2b 2b 2b 2b -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) changes state from FLOW to WAIT ASSIGN Got RLC block, coding scheme: CS-1, length: 23 (23)) UL data: 00 01 01 f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=WAIT ASSIGN) restarting timer 3169 while old timer 3169 pending -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=WAIT ASSIGN): Got CS-1 RLC data block: CV=0, BSN=0, SPB=0, PI=0, E=1, TI=1, bitoffs=24 +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=0, BSN=0, SPB=0, PI=0, E=1, TI=1, bitoffs=24 - BSN 0 storing in window (0..63) -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=WAIT ASSIGN): data_length=20, data=f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): data_length=20, data=f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Decoded premier TLLI=0x00000000 of UL DATA TFI=0. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed - Raising V(R) to 1 - Taking block 0 out, raising V(Q) to 1 - Assembling frames: (len=20) -- Frame 1 starts at offset 4, length=16, is_complete=1 -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) complete UL frame len=16 -LLC [PCU -> SGSN] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) len=16 +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) complete UL frame len=16 +LLC [PCU -> SGSN] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) len=16 No bctx +- No gaps in received block, last block: BSN=0 CV=0 +- Finished with UL TBF +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) changes state from FLOW to FINISHED - Scheduling Ack/Nack, because TLLI is included. -Got 'TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN)', TA=7 +- Scheduling Ack/Nack, because last block has CV==0. +Got 'TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FINISHED)', TA=7 Got MS: TLLI = 0xf1223344, TA = 7 ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=0/0 @@ -1613,8 +1582,7 @@ TX: START TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=7 TA=7 pollFN=-1 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) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT ASSIGN) append +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: MS requests single block allocation @@ -1654,16 +1622,15 @@ +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN): Scheduling polling at FN 2654283 TS 7 -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) Scheduled UL Assignment polling on FN=2654283, TS=7 -Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) (TRX=0, TS=7) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) Scheduled UL Assignment polling on FN=2654283, TS=7 +Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) (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 8f 1d 00 00 88 00 08 2b 2b 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=WAIT ASSIGN) Packet Control Ack -TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) changes state from WAIT ASSIGN to FLOW +RX: [PCU <- BTS] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) Packet Control Ack +TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got RLC block, coding scheme: CS-1, length: 23 (23)) UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 @@ -1740,16 +1707,15 @@ +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN): Scheduling polling at FN 2654283 TS 7 -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) Scheduled UL Assignment polling on FN=2654283, TS=7 -Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) (TRX=0, TS=7) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) Scheduled UL Assignment polling on FN=2654283, TS=7 +Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) (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 8f 1d 00 00 88 00 08 2b 2b 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=WAIT ASSIGN) Packet Control Ack -TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) changes state from WAIT ASSIGN to FLOW +RX: [PCU <- BTS] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) Packet Control Ack +TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got RLC block, coding scheme: CS-1, length: 23 (23)) UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 @@ -1792,7 +1758,6 @@ +++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Downlink Assignment ------------------------- TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Scheduling polling at FN 2654288 TS 7 -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Scheduled DL Assignment polling on FN=2654288, TS=7 Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) (TRX=0, TS=7) Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654275 block=9 data=48 08 00 00 0c 72 00 02 08 00 80 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b @@ -1801,7 +1766,7 @@ ------------------------- RX : Uplink Control Block ------------------------- RX: [PCU <- BTS] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Packet Control Ack TBF: [UPLINK] DOWNLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT ASSIGN) changes state from WAIT ASSIGN to FLOW +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to FLOW TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FLOW) stopping timer 0. Received RTS on disabled PDCH: TRX=0 TS=0 Received RTS on disabled PDCH: TRX=0 TS=1 @@ -1881,16 +1846,15 @@ +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN): Scheduling polling at FN 2654348 TS 7 -TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=WAIT ASSIGN) Scheduled UL Assignment polling on FN=2654348, TS=7 -Scheduling control message at RTS for TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=WAIT ASSIGN) (TRX=0, TS=7) +TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) Scheduled UL Assignment polling on FN=2654348, TS=7 +Scheduling control message at RTS for TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) (TRX=0, TS=7) Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654335 block=11 data=48 28 5e ac ce f1 0f 1d 00 00 88 40 09 2b 2b 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=1 TLLI=0xf5667788 DIR=UL STATE=WAIT ASSIGN) Packet Control Ack -TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=WAIT ASSIGN) -TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=WAIT ASSIGN) changes state from WAIT ASSIGN to FLOW +RX: [PCU <- BTS] TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) Packet Control Ack +TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) +TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got RLC block, coding scheme: CS-1, length: 23 (23)) UL data: 3c 02 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=1, CPS=0, RSB=0, rc=184 @@ -1953,16 +1917,15 @@ +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN): Scheduling polling at FN 2654283 TS 7 -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) Scheduled UL Assignment polling on FN=2654283, TS=7 -Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) (TRX=0, TS=7) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) Scheduled UL Assignment polling on FN=2654283, TS=7 +Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) (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 83 1d 00 00 88 00 08 2b 2b 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=WAIT ASSIGN) Packet Control Ack -TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) changes state from WAIT ASSIGN to FLOW +RX: [PCU <- BTS] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) Packet Control Ack +TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got RLC block, coding scheme: CS-1, length: 23 (23)) UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 @@ -2050,16 +2013,15 @@ +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN): Scheduling polling at FN 2654340 TS 7 -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) Scheduled UL Assignment polling on FN=2654340, TS=7 -Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) (TRX=0, TS=7) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) Scheduled UL Assignment polling on FN=2654340, TS=7 +Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) (TRX=0, TS=7) Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654327 block=9 data=4f 28 5e 24 46 68 83 1d 00 00 88 00 08 2b 2b 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=WAIT ASSIGN) Packet Control Ack -TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) changes state from WAIT ASSIGN to FLOW +RX: [PCU <- BTS] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) Packet Control Ack +TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=1/0 Slot Allocation (Algorithm A) for class 1 @@ -2132,16 +2094,15 @@ +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN): Scheduling polling at FN 2654283 TS 7 -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) Scheduled UL Assignment polling on FN=2654283, TS=7 -Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) (TRX=0, TS=7) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) Scheduled UL Assignment polling on FN=2654283, TS=7 +Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) (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 83 1d 00 00 88 00 08 2b 2b 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=WAIT ASSIGN) Packet Control Ack -TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) changes state from WAIT ASSIGN to FLOW +RX: [PCU <- BTS] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) Packet Control Ack +TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got RLC block, coding scheme: CS-1, length: 23 (23)) UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 @@ -2214,15 +2175,14 @@ 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 03 8b ed 07 00 c8 00 10 0b 2b 2b 2b 2b 2b 2b 2b -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) changes state from FLOW to WAIT ASSIGN Got RLC block, coding scheme: CS-1, length: 23 (23)) UL data: 00 01 01 f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=WAIT ASSIGN) restarting timer 3169 while old timer 3169 pending -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=WAIT ASSIGN): Got CS-1 RLC data block: CV=0, BSN=0, SPB=0, PI=0, E=1, TI=1, bitoffs=24 +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=0, BSN=0, SPB=0, PI=0, E=1, TI=1, bitoffs=24 - BSN 0 storing in window (0..63) -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=WAIT ASSIGN): data_length=20, data=f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): data_length=20, data=f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Decoded premier TLLI=0x00000000 of UL DATA TFI=0. Got RACH from TLLI=0x00000000 while TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) still exists. Killing pending DL TBF TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to RELEASING @@ -2240,10 +2200,14 @@ - Taking block 0 out, raising V(Q) to 1 - Assembling frames: (len=20) -- Frame 1 starts at offset 4, length=16, is_complete=1 -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) complete UL frame len=16 -LLC [PCU -> SGSN] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) len=16 +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) complete UL frame len=16 +LLC [PCU -> SGSN] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) len=16 No bctx +- No gaps in received block, last block: BSN=0 CV=0 +- Finished with UL TBF +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) changes state from FLOW to FINISHED - Scheduling Ack/Nack, because TLLI is included. +- 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: @@ -2284,16 +2248,15 @@ +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN): Scheduling polling at FN 2654283 TS 7 -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) Scheduled UL Assignment polling on FN=2654283, TS=7 -Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) (TRX=0, TS=7) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) Scheduled UL Assignment polling on FN=2654283, TS=7 +Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) (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 83 1d 00 00 88 00 08 2b 2b 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=WAIT ASSIGN) Packet Control Ack -TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) changes state from WAIT ASSIGN to FLOW +RX: [PCU <- BTS] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) Packet Control Ack +TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got RLC block, coding scheme: CS-1, length: 23 (23)) UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 @@ -2375,7 +2338,6 @@ +++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Downlink Assignment ------------------------- TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Scheduling polling at FN 2654288 TS 7 -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Scheduled DL Assignment polling on FN=2654288, TS=7 Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) (TRX=0, TS=7) Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654275 block=9 data=48 08 00 00 0c 72 00 02 08 00 80 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b @@ -2384,7 +2346,7 @@ ------------------------- RX : Uplink Control Block ------------------------- RX: [PCU <- BTS] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Packet Control Ack TBF: [UPLINK] DOWNLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT ASSIGN) changes state from WAIT ASSIGN to FLOW +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to FLOW TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FLOW) stopping timer 0. Received RTS on disabled PDCH: TRX=0 TS=0 Received RTS on disabled PDCH: TRX=0 TS=1 @@ -3063,7 +3025,6 @@ +++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Downlink Assignment ------------------------- TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT RELEASE): Scheduling polling at FN 2654413 TS 7 -TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT RELEASE) Scheduled DL Assignment polling on FN=2654413, TS=7 Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT RELEASE) (TRX=0, TS=7) Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654400 block=2 data=48 08 20 08 0c 72 00 02 18 00 80 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b @@ -3078,7 +3039,7 @@ PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING), 1 TBFs, USFs = 01, TFIs = 00000002. Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) ********** TBF ends here ********** -TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=WAIT ASSIGN) changes state from WAIT ASSIGN to FLOW +TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to FLOW TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FLOW) stopping timer 0. Received RTS on disabled PDCH: TRX=0 TS=0 Received RTS on disabled PDCH: TRX=0 TS=1 @@ -3425,16 +3386,15 @@ +++++++++++++++++++++++++ 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) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT 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=WAIT ASSIGN EGPRS) (TRX=0, 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 f8 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=WAIT ASSIGN EGPRS) Packet Control Ack -TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN EGPRS) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN EGPRS) changes state from WAIT ASSIGN to FLOW +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: CS-1, length: 23 (23)) UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 @@ -3518,16 +3478,15 @@ +++++++++++++++++++++++++ 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) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT 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=WAIT ASSIGN EGPRS) (TRX=0, 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 f8 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=WAIT ASSIGN EGPRS) Packet Control Ack -TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN EGPRS) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN EGPRS) changes state from WAIT ASSIGN to FLOW +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: CS-1, length: 23 (23)) UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 @@ -6281,16 +6240,15 @@ +++++++++++++++++++++++++ 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) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT 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=WAIT ASSIGN EGPRS) (TRX=0, 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 f8 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=WAIT ASSIGN EGPRS) Packet Control Ack -TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN EGPRS) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN EGPRS) changes state from WAIT ASSIGN to FLOW +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: CS-1, length: 23 (23)) UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 @@ -6454,16 +6412,15 @@ +++++++++++++++++++++++++ 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) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT 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=WAIT ASSIGN EGPRS) (TRX=0, 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 f8 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=WAIT ASSIGN EGPRS) Packet Control Ack -TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN EGPRS) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN EGPRS) changes state from WAIT ASSIGN to FLOW +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: 1d 00 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 00 00 00 00 00 00 00 Got MCS-4 RLC block: R=1, SI=0, TFI=0, CPS=5, RSB=0, rc=385 -- To view, visit https://gerrit.osmocom.org/218 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1532f8e93194368cdc1e3846f82afa6d68cd5fbd Gerrit-PatchSet: 5 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Anonymous Coward #1000055 Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Oct 18 12:52:13 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 12:52:13 +0000 Subject: osmo-gsm-manuals[master]: jenkins.sh: call 'make check' In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/1095/3//COMMIT_MSG Commit Message: PS3, Line 9: target > too long text. Please try to wrap it with email standards (IIRC < 80?) this line has 79 characters ... ? I always use vim's line wrapping. Should I reduce to, what, 75? -- To view, visit https://gerrit.osmocom.org/1095 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4e1a15b7a7ed50637b1c020dcd962f42d3ced08f Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals 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 Oct 18 12:55:39 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 18 Oct 2016 12:55:39 +0000 Subject: osmo-gsm-manuals[master]: OsmoBTS/abis/rsl: cosmetic: 'IPA style' In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 For changes like these I always think.. let's introduce some "banned/wrong" words and check they don't occur in our docs. -- To view, visit https://gerrit.osmocom.org/1086 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I91112c2d8af9424ebe7e1972fd4ef9c77d24a7b4 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 Oct 18 12:55:56 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 18 Oct 2016 12:55:56 +0000 Subject: osmo-gsm-manuals[master]: OsmoBTS/chapters/configuration.adoc: fix index numbering In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1085 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibe507fe36e0130377dec361d56fd75596ca64e75 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 Oct 18 12:56:19 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 18 Oct 2016 12:56:19 +0000 Subject: osmo-gsm-manuals[master]: osmobts-usermanual.adoc: fix link to abis.adoc chapter In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1084 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I698d83e96cb77900b99a0bd383587b1b68182efb 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 Oct 18 12:56:41 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 18 Oct 2016 12:56:41 +0000 Subject: osmo-gsm-manuals[master]: OsmoBTS/chapters/dynamic-timeslots.adoc: Remove obsolete links In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1083 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icbae85b959e80afe7f272a11f33064a3e594da53 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 Oct 18 13:03:29 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 18 Oct 2016 13:03:29 +0000 Subject: osmo-gsm-manuals[master]: add 'make check' target In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/1089/2/build/Makefile.asciidoc.inc File build/Makefile.asciidoc.inc: Line 40: @grep WARNING $@ && exit 1 || exit 0 @grep -v WARNING $@ might already be enough.. and you used "" for touch.. do you want to be consistent in the quoting? -- To view, visit https://gerrit.osmocom.org/1089 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibccc83a3415930a528f2e8e4e4dda3b81c6d0b64 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: Yes From gerrit-no-reply at lists.osmocom.org Tue Oct 18 13:07:00 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 18 Oct 2016 13:07:00 +0000 Subject: osmo-gsm-manuals[master]: fix 'make clean': shell glob, ignore failure In-Reply-To: References: Message-ID: Patch Set 3: What error do you get? or the file not being removed? -- To view, visit https://gerrit.osmocom.org/1096 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6bc4d9ea72b43a573acbc860c23397f748de2c7b Gerrit-PatchSet: 3 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 Oct 18 13:07:16 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 18 Oct 2016 13:07:16 +0000 Subject: osmo-gsm-manuals[master]: jenkins.sh: use sh instead of bash In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1100 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia65e960dc7d74e6bb7a2463316d09622e9788c97 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 Oct 18 13:07:39 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 18 Oct 2016 13:07:39 +0000 Subject: osmo-gsm-manuals[master]: OsmoBTS/abis/rsl: combine separate dyn ts sections In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1090 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic370ba34de5cb14f0194ff8c8661e45d7ca98e2b 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 Oct 18 13:09:16 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 18 Oct 2016 13:09:16 +0000 Subject: osmo-gsm-manuals[master]: make clean: also remove generated image files In-Reply-To: References: Message-ID: Patch Set 2: rebase and squash with the "fix"? -- To view, visit https://gerrit.osmocom.org/1088 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I80798e79b4ccee64f26f58f9754de02b2958e33e 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 Oct 18 13:09:58 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 18 Oct 2016 13:09:58 +0000 Subject: osmo-gsm-manuals[master]: OsmoBTS/abis/rsl: add missing info for Osmocom Dyn Channels In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1087 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib92895fe1bb89fb1b14dc8fcbd88b98bbb6edeee 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 Oct 18 13:11:58 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 13:11:58 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: add 'make check' target 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/1089 to look at the new patch set (#3). add 'make check' target Generate *.check files from asciidoc output and grep for WARNINGs. Add *.check files to gitignore and to 'make clean'. Change-Id: Ibccc83a3415930a528f2e8e4e4dda3b81c6d0b64 --- M .gitignore M Makefile M OsmoBSC/Makefile M OsmoBTS/Makefile M OsmoNITB/Makefile M OsmoPCU/Makefile M OsmoSGSN/Makefile M build/Makefile.asciidoc.inc 8 files changed, 27 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/89/1089/3 diff --git a/.gitignore b/.gitignore index 6455215..67c2f69 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ *.html *__*.png *__*.svg +*.check generated/ diff --git a/Makefile b/Makefile index cfe7fc0..9110013 100644 --- a/Makefile +++ b/Makefile @@ -24,3 +24,12 @@ cd OsmoSGSN; $(MAKE) upload cd OsmoNAT; $(MAKE) upload cd OsmoPCU; $(MAKE) upload + +check: + cd OsmoBTS; $(MAKE) check + cd OsmoNITB; $(MAKE) check + cd OsmoBSC; $(MAKE) check + #cd OsmoMGCP; $(MAKE) check + cd OsmoSGSN; $(MAKE) check + #cd OsmoNAT; $(MAKE) check + cd OsmoPCU; $(MAKE) check diff --git a/OsmoBSC/Makefile b/OsmoBSC/Makefile index fb5e269..9fc6f26 100644 --- a/OsmoBSC/Makefile +++ b/OsmoBSC/Makefile @@ -24,7 +24,7 @@ clean: rm -rf $(cleanfiles) - rm -rf osmobsc-usermanual__*.{svg,png} + rm -rf osmobsc-usermanual__*.{svg,png,check} gen-bsc-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoBTS/Makefile b/OsmoBTS/Makefile index 5ef9afa..0587de8 100644 --- a/OsmoBTS/Makefile +++ b/OsmoBTS/Makefile @@ -12,5 +12,5 @@ clean: rm -rf $(cleanfiles) - rm -rf osmobts-abis__*.{svg,png} - rm -rf osmobts-usermanual__*.{svg,png} + rm -rf osmobts-abis__*.{svg,png,check} + rm -rf osmobts-usermanual__*.{svg,png,check} diff --git a/OsmoNITB/Makefile b/OsmoNITB/Makefile index d3bf5c8..e68b9b0 100644 --- a/OsmoNITB/Makefile +++ b/OsmoNITB/Makefile @@ -23,7 +23,7 @@ clean: rm -rf $(cleanfiles) - rm -rf osmonitb-usermanual__*.{svg,png} + rm -rf osmonitb-usermanual__*.{svg,png,check} gen-nitb-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoPCU/Makefile b/OsmoPCU/Makefile index 6b4ecb8..1f06183 100644 --- a/OsmoPCU/Makefile +++ b/OsmoPCU/Makefile @@ -25,7 +25,7 @@ clean: rm -rf $(cleanfiles) rm -rf gen-vty-docbook - rm -rf osmopcu-usermanual__*.{svg,png} + rm -rf osmopcu-usermanual__*.{svg,png,check} gen-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoSGSN/Makefile b/OsmoSGSN/Makefile index 612c10f..7df5168 100644 --- a/OsmoSGSN/Makefile +++ b/OsmoSGSN/Makefile @@ -22,7 +22,7 @@ osmosgsn-usermanual.pdf: chapters/*.adoc clean: - rm -rf osmosgsn-usermanual__*.{svg,png} + rm -rf osmosgsn-usermanual__*.{svg,png,check} rm -rf $(cleanfiles) gen-sgsn-vty-docbook: FORCE diff --git a/build/Makefile.asciidoc.inc b/build/Makefile.asciidoc.inc index 7def592..f95cd0b 100644 --- a/build/Makefile.asciidoc.inc +++ b/build/Makefile.asciidoc.inc @@ -9,6 +9,7 @@ # generate list of PDFs that we're supposed to render ASCIIDOCPDFS = $(ASCIIDOCS:%=%.pdf) +ASCIIDOC_CHECKS = $(ASCIIDOCS:%=%.check) ASCIIDOCSTYLE ?= $(BUILDDIR)/custom-dblatex.sty @@ -30,3 +31,13 @@ $(ASCIIDOCPDFS): %.pdf: %.adoc %-docinfo.xml $(ASCIIDOCSTYLE) $(TOPDIR)/common/chapters/*.adoc a2x $(A2X_OPTS) $< || asciidoc -f $(BUILDDIR)/mscgen-filter.conf -f $(BUILDDIR)/diag-filter.conf $< + +check: $(ASCIIDOC_CHECKS) + +$(ASCIIDOC_CHECKS): %.check: %.adoc %-docinfo.xml $(ASCIIDOCSTYLE) $(TOPDIR)/common/chapters/*.adoc chapters/*.adoc + asciidoc -v $(ASCIIDOC_OPTS) $< > $@ 2>&1 + # Make absolutely sure that the %.check target is updated. + touch $@ + # Do print the WARNING output but return error if any was found + # (grep -v would omit the WARNING output from the log). + @grep WARNING $@ && exit 1 || exit 0 -- To view, visit https://gerrit.osmocom.org/1089 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibccc83a3415930a528f2e8e4e4dda3b81c6d0b64 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 18 13:17:58 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 13:17:58 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: make clean: also remove generated image files In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1088 to look at the new patch set (#3). make clean: also remove generated image files Change-Id: I80798e79b4ccee64f26f58f9754de02b2958e33e --- M OsmoBSC/Makefile M OsmoBTS/Makefile M OsmoNITB/Makefile M OsmoPCU/Makefile 4 files changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/88/1088/3 diff --git a/OsmoBSC/Makefile b/OsmoBSC/Makefile index e2c464c..fb5e269 100644 --- a/OsmoBSC/Makefile +++ b/OsmoBSC/Makefile @@ -24,6 +24,7 @@ clean: rm -rf $(cleanfiles) + rm -rf osmobsc-usermanual__*.{svg,png} gen-bsc-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoBTS/Makefile b/OsmoBTS/Makefile index 092856d..5ef9afa 100644 --- a/OsmoBTS/Makefile +++ b/OsmoBTS/Makefile @@ -12,3 +12,5 @@ clean: rm -rf $(cleanfiles) + rm -rf osmobts-abis__*.{svg,png} + rm -rf osmobts-usermanual__*.{svg,png} diff --git a/OsmoNITB/Makefile b/OsmoNITB/Makefile index 29d9c51..d3bf5c8 100644 --- a/OsmoNITB/Makefile +++ b/OsmoNITB/Makefile @@ -23,6 +23,7 @@ clean: rm -rf $(cleanfiles) + rm -rf osmonitb-usermanual__*.{svg,png} gen-nitb-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoPCU/Makefile b/OsmoPCU/Makefile index ef80327..6b4ecb8 100644 --- a/OsmoPCU/Makefile +++ b/OsmoPCU/Makefile @@ -25,6 +25,7 @@ clean: rm -rf $(cleanfiles) rm -rf gen-vty-docbook + rm -rf osmopcu-usermanual__*.{svg,png} gen-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ -- To view, visit https://gerrit.osmocom.org/1088 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I80798e79b4ccee64f26f58f9754de02b2958e33e Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 18 13:17:58 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 13:17:58 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: add 'make check' target 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/1089 to look at the new patch set (#4). add 'make check' target Generate *.check files from asciidoc output and grep for WARNINGs. Add *.check files to gitignore and to 'make clean'. Change-Id: Ibccc83a3415930a528f2e8e4e4dda3b81c6d0b64 --- M .gitignore M Makefile M OsmoBSC/Makefile M OsmoBTS/Makefile M OsmoNITB/Makefile M OsmoPCU/Makefile M OsmoSGSN/Makefile M build/Makefile.asciidoc.inc 8 files changed, 27 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/89/1089/4 diff --git a/.gitignore b/.gitignore index 6455215..67c2f69 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ *.html *__*.png *__*.svg +*.check generated/ diff --git a/Makefile b/Makefile index cfe7fc0..9110013 100644 --- a/Makefile +++ b/Makefile @@ -24,3 +24,12 @@ cd OsmoSGSN; $(MAKE) upload cd OsmoNAT; $(MAKE) upload cd OsmoPCU; $(MAKE) upload + +check: + cd OsmoBTS; $(MAKE) check + cd OsmoNITB; $(MAKE) check + cd OsmoBSC; $(MAKE) check + #cd OsmoMGCP; $(MAKE) check + cd OsmoSGSN; $(MAKE) check + #cd OsmoNAT; $(MAKE) check + cd OsmoPCU; $(MAKE) check diff --git a/OsmoBSC/Makefile b/OsmoBSC/Makefile index fb5e269..9fc6f26 100644 --- a/OsmoBSC/Makefile +++ b/OsmoBSC/Makefile @@ -24,7 +24,7 @@ clean: rm -rf $(cleanfiles) - rm -rf osmobsc-usermanual__*.{svg,png} + rm -rf osmobsc-usermanual__*.{svg,png,check} gen-bsc-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoBTS/Makefile b/OsmoBTS/Makefile index 5ef9afa..0587de8 100644 --- a/OsmoBTS/Makefile +++ b/OsmoBTS/Makefile @@ -12,5 +12,5 @@ clean: rm -rf $(cleanfiles) - rm -rf osmobts-abis__*.{svg,png} - rm -rf osmobts-usermanual__*.{svg,png} + rm -rf osmobts-abis__*.{svg,png,check} + rm -rf osmobts-usermanual__*.{svg,png,check} diff --git a/OsmoNITB/Makefile b/OsmoNITB/Makefile index d3bf5c8..e68b9b0 100644 --- a/OsmoNITB/Makefile +++ b/OsmoNITB/Makefile @@ -23,7 +23,7 @@ clean: rm -rf $(cleanfiles) - rm -rf osmonitb-usermanual__*.{svg,png} + rm -rf osmonitb-usermanual__*.{svg,png,check} gen-nitb-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoPCU/Makefile b/OsmoPCU/Makefile index 6b4ecb8..1f06183 100644 --- a/OsmoPCU/Makefile +++ b/OsmoPCU/Makefile @@ -25,7 +25,7 @@ clean: rm -rf $(cleanfiles) rm -rf gen-vty-docbook - rm -rf osmopcu-usermanual__*.{svg,png} + rm -rf osmopcu-usermanual__*.{svg,png,check} gen-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoSGSN/Makefile b/OsmoSGSN/Makefile index 612c10f..7df5168 100644 --- a/OsmoSGSN/Makefile +++ b/OsmoSGSN/Makefile @@ -22,7 +22,7 @@ osmosgsn-usermanual.pdf: chapters/*.adoc clean: - rm -rf osmosgsn-usermanual__*.{svg,png} + rm -rf osmosgsn-usermanual__*.{svg,png,check} rm -rf $(cleanfiles) gen-sgsn-vty-docbook: FORCE diff --git a/build/Makefile.asciidoc.inc b/build/Makefile.asciidoc.inc index 7def592..f95cd0b 100644 --- a/build/Makefile.asciidoc.inc +++ b/build/Makefile.asciidoc.inc @@ -9,6 +9,7 @@ # generate list of PDFs that we're supposed to render ASCIIDOCPDFS = $(ASCIIDOCS:%=%.pdf) +ASCIIDOC_CHECKS = $(ASCIIDOCS:%=%.check) ASCIIDOCSTYLE ?= $(BUILDDIR)/custom-dblatex.sty @@ -30,3 +31,13 @@ $(ASCIIDOCPDFS): %.pdf: %.adoc %-docinfo.xml $(ASCIIDOCSTYLE) $(TOPDIR)/common/chapters/*.adoc a2x $(A2X_OPTS) $< || asciidoc -f $(BUILDDIR)/mscgen-filter.conf -f $(BUILDDIR)/diag-filter.conf $< + +check: $(ASCIIDOC_CHECKS) + +$(ASCIIDOC_CHECKS): %.check: %.adoc %-docinfo.xml $(ASCIIDOCSTYLE) $(TOPDIR)/common/chapters/*.adoc chapters/*.adoc + asciidoc -v $(ASCIIDOC_OPTS) $< > $@ 2>&1 + # Make absolutely sure that the %.check target is updated. + touch $@ + # Do print the WARNING output but return error if any was found + # (grep -v would omit the WARNING output from the log). + @grep WARNING $@ && exit 1 || exit 0 -- To view, visit https://gerrit.osmocom.org/1089 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibccc83a3415930a528f2e8e4e4dda3b81c6d0b64 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 18 13:17:58 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 13:17:58 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoBTS/abis/rsl.adoc: fix missing section header In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1082 to look at the new patch set (#3). OsmoBTS/abis/rsl.adoc: fix missing section header In effect, this fixes the dangling references from the table of RSL messages with additions/limitations to the Chan Act message description. Change-Id: Ic6f83f016ce9ec90af7eb0af1b1f71a10263915d --- M OsmoBTS/abis/rsl.adoc 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/82/1082/3 diff --git a/OsmoBTS/abis/rsl.adoc b/OsmoBTS/abis/rsl.adoc index a78afc5..827e353 100644 --- a/OsmoBTS/abis/rsl.adoc +++ b/OsmoBTS/abis/rsl.adoc @@ -118,6 +118,7 @@ === Message Limitation Details [[CHANNEL_ACTIVATION]] +==== Channel Activation When used on a timeslot using the non-standard channel combination 'NM_CHANC_OSMO_TCHFull_TCHHalf_PDCH' as configured by OML, the regular -- To view, visit https://gerrit.osmocom.org/1082 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic6f83f016ce9ec90af7eb0af1b1f71a10263915d Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 18 13:17:58 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 13:17:58 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoBTS/chapters/dynamic-timeslots.adoc: Remove obsolete links 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/1083 to look at the new patch set (#3). OsmoBTS/chapters/dynamic-timeslots.adoc: Remove obsolete links Those file never existed and the ladder diagrams are instead at OsmoBTS/abis/dyn_ts*msc. Change-Id: Icbae85b959e80afe7f272a11f33064a3e594da53 --- M OsmoBTS/chapters/dynamic-timeslots.adoc 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/83/1083/3 diff --git a/OsmoBTS/chapters/dynamic-timeslots.adoc b/OsmoBTS/chapters/dynamic-timeslots.adoc index 68d6fe1..29dff5b 100644 --- a/OsmoBTS/chapters/dynamic-timeslots.adoc +++ b/OsmoBTS/chapters/dynamic-timeslots.adoc @@ -15,7 +15,3 @@ * _osmo-bts-trx_ See also <>. - -include::../../common/snippets/dyn_pdch_ladder.adoc[] - -include::../../common/snippets/dyn_ts_ladder_TCH_H.adoc[] -- To view, visit https://gerrit.osmocom.org/1083 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Icbae85b959e80afe7f272a11f33064a3e594da53 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 18 13:17:58 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 13:17:58 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: osmobts-usermanual.adoc: fix link to abis.adoc chapter 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/1084 to look at the new patch set (#3). osmobts-usermanual.adoc: fix link to abis.adoc chapter The chapter is in ../common/chapters, not in ./chapters Change-Id: I698d83e96cb77900b99a0bd383587b1b68182efb --- M OsmoBTS/osmobts-usermanual.adoc 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/84/1084/3 diff --git a/OsmoBTS/osmobts-usermanual.adoc b/OsmoBTS/osmobts-usermanual.adoc index a05becd..4d47b1c 100644 --- a/OsmoBTS/osmobts-usermanual.adoc +++ b/OsmoBTS/osmobts-usermanual.adoc @@ -6,7 +6,7 @@ include::chapters/overview.adoc[] -include::chapters/abis.adoc[] +include::../common/chapters/abis.adoc[] include::chapters/interfaces.adoc[] -- To view, visit https://gerrit.osmocom.org/1084 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I698d83e96cb77900b99a0bd383587b1b68182efb Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 18 13:17:58 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 13:17:58 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoBTS/chapters/configuration.adoc: fix index numbering 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/1085 to look at the new patch set (#3). OsmoBTS/chapters/configuration.adoc: fix index numbering Change-Id: Ibe507fe36e0130377dec361d56fd75596ca64e75 --- M OsmoBTS/chapters/configuration.adoc 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/85/1085/3 diff --git a/OsmoBTS/chapters/configuration.adoc b/OsmoBTS/chapters/configuration.adoc index 4362166..b91d8ac 100644 --- a/OsmoBTS/chapters/configuration.adoc +++ b/OsmoBTS/chapters/configuration.adoc @@ -99,7 +99,7 @@ <2> You must configure at least one PHY instance in the PHY link <3> There is always exactly one BTS (`bts 0`) configured in OsmoBTS <4> The `ipa unit-id` is what is used to identify this BTS to the BSC -<6> The OML Remote IP is the IP address of the BSC, to which the BTS shall connect to. +<5> The OML Remote IP is the IP address of the BSC, to which the BTS shall connect to. <6> There must be at least one trx (`trx 0`) in each BTS <7> Every TRX must be mapped to a specific PHY instance this way -- To view, visit https://gerrit.osmocom.org/1085 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibe507fe36e0130377dec361d56fd75596ca64e75 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 18 13:17:58 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 13:17:58 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoBTS/abis/rsl: cosmetic: 'IPA style' 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/1086 to look at the new patch set (#3). OsmoBTS/abis/rsl: cosmetic: 'IPA style' Consistently name the PDCH act methid 'IPA style', name ip.access only once in the 'IPA Style Dynamic Channels' section. Consistently write 'IPA style' without hyphen (not 'IPA-style'). Capitalize section headers ('IPA Style'). Change-Id: I91112c2d8af9424ebe7e1972fd4ef9c77d24a7b4 --- M OsmoBTS/abis/rsl.adoc 1 file changed, 15 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/86/1086/3 diff --git a/OsmoBTS/abis/rsl.adoc b/OsmoBTS/abis/rsl.adoc index 827e353..30a7d77 100644 --- a/OsmoBTS/abis/rsl.adoc +++ b/OsmoBTS/abis/rsl.adoc @@ -349,9 +349,9 @@ [[ipa_style_pdch_mgmt]] -=== IPA style PDCH Management +=== IPA Style PDCH Management -When using an IPA-style dynamic TCH/F+PDCH channel type on an +When using an IPA style dynamic TCH/F+PDCH channel type on an on-air timeslot, there are a couple of non-standard RSL messages used in order to activate or deactivate this timeslot in PDCH mode. @@ -366,7 +366,7 @@ ==== PDCH Activate This procedure is used by the BSC to request the BTS to activate an -IPA-style dynamic TCH/F+PDCH channel in PDCH mode. +IPA style dynamic TCH/F+PDCH channel in PDCH mode. The operation is not supported on any other physical channel type. @@ -376,7 +376,7 @@ ==== PDCH Deactivate This procedure is used by the BSC to request the BTS to deactivate an -active PDCH on any an IPA-style dynamic TCH/F+PDCH channel. +active PDCH on any an IPA style dynamic TCH/F+PDCH channel. The operation is not supported on any other physical channel type. @@ -581,7 +581,7 @@ ==== PDCH Activate This message is sent by the BSC to request the activation of a PDCH on -a IPA-style dynamic TCH/F+PDCH channel. +a IPA style dynamic TCH/F+PDCH channel. [options="header"] [cols="30%,25%,15%,15%,15%"] @@ -598,7 +598,7 @@ ==== PDCH Activate ACK This message is sent by the BTS to confirm the successful activation -of a PDCH on a IPA-style dynamic TCH/F+PDCH channel. +of a PDCH on a IPA style dynamic TCH/F+PDCH channel. [options="header"] [cols="30%,25%,15%,15%,15%"] @@ -616,7 +616,7 @@ ==== PDCH Activate NACK This message is sent by the BTS to reject the successful activation -of a PDCH on a IPA-style dynamic TCH/F+PDCH channel. +of a PDCH on a IPA style dynamic TCH/F+PDCH channel. [options="header"] [cols="30%,25%,15%,15%,15%"] @@ -634,7 +634,7 @@ ==== PDCH Deactivate This message is sent by the BSC to request the deactivation of a PDCH -on a IPA-style dynamic TCH/F+PDCH channel. +on a IPA style dynamic TCH/F+PDCH channel. [options="header"] [cols="30%,25%,15%,15%,15%"] @@ -651,7 +651,7 @@ ==== PDCH Deactivate ACK This message is sent by the BTS to confirm the successful deactivation -of a PDCH on a IPA-style dynamic TCH/F+PDCH channel. +of a PDCH on a IPA style dynamic TCH/F+PDCH channel. [options="header"] [cols="30%,25%,15%,15%,15%"] @@ -668,7 +668,7 @@ ==== PDCH Deactivate NACK This message is sent by the BTS to reject the deactivation of a PDCH -on a IPA-style dynamic TCH/F+PDCH channel. +on a IPA style dynamic TCH/F+PDCH channel. [options="header"] [cols="30%,25%,15%,15%,15%"] @@ -876,17 +876,19 @@ There are two variants implemented in the OsmoBTS A-bis dialect: -==== ip.access style Dynamic Channels +==== IPA Style Dynamic Channels This method is used when OML uses 'NM_CHANC_IPAC_TCHFull_PDCH' (0x80) as channel combination for the given time-slot. -When the ip.access style dynamic channel combination _TCH/F or PDCH_ +'IPA style' refers to 'ip.access' compatible PDCH activation and deactivation. + +When the IPA style dynamic channel combination _TCH/F or PDCH_ is set, the non-standard 'PDCH ACTIVATE' (<>) and 'PDCH DEACTIVATE' (<>) procedures are used for switching an idle channel into PDCH mode and back into idle mode. -.Example for dynamic channel switchover, for ip.access style dynamic timeslots +.Example for dynamic channel switchover, for IPA style dynamic timeslots ["mscgen"] ---- include::dyn_ts_ipa_style.msc[] -- To view, visit https://gerrit.osmocom.org/1086 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I91112c2d8af9424ebe7e1972fd4ef9c77d24a7b4 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 18 13:17:58 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 13:17:58 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoBTS/abis/rsl: add missing info for Osmocom Dyn Channels 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/1087 to look at the new patch set (#3). OsmoBTS/abis/rsl: add missing info for Osmocom Dyn Channels The section 'Osmocom Style Dynamic Channels' ended in mid-sentence without naming any of the hard facts. Complete that. Add section links. Change-Id: Ib92895fe1bb89fb1b14dc8fcbd88b98bbb6edeee --- M OsmoBTS/abis/rsl.adoc 1 file changed, 29 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/87/1087/3 diff --git a/OsmoBTS/abis/rsl.adoc b/OsmoBTS/abis/rsl.adoc index 30a7d77..c9bb555 100644 --- a/OsmoBTS/abis/rsl.adoc +++ b/OsmoBTS/abis/rsl.adoc @@ -125,8 +125,10 @@ RSL channel activation procedures can not only be used for activation of circuit-switched channels, but also for activation of a PDCH. -NOTE:: Do not confuse this with the ip.access style _PDCH ACT_ type -dynamic PDCH protocol employed by nanoBTS devices. +See <>. + +NOTE:: Do not confuse this with the IPA style _PDCH ACT_ type +dynamic PDCH protocol employed by nanoBTS devices (<>). [[MEASUREMENT_RESULT]] ==== Measurement Result @@ -894,14 +896,35 @@ include::dyn_ts_ipa_style.msc[] ---- -==== Osmocom style Dynamic Channels +[[OSMOCOM_DYN_TS]] +==== Osmocom Style Dynamic Channels This method is in use when OML uses 'NM_CHANC_OSMO_TCHFull_TCHHalf_PDCH' (0x90) for the given time-slot. -The activation of PDCH is performed by using the regular 'RSL CHANNEL -ACTIVATE' procedure according to <>, with the -exception that the 'cbits' part of the ' +The activation of PDCH is performed by using the regular 'RSL CHANNEL ACTIVATE' +procedure according to <>, with these modifications: + +* The 'C-bits' part of the 'Channel Number' IE take the non-standard binary + value 11000 (C5 thru C1 as seen in 3GPP TS 08.58 ? 9.3.1). +* The 'A-bits' part of the 'Activation Type' IE take the non-standard binary + value 1111, with an additional fourth bit (add A4 to A3 thru A1 as seen in + 3GPP TS 08.58 ? 9.3.3; all remaining reserved bits as well as the 'R' bit are + coded as zero). +* The normally mandatory 'Channel Mode' IE is omitted; none of the optional IEs + are included. + +Hence the message consists of exactly these IEs: + +.PDCH type _Channel Activation_ message IEs +[options="header",cols="10%,30%,60%"] +|=== +| TS 08.58 ? | IE Name | Handling +| 9.1 | Message discriminator | Dedicated Channel Management +| 9.2 | Message type | CHANnel ACTIVation +| 9.3.1 | Channel number | 'C-bits' 11000, plus TS bits as usual +| 9.3.3 | Activation type | 'A-bits' 1111 +|=== .Example for dynamic channel switchover, for Osmocom style dynamic timeslots ["mscgen"] -- To view, visit https://gerrit.osmocom.org/1087 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib92895fe1bb89fb1b14dc8fcbd88b98bbb6edeee Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 18 13:17:59 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 13:17:59 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: cosmetic: build: on a2x failure, use asciidoc -v and $ASCIID... Message-ID: Review at https://gerrit.osmocom.org/1110 cosmetic: build: on a2x failure, use asciidoc -v and $ASCIIDOC_OPTS This is only used to output warnings in case the a2x build failed. Use ASCIIDOC_OPTS instead of repeating the same options (with one missing) and add verbose output by asciidoc. Change-Id: I6135ba1a3e46610eea6089e2218f1024c49054be --- M build/Makefile.asciidoc.inc 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/10/1110/1 diff --git a/build/Makefile.asciidoc.inc b/build/Makefile.asciidoc.inc index f95cd0b..fad91fa 100644 --- a/build/Makefile.asciidoc.inc +++ b/build/Makefile.asciidoc.inc @@ -30,7 +30,7 @@ all: $(ASCIIDOCPDFS) $(ASCIIDOCPDFS): %.pdf: %.adoc %-docinfo.xml $(ASCIIDOCSTYLE) $(TOPDIR)/common/chapters/*.adoc - a2x $(A2X_OPTS) $< || asciidoc -f $(BUILDDIR)/mscgen-filter.conf -f $(BUILDDIR)/diag-filter.conf $< + a2x $(A2X_OPTS) $< || asciidoc -v $(ASCIIDOC_OPTS) $< check: $(ASCIIDOC_CHECKS) -- To view, visit https://gerrit.osmocom.org/1110 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6135ba1a3e46610eea6089e2218f1024c49054be Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Oct 18 13:28:26 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 13:28:26 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: add 'make check' target 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/1089 to look at the new patch set (#5). add 'make check' target Generate *.check files from asciidoc output and grep for WARNINGs. Add *.check files to gitignore and to 'make clean'. Change-Id: Ibccc83a3415930a528f2e8e4e4dda3b81c6d0b64 --- M .gitignore M Makefile M OsmoBSC/Makefile M OsmoBTS/Makefile M OsmoNITB/Makefile M OsmoPCU/Makefile M OsmoSGSN/Makefile M build/Makefile.asciidoc.inc 8 files changed, 28 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/89/1089/5 diff --git a/.gitignore b/.gitignore index 6455215..67c2f69 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ *.html *__*.png *__*.svg +*.check generated/ diff --git a/Makefile b/Makefile index cfe7fc0..035595c 100644 --- a/Makefile +++ b/Makefile @@ -24,3 +24,13 @@ cd OsmoSGSN; $(MAKE) upload cd OsmoNAT; $(MAKE) upload cd OsmoPCU; $(MAKE) upload + +check: + cd OsmoBTS; $(MAKE) check + cd OsmoNITB; $(MAKE) check + cd OsmoBSC; $(MAKE) check + cd OsmoSGSN; $(MAKE) check + cd OsmoPCU; $(MAKE) check + # These don't use asciidoc, so they have no 'make check' target: + #cd OsmoMGCP; $(MAKE) check + #cd OsmoNAT; $(MAKE) check diff --git a/OsmoBSC/Makefile b/OsmoBSC/Makefile index fb5e269..9fc6f26 100644 --- a/OsmoBSC/Makefile +++ b/OsmoBSC/Makefile @@ -24,7 +24,7 @@ clean: rm -rf $(cleanfiles) - rm -rf osmobsc-usermanual__*.{svg,png} + rm -rf osmobsc-usermanual__*.{svg,png,check} gen-bsc-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoBTS/Makefile b/OsmoBTS/Makefile index 5ef9afa..0587de8 100644 --- a/OsmoBTS/Makefile +++ b/OsmoBTS/Makefile @@ -12,5 +12,5 @@ clean: rm -rf $(cleanfiles) - rm -rf osmobts-abis__*.{svg,png} - rm -rf osmobts-usermanual__*.{svg,png} + rm -rf osmobts-abis__*.{svg,png,check} + rm -rf osmobts-usermanual__*.{svg,png,check} diff --git a/OsmoNITB/Makefile b/OsmoNITB/Makefile index d3bf5c8..e68b9b0 100644 --- a/OsmoNITB/Makefile +++ b/OsmoNITB/Makefile @@ -23,7 +23,7 @@ clean: rm -rf $(cleanfiles) - rm -rf osmonitb-usermanual__*.{svg,png} + rm -rf osmonitb-usermanual__*.{svg,png,check} gen-nitb-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoPCU/Makefile b/OsmoPCU/Makefile index 6b4ecb8..1f06183 100644 --- a/OsmoPCU/Makefile +++ b/OsmoPCU/Makefile @@ -25,7 +25,7 @@ clean: rm -rf $(cleanfiles) rm -rf gen-vty-docbook - rm -rf osmopcu-usermanual__*.{svg,png} + rm -rf osmopcu-usermanual__*.{svg,png,check} gen-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoSGSN/Makefile b/OsmoSGSN/Makefile index 612c10f..7df5168 100644 --- a/OsmoSGSN/Makefile +++ b/OsmoSGSN/Makefile @@ -22,7 +22,7 @@ osmosgsn-usermanual.pdf: chapters/*.adoc clean: - rm -rf osmosgsn-usermanual__*.{svg,png} + rm -rf osmosgsn-usermanual__*.{svg,png,check} rm -rf $(cleanfiles) gen-sgsn-vty-docbook: FORCE diff --git a/build/Makefile.asciidoc.inc b/build/Makefile.asciidoc.inc index 7def592..f95cd0b 100644 --- a/build/Makefile.asciidoc.inc +++ b/build/Makefile.asciidoc.inc @@ -9,6 +9,7 @@ # generate list of PDFs that we're supposed to render ASCIIDOCPDFS = $(ASCIIDOCS:%=%.pdf) +ASCIIDOC_CHECKS = $(ASCIIDOCS:%=%.check) ASCIIDOCSTYLE ?= $(BUILDDIR)/custom-dblatex.sty @@ -30,3 +31,13 @@ $(ASCIIDOCPDFS): %.pdf: %.adoc %-docinfo.xml $(ASCIIDOCSTYLE) $(TOPDIR)/common/chapters/*.adoc a2x $(A2X_OPTS) $< || asciidoc -f $(BUILDDIR)/mscgen-filter.conf -f $(BUILDDIR)/diag-filter.conf $< + +check: $(ASCIIDOC_CHECKS) + +$(ASCIIDOC_CHECKS): %.check: %.adoc %-docinfo.xml $(ASCIIDOCSTYLE) $(TOPDIR)/common/chapters/*.adoc chapters/*.adoc + asciidoc -v $(ASCIIDOC_OPTS) $< > $@ 2>&1 + # Make absolutely sure that the %.check target is updated. + touch $@ + # Do print the WARNING output but return error if any was found + # (grep -v would omit the WARNING output from the log). + @grep WARNING $@ && exit 1 || exit 0 -- To view, visit https://gerrit.osmocom.org/1089 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibccc83a3415930a528f2e8e4e4dda3b81c6d0b64 Gerrit-PatchSet: 5 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 18 13:33:36 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 18 Oct 2016 13:33:36 +0000 Subject: [MERGED] libosmocore[master]: vty/show asciidoc: counters: improve table headers In-Reply-To: References: Message-ID: lynxis lazus has submitted this change and it was merged. Change subject: vty/show asciidoc: counters: improve table headers ...................................................................... vty/show asciidoc: counters: improve table headers add [options=header] to every table header vty/show asciidoc: rename reference field into "Reference" vty/show asciidoc: capilize table header field names Change-Id: Ie991f4db77a60afb86a2a0b35c137586527f6228 --- M src/vty/stats_vty.c 1 file changed, 8 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c index 2ca436a..c03546b 100644 --- a/src/vty/stats_vty.c +++ b/src/vty/stats_vty.c @@ -383,8 +383,9 @@ { vty_out(vty, "// ungrouped osmo_counters%s", VTY_NEWLINE); vty_out(vty, ".ungrouped osmo counters%s", VTY_NEWLINE); + vty_out(vty, "[options=\"header\"]%s", VTY_NEWLINE); vty_out(vty, "|===%s", VTY_NEWLINE); - vty_out(vty, "| name | This document & | description%s", VTY_NEWLINE); + vty_out(vty, "| Name | Reference | Description%s", VTY_NEWLINE); osmo_counters_for_each(asciidoc_handle_counter, vty); vty_out(vty, "|===%s", VTY_NEWLINE); } @@ -398,7 +399,7 @@ char *description = osmo_asciidoc_escape(desc->description); char *group_name_prefix = osmo_asciidoc_escape(ctrg->desc->group_name_prefix); - /* | name | This document & | description | */ + /* | Name | This document & | Description | */ vty_out(vty, "| %s | <<%s_%s>> | %s%s", name, group_name_prefix, @@ -423,8 +424,9 @@ vty_out(vty, "// rate_ctr_group table %s%s", group_description, VTY_NEWLINE); vty_out(vty, ".%s - %s %s", group_name_prefix, group_description, VTY_NEWLINE); + vty_out(vty, "[options=\"header\"]%s", VTY_NEWLINE); vty_out(vty, "|===%s", VTY_NEWLINE); - vty_out(vty, "| name | This document & | description%s", VTY_NEWLINE); + vty_out(vty, "| Name | Reference | Description%s", VTY_NEWLINE); rate_ctr_for_each_counter(ctrg, asciidoc_rate_ctr_handler, sctx_); vty_out(vty, "|===%s", VTY_NEWLINE); @@ -444,7 +446,7 @@ char *group_name_prefix = osmo_asciidoc_escape(statg->desc->group_name_prefix); char *unit = osmo_asciidoc_escape(item->desc->unit); - /* | name | This document & | description | unit | */ + /* | Name | Reference | Description | Unit | */ vty_out(vty, "| %s | <<%s_%s>> | %s | %s%s", name, group_name_prefix, @@ -471,8 +473,9 @@ vty_out(vty, "// osmo_stat_item_group table %s%s", group_description ? group_description : "", VTY_NEWLINE); vty_out(vty, ".%s - %s %s", group_name_prefix, group_description ? group_description : "", VTY_NEWLINE); + vty_out(vty, "[options=\"header\"]%s", VTY_NEWLINE); vty_out(vty, "|===%s", VTY_NEWLINE); - vty_out(vty, "| name | This document & | description | unit%s", VTY_NEWLINE); + vty_out(vty, "| Name | Reference | Description | Unit%s", VTY_NEWLINE); osmo_stat_item_for_each_item(statg, asciidoc_osmo_stat_item_handler, sctx_); vty_out(vty, "|===%s", VTY_NEWLINE); -- To view, visit https://gerrit.osmocom.org/1109 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie991f4db77a60afb86a2a0b35c137586527f6228 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore 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 Oct 18 13:33:43 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 18 Oct 2016 13:33:43 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: add .gitreview In-Reply-To: References: Message-ID: lynxis lazus has submitted this change and it was merged. Change subject: add .gitreview ...................................................................... add .gitreview .gitreview is used by `git review` plugin. Change-Id: Ia60e51f156985f7c3c1f0452d4d3760cb1396f1b --- 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..c0ec0c0 --- /dev/null +++ b/.gitreview @@ -0,0 +1,3 @@ +[gerrit] +host=gerrit.osmocom.org +project=osmo-gsm-manuals -- To view, visit https://gerrit.osmocom.org/1075 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia60e51f156985f7c3c1f0452d4d3760cb1396f1b Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Oct 18 13:34:08 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 18 Oct 2016 13:34:08 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: build/Makefile: set LIBOSMO_DIR UPLOAD_PATH only if not exists In-Reply-To: References: Message-ID: lynxis lazus has submitted this change and it was merged. Change subject: build/Makefile: set LIBOSMO_DIR UPLOAD_PATH only if not exists ...................................................................... build/Makefile: set LIBOSMO_DIR UPLOAD_PATH only if not exists Allows the user to set by env or argument Change-Id: Ibc2c9ff6e61fd8cb59b908a9586ad5841d698924 --- M build/Makefile.inc 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/build/Makefile.inc b/build/Makefile.inc index e317131..3905cb0 100644 --- a/build/Makefile.inc +++ b/build/Makefile.inc @@ -1,9 +1,9 @@ # XSL stylesheets downloaded from http://docbook.sourceforge.net/release/xsl/current/html/ # Makefile from BitBake/OpenEmbedded manuals -LIBOSMO_DIR := ~/source/gsm/libosmocore +LIBOSMO_DIR ?= ~/source/gsm/libosmocore MERGE_DOC := $(LIBOSMO_DIR)/doc/vty/merge_doc.xsl -UPLOAD_PATH := generic at sysmocom-downloads:documents +UPLOAD_PATH ?= generic at sysmocom-downloads:documents pdfs = $(patsubst %.xml,%.pdf,$(manuals)) lint = $(patsubst %.xml,%.xml-lint,$(manuals)) -- To view, visit https://gerrit.osmocom.org/1073 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibc2c9ff6e61fd8cb59b908a9586ad5841d698924 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Oct 18 14:18:01 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 18 Oct 2016 14:18:01 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoBTS: add vty reference documentation In-Reply-To: References: Message-ID: lynxis lazus has submitted this change and it was merged. Change subject: OsmoBTS: add vty reference documentation ...................................................................... OsmoBTS: add vty reference documentation Including the required changes of the Makefile which is now simliar as the other projects Makefile's. Based on: OsmoBTS 0.3.0.283-f869 Change-Id: Id7362ce1c584b1926330b93770d68453e091c71c --- M OsmoBTS/Makefile A OsmoBTS/osmobts-vty-reference.xml A OsmoBTS/vty/bts_vty_additions.xml A OsmoBTS/vty/bts_vty_reference.xml 4 files changed, 1,705 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoBTS/Makefile b/OsmoBTS/Makefile index 092856d..01683a7 100644 --- a/OsmoBTS/Makefile +++ b/OsmoBTS/Makefile @@ -1,14 +1,42 @@ +# XSL stylesheets downloaded from http://docbook.sourceforge.net/release/xsl/current/html/ +# Makefile from BitBake/OpenEmbedded manuals + +EXTRA_DEPS = gen-bts-vty-docbook + +topdir = . +bts_reference = $(topdir)/osmobts-vty-reference.xml +manuals = $(bts_reference) +# types = pdf txt rtf ps xhtml html man tex texi dvi +# types = pdf txt +types = $(docbooktotypes) +docbooktotypes = pdf +# htmlcssfile = +# htmlcss = + TOPDIR := .. -ASCIIDOCS := osmobts-usermanual osmobts-abis +ASCIIDOCS := osmobts-usermanual include $(TOPDIR)/build/Makefile.asciidoc.inc - -# for the upload target include $(TOPDIR)/build/Makefile.inc -# dependencies -osmobts-abis.pdf: abis/*.adoc abis/*.msc osmobts-usermanual.pdf: chapters/*.adoc clean: + rm -rf osmobts-usermanual__*.{svg,png} rm -rf $(cleanfiles) + +gen-bts-vty-docbook: FORCE + $(call command,xsltproc -o generated/combined1.xml \ + --stringparam with $(PWD)/../common/vty_additions.xml \ + $(MERGE_DOC) vty/bts_vty_reference.xml, \ + XSLTPROC,Merging Common VTY) + $(call command,xsltproc -o generated/combined2.xml \ + --stringparam with $(PWD)/../common/ns_vty_additions.xml \ + $(MERGE_DOC) generated/combined1.xml, \ + XSLTPROC,Merging Common NS VTY) + $(call command,xsltproc -o generated/combined3.xml \ + --stringparam with $(PWD)/vty/bts_vty_additions.xml \ + $(MERGE_DOC) generated/combined2.xml, \ + XSLTPROC,Merging BTS VTY) + $(call command,xsltproc ../vty_reference.xsl generated/combined3.xml > generated/docbook_vty.xml, \ + XSLTPROC,Converting BTS VTY to DocBook) diff --git a/OsmoBTS/osmobts-vty-reference.xml b/OsmoBTS/osmobts-vty-reference.xml new file mode 100644 index 0000000..0d0454a --- /dev/null +++ b/OsmoBTS/osmobts-vty-reference.xml @@ -0,0 +1,38 @@ + + + + +]> + + + + + + v1 + 13th October 2016 + hw + Initial + + + + OsmoBTS VTY Reference + + + 2016 + + + + This work is copyright by sysmocom - s.f.m.c. GmbH. All rights reserved. + + + + + + &chapter-vty; + + diff --git a/OsmoBTS/vty/bts_vty_additions.xml b/OsmoBTS/vty/bts_vty_additions.xml new file mode 100644 index 0000000..519c4b4 --- /dev/null +++ b/OsmoBTS/vty/bts_vty_additions.xml @@ -0,0 +1 @@ + diff --git a/OsmoBTS/vty/bts_vty_reference.xml b/OsmoBTS/vty/bts_vty_reference.xml new file mode 100644 index 0000000..b50ac1b --- /dev/null +++ b/OsmoBTS/vty/bts_vty_reference.xml @@ -0,0 +1,1633 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- To view, visit https://gerrit.osmocom.org/1074 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id7362ce1c584b1926330b93770d68453e091c71c Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Oct 18 14:22:08 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 18 Oct 2016 14:22:08 +0000 Subject: [PATCH] openbsc[master]: Replace magic number with define Message-ID: Review at https://gerrit.osmocom.org/1111 Replace magic number with define Value 4 used as magic number by both OpenBSC and OsmoBTS so it make sense to add it to shared header. See ebb483b69a5319e522ba5f713e9cb6f68a814a6a in osmo-bts for details. Change-Id: I9c6ad68f4c6aa72d39ec7e5a6968b36ec20e79f4 --- M openbsc/include/openbsc/gsm_data_shared.h M openbsc/src/libcommon/gsm_data_shared.c 2 files changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/11/1111/1 diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index d889959..487a3f3 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -46,6 +46,10 @@ GSM_CHREQ_REASON_OTHER, }; +/* lchans 0..3 are SDCCH in combined channel configuration, + use 4 as magic number for BCCH hack - see osmo-bts-../oml.c:opstart_compl() */ +#define CCCH_LCHAN 4 + #define TRX_NR_TS 8 #define TS_MAX_LCHAN 8 diff --git a/openbsc/src/libcommon/gsm_data_shared.c b/openbsc/src/libcommon/gsm_data_shared.c index b8853ad..df204fe 100644 --- a/openbsc/src/libcommon/gsm_data_shared.c +++ b/openbsc/src/libcommon/gsm_data_shared.c @@ -579,7 +579,7 @@ * here. This should never be sent in an RSL message. * See osmo-bts-xxx/oml.c:opstart_compl(). */ - if (lchan_nr == 4) + if (lchan_nr == CCCH_LCHAN) chan_nr = 0; else OSMO_ASSERT(lchan_nr < 4); -- To view, visit https://gerrit.osmocom.org/1111 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9c6ad68f4c6aa72d39ec7e5a6968b36ec20e79f4 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Oct 18 14:42:24 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 18 Oct 2016 14:42:24 +0000 Subject: [PATCH] osmo-bts[master]: Fix lc15 build Message-ID: Review at https://gerrit.osmocom.org/1112 Fix lc15 build The error seems to be introduced in 21142f789812553b56f493d79184f5a31ab7b1cd Change-Id: I620ac6774fb47479d74bc4470ccc6edd379600ba --- M src/osmo-bts-litecell15/misc/lc15bts_mgr.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/12/1112/1 diff --git a/src/osmo-bts-litecell15/misc/lc15bts_mgr.c b/src/osmo-bts-litecell15/misc/lc15bts_mgr.c index 193e108..3a7d3a1 100644 --- a/src/osmo-bts-litecell15/misc/lc15bts_mgr.c +++ b/src/osmo-bts-litecell15/misc/lc15bts_mgr.c @@ -226,7 +226,7 @@ tall_mgr_ctx = talloc_named_const(NULL, 1, "bts manager"); - msgb_talloc_ctx_init(tall_mgr_ctx); + msgb_talloc_ctx_init(tall_mgr_ctx, 0); mgr_log_init(); -- To view, visit https://gerrit.osmocom.org/1112 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I620ac6774fb47479d74bc4470ccc6edd379600ba Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Oct 18 15:12:39 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 15:12:39 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: make clean: also remove generated image files In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1088 to look at the new patch set (#4). make clean: also remove generated image files Change-Id: I80798e79b4ccee64f26f58f9754de02b2958e33e --- M OsmoBSC/Makefile M OsmoBTS/Makefile M OsmoNITB/Makefile M OsmoPCU/Makefile 4 files changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/88/1088/4 diff --git a/OsmoBSC/Makefile b/OsmoBSC/Makefile index e2c464c..fb5e269 100644 --- a/OsmoBSC/Makefile +++ b/OsmoBSC/Makefile @@ -24,6 +24,7 @@ clean: rm -rf $(cleanfiles) + rm -rf osmobsc-usermanual__*.{svg,png} gen-bsc-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoBTS/Makefile b/OsmoBTS/Makefile index 01683a7..729704e 100644 --- a/OsmoBTS/Makefile +++ b/OsmoBTS/Makefile @@ -22,8 +22,9 @@ osmobts-usermanual.pdf: chapters/*.adoc clean: - rm -rf osmobts-usermanual__*.{svg,png} rm -rf $(cleanfiles) + rm -rf osmobts-abis__*.{svg,png} + rm -rf osmobts-usermanual__*.{svg,png} gen-bts-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoNITB/Makefile b/OsmoNITB/Makefile index 29d9c51..d3bf5c8 100644 --- a/OsmoNITB/Makefile +++ b/OsmoNITB/Makefile @@ -23,6 +23,7 @@ clean: rm -rf $(cleanfiles) + rm -rf osmonitb-usermanual__*.{svg,png} gen-nitb-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoPCU/Makefile b/OsmoPCU/Makefile index ef80327..6b4ecb8 100644 --- a/OsmoPCU/Makefile +++ b/OsmoPCU/Makefile @@ -25,6 +25,7 @@ clean: rm -rf $(cleanfiles) rm -rf gen-vty-docbook + rm -rf osmopcu-usermanual__*.{svg,png} gen-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ -- To view, visit https://gerrit.osmocom.org/1088 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I80798e79b4ccee64f26f58f9754de02b2958e33e Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 18 15:12:39 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 15:12:39 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: add 'make check' target 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/1089 to look at the new patch set (#6). add 'make check' target Generate *.check files from asciidoc output and grep for WARNINGs. Add *.check files to gitignore and to 'make clean'. Change-Id: Ibccc83a3415930a528f2e8e4e4dda3b81c6d0b64 --- M .gitignore M Makefile M OsmoBSC/Makefile M OsmoBTS/Makefile M OsmoNITB/Makefile M OsmoPCU/Makefile M OsmoSGSN/Makefile M build/Makefile.asciidoc.inc 8 files changed, 28 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/89/1089/6 diff --git a/.gitignore b/.gitignore index 6455215..67c2f69 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ *.html *__*.png *__*.svg +*.check generated/ diff --git a/Makefile b/Makefile index cfe7fc0..035595c 100644 --- a/Makefile +++ b/Makefile @@ -24,3 +24,13 @@ cd OsmoSGSN; $(MAKE) upload cd OsmoNAT; $(MAKE) upload cd OsmoPCU; $(MAKE) upload + +check: + cd OsmoBTS; $(MAKE) check + cd OsmoNITB; $(MAKE) check + cd OsmoBSC; $(MAKE) check + cd OsmoSGSN; $(MAKE) check + cd OsmoPCU; $(MAKE) check + # These don't use asciidoc, so they have no 'make check' target: + #cd OsmoMGCP; $(MAKE) check + #cd OsmoNAT; $(MAKE) check diff --git a/OsmoBSC/Makefile b/OsmoBSC/Makefile index fb5e269..9fc6f26 100644 --- a/OsmoBSC/Makefile +++ b/OsmoBSC/Makefile @@ -24,7 +24,7 @@ clean: rm -rf $(cleanfiles) - rm -rf osmobsc-usermanual__*.{svg,png} + rm -rf osmobsc-usermanual__*.{svg,png,check} gen-bsc-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoBTS/Makefile b/OsmoBTS/Makefile index 729704e..f2c873a 100644 --- a/OsmoBTS/Makefile +++ b/OsmoBTS/Makefile @@ -23,8 +23,8 @@ clean: rm -rf $(cleanfiles) - rm -rf osmobts-abis__*.{svg,png} - rm -rf osmobts-usermanual__*.{svg,png} + rm -rf osmobts-abis__*.{svg,png,check} + rm -rf osmobts-usermanual__*.{svg,png,check} gen-bts-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoNITB/Makefile b/OsmoNITB/Makefile index d3bf5c8..e68b9b0 100644 --- a/OsmoNITB/Makefile +++ b/OsmoNITB/Makefile @@ -23,7 +23,7 @@ clean: rm -rf $(cleanfiles) - rm -rf osmonitb-usermanual__*.{svg,png} + rm -rf osmonitb-usermanual__*.{svg,png,check} gen-nitb-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoPCU/Makefile b/OsmoPCU/Makefile index 6b4ecb8..1f06183 100644 --- a/OsmoPCU/Makefile +++ b/OsmoPCU/Makefile @@ -25,7 +25,7 @@ clean: rm -rf $(cleanfiles) rm -rf gen-vty-docbook - rm -rf osmopcu-usermanual__*.{svg,png} + rm -rf osmopcu-usermanual__*.{svg,png,check} gen-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoSGSN/Makefile b/OsmoSGSN/Makefile index 612c10f..7df5168 100644 --- a/OsmoSGSN/Makefile +++ b/OsmoSGSN/Makefile @@ -22,7 +22,7 @@ osmosgsn-usermanual.pdf: chapters/*.adoc clean: - rm -rf osmosgsn-usermanual__*.{svg,png} + rm -rf osmosgsn-usermanual__*.{svg,png,check} rm -rf $(cleanfiles) gen-sgsn-vty-docbook: FORCE diff --git a/build/Makefile.asciidoc.inc b/build/Makefile.asciidoc.inc index 7def592..f95cd0b 100644 --- a/build/Makefile.asciidoc.inc +++ b/build/Makefile.asciidoc.inc @@ -9,6 +9,7 @@ # generate list of PDFs that we're supposed to render ASCIIDOCPDFS = $(ASCIIDOCS:%=%.pdf) +ASCIIDOC_CHECKS = $(ASCIIDOCS:%=%.check) ASCIIDOCSTYLE ?= $(BUILDDIR)/custom-dblatex.sty @@ -30,3 +31,13 @@ $(ASCIIDOCPDFS): %.pdf: %.adoc %-docinfo.xml $(ASCIIDOCSTYLE) $(TOPDIR)/common/chapters/*.adoc a2x $(A2X_OPTS) $< || asciidoc -f $(BUILDDIR)/mscgen-filter.conf -f $(BUILDDIR)/diag-filter.conf $< + +check: $(ASCIIDOC_CHECKS) + +$(ASCIIDOC_CHECKS): %.check: %.adoc %-docinfo.xml $(ASCIIDOCSTYLE) $(TOPDIR)/common/chapters/*.adoc chapters/*.adoc + asciidoc -v $(ASCIIDOC_OPTS) $< > $@ 2>&1 + # Make absolutely sure that the %.check target is updated. + touch $@ + # Do print the WARNING output but return error if any was found + # (grep -v would omit the WARNING output from the log). + @grep WARNING $@ && exit 1 || exit 0 -- To view, visit https://gerrit.osmocom.org/1089 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibccc83a3415930a528f2e8e4e4dda3b81c6d0b64 Gerrit-PatchSet: 6 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 18 15:12:58 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 15:12:58 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: fix 'make clean': shell glob, ignore failure In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1096 to look at the new patch set (#4). fix 'make clean': shell glob, ignore failure Unfortunately a glob like osmo-x__*.{svg,png} doesn't work, so have the suffixes in separate globs. Add dashes to indicate that failure should be ignored. Change-Id: I6bc4d9ea72b43a573acbc860c23397f748de2c7b --- M OsmoBSC/Makefile M OsmoBTS/Makefile M OsmoMGCP/Makefile M OsmoNAT/Makefile M OsmoNITB/Makefile M OsmoPCU/Makefile M OsmoSGSN/Makefile 7 files changed, 25 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/96/1096/4 diff --git a/OsmoBSC/Makefile b/OsmoBSC/Makefile index 9fc6f26..284ac3b 100644 --- a/OsmoBSC/Makefile +++ b/OsmoBSC/Makefile @@ -23,8 +23,10 @@ osmobsc-usermanual.pdf: chapters/*.adoc clean: - rm -rf $(cleanfiles) - rm -rf osmobsc-usermanual__*.{svg,png,check} + -rm -rf $(cleanfiles) + -rm osmobsc-usermanual__*.png + -rm osmobsc-usermanual__*.svg + -rm osmobsc-usermanual*.check gen-bsc-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoBTS/Makefile b/OsmoBTS/Makefile index f2c873a..73430fc 100644 --- a/OsmoBTS/Makefile +++ b/OsmoBTS/Makefile @@ -22,9 +22,13 @@ osmobts-usermanual.pdf: chapters/*.adoc clean: - rm -rf $(cleanfiles) - rm -rf osmobts-abis__*.{svg,png,check} - rm -rf osmobts-usermanual__*.{svg,png,check} + -rm -rf $(cleanfiles) + -rm osmobts-abis__*.png + -rm osmobts-abis__*.svg + -rm osmobts-usermanual__*.png + -rm osmobts-usermanual__*.svg + -rm osmobts-abis*.check + -rm osmobts-usermanual*.check gen-bts-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoMGCP/Makefile b/OsmoMGCP/Makefile index aba8e3d..9aff12b 100644 --- a/OsmoMGCP/Makefile +++ b/OsmoMGCP/Makefile @@ -16,7 +16,7 @@ include ../build/Makefile.inc clean: - rm -rf $(cleanfiles) + -rm -rf $(cleanfiles) gen-mgcp-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoNAT/Makefile b/OsmoNAT/Makefile index 3ace4d2..d7302e6 100644 --- a/OsmoNAT/Makefile +++ b/OsmoNAT/Makefile @@ -16,7 +16,7 @@ include ../build/Makefile.inc clean: - rm -rf $(cleanfiles) + -rm -rf $(cleanfiles) gen-nat-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoNITB/Makefile b/OsmoNITB/Makefile index e68b9b0..99cd317 100644 --- a/OsmoNITB/Makefile +++ b/OsmoNITB/Makefile @@ -22,8 +22,10 @@ osmonitb-usermanual.pdf: chapters/*.adoc clean: - rm -rf $(cleanfiles) - rm -rf osmonitb-usermanual__*.{svg,png,check} + -rm -rf $(cleanfiles) + -rm osmonitb-usermanual__*.svg + -rm osmonitb-usermanual__*.png + -rm osmonitb-usermanual.check gen-nitb-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoPCU/Makefile b/OsmoPCU/Makefile index 1f06183..a83b909 100644 --- a/OsmoPCU/Makefile +++ b/OsmoPCU/Makefile @@ -23,9 +23,11 @@ osmopcu-usermanual.pdf: chapters/*.adoc clean: - rm -rf $(cleanfiles) - rm -rf gen-vty-docbook - rm -rf osmopcu-usermanual__*.{svg,png,check} + -rm -rf $(cleanfiles) + -rm -rf gen-vty-docbook + -rm osmopcu-usermanual__*.png + -rm osmopcu-usermanual__*.svg + -rm osmopcu-usermanual.check gen-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoSGSN/Makefile b/OsmoSGSN/Makefile index 7df5168..6f7d28d 100644 --- a/OsmoSGSN/Makefile +++ b/OsmoSGSN/Makefile @@ -22,8 +22,9 @@ osmosgsn-usermanual.pdf: chapters/*.adoc clean: - rm -rf osmosgsn-usermanual__*.{svg,png,check} - rm -rf $(cleanfiles) + -rm -rf $(cleanfiles) + -rm osmosgsn-usermanual__*.svg osmosgsn-usermanual__*.png + -rm osmosgsn-usermanual.check gen-sgsn-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ -- To view, visit https://gerrit.osmocom.org/1096 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I6bc4d9ea72b43a573acbc860c23397f748de2c7b Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 18 15:14:47 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 15:14:47 +0000 Subject: osmo-bts[master]: Fix lc15 build In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1112 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I620ac6774fb47479d74bc4470ccc6edd379600ba 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 Tue Oct 18 15:14:48 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 15:14:48 +0000 Subject: [MERGED] osmo-bts[master]: Fix lc15 build In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: Fix lc15 build ...................................................................... Fix lc15 build The error seems to be introduced in 21142f789812553b56f493d79184f5a31ab7b1cd Change-Id: I620ac6774fb47479d74bc4470ccc6edd379600ba --- M src/osmo-bts-litecell15/misc/lc15bts_mgr.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bts-litecell15/misc/lc15bts_mgr.c b/src/osmo-bts-litecell15/misc/lc15bts_mgr.c index 193e108..3a7d3a1 100644 --- a/src/osmo-bts-litecell15/misc/lc15bts_mgr.c +++ b/src/osmo-bts-litecell15/misc/lc15bts_mgr.c @@ -226,7 +226,7 @@ tall_mgr_ctx = talloc_named_const(NULL, 1, "bts manager"); - msgb_talloc_ctx_init(tall_mgr_ctx); + msgb_talloc_ctx_init(tall_mgr_ctx, 0); mgr_log_init(); -- To view, visit https://gerrit.osmocom.org/1112 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I620ac6774fb47479d74bc4470ccc6edd379600ba 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 Tue Oct 18 17:07:38 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 18 Oct 2016 17:07:38 +0000 Subject: [PATCH] libosmocore[master]: utils/conv_gen.py: improve output formatting 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/829 to look at the new patch set (#7). utils/conv_gen.py: improve output formatting To keep the generated tables readable, line with should be limited. So, now there are the following limitations: - _print_term(): up to 12 numbers per line, - _print_puncture(): up to 12 numbers per line, - _print_x(): up to 4 blocks per line. Change-Id: I95256c4ad402a3c088bdb6c5a5cda8b17c31881c --- 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/29/829/7 diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index d60e60e..3877f78 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -35,3 +35,5 @@ # Convolutional codes generation gsm0503_conv.c: $(AM_V_GEN)python2 $(top_srcdir)/utils/conv_gen.py + +CLEANFILES = gsm0503_conv.c diff --git a/utils/conv_gen.py b/utils/conv_gen.py index 38ea63b..4b42378 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -129,17 +129,23 @@ return ns, nb def _print_term(self, fi, num_states, pack = False): + items = [] d = [] + for state in range(num_states): if pack: x = pack(self.next_term_output(state)) else: x = self.next_term_state(state) - d.append("%d, " % x) - print >>fi, "\t%s" % ''.join(d) + items.append(x) + + # Up to 12 numbers should be placed per line + print_formatted(items, "%3d, ", 12, fi) def _print_x(self, fi, num_states, pack = False): + items = [] + for state in range(num_states): if pack: x0 = pack(self.next_output(state, 0)) @@ -148,7 +154,14 @@ x0 = self.next_state(state, 0) x1 = self.next_state(state, 1) - print >>fi, "\t{ %2d, %2d }," % (x0, x1) + items.append((x0, x1)) + + # Up to 4 blocks should be placed per line + print_formatted(items, "{ %2d, %2d }, ", 4, fi) + + def _print_puncture(self, fi): + # Up to 12 numbers should be placed per line + print_formatted(self.puncture, "%3d, ", 12, fi) def gen_tables(self, pref, fi): pack = lambda n: \ @@ -175,8 +188,7 @@ if len(self.puncture): print >>fi, "\nstatic const int %s_puncture[] = {" % self.name - for p in self.puncture: - print >>fi, "\t%d," % p + self._print_puncture(fi) print >>fi, "};" # Write description as a multi-line comment @@ -207,6 +219,21 @@ 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): + counter = 0 + + # Print initial indent + fi.write("\t") + + for item in items: + if counter > 0 and counter % count == 0: + fi.write("\n\t") + + fi.write(format % item) + counter += 1 + + fi.write("\n") + # Polynomials according to 3GPP TS 05.03 Annex B G0 = poly(0, 3, 4) G1 = poly(0, 1, 3, 4) -- To view, visit https://gerrit.osmocom.org/829 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I95256c4ad402a3c088bdb6c5a5cda8b17c31881c Gerrit-PatchSet: 7 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Oct 18 17:20:12 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:20:12 +0000 Subject: osmo-gsm-manuals[master]: OsmoBTS/abis/rsl.adoc: fix missing section header In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1082 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic6f83f016ce9ec90af7eb0af1b1f71a10263915d Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals 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 Tue Oct 18 17:21:34 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:21:34 +0000 Subject: osmo-gsm-manuals[master]: make clean: also remove generated image files In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1088 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I80798e79b4ccee64f26f58f9754de02b2958e33e Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Oct 18 17:22:21 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:22:21 +0000 Subject: osmo-gsm-manuals[master]: add 'make check' target In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1089 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibccc83a3415930a528f2e8e4e4dda3b81c6d0b64 Gerrit-PatchSet: 6 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Oct 18 17:22:46 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:22:46 +0000 Subject: osmo-gsm-manuals[master]: cosmetic: build: on a2x failure, use asciidoc -v and $ASCIID... In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1110 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6135ba1a3e46610eea6089e2218f1024c49054be Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals 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 Tue Oct 18 17:23:29 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:23:29 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: cosmetic: build: on a2x failure, use asciidoc -v and $ASCIID... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: cosmetic: build: on a2x failure, use asciidoc -v and $ASCIIDOC_OPTS ...................................................................... cosmetic: build: on a2x failure, use asciidoc -v and $ASCIIDOC_OPTS This is only used to output warnings in case the a2x build failed. Use ASCIIDOC_OPTS instead of repeating the same options (with one missing) and add verbose output by asciidoc. Change-Id: I6135ba1a3e46610eea6089e2218f1024c49054be --- M build/Makefile.asciidoc.inc 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/build/Makefile.asciidoc.inc b/build/Makefile.asciidoc.inc index f95cd0b..fad91fa 100644 --- a/build/Makefile.asciidoc.inc +++ b/build/Makefile.asciidoc.inc @@ -30,7 +30,7 @@ all: $(ASCIIDOCPDFS) $(ASCIIDOCPDFS): %.pdf: %.adoc %-docinfo.xml $(ASCIIDOCSTYLE) $(TOPDIR)/common/chapters/*.adoc - a2x $(A2X_OPTS) $< || asciidoc -f $(BUILDDIR)/mscgen-filter.conf -f $(BUILDDIR)/diag-filter.conf $< + a2x $(A2X_OPTS) $< || asciidoc -v $(ASCIIDOC_OPTS) $< check: $(ASCIIDOC_CHECKS) -- To view, visit https://gerrit.osmocom.org/1110 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6135ba1a3e46610eea6089e2218f1024c49054be Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 18 17:23:30 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:23:30 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: add 'make check' target In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: add 'make check' target ...................................................................... add 'make check' target Generate *.check files from asciidoc output and grep for WARNINGs. Add *.check files to gitignore and to 'make clean'. Change-Id: Ibccc83a3415930a528f2e8e4e4dda3b81c6d0b64 --- M .gitignore M Makefile M OsmoBSC/Makefile M OsmoBTS/Makefile M OsmoNITB/Makefile M OsmoPCU/Makefile M OsmoSGSN/Makefile M build/Makefile.asciidoc.inc 8 files changed, 28 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/.gitignore b/.gitignore index 6455215..67c2f69 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ *.html *__*.png *__*.svg +*.check generated/ diff --git a/Makefile b/Makefile index cfe7fc0..035595c 100644 --- a/Makefile +++ b/Makefile @@ -24,3 +24,13 @@ cd OsmoSGSN; $(MAKE) upload cd OsmoNAT; $(MAKE) upload cd OsmoPCU; $(MAKE) upload + +check: + cd OsmoBTS; $(MAKE) check + cd OsmoNITB; $(MAKE) check + cd OsmoBSC; $(MAKE) check + cd OsmoSGSN; $(MAKE) check + cd OsmoPCU; $(MAKE) check + # These don't use asciidoc, so they have no 'make check' target: + #cd OsmoMGCP; $(MAKE) check + #cd OsmoNAT; $(MAKE) check diff --git a/OsmoBSC/Makefile b/OsmoBSC/Makefile index fb5e269..9fc6f26 100644 --- a/OsmoBSC/Makefile +++ b/OsmoBSC/Makefile @@ -24,7 +24,7 @@ clean: rm -rf $(cleanfiles) - rm -rf osmobsc-usermanual__*.{svg,png} + rm -rf osmobsc-usermanual__*.{svg,png,check} gen-bsc-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoBTS/Makefile b/OsmoBTS/Makefile index 729704e..f2c873a 100644 --- a/OsmoBTS/Makefile +++ b/OsmoBTS/Makefile @@ -23,8 +23,8 @@ clean: rm -rf $(cleanfiles) - rm -rf osmobts-abis__*.{svg,png} - rm -rf osmobts-usermanual__*.{svg,png} + rm -rf osmobts-abis__*.{svg,png,check} + rm -rf osmobts-usermanual__*.{svg,png,check} gen-bts-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoNITB/Makefile b/OsmoNITB/Makefile index d3bf5c8..e68b9b0 100644 --- a/OsmoNITB/Makefile +++ b/OsmoNITB/Makefile @@ -23,7 +23,7 @@ clean: rm -rf $(cleanfiles) - rm -rf osmonitb-usermanual__*.{svg,png} + rm -rf osmonitb-usermanual__*.{svg,png,check} gen-nitb-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoPCU/Makefile b/OsmoPCU/Makefile index 6b4ecb8..1f06183 100644 --- a/OsmoPCU/Makefile +++ b/OsmoPCU/Makefile @@ -25,7 +25,7 @@ clean: rm -rf $(cleanfiles) rm -rf gen-vty-docbook - rm -rf osmopcu-usermanual__*.{svg,png} + rm -rf osmopcu-usermanual__*.{svg,png,check} gen-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoSGSN/Makefile b/OsmoSGSN/Makefile index 612c10f..7df5168 100644 --- a/OsmoSGSN/Makefile +++ b/OsmoSGSN/Makefile @@ -22,7 +22,7 @@ osmosgsn-usermanual.pdf: chapters/*.adoc clean: - rm -rf osmosgsn-usermanual__*.{svg,png} + rm -rf osmosgsn-usermanual__*.{svg,png,check} rm -rf $(cleanfiles) gen-sgsn-vty-docbook: FORCE diff --git a/build/Makefile.asciidoc.inc b/build/Makefile.asciidoc.inc index 7def592..f95cd0b 100644 --- a/build/Makefile.asciidoc.inc +++ b/build/Makefile.asciidoc.inc @@ -9,6 +9,7 @@ # generate list of PDFs that we're supposed to render ASCIIDOCPDFS = $(ASCIIDOCS:%=%.pdf) +ASCIIDOC_CHECKS = $(ASCIIDOCS:%=%.check) ASCIIDOCSTYLE ?= $(BUILDDIR)/custom-dblatex.sty @@ -30,3 +31,13 @@ $(ASCIIDOCPDFS): %.pdf: %.adoc %-docinfo.xml $(ASCIIDOCSTYLE) $(TOPDIR)/common/chapters/*.adoc a2x $(A2X_OPTS) $< || asciidoc -f $(BUILDDIR)/mscgen-filter.conf -f $(BUILDDIR)/diag-filter.conf $< + +check: $(ASCIIDOC_CHECKS) + +$(ASCIIDOC_CHECKS): %.check: %.adoc %-docinfo.xml $(ASCIIDOCSTYLE) $(TOPDIR)/common/chapters/*.adoc chapters/*.adoc + asciidoc -v $(ASCIIDOC_OPTS) $< > $@ 2>&1 + # Make absolutely sure that the %.check target is updated. + touch $@ + # Do print the WARNING output but return error if any was found + # (grep -v would omit the WARNING output from the log). + @grep WARNING $@ && exit 1 || exit 0 -- To view, visit https://gerrit.osmocom.org/1089 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibccc83a3415930a528f2e8e4e4dda3b81c6d0b64 Gerrit-PatchSet: 6 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 18 17:23:30 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:23:30 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: make clean: also remove generated image files In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: make clean: also remove generated image files ...................................................................... make clean: also remove generated image files Change-Id: I80798e79b4ccee64f26f58f9754de02b2958e33e --- M OsmoBSC/Makefile M OsmoBTS/Makefile M OsmoNITB/Makefile M OsmoPCU/Makefile 4 files changed, 5 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoBSC/Makefile b/OsmoBSC/Makefile index e2c464c..fb5e269 100644 --- a/OsmoBSC/Makefile +++ b/OsmoBSC/Makefile @@ -24,6 +24,7 @@ clean: rm -rf $(cleanfiles) + rm -rf osmobsc-usermanual__*.{svg,png} gen-bsc-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoBTS/Makefile b/OsmoBTS/Makefile index 01683a7..729704e 100644 --- a/OsmoBTS/Makefile +++ b/OsmoBTS/Makefile @@ -22,8 +22,9 @@ osmobts-usermanual.pdf: chapters/*.adoc clean: - rm -rf osmobts-usermanual__*.{svg,png} rm -rf $(cleanfiles) + rm -rf osmobts-abis__*.{svg,png} + rm -rf osmobts-usermanual__*.{svg,png} gen-bts-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoNITB/Makefile b/OsmoNITB/Makefile index 29d9c51..d3bf5c8 100644 --- a/OsmoNITB/Makefile +++ b/OsmoNITB/Makefile @@ -23,6 +23,7 @@ clean: rm -rf $(cleanfiles) + rm -rf osmonitb-usermanual__*.{svg,png} gen-nitb-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoPCU/Makefile b/OsmoPCU/Makefile index ef80327..6b4ecb8 100644 --- a/OsmoPCU/Makefile +++ b/OsmoPCU/Makefile @@ -25,6 +25,7 @@ clean: rm -rf $(cleanfiles) rm -rf gen-vty-docbook + rm -rf osmopcu-usermanual__*.{svg,png} gen-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ -- To view, visit https://gerrit.osmocom.org/1088 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I80798e79b4ccee64f26f58f9754de02b2958e33e Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 18 17:23:30 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:23:30 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoBTS/abis/rsl.adoc: fix missing section header In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoBTS/abis/rsl.adoc: fix missing section header ...................................................................... OsmoBTS/abis/rsl.adoc: fix missing section header In effect, this fixes the dangling references from the table of RSL messages with additions/limitations to the Chan Act message description. Change-Id: Ic6f83f016ce9ec90af7eb0af1b1f71a10263915d --- M OsmoBTS/abis/rsl.adoc 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoBTS/abis/rsl.adoc b/OsmoBTS/abis/rsl.adoc index a78afc5..827e353 100644 --- a/OsmoBTS/abis/rsl.adoc +++ b/OsmoBTS/abis/rsl.adoc @@ -118,6 +118,7 @@ === Message Limitation Details [[CHANNEL_ACTIVATION]] +==== Channel Activation When used on a timeslot using the non-standard channel combination 'NM_CHANC_OSMO_TCHFull_TCHHalf_PDCH' as configured by OML, the regular -- To view, visit https://gerrit.osmocom.org/1082 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic6f83f016ce9ec90af7eb0af1b1f71a10263915d Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 18 17:23:30 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:23:30 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoBTS/abis/rsl: combine separate dyn ts sections In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoBTS/abis/rsl: combine separate dyn ts sections ...................................................................... OsmoBTS/abis/rsl: combine separate dyn ts sections There were two separate sections saying basically the same. Move the entire 'Dynamic Channel Combinations' section further above and combine with the 'IPA Style PDCH Management' section to avoid repetition. Change-Id: Ic370ba34de5cb14f0194ff8c8661e45d7ca98e2b --- M OsmoBTS/abis/rsl.adoc 1 file changed, 78 insertions(+), 80 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/OsmoBTS/abis/rsl.adoc b/OsmoBTS/abis/rsl.adoc index c9bb555..ed8676e 100644 --- a/OsmoBTS/abis/rsl.adoc +++ b/OsmoBTS/abis/rsl.adoc @@ -350,12 +350,36 @@ See <> -[[ipa_style_pdch_mgmt]] -=== IPA Style PDCH Management +[[rsl-dynamic-channels]] +=== Dynamic Channel Combinations -When using an IPA style dynamic TCH/F+PDCH channel type on an -on-air timeslot, there are a couple of non-standard RSL messages used -in order to activate or deactivate this timeslot in PDCH mode. +In the classic data model established by ETSI/3GPP for A-bis, each +timeslot (channel) is configured using a static channel combination by +means of A-bis OML. Particularly in presence of GPRS services, this +is very unflexible and leads to inefficient use of air interface +resources. + +As such, several methods have been implemented to overcome this +limitation. The fundamental operation can be outlined like this: + +* Configuration of a particular _dynamic_ channel combination via OML +* activation of TCH works like on a classic TCH channel combination +* activation of PDCH requires some specific PDCH activation procedure + +There are two variants implemented in the OsmoBTS A-bis dialect: + +[[ipa_style_pdch_mgmt]] +==== IPA Style Dynamic Channels + +This method is used when OML uses 'NM_CHANC_IPAC_TCHFull_PDCH' (0x80) +as channel combination for the given time-slot. + +'IPA style' refers to 'ip.access' compatible PDCH activation and deactivation. + +When the IPA style dynamic channel combination _TCH/F or PDCH_ +is set, the non-standard 'PDCH ACTIVATE' (<>) and 'PDCH +DEACTIVATE' (<>) procedures are used for switching an idle +channel into PDCH mode and back into idle mode. When the channel is used as TCH/F, regular circuit-switched activation is performed, like on any traditional TCH/F. However, the BSC must @@ -365,7 +389,7 @@ related procedures are used to enable the PDCH. [[pdch_act]] -==== PDCH Activate +===== PDCH Activate This procedure is used by the BSC to request the BTS to activate an IPA style dynamic TCH/F+PDCH channel in PDCH mode. @@ -375,7 +399,7 @@ See <>, <>, <> [[pdch_deact]] -==== PDCH Deactivate +===== PDCH Deactivate This procedure is used by the BSC to request the BTS to deactivate an active PDCH on any an IPA style dynamic TCH/F+PDCH channel. @@ -383,6 +407,53 @@ The operation is not supported on any other physical channel type. See <>, <>, <> + +===== IPA Style Dynamic Switchover Example + +.Example for dynamic channel switchover, for IPA style dynamic timeslots +["mscgen"] +---- +include::dyn_ts_ipa_style.msc[] +---- + + +[[OSMOCOM_DYN_TS]] +==== Osmocom Style Dynamic Channels + +This method is in use when OML uses +'NM_CHANC_OSMO_TCHFull_TCHHalf_PDCH' (0x90) for the given time-slot. + +The activation of PDCH is performed by using the regular 'RSL CHANNEL ACTIVATE' +procedure according to <>, with these modifications: + +* The 'C-bits' part of the 'Channel Number' IE take the non-standard binary + value 11000 (C5 thru C1 as seen in 3GPP TS 08.58 ? 9.3.1). +* The 'A-bits' part of the 'Activation Type' IE take the non-standard binary + value 1111, with an additional fourth bit (add A4 to A3 thru A1 as seen in + 3GPP TS 08.58 ? 9.3.3; all remaining reserved bits as well as the 'R' bit are + coded as zero). +* The normally mandatory 'Channel Mode' IE is omitted; none of the optional IEs + are included. + +Hence the message consists of exactly these IEs: + +.PDCH type _Channel Activation_ message IEs +[options="header",cols="10%,30%,60%"] +|=== +| TS 08.58 ? | IE Name | Handling +| 9.1 | Message discriminator | Dedicated Channel Management +| 9.2 | Message type | CHANnel ACTIVation +| 9.3.1 | Channel number | 'C-bits' 11000, plus TS bits as usual +| 9.3.3 | Activation type | 'A-bits' 1111 +|=== + +===== Osmocom Style Dynamic Switchover Example + +.Example for dynamic channel switchover, for Osmocom style dynamic timeslots +["mscgen"] +---- +include::dyn_ts_osmocom_style.msc[] +---- === Message Formats and Contents @@ -859,77 +930,4 @@ illustrated by the differences of <> and <>. Since the secondary TRX has no BCCH, it does not (need to) receive any 'RSL BCCH INFORMATION' messages from the BSC. - -[[rsl-dynamic-channels]] -=== Dynamic Channel Combinations - -In the classic data model established by ETSI/3GPP for A-bis, each -timeslot (channel) is configured using a static channel combination by -means of A-bis OML. Particularly in presence of GPRS services, this -is very unflexible and leads to inefficient use of air interface -resources. - -As such, several methods have been implemented to overcome this -limitation. The fundamental operation can be outlined like this: - -* Configuration of a particular _dynamic_ channel combination via OML -* activation of TCH works like on a classic TCH channel combination -* activation of PDCH requires some specific PDCH activation procedure - -There are two variants implemented in the OsmoBTS A-bis dialect: - -==== IPA Style Dynamic Channels - -This method is used when OML uses 'NM_CHANC_IPAC_TCHFull_PDCH' (0x80) -as channel combination for the given time-slot. - -'IPA style' refers to 'ip.access' compatible PDCH activation and deactivation. - -When the IPA style dynamic channel combination _TCH/F or PDCH_ -is set, the non-standard 'PDCH ACTIVATE' (<>) and 'PDCH -DEACTIVATE' (<>) procedures are used for switching an idle -channel into PDCH mode and back into idle mode. - -.Example for dynamic channel switchover, for IPA style dynamic timeslots -["mscgen"] ----- -include::dyn_ts_ipa_style.msc[] ----- - -[[OSMOCOM_DYN_TS]] -==== Osmocom Style Dynamic Channels - -This method is in use when OML uses -'NM_CHANC_OSMO_TCHFull_TCHHalf_PDCH' (0x90) for the given time-slot. - -The activation of PDCH is performed by using the regular 'RSL CHANNEL ACTIVATE' -procedure according to <>, with these modifications: - -* The 'C-bits' part of the 'Channel Number' IE take the non-standard binary - value 11000 (C5 thru C1 as seen in 3GPP TS 08.58 ? 9.3.1). -* The 'A-bits' part of the 'Activation Type' IE take the non-standard binary - value 1111, with an additional fourth bit (add A4 to A3 thru A1 as seen in - 3GPP TS 08.58 ? 9.3.3; all remaining reserved bits as well as the 'R' bit are - coded as zero). -* The normally mandatory 'Channel Mode' IE is omitted; none of the optional IEs - are included. - -Hence the message consists of exactly these IEs: - -.PDCH type _Channel Activation_ message IEs -[options="header",cols="10%,30%,60%"] -|=== -| TS 08.58 ? | IE Name | Handling -| 9.1 | Message discriminator | Dedicated Channel Management -| 9.2 | Message type | CHANnel ACTIVation -| 9.3.1 | Channel number | 'C-bits' 11000, plus TS bits as usual -| 9.3.3 | Activation type | 'A-bits' 1111 -|=== - -.Example for dynamic channel switchover, for Osmocom style dynamic timeslots -["mscgen"] ----- -include::dyn_ts_osmocom_style.msc[] ----- - -- To view, visit https://gerrit.osmocom.org/1090 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic370ba34de5cb14f0194ff8c8661e45d7ca98e2b Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 18 17:23:30 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:23:30 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: osmobts-usermanual.adoc: fix link to abis.adoc chapter In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: osmobts-usermanual.adoc: fix link to abis.adoc chapter ...................................................................... osmobts-usermanual.adoc: fix link to abis.adoc chapter The chapter is in ../common/chapters, not in ./chapters Change-Id: I698d83e96cb77900b99a0bd383587b1b68182efb --- M OsmoBTS/osmobts-usermanual.adoc 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/OsmoBTS/osmobts-usermanual.adoc b/OsmoBTS/osmobts-usermanual.adoc index a05becd..4d47b1c 100644 --- a/OsmoBTS/osmobts-usermanual.adoc +++ b/OsmoBTS/osmobts-usermanual.adoc @@ -6,7 +6,7 @@ include::chapters/overview.adoc[] -include::chapters/abis.adoc[] +include::../common/chapters/abis.adoc[] include::chapters/interfaces.adoc[] -- To view, visit https://gerrit.osmocom.org/1084 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I698d83e96cb77900b99a0bd383587b1b68182efb Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 18 17:23:30 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:23:30 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoBTS/abis/rsl: add missing info for Osmocom Dyn Channels In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoBTS/abis/rsl: add missing info for Osmocom Dyn Channels ...................................................................... OsmoBTS/abis/rsl: add missing info for Osmocom Dyn Channels The section 'Osmocom Style Dynamic Channels' ended in mid-sentence without naming any of the hard facts. Complete that. Add section links. Change-Id: Ib92895fe1bb89fb1b14dc8fcbd88b98bbb6edeee --- M OsmoBTS/abis/rsl.adoc 1 file changed, 29 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/OsmoBTS/abis/rsl.adoc b/OsmoBTS/abis/rsl.adoc index 30a7d77..c9bb555 100644 --- a/OsmoBTS/abis/rsl.adoc +++ b/OsmoBTS/abis/rsl.adoc @@ -125,8 +125,10 @@ RSL channel activation procedures can not only be used for activation of circuit-switched channels, but also for activation of a PDCH. -NOTE:: Do not confuse this with the ip.access style _PDCH ACT_ type -dynamic PDCH protocol employed by nanoBTS devices. +See <>. + +NOTE:: Do not confuse this with the IPA style _PDCH ACT_ type +dynamic PDCH protocol employed by nanoBTS devices (<>). [[MEASUREMENT_RESULT]] ==== Measurement Result @@ -894,14 +896,35 @@ include::dyn_ts_ipa_style.msc[] ---- -==== Osmocom style Dynamic Channels +[[OSMOCOM_DYN_TS]] +==== Osmocom Style Dynamic Channels This method is in use when OML uses 'NM_CHANC_OSMO_TCHFull_TCHHalf_PDCH' (0x90) for the given time-slot. -The activation of PDCH is performed by using the regular 'RSL CHANNEL -ACTIVATE' procedure according to <>, with the -exception that the 'cbits' part of the ' +The activation of PDCH is performed by using the regular 'RSL CHANNEL ACTIVATE' +procedure according to <>, with these modifications: + +* The 'C-bits' part of the 'Channel Number' IE take the non-standard binary + value 11000 (C5 thru C1 as seen in 3GPP TS 08.58 ? 9.3.1). +* The 'A-bits' part of the 'Activation Type' IE take the non-standard binary + value 1111, with an additional fourth bit (add A4 to A3 thru A1 as seen in + 3GPP TS 08.58 ? 9.3.3; all remaining reserved bits as well as the 'R' bit are + coded as zero). +* The normally mandatory 'Channel Mode' IE is omitted; none of the optional IEs + are included. + +Hence the message consists of exactly these IEs: + +.PDCH type _Channel Activation_ message IEs +[options="header",cols="10%,30%,60%"] +|=== +| TS 08.58 ? | IE Name | Handling +| 9.1 | Message discriminator | Dedicated Channel Management +| 9.2 | Message type | CHANnel ACTIVation +| 9.3.1 | Channel number | 'C-bits' 11000, plus TS bits as usual +| 9.3.3 | Activation type | 'A-bits' 1111 +|=== .Example for dynamic channel switchover, for Osmocom style dynamic timeslots ["mscgen"] -- To view, visit https://gerrit.osmocom.org/1087 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib92895fe1bb89fb1b14dc8fcbd88b98bbb6edeee Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 18 17:23:31 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:23:31 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoBTS/abis/rsl: cosmetic: 'IPA style' In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoBTS/abis/rsl: cosmetic: 'IPA style' ...................................................................... OsmoBTS/abis/rsl: cosmetic: 'IPA style' Consistently name the PDCH act methid 'IPA style', name ip.access only once in the 'IPA Style Dynamic Channels' section. Consistently write 'IPA style' without hyphen (not 'IPA-style'). Capitalize section headers ('IPA Style'). Change-Id: I91112c2d8af9424ebe7e1972fd4ef9c77d24a7b4 --- M OsmoBTS/abis/rsl.adoc 1 file changed, 15 insertions(+), 13 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/OsmoBTS/abis/rsl.adoc b/OsmoBTS/abis/rsl.adoc index 827e353..30a7d77 100644 --- a/OsmoBTS/abis/rsl.adoc +++ b/OsmoBTS/abis/rsl.adoc @@ -349,9 +349,9 @@ [[ipa_style_pdch_mgmt]] -=== IPA style PDCH Management +=== IPA Style PDCH Management -When using an IPA-style dynamic TCH/F+PDCH channel type on an +When using an IPA style dynamic TCH/F+PDCH channel type on an on-air timeslot, there are a couple of non-standard RSL messages used in order to activate or deactivate this timeslot in PDCH mode. @@ -366,7 +366,7 @@ ==== PDCH Activate This procedure is used by the BSC to request the BTS to activate an -IPA-style dynamic TCH/F+PDCH channel in PDCH mode. +IPA style dynamic TCH/F+PDCH channel in PDCH mode. The operation is not supported on any other physical channel type. @@ -376,7 +376,7 @@ ==== PDCH Deactivate This procedure is used by the BSC to request the BTS to deactivate an -active PDCH on any an IPA-style dynamic TCH/F+PDCH channel. +active PDCH on any an IPA style dynamic TCH/F+PDCH channel. The operation is not supported on any other physical channel type. @@ -581,7 +581,7 @@ ==== PDCH Activate This message is sent by the BSC to request the activation of a PDCH on -a IPA-style dynamic TCH/F+PDCH channel. +a IPA style dynamic TCH/F+PDCH channel. [options="header"] [cols="30%,25%,15%,15%,15%"] @@ -598,7 +598,7 @@ ==== PDCH Activate ACK This message is sent by the BTS to confirm the successful activation -of a PDCH on a IPA-style dynamic TCH/F+PDCH channel. +of a PDCH on a IPA style dynamic TCH/F+PDCH channel. [options="header"] [cols="30%,25%,15%,15%,15%"] @@ -616,7 +616,7 @@ ==== PDCH Activate NACK This message is sent by the BTS to reject the successful activation -of a PDCH on a IPA-style dynamic TCH/F+PDCH channel. +of a PDCH on a IPA style dynamic TCH/F+PDCH channel. [options="header"] [cols="30%,25%,15%,15%,15%"] @@ -634,7 +634,7 @@ ==== PDCH Deactivate This message is sent by the BSC to request the deactivation of a PDCH -on a IPA-style dynamic TCH/F+PDCH channel. +on a IPA style dynamic TCH/F+PDCH channel. [options="header"] [cols="30%,25%,15%,15%,15%"] @@ -651,7 +651,7 @@ ==== PDCH Deactivate ACK This message is sent by the BTS to confirm the successful deactivation -of a PDCH on a IPA-style dynamic TCH/F+PDCH channel. +of a PDCH on a IPA style dynamic TCH/F+PDCH channel. [options="header"] [cols="30%,25%,15%,15%,15%"] @@ -668,7 +668,7 @@ ==== PDCH Deactivate NACK This message is sent by the BTS to reject the deactivation of a PDCH -on a IPA-style dynamic TCH/F+PDCH channel. +on a IPA style dynamic TCH/F+PDCH channel. [options="header"] [cols="30%,25%,15%,15%,15%"] @@ -876,17 +876,19 @@ There are two variants implemented in the OsmoBTS A-bis dialect: -==== ip.access style Dynamic Channels +==== IPA Style Dynamic Channels This method is used when OML uses 'NM_CHANC_IPAC_TCHFull_PDCH' (0x80) as channel combination for the given time-slot. -When the ip.access style dynamic channel combination _TCH/F or PDCH_ +'IPA style' refers to 'ip.access' compatible PDCH activation and deactivation. + +When the IPA style dynamic channel combination _TCH/F or PDCH_ is set, the non-standard 'PDCH ACTIVATE' (<>) and 'PDCH DEACTIVATE' (<>) procedures are used for switching an idle channel into PDCH mode and back into idle mode. -.Example for dynamic channel switchover, for ip.access style dynamic timeslots +.Example for dynamic channel switchover, for IPA style dynamic timeslots ["mscgen"] ---- include::dyn_ts_ipa_style.msc[] -- To view, visit https://gerrit.osmocom.org/1086 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I91112c2d8af9424ebe7e1972fd4ef9c77d24a7b4 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 18 17:23:31 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:23:31 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoBTS/chapters/configuration.adoc: fix index numbering In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoBTS/chapters/configuration.adoc: fix index numbering ...................................................................... OsmoBTS/chapters/configuration.adoc: fix index numbering Change-Id: Ibe507fe36e0130377dec361d56fd75596ca64e75 --- M OsmoBTS/chapters/configuration.adoc 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/OsmoBTS/chapters/configuration.adoc b/OsmoBTS/chapters/configuration.adoc index 4362166..b91d8ac 100644 --- a/OsmoBTS/chapters/configuration.adoc +++ b/OsmoBTS/chapters/configuration.adoc @@ -99,7 +99,7 @@ <2> You must configure at least one PHY instance in the PHY link <3> There is always exactly one BTS (`bts 0`) configured in OsmoBTS <4> The `ipa unit-id` is what is used to identify this BTS to the BSC -<6> The OML Remote IP is the IP address of the BSC, to which the BTS shall connect to. +<5> The OML Remote IP is the IP address of the BSC, to which the BTS shall connect to. <6> There must be at least one trx (`trx 0`) in each BTS <7> Every TRX must be mapped to a specific PHY instance this way -- To view, visit https://gerrit.osmocom.org/1085 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibe507fe36e0130377dec361d56fd75596ca64e75 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 18 17:23:31 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:23:31 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoBTS/chapters/dynamic-timeslots.adoc: Remove obsolete links In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoBTS/chapters/dynamic-timeslots.adoc: Remove obsolete links ...................................................................... OsmoBTS/chapters/dynamic-timeslots.adoc: Remove obsolete links Those file never existed and the ladder diagrams are instead at OsmoBTS/abis/dyn_ts*msc. Change-Id: Icbae85b959e80afe7f272a11f33064a3e594da53 --- M OsmoBTS/chapters/dynamic-timeslots.adoc 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/OsmoBTS/chapters/dynamic-timeslots.adoc b/OsmoBTS/chapters/dynamic-timeslots.adoc index 68d6fe1..29dff5b 100644 --- a/OsmoBTS/chapters/dynamic-timeslots.adoc +++ b/OsmoBTS/chapters/dynamic-timeslots.adoc @@ -15,7 +15,3 @@ * _osmo-bts-trx_ See also <>. - -include::../../common/snippets/dyn_pdch_ladder.adoc[] - -include::../../common/snippets/dyn_ts_ladder_TCH_H.adoc[] -- To view, visit https://gerrit.osmocom.org/1083 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icbae85b959e80afe7f272a11f33064a3e594da53 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue Oct 18 17:23:47 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:23:47 +0000 Subject: osmo-gsm-manuals[master]: OsmoBSC+NITB/running: fix title levels, one too deep In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1092 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If81e44c9a0774e5de39cc536989cef5cb214a224 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Oct 18 17:24:07 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:24:07 +0000 Subject: osmo-gsm-manuals[master]: OsmoBSC: include bts-examples.adoc from OsmoNITB In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1093 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6b6d8c413762c710453b228f846216961b578597 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Oct 18 17:24:19 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:24:19 +0000 Subject: osmo-gsm-manuals[master]: OsmoNITB: include abis.adoc from common/chapters/ In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1094 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If3d92fe19d402d77b0db0eb9d00efef0a8d02122 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Oct 18 17:24:53 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:24:53 +0000 Subject: osmo-gsm-manuals[master]: fix 'make clean': shell glob, ignore failure In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1096 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6bc4d9ea72b43a573acbc860c23397f748de2c7b Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Oct 18 17:25:04 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:25:04 +0000 Subject: osmo-gsm-manuals[master]: jenkins.sh: use sh instead of bash In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1100 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia65e960dc7d74e6bb7a2463316d09622e9788c97 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Oct 18 17:25:43 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:25:43 +0000 Subject: openbsc[master]: Replace magic number with define In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1111 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c6ad68f4c6aa72d39ec7e5a6968b36ec20e79f4 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 Tue Oct 18 17:25:46 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:25:46 +0000 Subject: [MERGED] openbsc[master]: Replace magic number with define In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Replace magic number with define ...................................................................... Replace magic number with define Value 4 used as magic number by both OpenBSC and OsmoBTS so it make sense to add it to shared header. See ebb483b69a5319e522ba5f713e9cb6f68a814a6a in osmo-bts for details. Change-Id: I9c6ad68f4c6aa72d39ec7e5a6968b36ec20e79f4 --- M openbsc/include/openbsc/gsm_data_shared.h M openbsc/src/libcommon/gsm_data_shared.c 2 files changed, 5 insertions(+), 1 deletion(-) 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 d889959..487a3f3 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -46,6 +46,10 @@ GSM_CHREQ_REASON_OTHER, }; +/* lchans 0..3 are SDCCH in combined channel configuration, + use 4 as magic number for BCCH hack - see osmo-bts-../oml.c:opstart_compl() */ +#define CCCH_LCHAN 4 + #define TRX_NR_TS 8 #define TS_MAX_LCHAN 8 diff --git a/openbsc/src/libcommon/gsm_data_shared.c b/openbsc/src/libcommon/gsm_data_shared.c index b8853ad..df204fe 100644 --- a/openbsc/src/libcommon/gsm_data_shared.c +++ b/openbsc/src/libcommon/gsm_data_shared.c @@ -579,7 +579,7 @@ * here. This should never be sent in an RSL message. * See osmo-bts-xxx/oml.c:opstart_compl(). */ - if (lchan_nr == 4) + if (lchan_nr == CCCH_LCHAN) chan_nr = 0; else OSMO_ASSERT(lchan_nr < 4); -- To view, visit https://gerrit.osmocom.org/1111 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9c6ad68f4c6aa72d39ec7e5a6968b36ec20e79f4 Gerrit-PatchSet: 1 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 Tue Oct 18 17:25:59 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:25:59 +0000 Subject: osmo-pcu[master]: Revert "tbf: Add state WAIT_ASSIGN" In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/218 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1532f8e93194368cdc1e3846f82afa6d68cd5fbd Gerrit-PatchSet: 5 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Anonymous Coward #1000055 Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Oct 18 17:26:02 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:26:02 +0000 Subject: [MERGED] osmo-pcu[master]: Revert "tbf: Add state WAIT_ASSIGN" In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Revert "tbf: Add state WAIT_ASSIGN" ...................................................................... Revert "tbf: Add state WAIT_ASSIGN" This reverts commit f1a7b8fc6651f92a8b7f3f27b7ca05d07f4e44e0. Conflicts: tests/tbf/TbfTest.err The commit broke GPRS service at least for osmo-bts-sysmo on a SysmoBTS 1002 with current master of osmo-bts (ef30f50d5d6d5f863fc147d05ccdceb89284934e). The error observed is the following log output (was viewing both osmo-bts-sysmo and osmo-pcu logs interleaved): <0002> tbf.cpp:874 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=WAIT ASSIGN) T3169 timeout during transsmission <0002> tbf.cpp:893 - Assignment was on CCCH <0002> tbf.cpp:899 - No uplink data received yet <0007> l1sap.c:904 RACH for packet access <0001> pcu_l1_if.cpp:311 RACH request received: sapi=1 qta=0, ra=121, fn=13653 [repeat] When removing this single commit from current osmo-pcu master, GPRS service works well on SysmoBTS, with current osmo-bts master. The TbfTest.err expected output needed adjustment after the revert. Disclaimer: I am not aware of adverse effects this commit may have. I have no idea what the WAIT_ASSIGN state is used for -- further review is required. Change-Id: I1532f8e93194368cdc1e3846f82afa6d68cd5fbd --- M src/bts.cpp M src/tbf.cpp M src/tbf.h M tests/tbf/TbfTest.cpp M tests/tbf/TbfTest.err 5 files changed, 134 insertions(+), 191 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/bts.cpp b/src/bts.cpp index 73ec1f7..35da307 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -558,11 +558,8 @@ m_bts.trx[trx_no].arfcn, ts_no, tsc, usf, 0, sb_fn, m_bts.alpha, m_bts.gamma, -1, burst_type, sb); - if (plen >= 0) { + if (plen >= 0) pcu_l1if_tx_agch(immediate_assignment, plen); - if (tbf) - tbf->set_state(GPRS_RLCMAC_WAIT_ASSIGN); - } bitvec_free(immediate_assignment); @@ -687,10 +684,8 @@ (tbf->pdch[ts]->last_rts_fn + 21216) % 2715648, tbf->ta(), tbf->trx->arfcn, ts, tbf->tsc(), 7, poll, tbf->poll_fn, m_bts.alpha, m_bts.gamma, -1); - if (plen >= 0) { + if (plen >= 0) pcu_l1if_tx_pch(immediate_assignment, plen, imsi); - tbf->set_state(GPRS_RLCMAC_WAIT_ASSIGN); - } bitvec_free(immediate_assignment); } diff --git a/src/tbf.cpp b/src/tbf.cpp index 48d89b9..0ac8ace 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -408,7 +408,6 @@ const char *gprs_rlcmac_tbf::tbf_state_name[] = { "NULL", "ASSIGN", - "WAIT ASSIGN", "FLOW", "FINISHED", "WAIT RELEASE", @@ -827,12 +826,6 @@ if ((state_flags & (1 << GPRS_RLCMAC_FLAG_PACCH))) { if (state_is(GPRS_RLCMAC_ASSIGN)) { LOGP(DRLCMAC, LOGL_NOTICE, "%s releasing due to " - "PACCH assignment timeout (not yet sent).\n", - tbf_name(this)); - tbf_free(this); - return; - } else if (state_is(GPRS_RLCMAC_WAIT_ASSIGN)) { - LOGP(DRLCMAC, LOGL_NOTICE, "%s releasing due to " "PACCH assignment timeout.\n", tbf_name(this)); tbf_free(this); return; @@ -843,7 +836,7 @@ if ((state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))) { gprs_rlcmac_dl_tbf *dl_tbf = as_dl_tbf(this); dl_tbf->m_wait_confirm = 0; - if (dl_tbf->state_is(GPRS_RLCMAC_WAIT_ASSIGN)) { + if (dl_tbf->state_is(GPRS_RLCMAC_ASSIGN)) { tbf_assign_control_ts(dl_tbf); if (!dl_tbf->upgrade_to_multislot) { @@ -1004,8 +997,6 @@ if (poll_ass_dl) { set_polling(new_poll_fn, ts); - if (new_dl_tbf->state_is(GPRS_RLCMAC_ASSIGN)) - new_dl_tbf->set_state(GPRS_RLCMAC_WAIT_ASSIGN); dl_ass_state = GPRS_RLCMAC_DL_ASS_WAIT_ACK; LOGP(DRLCMACDL, LOGL_INFO, "%s Scheduled DL Assignment polling on FN=%d, TS=%d\n", @@ -1078,8 +1069,6 @@ set_polling(new_poll_fn, ts); ul_ass_state = GPRS_RLCMAC_UL_ASS_WAIT_ACK; - if (new_tbf->state_is(GPRS_RLCMAC_ASSIGN)) - new_tbf->set_state(GPRS_RLCMAC_WAIT_ASSIGN); LOGP(DRLCMACDL, LOGL_INFO, "%s Scheduled UL Assignment polling on FN=%d, TS=%d\n", name(), poll_fn, poll_ts); diff --git a/src/tbf.h b/src/tbf.h index 37401bf..3205f6e 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -43,8 +43,7 @@ enum gprs_rlcmac_tbf_state { GPRS_RLCMAC_NULL = 0, /* new created TBF */ - GPRS_RLCMAC_ASSIGN, /* wait for DL transmission */ - GPRS_RLCMAC_WAIT_ASSIGN,/* wait for confirmation */ + GPRS_RLCMAC_ASSIGN, /* wait for downlink assignment */ GPRS_RLCMAC_FLOW, /* RLC/MAC flow, resource needed */ GPRS_RLCMAC_FINISHED, /* flow finished, wait for release */ GPRS_RLCMAC_WAIT_RELEASE,/* wait for release or restart of DL TBF */ @@ -233,7 +232,7 @@ gprs_llc_queue *llc_queue(); const gprs_llc_queue *llc_queue() const; - static const char *tbf_state_name[7]; + static const char *tbf_state_name[6]; class GprsMs *m_ms; @@ -318,7 +317,10 @@ { /* The TBF is established or has been assigned by a IMM.ASS for * download */ - return state > GPRS_RLCMAC_ASSIGN; + return state > GPRS_RLCMAC_ASSIGN || + (direction == GPRS_RLCMAC_DL_TBF && + state == GPRS_RLCMAC_ASSIGN && + (state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))); } inline uint8_t gprs_rlcmac_tbf::tfi() const diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 3e17d8f..c716a55 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -1669,7 +1669,7 @@ ms2 = the_bts.ms_by_tlli(tlli1); OSMO_ASSERT(ms2 == ms1); OSMO_ASSERT(ms2->dl_tbf()); - OSMO_ASSERT(ms2->dl_tbf()->state_is(GPRS_RLCMAC_WAIT_ASSIGN)); + OSMO_ASSERT(ms2->dl_tbf()->state_is(GPRS_RLCMAC_ASSIGN)); dl_tbf2 = ms2->dl_tbf(); diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 0c9c877..8c6b78c 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -602,8 +602,7 @@ TX: START TBF(TFI=0 TLLI=0xc0000000 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 30 30 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 08 00 03 2b 2b 2b 2b -TBF(TFI=0 TLLI=0xc0000000 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xc0000000 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=0 TLLI=0xc0000000 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -629,8 +628,7 @@ TX: START TBF(TFI=1 TLLI=0xc0000001 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 30 31 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 18 40 03 2b 2b 2b 2b -TBF(TFI=1 TLLI=0xc0000001 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=1 TLLI=0xc0000001 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=1 TLLI=0xc0000001 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -656,8 +654,7 @@ TX: START TBF(TFI=2 TLLI=0xc0000002 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 30 32 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 28 80 03 2b 2b 2b 2b -TBF(TFI=2 TLLI=0xc0000002 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=2 TLLI=0xc0000002 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=2 TLLI=0xc0000002 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -683,8 +680,7 @@ TX: START TBF(TFI=3 TLLI=0xc0000003 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 30 33 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 38 c0 03 2b 2b 2b 2b -TBF(TFI=3 TLLI=0xc0000003 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=3 TLLI=0xc0000003 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=3 TLLI=0xc0000003 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -710,8 +706,7 @@ TX: START TBF(TFI=4 TLLI=0xc0000004 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 30 34 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 49 00 03 2b 2b 2b 2b -TBF(TFI=4 TLLI=0xc0000004 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=4 TLLI=0xc0000004 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=4 TLLI=0xc0000004 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -737,8 +732,7 @@ TX: START TBF(TFI=5 TLLI=0xc0000005 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 30 35 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 59 40 03 2b 2b 2b 2b -TBF(TFI=5 TLLI=0xc0000005 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=5 TLLI=0xc0000005 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=5 TLLI=0xc0000005 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -764,8 +758,7 @@ TX: START TBF(TFI=6 TLLI=0xc0000006 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 30 36 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 69 80 03 2b 2b 2b 2b -TBF(TFI=6 TLLI=0xc0000006 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=6 TLLI=0xc0000006 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=6 TLLI=0xc0000006 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -791,8 +784,7 @@ TX: START TBF(TFI=7 TLLI=0xc0000007 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 30 37 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 79 c0 03 2b 2b 2b 2b -TBF(TFI=7 TLLI=0xc0000007 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=7 TLLI=0xc0000007 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=7 TLLI=0xc0000007 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -818,8 +810,7 @@ TX: START TBF(TFI=8 TLLI=0xc0000008 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 30 38 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 8a 00 03 2b 2b 2b 2b -TBF(TFI=8 TLLI=0xc0000008 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=8 TLLI=0xc0000008 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=8 TLLI=0xc0000008 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -845,8 +836,7 @@ TX: START TBF(TFI=9 TLLI=0xc0000009 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 30 39 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 9a 40 03 2b 2b 2b 2b -TBF(TFI=9 TLLI=0xc0000009 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=9 TLLI=0xc0000009 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=9 TLLI=0xc0000009 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -872,8 +862,7 @@ TX: START TBF(TFI=10 TLLI=0xc000000a DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 31 30 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 aa 80 03 2b 2b 2b 2b -TBF(TFI=10 TLLI=0xc000000a DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=10 TLLI=0xc000000a DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=10 TLLI=0xc000000a DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -899,8 +888,7 @@ TX: START TBF(TFI=11 TLLI=0xc000000b DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 31 31 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 ba c0 03 2b 2b 2b 2b -TBF(TFI=11 TLLI=0xc000000b DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=11 TLLI=0xc000000b DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=11 TLLI=0xc000000b DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -926,8 +914,7 @@ TX: START TBF(TFI=12 TLLI=0xc000000c DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 31 32 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 cb 00 03 2b 2b 2b 2b -TBF(TFI=12 TLLI=0xc000000c DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=12 TLLI=0xc000000c DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=12 TLLI=0xc000000c DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -953,8 +940,7 @@ TX: START TBF(TFI=13 TLLI=0xc000000d DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 31 33 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 db 40 03 2b 2b 2b 2b -TBF(TFI=13 TLLI=0xc000000d DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=13 TLLI=0xc000000d DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=13 TLLI=0xc000000d DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -980,8 +966,7 @@ TX: START TBF(TFI=14 TLLI=0xc000000e DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 31 34 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 eb 80 03 2b 2b 2b 2b -TBF(TFI=14 TLLI=0xc000000e DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=14 TLLI=0xc000000e DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=14 TLLI=0xc000000e DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1007,8 +992,7 @@ TX: START TBF(TFI=15 TLLI=0xc000000f DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 31 35 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 00 fb c0 03 2b 2b 2b 2b -TBF(TFI=15 TLLI=0xc000000f DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=15 TLLI=0xc000000f DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=15 TLLI=0xc000000f DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1034,8 +1018,7 @@ TX: START TBF(TFI=16 TLLI=0xc0000010 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 31 36 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 0c 00 03 2b 2b 2b 2b -TBF(TFI=16 TLLI=0xc0000010 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=16 TLLI=0xc0000010 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=16 TLLI=0xc0000010 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1061,8 +1044,7 @@ TX: START TBF(TFI=17 TLLI=0xc0000011 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 31 37 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 1c 40 03 2b 2b 2b 2b -TBF(TFI=17 TLLI=0xc0000011 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=17 TLLI=0xc0000011 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=17 TLLI=0xc0000011 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1088,8 +1070,7 @@ TX: START TBF(TFI=18 TLLI=0xc0000012 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 31 38 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 2c 80 03 2b 2b 2b 2b -TBF(TFI=18 TLLI=0xc0000012 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=18 TLLI=0xc0000012 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=18 TLLI=0xc0000012 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1115,8 +1096,7 @@ TX: START TBF(TFI=19 TLLI=0xc0000013 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 31 39 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 3c c0 03 2b 2b 2b 2b -TBF(TFI=19 TLLI=0xc0000013 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=19 TLLI=0xc0000013 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=19 TLLI=0xc0000013 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1142,8 +1122,7 @@ TX: START TBF(TFI=20 TLLI=0xc0000014 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 32 30 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 4d 00 03 2b 2b 2b 2b -TBF(TFI=20 TLLI=0xc0000014 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=20 TLLI=0xc0000014 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=20 TLLI=0xc0000014 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1169,8 +1148,7 @@ TX: START TBF(TFI=21 TLLI=0xc0000015 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 32 31 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 5d 40 03 2b 2b 2b 2b -TBF(TFI=21 TLLI=0xc0000015 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=21 TLLI=0xc0000015 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=21 TLLI=0xc0000015 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1196,8 +1174,7 @@ TX: START TBF(TFI=22 TLLI=0xc0000016 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 32 32 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 6d 80 03 2b 2b 2b 2b -TBF(TFI=22 TLLI=0xc0000016 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=22 TLLI=0xc0000016 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=22 TLLI=0xc0000016 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1223,8 +1200,7 @@ TX: START TBF(TFI=23 TLLI=0xc0000017 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 32 33 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 7d c0 03 2b 2b 2b 2b -TBF(TFI=23 TLLI=0xc0000017 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=23 TLLI=0xc0000017 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=23 TLLI=0xc0000017 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1250,8 +1226,7 @@ TX: START TBF(TFI=24 TLLI=0xc0000018 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 32 34 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 8e 00 03 2b 2b 2b 2b -TBF(TFI=24 TLLI=0xc0000018 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=24 TLLI=0xc0000018 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=24 TLLI=0xc0000018 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1277,8 +1252,7 @@ TX: START TBF(TFI=25 TLLI=0xc0000019 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 32 35 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 9e 40 03 2b 2b 2b 2b -TBF(TFI=25 TLLI=0xc0000019 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=25 TLLI=0xc0000019 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=25 TLLI=0xc0000019 DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1304,8 +1278,7 @@ TX: START TBF(TFI=26 TLLI=0xc000001a DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 32 36 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 ae 80 03 2b 2b 2b 2b -TBF(TFI=26 TLLI=0xc000001a DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=26 TLLI=0xc000001a DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=26 TLLI=0xc000001a DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1331,8 +1304,7 @@ TX: START TBF(TFI=27 TLLI=0xc000001b DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 32 37 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 be c0 03 2b 2b 2b 2b -TBF(TFI=27 TLLI=0xc000001b DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=27 TLLI=0xc000001b DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=27 TLLI=0xc000001b DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1358,8 +1330,7 @@ TX: START TBF(TFI=28 TLLI=0xc000001c DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 32 38 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 cf 00 03 2b 2b 2b 2b -TBF(TFI=28 TLLI=0xc000001c DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=28 TLLI=0xc000001c DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=28 TLLI=0xc000001c DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1385,8 +1356,7 @@ TX: START TBF(TFI=29 TLLI=0xc000001d DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 32 39 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 df 40 03 2b 2b 2b 2b -TBF(TFI=29 TLLI=0xc000001d DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=29 TLLI=0xc000001d DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=29 TLLI=0xc000001d DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1412,8 +1382,7 @@ TX: START TBF(TFI=30 TLLI=0xc000001e DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 33 30 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 ef 80 03 2b 2b 2b 2b -TBF(TFI=30 TLLI=0xc000001e DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=30 TLLI=0xc000001e DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=30 TLLI=0xc000001e DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1439,8 +1408,7 @@ TX: START TBF(TFI=31 TLLI=0xc000001f DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=30 33 31 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 00 00 01 ff c0 03 2b 2b 2b 2b -TBF(TFI=31 TLLI=0xc000001f DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=31 TLLI=0xc000001f DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=31 TLLI=0xc000001f DIR=DL STATE=ASSIGN) append ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=45/0 Creating MS object, TLLI = 0x00000000 @@ -1474,11 +1442,10 @@ TX: START TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=220 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=34 35 36 2d 06 3f 30 0c 00 00 7d 80 00 1c 00 dc 01 23 45 68 00 03 2b 2b 2b 2b -TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN) append +TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) append Modifying MS object, TLLI = 0xc0123456, TA 220 -> 0 -TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN) append -TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN) changes state from WAIT ASSIGN to RELEASING +TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) append +TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) changes state from ASSIGN to RELEASING TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=RELEASING) free PDCH(TS 4, TRX 0): Detaching TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=RELEASING), 0 TBFs, USFs = 00, TFIs = 00000000. Detaching TBF from MS object, TLLI = 0xc0123456, TBF = TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=RELEASING) @@ -1504,37 +1471,36 @@ TX: START TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=4 TA=0 pollFN=-1 Sending data request: trx=0 ts=0 sapi=3 arfcn=0 fn=0 block=0 data=34 35 36 2d 06 3f 30 0c 00 00 7d 80 00 00 00 dc 01 23 45 68 00 23 2b 2b 2b 2b -TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN) append -TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN) downlink (V(A)==0 .. V(S)==0) +TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) append +TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) downlink (V(A)==0 .. V(S)==0) - Sending new block at BSN 0, CS=CS-1 -- Dequeue next LLC for TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN) (len=19) +- Dequeue next LLC for TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) (len=19) -- Chunk with length 19 is less than remaining space (20): add length header to to delimit LLC frame -- No space left, so we are done. -Complete DL frame for TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN)len=19 -- Dequeue next LLC for TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN) (len=19) +Complete DL frame for TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN)len=19 +- Dequeue next LLC for TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) (len=19) data block (BSN 0, CS-1): 4d 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 - need_padding 0 spb_status 0 spb 0(BSN1 0 BSN2 -1) - Copying data unit 0 (BSN 0) msg block (BSN 0, CS-1): 07 00 00 4d 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 MSG = 07 00 00 4d 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 -TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN) downlink (V(A)==0 .. V(S)==1) +TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) downlink (V(A)==0 .. V(S)==1) - Sending new block at BSN 1, CS=CS-1 -- Chunk with length 19 is less than remaining space (20): add length header to to delimit LLC frame -- No space left, so we are done. -Complete DL frame for TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN)len=19 -- Dequeue next LLC for TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN) (len=19) +Complete DL frame for TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN)len=19 +- Dequeue next LLC for TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) (len=19) data block (BSN 1, CS-1): 4d 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 - need_padding 0 spb_status 0 spb 0(BSN1 1 BSN2 -1) - Copying data unit 0 (BSN 1) msg block (BSN 1, CS-1): 07 00 02 4d 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 MSG = 07 00 02 4d 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 -TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN) downlink (V(A)==0 .. V(S)==2) +TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) downlink (V(A)==0 .. V(S)==2) - Sending new block at BSN 2, CS=CS-1 -- Chunk with length 19 is less than remaining space (20): add length header to to delimit LLC frame -- Final block, so we done. -Complete DL frame for TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN)len=19 -TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=WAIT ASSIGN) changes state from WAIT ASSIGN to FINISHED +Complete DL frame for TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN)len=19 +TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=ASSIGN) changes state from ASSIGN to FINISHED data block (BSN 2, CS-1): 4d 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 - need_padding 0 spb_status 0 spb 0(BSN1 2 BSN2 -1) - Copying data unit 0 (BSN 2) @@ -1569,26 +1535,29 @@ 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 03 8b 29 07 00 c8 00 10 0b 2b 2b 2b 2b 2b 2b 2b -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) changes state from FLOW to WAIT ASSIGN Got RLC block, coding scheme: CS-1, length: 23 (23)) UL data: 00 01 01 f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=WAIT ASSIGN) restarting timer 3169 while old timer 3169 pending -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=WAIT ASSIGN): Got CS-1 RLC data block: CV=0, BSN=0, SPB=0, PI=0, E=1, TI=1, bitoffs=24 +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=0, BSN=0, SPB=0, PI=0, E=1, TI=1, bitoffs=24 - BSN 0 storing in window (0..63) -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=WAIT ASSIGN): data_length=20, data=f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): data_length=20, data=f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Decoded premier TLLI=0x00000000 of UL DATA TFI=0. Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed - Raising V(R) to 1 - Taking block 0 out, raising V(Q) to 1 - Assembling frames: (len=20) -- Frame 1 starts at offset 4, length=16, is_complete=1 -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) complete UL frame len=16 -LLC [PCU -> SGSN] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) len=16 +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) complete UL frame len=16 +LLC [PCU -> SGSN] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) len=16 No bctx +- No gaps in received block, last block: BSN=0 CV=0 +- Finished with UL TBF +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) changes state from FLOW to FINISHED - Scheduling Ack/Nack, because TLLI is included. -Got 'TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN)', TA=7 +- Scheduling Ack/Nack, because last block has CV==0. +Got 'TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FINISHED)', TA=7 Got MS: TLLI = 0xf1223344, TA = 7 ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=0/0 @@ -1613,8 +1582,7 @@ TX: START TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) Immediate Assignment Downlink (PCH) - TRX=0 (0) TS=7 TA=7 pollFN=-1 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) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT ASSIGN) append +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: MS requests single block allocation @@ -1654,16 +1622,15 @@ +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN): Scheduling polling at FN 2654283 TS 7 -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) Scheduled UL Assignment polling on FN=2654283, TS=7 -Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) (TRX=0, TS=7) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) Scheduled UL Assignment polling on FN=2654283, TS=7 +Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) (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 8f 1d 00 00 88 00 08 2b 2b 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=WAIT ASSIGN) Packet Control Ack -TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) changes state from WAIT ASSIGN to FLOW +RX: [PCU <- BTS] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) Packet Control Ack +TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got RLC block, coding scheme: CS-1, length: 23 (23)) UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 @@ -1740,16 +1707,15 @@ +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN): Scheduling polling at FN 2654283 TS 7 -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) Scheduled UL Assignment polling on FN=2654283, TS=7 -Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) (TRX=0, TS=7) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) Scheduled UL Assignment polling on FN=2654283, TS=7 +Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) (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 8f 1d 00 00 88 00 08 2b 2b 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=WAIT ASSIGN) Packet Control Ack -TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) changes state from WAIT ASSIGN to FLOW +RX: [PCU <- BTS] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) Packet Control Ack +TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got RLC block, coding scheme: CS-1, length: 23 (23)) UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 @@ -1792,7 +1758,6 @@ +++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Downlink Assignment ------------------------- TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Scheduling polling at FN 2654288 TS 7 -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Scheduled DL Assignment polling on FN=2654288, TS=7 Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) (TRX=0, TS=7) Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654275 block=9 data=48 08 00 00 0c 72 00 02 08 00 80 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b @@ -1801,7 +1766,7 @@ ------------------------- RX : Uplink Control Block ------------------------- RX: [PCU <- BTS] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Packet Control Ack TBF: [UPLINK] DOWNLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT ASSIGN) changes state from WAIT ASSIGN to FLOW +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to FLOW TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FLOW) stopping timer 0. Received RTS on disabled PDCH: TRX=0 TS=0 Received RTS on disabled PDCH: TRX=0 TS=1 @@ -1881,16 +1846,15 @@ +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN): Scheduling polling at FN 2654348 TS 7 -TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=WAIT ASSIGN) Scheduled UL Assignment polling on FN=2654348, TS=7 -Scheduling control message at RTS for TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=WAIT ASSIGN) (TRX=0, TS=7) +TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) Scheduled UL Assignment polling on FN=2654348, TS=7 +Scheduling control message at RTS for TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) (TRX=0, TS=7) Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654335 block=11 data=48 28 5e ac ce f1 0f 1d 00 00 88 40 09 2b 2b 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=1 TLLI=0xf5667788 DIR=UL STATE=WAIT ASSIGN) Packet Control Ack -TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=WAIT ASSIGN) -TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=WAIT ASSIGN) changes state from WAIT ASSIGN to FLOW +RX: [PCU <- BTS] TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) Packet Control Ack +TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) +TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got RLC block, coding scheme: CS-1, length: 23 (23)) UL data: 3c 02 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=1, CPS=0, RSB=0, rc=184 @@ -1953,16 +1917,15 @@ +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN): Scheduling polling at FN 2654283 TS 7 -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) Scheduled UL Assignment polling on FN=2654283, TS=7 -Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) (TRX=0, TS=7) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) Scheduled UL Assignment polling on FN=2654283, TS=7 +Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) (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 83 1d 00 00 88 00 08 2b 2b 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=WAIT ASSIGN) Packet Control Ack -TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) changes state from WAIT ASSIGN to FLOW +RX: [PCU <- BTS] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) Packet Control Ack +TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got RLC block, coding scheme: CS-1, length: 23 (23)) UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 @@ -2050,16 +2013,15 @@ +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN): Scheduling polling at FN 2654340 TS 7 -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) Scheduled UL Assignment polling on FN=2654340, TS=7 -Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) (TRX=0, TS=7) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) Scheduled UL Assignment polling on FN=2654340, TS=7 +Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) (TRX=0, TS=7) Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654327 block=9 data=4f 28 5e 24 46 68 83 1d 00 00 88 00 08 2b 2b 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=WAIT ASSIGN) Packet Control Ack -TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) changes state from WAIT ASSIGN to FLOW +RX: [PCU <- BTS] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) Packet Control Ack +TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW ********** TBF starts here ********** Allocating DL TBF: MS_CLASS=1/0 Slot Allocation (Algorithm A) for class 1 @@ -2132,16 +2094,15 @@ +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN): Scheduling polling at FN 2654283 TS 7 -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) Scheduled UL Assignment polling on FN=2654283, TS=7 -Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) (TRX=0, TS=7) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) Scheduled UL Assignment polling on FN=2654283, TS=7 +Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) (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 83 1d 00 00 88 00 08 2b 2b 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=WAIT ASSIGN) Packet Control Ack -TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) changes state from WAIT ASSIGN to FLOW +RX: [PCU <- BTS] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) Packet Control Ack +TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got RLC block, coding scheme: CS-1, length: 23 (23)) UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 @@ -2214,15 +2175,14 @@ 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 03 8b ed 07 00 c8 00 10 0b 2b 2b 2b 2b 2b 2b 2b -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) changes state from FLOW to WAIT ASSIGN Got RLC block, coding scheme: CS-1, length: 23 (23)) UL data: 00 01 01 f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 UL DATA TFI=0 received (V(Q)=0 .. V(R)=0) -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=WAIT ASSIGN) restarting timer 3169 while old timer 3169 pending -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=WAIT ASSIGN): Got CS-1 RLC data block: CV=0, BSN=0, SPB=0, PI=0, E=1, TI=1, bitoffs=24 +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) restarting timer 3169 while old timer 3169 pending +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): Got CS-1 RLC data block: CV=0, BSN=0, SPB=0, PI=0, E=1, TI=1, bitoffs=24 - BSN 0 storing in window (0..63) -TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=WAIT ASSIGN): data_length=20, data=f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW): data_length=20, data=f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Decoded premier TLLI=0x00000000 of UL DATA TFI=0. Got RACH from TLLI=0x00000000 while TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) still exists. Killing pending DL TBF TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to RELEASING @@ -2240,10 +2200,14 @@ - Taking block 0 out, raising V(Q) to 1 - Assembling frames: (len=20) -- Frame 1 starts at offset 4, length=16, is_complete=1 -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) complete UL frame len=16 -LLC [PCU -> SGSN] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) len=16 +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) complete UL frame len=16 +LLC [PCU -> SGSN] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) len=16 No bctx +- No gaps in received block, last block: BSN=0 CV=0 +- Finished with UL TBF +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) changes state from FLOW to FINISHED - Scheduling Ack/Nack, because TLLI is included. +- 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: @@ -2284,16 +2248,15 @@ +++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Uplink Assignment ------------------------- TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN): Scheduling polling at FN 2654283 TS 7 -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) Scheduled UL Assignment polling on FN=2654283, TS=7 -Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) (TRX=0, TS=7) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) Scheduled UL Assignment polling on FN=2654283, TS=7 +Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) (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 83 1d 00 00 88 00 08 2b 2b 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=WAIT ASSIGN) Packet Control Ack -TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN) changes state from WAIT ASSIGN to FLOW +RX: [PCU <- BTS] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) Packet Control Ack +TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) +TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes state from ASSIGN to FLOW Got RLC block, coding scheme: CS-1, length: 23 (23)) UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 @@ -2375,7 +2338,6 @@ +++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Downlink Assignment ------------------------- TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW): Scheduling polling at FN 2654288 TS 7 -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Scheduled DL Assignment polling on FN=2654288, TS=7 Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) (TRX=0, TS=7) Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654275 block=9 data=48 08 00 00 0c 72 00 02 08 00 80 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b @@ -2384,7 +2346,7 @@ ------------------------- RX : Uplink Control Block ------------------------- RX: [PCU <- BTS] TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Packet Control Ack TBF: [UPLINK] DOWNLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) -TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT ASSIGN) changes state from WAIT ASSIGN to FLOW +TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to FLOW TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FLOW) stopping timer 0. Received RTS on disabled PDCH: TRX=0 TS=0 Received RTS on disabled PDCH: TRX=0 TS=1 @@ -3063,7 +3025,6 @@ +++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++ ------------------------- TX : Packet Downlink Assignment ------------------------- TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT RELEASE): Scheduling polling at FN 2654413 TS 7 -TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to WAIT ASSIGN TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT RELEASE) Scheduled DL Assignment polling on FN=2654413, TS=7 Scheduling control message at RTS for TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT RELEASE) (TRX=0, TS=7) Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654400 block=2 data=48 08 20 08 0c 72 00 02 18 00 80 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b @@ -3078,7 +3039,7 @@ PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING), 1 TBFs, USFs = 01, TFIs = 00000002. Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=RELEASING) ********** TBF ends here ********** -TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=WAIT ASSIGN) changes state from WAIT ASSIGN to FLOW +TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) changes state from ASSIGN to FLOW TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FLOW) stopping timer 0. Received RTS on disabled PDCH: TRX=0 TS=0 Received RTS on disabled PDCH: TRX=0 TS=1 @@ -3425,16 +3386,15 @@ +++++++++++++++++++++++++ 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) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT 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=WAIT ASSIGN EGPRS) (TRX=0, 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 f8 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=WAIT ASSIGN EGPRS) Packet Control Ack -TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN EGPRS) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN EGPRS) changes state from WAIT ASSIGN to FLOW +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: CS-1, length: 23 (23)) UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 @@ -3518,16 +3478,15 @@ +++++++++++++++++++++++++ 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) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT 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=WAIT ASSIGN EGPRS) (TRX=0, 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 f8 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=WAIT ASSIGN EGPRS) Packet Control Ack -TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN EGPRS) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN EGPRS) changes state from WAIT ASSIGN to FLOW +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: CS-1, length: 23 (23)) UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 @@ -6281,16 +6240,15 @@ +++++++++++++++++++++++++ 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) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT 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=WAIT ASSIGN EGPRS) (TRX=0, 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 f8 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=WAIT ASSIGN EGPRS) Packet Control Ack -TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN EGPRS) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN EGPRS) changes state from WAIT ASSIGN to FLOW +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: CS-1, length: 23 (23)) UL data: 3c 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184 @@ -6454,16 +6412,15 @@ +++++++++++++++++++++++++ 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) changes state from ASSIGN to WAIT ASSIGN -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT 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=WAIT ASSIGN EGPRS) (TRX=0, 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 f8 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=WAIT ASSIGN EGPRS) Packet Control Ack -TBF: [DOWNLINK] UPLINK ASSIGNED TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN EGPRS) -TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=WAIT ASSIGN EGPRS) changes state from WAIT ASSIGN to FLOW +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: 1d 00 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 00 00 00 00 00 00 00 Got MCS-4 RLC block: R=1, SI=0, TFI=0, CPS=5, RSB=0, rc=385 -- To view, visit https://gerrit.osmocom.org/218 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1532f8e93194368cdc1e3846f82afa6d68cd5fbd Gerrit-PatchSet: 5 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Anonymous Coward #1000055 Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Oct 18 17:26:54 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:26:54 +0000 Subject: osmo-iuh[master]: hnbgw: vty: set explicit go_parent_cb In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1061 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8d1c18a396c215e8425ae49872b5c73316087d7d Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh 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 Tue Oct 18 17:27:08 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:27:08 +0000 Subject: osmo-iuh[master]: cosmetic: hnbgw: addr related renames, move define, move com... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1059 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ice85941c978498e3ddf41d151248507e7f56cb5d Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh 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 Tue Oct 18 17:29:11 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:29:11 +0000 Subject: osmo-iuh[master]: hnbgw: parameterize iuh local port: add vty cmd In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/1060/1/src/hnbgw.c File src/hnbgw.c: Line 327: if (!g_hnb_gw->config.iuh_local_port) we normally solve such cases by initializing g_hnb_gw->config.iuh_local_port = IUH_DEFAULT_SCTP_PORT *before* reading the config file. This way we don't need some getter-function with conditionals, ... So basically, the typical solution applied in OpenBSC & co is exactly what you are removing here. I don't understand why? -- To view, visit https://gerrit.osmocom.org/1060 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4b5e9fe9fcfa489069a0728d47899ef4a61f7ce5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh 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 Tue Oct 18 17:30:07 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 17:30:07 +0000 Subject: osmo-iuh[master]: hnbgw: parameterize IuCS and IuPS ips and ports: add vty cmds In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/1062/1/include/osmocom/iuh/hnbgw.h File include/osmocom/iuh/hnbgw.h: Line 161: const char *hnbgw_get_iucs_remote_ip(struct hnb_gw *gw); I really don't like the getter functions for each and every config item we have. This adds no value, as far as I can tell. Rather than adding more, we should work on removing those that already exist. -- To view, visit https://gerrit.osmocom.org/1062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2c28977011009df4e1fa472290bbbc359e406971 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh 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 Tue Oct 18 17:41:47 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 18 Oct 2016 17:41:47 +0000 Subject: [PATCH] osmo-bts[master]: Remove obsolete define Message-ID: Review at https://gerrit.osmocom.org/1113 Remove obsolete define It was moved to OpenBSC in 582e4f627674f46310a90d9061e82fb342051b42 as it's used by both projects. Change-Id: I8aba987e3cdaa840cf3e14913a8455b0ba759889 --- M include/osmo-bts/gsm_data.h 1 file changed, 0 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/13/1113/1 diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h index a2bb641..f1c9601 100644 --- a/include/osmo-bts/gsm_data.h +++ b/include/osmo-bts/gsm_data.h @@ -8,9 +8,6 @@ #include #include -/* lchans 0..3 are SDCCH in combined channel configuration: */ -#define CCCH_LCHAN 4 - #define GSM_FR_BITS 260 #define GSM_EFR_BITS 244 -- To view, visit https://gerrit.osmocom.org/1113 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8aba987e3cdaa840cf3e14913a8455b0ba759889 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Oct 18 18:02:17 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 18 Oct 2016 18:02:17 +0000 Subject: libosmocore[master]: utils/conv_gen.py: generate a single file In-Reply-To: References: Message-ID: Patch Set 8: > What do you mean by "more definitions is more files"?? > This is still not a reason, it doesn't even mean anything. > What is the motivation, the aim? Sorry for my English. I meant: as many convolutional codes we add, as many files we will have. For example, the MCS convolutional codes will bring about 15 new files. Finally, we will have to add 15 new entries into the Makefile.am, what makes one harder to understand. Could you help me to write a more accurate description? Thanks in advance! -- To view, visit https://gerrit.osmocom.org/828 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib4e4ee5fdde38429e68e3b2fa50ec03a18f59daa Gerrit-PatchSet: 8 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-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Oct 18 18:30:27 2016 From: gerrit-no-reply at lists.osmocom.org (Tom Tsou) Date: Tue, 18 Oct 2016 18:30:27 +0000 Subject: [PATCH] osmo-trx[master]: uhd: Add missing B200 sample timing for 4 SPS receive Message-ID: Review at https://gerrit.osmocom.org/1114 uhd: Add missing B200 sample timing for 4 SPS receive Only B210 timing was previously set in the timing table. Change-Id: Idc8d1be8201ad086c57dd9b3d6d72d277306cd2b --- M Transceiver52M/UHDDevice.cpp 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/14/1114/1 diff --git a/Transceiver52M/UHDDevice.cpp b/Transceiver52M/UHDDevice.cpp index 89ca2a3..47fa0bf 100644 --- a/Transceiver52M/UHDDevice.cpp +++ b/Transceiver52M/UHDDevice.cpp @@ -125,7 +125,8 @@ { UMTRX, 1, 1, 9.9692e-5, "UmTRX 1 SPS" }, { UMTRX, 4, 1, 7.3846e-5, "UmTRX 4/1 Tx/Rx SPS" }, { USRP2, 4, 4, 4.6080e-5, "N2XX 4 SPS" }, - { B210, 4, 4, B2XX_TIMING_4_4SPS, "B200/B210 4 SPS" }, + { B200, 4, 4, B2XX_TIMING_4_4SPS, "B200 4 SPS" }, + { B210, 4, 4, B2XX_TIMING_4_4SPS, "B210 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/1114 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idc8d1be8201ad086c57dd9b3d6d72d277306cd2b Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Tom Tsou From gerrit-no-reply at lists.osmocom.org Tue Oct 18 18:33:56 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 18 Oct 2016 18:33:56 +0000 Subject: osmo-pcu[master]: Handle Timing Advance IE properly In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/552 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I786bf7fc999d401cc3d9e7f1e7a1fba953b5d458 Gerrit-PatchSet: 6 Gerrit-Project: osmo-pcu 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 Oct 18 18:41:52 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 18:41:52 +0000 Subject: osmo-iuh[master]: hnbgw: parameterize IuCS and IuPS ips and ports: add vty cmds In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/1062/1/include/osmocom/iuh/hnbgw.h File include/osmocom/iuh/hnbgw.h: Line 161: const char *hnbgw_get_iucs_remote_ip(struct hnb_gw *gw); > I really don't like the getter functions for each and every config item we I agree that it is bloaty. The idea why they came up is that the default is used automatically when no value is set, and that we can distinguish between whether the user set a value or not. Why? Because in the VTY, upon config 'write', we want to ouput the exact same config that was read in from the config file earlier. So if the user had no config, the code outputs nothing; if the user had a value set, the code writes that value, even if the user set the default value "by coincidence". Admittedly, this idea got lost in this patch, because it also omits the vty output when the value is explicitly set to the default. For my argument to be valid, I would have to write out the config when it is set, even if it is the default value. So I presume you would like me to drop all that? How should the VTY behave though, omit output when it finds that the default is set? Always write whatever is found = the leanest code? -- To view, visit https://gerrit.osmocom.org/1062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2c28977011009df4e1fa472290bbbc359e406971 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Oct 18 18:45:49 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 18:45:49 +0000 Subject: osmo-iuh[master]: hnbgw: parameterize iuh local port: add vty cmd In-Reply-To: References: Message-ID: Patch Set 1: (2 comments) https://gerrit.osmocom.org/#/c/1060/1/src/hnbgw.c File src/hnbgw.c: Line 327: if (!g_hnb_gw->config.iuh_local_port) > we normally solve such cases by initializing g_hnb_gw->config.iuh_local_por -> comment at https://gerrit.osmocom.org/#/c/1062/1/include/osmocom/iuh/hnbgw.h at 161 explains why and ... https://gerrit.osmocom.org/#/c/1060/1/src/hnbgw_vty.c File src/hnbgw_vty.c: Line 156: if (port && port != IUH_DEFAULT_SCTP_PORT) ...and for the argument to be valid this would have to *only* check for 'if (port)' and write any value back that was set by the user explicitly even if it happens to be the default. -- To view, visit https://gerrit.osmocom.org/1060 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4b5e9fe9fcfa489069a0728d47899ef4a61f7ce5 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Oct 18 18:46:32 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 18 Oct 2016 18:46:32 +0000 Subject: osmo-pcu[master]: Use qbit-TA to update Timing Advance In-Reply-To: References: Message-ID: Patch Set 10: Code-Review+2 Comments addressed. All places I can think of use the ta function now (and since we have a GprsMs the Timingadvance cache is luckily gone as well). -- To view, visit https://gerrit.osmocom.org/544 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I96fdbb20b09fb85fdd9fb6dcf3c25f6bee7f80e4 Gerrit-PatchSet: 10 Gerrit-Project: osmo-pcu 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 Oct 18 18:49:09 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 18:49:09 +0000 Subject: [ABANDON] osmo-gsm-manuals[master]: add jenkins.sh script for jenkins build job In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: add jenkins.sh script for jenkins build job ...................................................................... Abandoned this *was* actually merged, but gerrit somehow chokes on the merge commit that it created itself and thinks that this commit is not merged yet. (strategy now changed to rebase-if-necessary like the other osmo projects) -- To view, visit https://gerrit.osmocom.org/1080 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I6c3d959202f510f0c9780d0fa28c769ea9d721e8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Oct 18 18:50:14 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 18 Oct 2016 18:50:14 +0000 Subject: openggsn[master]: Only send TRAP for defined PDP peer In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/1065/1/ggsn/ggsn.c File ggsn/ggsn.c: Line 146: LOGP(DGGSN, LOGL_ERROR, "Trap creation failed.\n"); "creation" but create+send is happening here? Please follow up to make this log message more expressive: * Correct what was actually done! * Mention the "peer" in the log message -- To view, visit https://gerrit.osmocom.org/1065 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5e02c1d42bb7aaf1ef81a9824aab7b12047cdd3e Gerrit-PatchSet: 1 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Oct 18 18:51:17 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 18 Oct 2016 18:51:17 +0000 Subject: osmo-bts[master]: Fix AGCH/PCH proportional allocation In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/1099/1//COMMIT_MSG Commit Message: Line 15: This affects octphy, lc15 and sysmo hw. And which hardware did you try and what was the result? -- To view, visit https://gerrit.osmocom.org/1099 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I11377b12680ac3b2f77f80e742b6f0af63fc9c1e Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts 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 Oct 18 18:54:18 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 18 Oct 2016 18:54:18 +0000 Subject: osmo-bts[master]: Fix AGCH/PCH proportional allocation In-Reply-To: References: Message-ID: Patch Set 1: (3 comments) https://gerrit.osmocom.org/#/c/1099/1/src/osmo-bts-litecell15/oml.c File src/osmo-bts-litecell15/oml.c: Line 1026: lch_par->agch.u8NbrOfAgch = num_agch(lchan->ts->trx, "MPH.act"); lchan->name too? https://gerrit.osmocom.org/#/c/1099/1/src/osmo-bts-octphy/l1_if.c File src/osmo-bts-octphy/l1_if.c: Line 490: /* FIXME: how does octphy differentiate between AGCH and PCH? did you check the header? did you ask them? Runtime log message if config is not as will be used? https://gerrit.osmocom.org/#/c/1099/1/src/osmo-bts-sysmo/oml.c File src/osmo-bts-sysmo/oml.c: Line 1041: lch_par->agch.u8NbrOfAgch = num_agch(lchan->ts->trx, lchan->name); lc and bts should be similar but argument to num_agch is different? -- To view, visit https://gerrit.osmocom.org/1099 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I11377b12680ac3b2f77f80e742b6f0af63fc9c1e Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts 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 Oct 18 18:56:23 2016 From: gerrit-no-reply at lists.osmocom.org (Tom Tsou) Date: Tue, 18 Oct 2016 18:56:23 +0000 Subject: libosmocore[master]: utils/conv_gen.py: fix some typos In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/836 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3327b92715744af4ef61496ef0121555d9d24799 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: Tom Tsou Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Oct 18 18:57:34 2016 From: gerrit-no-reply at lists.osmocom.org (Tom Tsou) Date: Tue, 18 Oct 2016 18:57:34 +0000 Subject: libosmocore[master]: gsm/gsm0503.h: fix typo In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/830 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I263d61111544eeb7227e1e0e8f2d14479eae2079 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: Tom Tsou Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Oct 18 19:06:01 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 19:06:01 +0000 Subject: [PATCH] osmo-bts[master]: jenkins-oct.sh: fix build: typo in deps path Message-ID: Review at https://gerrit.osmocom.org/1115 jenkins-oct.sh: fix build: typo in deps path Change-Id: I05014e25ffc829fa2fc3973471baa28f7f5a62c9 --- M contrib/jenkins_oct.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/15/1115/1 diff --git a/contrib/jenkins_oct.sh b/contrib/jenkins_oct.sh index 7920224..4fecd0a 100755 --- a/contrib/jenkins_oct.sh +++ b/contrib/jenkins_oct.sh @@ -50,7 +50,7 @@ set -x autoreconf --install --force -./configure --with-openbsc="$deps/openbsc/openbsc/include" --with-octsdr-2g="$deps/deps/layer1-api/" --enable-octphy +./configure --with-openbsc="$deps/openbsc/openbsc/include" --with-octsdr-2g="$deps/layer1-api/" --enable-octphy $MAKE $PARALLEL_MAKE $MAKE check \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/1115 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I05014e25ffc829fa2fc3973471baa28f7f5a62c9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Oct 18 19:07:13 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 19:07:13 +0000 Subject: osmo-bts[master]: jenkins-oct.sh: fix build: typo in deps path In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1115 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I05014e25ffc829fa2fc3973471baa28f7f5a62c9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts 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 Oct 18 19:08:32 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 18 Oct 2016 19:08:32 +0000 Subject: [MERGED] osmo-bts[master]: jenkins-oct.sh: fix build: typo in deps path In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jenkins-oct.sh: fix build: typo in deps path ...................................................................... jenkins-oct.sh: fix build: typo in deps path Change-Id: I05014e25ffc829fa2fc3973471baa28f7f5a62c9 --- M contrib/jenkins_oct.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins_oct.sh b/contrib/jenkins_oct.sh index 7920224..4fecd0a 100755 --- a/contrib/jenkins_oct.sh +++ b/contrib/jenkins_oct.sh @@ -50,7 +50,7 @@ set -x autoreconf --install --force -./configure --with-openbsc="$deps/openbsc/openbsc/include" --with-octsdr-2g="$deps/deps/layer1-api/" --enable-octphy +./configure --with-openbsc="$deps/openbsc/openbsc/include" --with-octsdr-2g="$deps/layer1-api/" --enable-octphy $MAKE $PARALLEL_MAKE $MAKE check \ || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/1115 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I05014e25ffc829fa2fc3973471baa28f7f5a62c9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Oct 18 19:12:11 2016 From: gerrit-no-reply at lists.osmocom.org (pierre.baudry) Date: Tue, 18 Oct 2016 19:12:11 +0000 Subject: osmo-trx[master]: uhd: Add missing B200 sample timing for 4 SPS receive In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 Verified+1 Currently in use, works properly. Solved a registration problem similar to http://lists.osmocom.org/pipermail/openbsc/2016-September/009681.html -- To view, visit https://gerrit.osmocom.org/1114 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idc8d1be8201ad086c57dd9b3d6d72d277306cd2b Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Tom Tsou Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pierre.baudry Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Oct 18 19:16:24 2016 From: gerrit-no-reply at lists.osmocom.org (Tom Tsou) Date: Tue, 18 Oct 2016 19:16:24 +0000 Subject: osmo-trx[master]: uhd: Add missing B200 sample timing for 4 SPS receive In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1114 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idc8d1be8201ad086c57dd9b3d6d72d277306cd2b Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Tom Tsou Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: pierre.baudry Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Oct 18 19:16:28 2016 From: gerrit-no-reply at lists.osmocom.org (Tom Tsou) Date: Tue, 18 Oct 2016 19:16:28 +0000 Subject: [MERGED] osmo-trx[master]: uhd: Add missing B200 sample timing for 4 SPS receive In-Reply-To: References: Message-ID: Tom Tsou has submitted this change and it was merged. Change subject: uhd: Add missing B200 sample timing for 4 SPS receive ...................................................................... uhd: Add missing B200 sample timing for 4 SPS receive Only B210 timing was previously set in the timing table. Change-Id: Idc8d1be8201ad086c57dd9b3d6d72d277306cd2b --- M Transceiver52M/UHDDevice.cpp 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Tom Tsou: Looks good to me, approved pierre.baudry: Looks good to me, but someone else must approve; Verified Jenkins Builder: Verified diff --git a/Transceiver52M/UHDDevice.cpp b/Transceiver52M/UHDDevice.cpp index 89ca2a3..47fa0bf 100644 --- a/Transceiver52M/UHDDevice.cpp +++ b/Transceiver52M/UHDDevice.cpp @@ -125,7 +125,8 @@ { UMTRX, 1, 1, 9.9692e-5, "UmTRX 1 SPS" }, { UMTRX, 4, 1, 7.3846e-5, "UmTRX 4/1 Tx/Rx SPS" }, { USRP2, 4, 4, 4.6080e-5, "N2XX 4 SPS" }, - { B210, 4, 4, B2XX_TIMING_4_4SPS, "B200/B210 4 SPS" }, + { B200, 4, 4, B2XX_TIMING_4_4SPS, "B200 4 SPS" }, + { B210, 4, 4, B2XX_TIMING_4_4SPS, "B210 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/1114 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idc8d1be8201ad086c57dd9b3d6d72d277306cd2b Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Tom Tsou Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: pierre.baudry From gerrit-no-reply at lists.osmocom.org Tue Oct 18 22:33:38 2016 From: gerrit-no-reply at lists.osmocom.org (Tom Tsou) Date: Tue, 18 Oct 2016 22:33:38 +0000 Subject: libosmocore[master]: utils/conv_gen.py: add EDGE MCS 1-9 definitions In-Reply-To: References: Message-ID: Patch Set 6: Harald Welte wrote: > We should be able to do a pretty simple Encode -> Decode test to > test against our own encoder, and have that test be executed with > every of the convolutional codes. We should also be able to > introduce a defined amount of bit errors and check if the decoder > can still recover as expected (won't work for MCS-9/CS-4, of > course). Argeed that we need test cases. What makes the MCS encode/decode test non-trival is that the downlink/uplink coding is asymmetric. Coding in both directions is very similar, but still different enough to prevent using the BTS only calls directly. We need UE side encode and decode calls for the test case. I support adding that functionality in a separate commit. -- To view, visit https://gerrit.osmocom.org/837 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie1452342f524a8b60f2babc07398a1d9c9e06aa3 Gerrit-PatchSet: 6 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Oct 18 22:34:56 2016 From: gerrit-no-reply at lists.osmocom.org (Tom Tsou) Date: Tue, 18 Oct 2016 22:34:56 +0000 Subject: libosmocore[master]: utils/conv_gen.py: add EDGE MCS 1-9 definitions In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+1 Manually compared generated XCCH and MCS output against existing hand coded gsm0503_conv.c implementation. -- To view, visit https://gerrit.osmocom.org/837 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie1452342f524a8b60f2babc07398a1d9c9e06aa3 Gerrit-PatchSet: 6 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Oct 18 22:37:00 2016 From: gerrit-no-reply at lists.osmocom.org (Tom Tsou) Date: Tue, 18 Oct 2016 22:37:00 +0000 Subject: libosmocore[master]: utils/conv_gen.py: add RACH, SCH and TCH/AHS definitions In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/831 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0ea7151f4e8119a8798a9e129b951559e56b0d93 Gerrit-PatchSet: 6 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Tom Tsou Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Oct 19 02:19:26 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 19 Oct 2016 02:19:26 +0000 Subject: [PATCH] osmo-pcu[master]: jenkins.sh: use osmo-build-dep.sh, output testlogs Message-ID: Review at https://gerrit.osmocom.org/1116 jenkins.sh: use osmo-build-dep.sh, output testlogs Also make cosmetically similar to the other jenkins.sh scripts in various osmo repositories. Change-Id: I34c19ed7c80aa56bd131f738f37324aed1cd73db --- M contrib/jenkins.sh 1 file changed, 16 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/16/1116/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 7b456c2..fb0fb2f 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -10,9 +10,10 @@ base="$PWD" deps="$base/deps" inst="$deps/install" +export deps inst +mkdir "$deps" || true rm -rf "$inst" -mkdir -p "$deps" # Collect configure options for osmo-pcu PCU_CONFIG="" @@ -30,6 +31,7 @@ api_incl="$inst/include/sysmocom/femtobts/" mkdir -p "$api_incl" cp include/*.h "$api_incl" + cd "$base" elif [ -z "$with_dsp" -o "$with_dsp" = none ]; then echo "Direct DSP access disabled" @@ -48,19 +50,22 @@ fi # Build deps -cd "$deps" -osmo-deps.sh libosmocore -cd libosmocore -autoreconf --install --force -./configure --prefix="$inst" -$MAKE $PARALLEL_MAKE install +osmo-build-dep.sh libosmocore -export PKG_CONFIG_PATH="$inst/lib/pkgconfig" +export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" export LD_LIBRARY_PATH="$inst/lib" -# Build osmo-pcu -cd "$base" +set +x +echo +echo +echo +echo " =============================== osmo-pcu ===============================" +echo +set -x + autoreconf --install --force ./configure $PCU_CONFIG $MAKE $PARALLEL_MAKE -DISTCHECK_CONFIGURE_FLAGS="$PCU_CONFIG" AM_DISTCHECK_CONFIGURE_FLAGS="$PCU_CONFIG" $MAKE distcheck +DISTCHECK_CONFIGURE_FLAGS="$PCU_CONFIG" AM_DISTCHECK_CONFIGURE_FLAGS="$PCU_CONFIG" \ + $MAKE distcheck \ + || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/1116 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I34c19ed7c80aa56bd131f738f37324aed1cd73db Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed Oct 19 07:25:30 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 19 Oct 2016 07:25:30 +0000 Subject: libosmocore[master]: utils/conv_gen.py: improve output formatting In-Reply-To: References: Message-ID: Patch Set 7: (4 comments) https://gerrit.osmocom.org/#/c/829/6/utils/conv_gen.py File utils/conv_gen.py: Line 142: > counter == 0 will only happen at the very first iteration, so you can put t Done Line 164: print_formatted(self.puncture, "%3d, ", 12, fi) > same Done Line 179: if self.recursive: > same Done Line 185: "};\n\nstatic const uint8_t %s_term_output[] = {" % self.name > Actually, the output loop with the 'counter % 12' algorithm and whitespace Done -- To view, visit https://gerrit.osmocom.org/829 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I95256c4ad402a3c088bdb6c5a5cda8b17c31881c Gerrit-PatchSet: 7 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed Oct 19 08:23:30 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 19 Oct 2016 08:23:30 +0000 Subject: [MERGED] osmo-pcu[master]: Use qbit-TA to update Timing Advance In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Use qbit-TA to update Timing Advance ...................................................................... Use qbit-TA to update Timing Advance Separate qbit-TA to TA conversion into separate function and use it for computing and updating Timing Advance. Note: the code was tested with TA=0 only to make sure it does not introduce regressions. Change-Id: I96fdbb20b09fb85fdd9fb6dcf3c25f6bee7f80e4 Fixes: OS#1531 --- M src/bts.cpp M src/bts.h M src/osmo-bts-litecell15/lc15_l1_if.c M src/osmo-bts-sysmo/sysmo_l1_if.c M src/pcu_l1_if.h 5 files changed, 46 insertions(+), 51 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/bts.cpp b/src/bts.cpp index 35da307..4aa5c2c 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -478,8 +478,7 @@ int rc; int plen; uint8_t usf = 7; - uint8_t tsc; - uint16_t ta; + uint8_t tsc, ta = qta2ta(qta); uint16_t ms_class = 0; uint16_t priority = 0; @@ -489,13 +488,6 @@ "one:\n"); sb = is_single_block(ra, burst_type, is_11bit, &ms_class, &priority); - - if (qta < 0) - qta = 0; - if (qta > 252) - qta = 252; - - ta = qta >> 2; if (sb) { rc = sba()->alloc(&trx_no, &ts_no, &sb_fn, ta); @@ -1475,6 +1467,23 @@ return rc; } +void bts_update_tbf_ta(const char *p, uint32_t fn, uint8_t trx_no, uint8_t ts, + uint8_t ta) +{ + struct gprs_rlcmac_ul_tbf *tbf = + bts_main_data()->bts->ul_tbf_by_poll_fn(fn, trx_no, ts); + if (!tbf) + LOGP(DL1IF, LOGL_DEBUG, "[%s] update TA = %u ignored due to " + "unknown UL TBF on TRX = %d, TS = %d, FN = %d\n", + p, ta, trx_no, ts, fn); + else if (tbf->ta() != ta) { + LOGP(DL1IF, LOGL_INFO, "[%s] Updating TA %u -> %u on " + "TRX = %d, TS = %d, FN = %d\n", + p, tbf->ta(), ta, trx_no, ts, fn); + tbf->set_ta(ta); + } +} + gprs_rlcmac_tbf *gprs_rlcmac_pdch::tbf_from_list_by_tfi( LListHead *tbf_list, uint8_t tfi, enum gprs_rlcmac_tbf_direction dir) diff --git a/src/bts.h b/src/bts.h index ba6fc4d..8bea371 100644 --- a/src/bts.h +++ b/src/bts.h @@ -143,6 +143,15 @@ #endif }; +#ifdef __cplusplus +extern "C" { +#endif +void bts_update_tbf_ta(const char *p, uint32_t fn, uint8_t trx_no, uint8_t ts, + uint8_t ta); +#ifdef __cplusplus +} +#endif + /** * This is the data from C. As soon as our minimal compiler is gcc 4.7 * we can start to compile pcu_vty.c with c++ and remove the split. diff --git a/src/osmo-bts-litecell15/lc15_l1_if.c b/src/osmo-bts-litecell15/lc15_l1_if.c index a6358ba..12a977b 100644 --- a/src/osmo-bts-litecell15/lc15_l1_if.c +++ b/src/osmo-bts-litecell15/lc15_l1_if.c @@ -32,6 +32,7 @@ #include #include #include +#include extern void *tall_pcu_ctx; @@ -204,6 +205,8 @@ data_ind->msgUnitParam.u8Size-1); get_meas(&meas, &data_ind->measParam); + bts_update_tbf_ta("PH-DATA", data_ind->u32Fn, fl1h->trx_no, + data_ind->u8Tn, qta2ta(meas.bto)); switch (data_ind->sapi) { case GsmL1_Sapi_Pdtch: @@ -235,31 +238,12 @@ static int handle_ph_ra_ind(struct lc15l1_hdl *fl1h, GsmL1_PhRaInd_t *ra_ind) { - uint8_t acc_delay; - if (ra_ind->measParam.fLinkQuality < MIN_QUAL_RACH) return 0; DEBUGP(DL1IF, "Rx PH-RA.ind"); - - /* check for under/overflow / sign */ - if (ra_ind->measParam.i16BurstTiming < 0) - acc_delay = 0; - else - acc_delay = ra_ind->measParam.i16BurstTiming >> 2; - - LOGP(DL1IF, LOGL_NOTICE, "got (P)RACH request, TA = %u (ignored)\n", - acc_delay); - -#warning "The (P)RACH request is just dropped here" - -#if 0 - if (acc_delay > bts->max_ta) { - LOGP(DL1C, LOGL_INFO, "ignoring RACH request %u > max_ta(%u)\n", - acc_delay, btsb->max_ta); - return 0; - } -#endif + bts_update_tbf_ta("PH-RA", ra_ind->u32Fn, fl1h->trx_no, ra_ind->u8Tn, + qta2ta(ra_ind->measParam.i16BurstTiming)); return 0; } diff --git a/src/osmo-bts-sysmo/sysmo_l1_if.c b/src/osmo-bts-sysmo/sysmo_l1_if.c index 75a2d5f..8994ac3 100644 --- a/src/osmo-bts-sysmo/sysmo_l1_if.c +++ b/src/osmo-bts-sysmo/sysmo_l1_if.c @@ -13,6 +13,7 @@ #include #include #include +#include extern void *tall_pcu_ctx; @@ -189,6 +190,8 @@ data_ind->msgUnitParam.u8Size-1); get_meas(&meas, &data_ind->measParam); + bts_update_tbf_ta("PH-DATA", data_ind->u32Fn, fl1h->trx_no, + data_ind->u8Tn, qta2ta(meas.bto)); switch (data_ind->sapi) { case GsmL1_Sapi_Pdtch: @@ -220,33 +223,14 @@ static int handle_ph_ra_ind(struct femtol1_hdl *fl1h, GsmL1_PhRaInd_t *ra_ind) { - uint8_t acc_delay; - pcu_rx_ra_time(ra_ind->u16Arfcn, ra_ind->u32Fn, ra_ind->u8Tn); if (ra_ind->measParam.fLinkQuality < MIN_QUAL_RACH) return 0; DEBUGP(DL1IF, "Rx PH-RA.ind"); - - /* check for under/overflow / sign */ - if (ra_ind->measParam.i16BurstTiming < 0) - acc_delay = 0; - else - acc_delay = ra_ind->measParam.i16BurstTiming >> 2; - - LOGP(DL1IF, LOGL_NOTICE, "got (P)RACH request, TA = %u (ignored)\n", - acc_delay); - -#warning "The (P)RACH request is just dropped here" - -#if 0 - if (acc_delay > bts->max_ta) { - LOGP(DL1C, LOGL_INFO, "ignoring RACH request %u > max_ta(%u)\n", - acc_delay, btsb->max_ta); - return 0; - } -#endif + bts_update_tbf_ta("PH-RA", ra_ind->u32Fn, fl1h->trx_no, ra_ind->u8Tn, + qta2ta(ra_ind->measParam.i16BurstTiming)); return 0; } diff --git a/src/pcu_l1_if.h b/src/pcu_l1_if.h index b2a9832..d9d970d 100644 --- a/src/pcu_l1_if.h +++ b/src/pcu_l1_if.h @@ -33,6 +33,15 @@ } #endif +static inline uint8_t qta2ta(int16_t qta) +{ + if (qta < 0) + return 0; + if (qta > 252) + qta = 252; + return qta >> 2; +} + /* * L1 Measurement values */ -- To view, visit https://gerrit.osmocom.org/544 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I96fdbb20b09fb85fdd9fb6dcf3c25f6bee7f80e4 Gerrit-PatchSet: 11 Gerrit-Project: osmo-pcu 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 Oct 19 08:32:23 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 19 Oct 2016 08:32:23 +0000 Subject: [PATCH] openggsn[master]: Only send TRAP for defined PDP peer 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/1065 to look at the new patch set (#2). Only send TRAP for defined PDP peer Do not attempt to send TRAP message on PDP context deletion if peer is unknown. Change-Id: I5e02c1d42bb7aaf1ef81a9824aab7b12047cdd3e Fixes: Coverity CID 150135 --- M ggsn/ggsn.c 1 file changed, 8 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openggsn refs/changes/65/1065/2 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 9609d52..181ba2d 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -138,10 +138,15 @@ DEBUGP(DGGSN, "Deleting PDP context\n"); struct ippoolm_t *member = pdp->peer; char v[NAMESIZE]; - snprintf(v, sizeof(v), "%" PRIu64 ",%s", pdp->imsi, inet_ntoa(member->addr)); - if (pdp->peer) + + if (pdp->peer) { + snprintf(v, sizeof(v), "%" PRIu64 ",%s", pdp->imsi, + inet_ntoa(member->addr)); + if (ctrl_cmd_send_trap(gsn->ctrl, "imsi-rem-ip", v) < 0) + LOGP(DGGSN, LOGL_ERROR, "Failed to create and send TRAP" + " for IMSI %" PRIu64 " PDP deletion.\n", pdp->imsi); ippool_freeip(ippool, (struct ippoolm_t *)pdp->peer); - else + } else SYS_ERR(DGGSN, LOGL_ERROR, 0, "Peer not defined!"); if (gtp_kernel_tunnel_del(pdp)) { @@ -149,9 +154,6 @@ "Cannot delete tunnel from kernel: %s\n", strerror(errno)); } -/* FIXME: naming? */ - if (ctrl_cmd_send_trap(gsn->ctrl, "imsi-rem-ip", v) < 0) - LOGP(DGGSN, LOGL_ERROR, "Trap creation failed.\n"); return 0; } -- To view, visit https://gerrit.osmocom.org/1065 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I5e02c1d42bb7aaf1ef81a9824aab7b12047cdd3e Gerrit-PatchSet: 2 Gerrit-Project: openggsn Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Oct 19 17:30:35 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 19 Oct 2016 17:30:35 +0000 Subject: [PATCH] libosmocore[master]: utils/conv_gen.py: generate a single file 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/828 to look at the new patch set (#9). utils/conv_gen.py: generate a single file Instead of generating every convolutional code into a separate file (such as conv_xcch_gen.c, conv_cs3_gen.c), it is better to have a single file, containing all definitions, because as many convolutional codes we add, as many entries we will have to add into 'src/gsm/Makefile.am'. This approach increases readability of the Makefile.am, and also makes us able to share some data between some convolutional code definitions. For example: xCCH, RACH, SCH, TCH/F, both CS2 and CS3 may use the same *_state[][2] and *_output[][2] arrays within a single file. This optimization is currently WIP. Change-Id: Ib4e4ee5fdde38429e68e3b2fa50ec03a18f59daa --- M .gitignore M src/gsm/Makefile.am M utils/conv_gen.py 3 files changed, 310 insertions(+), 315 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/28/828/9 diff --git a/.gitignore b/.gitignore index 5165364..90c8c85 100644 --- a/.gitignore +++ b/.gitignore @@ -110,7 +110,7 @@ doc/*.tag src/crc*gen.c -src/gsm/conv*gen.c +src/gsm/gsm0503_conv.c include/osmocom/core/crc*gen.h include/osmocom/core/bit*gen.h diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index 2071413..3877f78 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -18,16 +18,11 @@ gprs_cipher_core.c gprs_rlc.c gsm0480.c abis_nm.c gsm0502.c \ gsm0411_utils.c gsm0411_smc.c gsm0411_smr.c \ lapd_core.c lapdm.c kasumi.c gsm_04_08_gprs.c \ - conv_cs2_gen.c conv_cs3_gen.c conv_xcch_gen.c \ - conv_tch_afs_12_2_gen.c conv_tch_afs_10_2_gen.c \ - conv_tch_afs_7_95_gen.c conv_tch_afs_7_4_gen.c \ - conv_tch_afs_6_7_gen.c conv_tch_afs_5_9_gen.c \ - conv_tch_afs_5_15_gen.c conv_tch_afs_4_75_gen.c \ auth_core.c auth_comp128v1.c auth_comp128v23.c \ auth_milenage.c milenage/aes-encblock.c gea.c \ 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 + gsup.c gprs_gea.c gsm0503_conv.c libgsmint_la_LDFLAGS = -no-undefined libgsmint_la_LIBADD = $(top_builddir)/src/libosmocore.la @@ -37,5 +32,8 @@ EXTRA_DIST = libosmogsm.map -conv%gen.c: $(top_srcdir)/utils/conv_gen.py +# Convolutional codes generation +gsm0503_conv.c: $(AM_V_GEN)python2 $(top_srcdir)/utils/conv_gen.py + +CLEANFILES = gsm0503_conv.c diff --git a/utils/conv_gen.py b/utils/conv_gen.py index a4f918f..38ea63b 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -222,325 +222,322 @@ ( G1, 1 ), ] -# xCCH definition -xCCH = ConvolutionalCode( - 224, - CCH_poly, - name = "xcch", - description = [ - "xCCH convolutional code:", - "228 bits blocks, rate 1/2, k = 5", - "G0 = 1 + D3 + D4", - "G1 = 1 + D + D3 + D4", - ] -) +conv_codes = [ + # xCCH definition + ConvolutionalCode( + 224, + CCH_poly, + name = "xcch", + description = [ + "xCCH convolutional code:", + "228 bits blocks, rate 1/2, k = 5", + "G0 = 1 + D3 + D4", + "G1 = 1 + D + D3 + D4", + ] + ), -# CS2 definition -CS2 = ConvolutionalCode( - 290, - CCH_poly, - puncture = [ - 15, 19, 23, 27, 31, 35, 43, 47, 51, 55, 59, 63, 67, 71, - 75, 79, 83, 91, 95, 99, 103, 107, 111, 115, 119, 123, 127, 131, - 139, 143, 147, 151, 155, 159, 163, 167, 171, 175, 179, 187, 191, 195, - 199, 203, 207, 211, 215, 219, 223, 227, 235, 239, 243, 247, 251, 255, - 259, 263, 267, 271, 275, 283, 287, 291, 295, 299, 303, 307, 311, 315, - 319, 323, 331, 335, 339, 343, 347, 351, 355, 359, 363, 367, 371, 379, - 383, 387, 391, 395, 399, 403, 407, 411, 415, 419, 427, 431, 435, 439, - 443, 447, 451, 455, 459, 463, 467, 475, 479, 483, 487, 491, 495, 499, - 503, 507, 511, 515, 523, 527, 531, 535, 539, 543, 547, 551, 555, 559, - 563, 571, 575, 579, 583, 587, -1 - ], - name = "cs2", - description = [ - "CS2 convolutional code:", - "G0 = 1 + D3 + D4", - "G1 = 1 + D + D3 + D4", - ] -) + # CS2 definition + ConvolutionalCode( + 290, + CCH_poly, + puncture = [ + 15, 19, 23, 27, 31, 35, 43, 47, 51, 55, 59, 63, 67, 71, + 75, 79, 83, 91, 95, 99, 103, 107, 111, 115, 119, 123, 127, 131, + 139, 143, 147, 151, 155, 159, 163, 167, 171, 175, 179, 187, 191, 195, + 199, 203, 207, 211, 215, 219, 223, 227, 235, 239, 243, 247, 251, 255, + 259, 263, 267, 271, 275, 283, 287, 291, 295, 299, 303, 307, 311, 315, + 319, 323, 331, 335, 339, 343, 347, 351, 355, 359, 363, 367, 371, 379, + 383, 387, 391, 395, 399, 403, 407, 411, 415, 419, 427, 431, 435, 439, + 443, 447, 451, 455, 459, 463, 467, 475, 479, 483, 487, 491, 495, 499, + 503, 507, 511, 515, 523, 527, 531, 535, 539, 543, 547, 551, 555, 559, + 563, 571, 575, 579, 583, 587, -1 + ], + name = "cs2", + description = [ + "CS2 convolutional code:", + "G0 = 1 + D3 + D4", + "G1 = 1 + D + D3 + D4", + ] + ), -# CS3 definition -CS3 = ConvolutionalCode( - 334, - CCH_poly, - puncture = [ - 15, 17, 21, 23, 27, 29, 33, 35, 39, 41, 45, 47, 51, 53, - 57, 59, 63, 65, 69, 71, 75, 77, 81, 83, 87, 89, 93, 95, - 99, 101, 105, 107, 111, 113, 117, 119, 123, 125, 129, 131, 135, 137, - 141, 143, 147, 149, 153, 155, 159, 161, 165, 167, 171, 173, 177, 179, - 183, 185, 189, 191, 195, 197, 201, 203, 207, 209, 213, 215, 219, 221, - 225, 227, 231, 233, 237, 239, 243, 245, 249, 251, 255, 257, 261, 263, - 267, 269, 273, 275, 279, 281, 285, 287, 291, 293, 297, 299, 303, 305, - 309, 311, 315, 317, 321, 323, 327, 329, 333, 335, 339, 341, 345, 347, - 351, 353, 357, 359, 363, 365, 369, 371, 375, 377, 381, 383, 387, 389, - 393, 395, 399, 401, 405, 407, 411, 413, 417, 419, 423, 425, 429, 431, - 435, 437, 441, 443, 447, 449, 453, 455, 459, 461, 465, 467, 471, 473, - 477, 479, 483, 485, 489, 491, 495, 497, 501, 503, 507, 509, 513, 515, - 519, 521, 525, 527, 531, 533, 537, 539, 543, 545, 549, 551, 555, 557, - 561, 563, 567, 569, 573, 575, 579, 581, 585, 587, 591, 593, 597, 599, - 603, 605, 609, 611, 615, 617, 621, 623, 627, 629, 633, 635, 639, 641, - 645, 647, 651, 653, 657, 659, 663, 665, 669, 671, -1 - ], - name = "cs3", - description = [ - "CS3 convolutional code:", - "G0 = 1 + D3 + D4", - "G1 = 1 + D + D3 + D4", - ] -) + # CS3 definition + ConvolutionalCode( + 334, + CCH_poly, + puncture = [ + 15, 17, 21, 23, 27, 29, 33, 35, 39, 41, 45, 47, 51, 53, + 57, 59, 63, 65, 69, 71, 75, 77, 81, 83, 87, 89, 93, 95, + 99, 101, 105, 107, 111, 113, 117, 119, 123, 125, 129, 131, 135, 137, + 141, 143, 147, 149, 153, 155, 159, 161, 165, 167, 171, 173, 177, 179, + 183, 185, 189, 191, 195, 197, 201, 203, 207, 209, 213, 215, 219, 221, + 225, 227, 231, 233, 237, 239, 243, 245, 249, 251, 255, 257, 261, 263, + 267, 269, 273, 275, 279, 281, 285, 287, 291, 293, 297, 299, 303, 305, + 309, 311, 315, 317, 321, 323, 327, 329, 333, 335, 339, 341, 345, 347, + 351, 353, 357, 359, 363, 365, 369, 371, 375, 377, 381, 383, 387, 389, + 393, 395, 399, 401, 405, 407, 411, 413, 417, 419, 423, 425, 429, 431, + 435, 437, 441, 443, 447, 449, 453, 455, 459, 461, 465, 467, 471, 473, + 477, 479, 483, 485, 489, 491, 495, 497, 501, 503, 507, 509, 513, 515, + 519, 521, 525, 527, 531, 533, 537, 539, 543, 545, 549, 551, 555, 557, + 561, 563, 567, 569, 573, 575, 579, 581, 585, 587, 591, 593, 597, 599, + 603, 605, 609, 611, 615, 617, 621, 623, 627, 629, 633, 635, 639, 641, + 645, 647, 651, 653, 657, 659, 663, 665, 669, 671, -1 + ], + name = "cs3", + description = [ + "CS3 convolutional code:", + "G0 = 1 + D3 + D4", + "G1 = 1 + D + D3 + D4", + ] + ), -# TCH_AFS_12_2 definition -TCH_AFS_12_2 = ConvolutionalCode( - 250, - [ - ( 1, 1 ), - ( G1, G0 ), - ], - puncture = [ - 321, 325, 329, 333, 337, 341, 345, 349, 353, 357, 361, 363, - 365, 369, 373, 377, 379, 381, 385, 389, 393, 395, 397, 401, - 405, 409, 411, 413, 417, 421, 425, 427, 429, 433, 437, 441, - 443, 445, 449, 453, 457, 459, 461, 465, 469, 473, 475, 477, - 481, 485, 489, 491, 493, 495, 497, 499, 501, 503, 505, 507, - -1 - ], - name = 'tch_afs_12_2', - description = [ - "TCH/AFS 12.2 kbits convolutional code:", - "250 bits block, rate 1/2, punctured", - "G0/G0 = 1", - "G1/G0 = 1 + D + D3 + D4 / 1 + D3 + D4", - ] -) + # TCH_AFS_12_2 definition + ConvolutionalCode( + 250, + [ + ( 1, 1 ), + ( G1, G0 ), + ], + puncture = [ + 321, 325, 329, 333, 337, 341, 345, 349, 353, 357, 361, 363, + 365, 369, 373, 377, 379, 381, 385, 389, 393, 395, 397, 401, + 405, 409, 411, 413, 417, 421, 425, 427, 429, 433, 437, 441, + 443, 445, 449, 453, 457, 459, 461, 465, 469, 473, 475, 477, + 481, 485, 489, 491, 493, 495, 497, 499, 501, 503, 505, 507, + -1 + ], + name = 'tch_afs_12_2', + description = [ + "TCH/AFS 12.2 kbits convolutional code:", + "250 bits block, rate 1/2, punctured", + "G0/G0 = 1", + "G1/G0 = 1 + D + D3 + D4 / 1 + D3 + D4", + ] + ), -# TCH_AFS_10_2 definition -TCH_AFS_10_2 = ConvolutionalCode( - 210, - [ - ( G1, G3 ), - ( G2, G3 ), - ( 1, 1 ), - ], - puncture = [ - 1, 4, 7, 10, 16, 19, 22, 28, 31, 34, 40, 43, - 46, 52, 55, 58, 64, 67, 70, 76, 79, 82, 88, 91, - 94, 100, 103, 106, 112, 115, 118, 124, 127, 130, 136, 139, - 142, 148, 151, 154, 160, 163, 166, 172, 175, 178, 184, 187, - 190, 196, 199, 202, 208, 211, 214, 220, 223, 226, 232, 235, - 238, 244, 247, 250, 256, 259, 262, 268, 271, 274, 280, 283, - 286, 292, 295, 298, 304, 307, 310, 316, 319, 322, 325, 328, - 331, 334, 337, 340, 343, 346, 349, 352, 355, 358, 361, 364, - 367, 370, 373, 376, 379, 382, 385, 388, 391, 394, 397, 400, - 403, 406, 409, 412, 415, 418, 421, 424, 427, 430, 433, 436, - 439, 442, 445, 448, 451, 454, 457, 460, 463, 466, 469, 472, - 475, 478, 481, 484, 487, 490, 493, 496, 499, 502, 505, 508, - 511, 514, 517, 520, 523, 526, 529, 532, 535, 538, 541, 544, - 547, 550, 553, 556, 559, 562, 565, 568, 571, 574, 577, 580, - 583, 586, 589, 592, 595, 598, 601, 604, 607, 609, 610, 613, - 616, 619, 621, 622, 625, 627, 628, 631, 633, 634, 636, 637, - 639, 640, -1 - ], - name = 'tch_afs_10_2', - description = [ - "TCH/AFS 10.2 kbits convolutional code:", - "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", - "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", - "G3/G3 = 1", - ] -) + # TCH_AFS_10_2 definition + ConvolutionalCode( + 210, + [ + ( G1, G3 ), + ( G2, G3 ), + ( 1, 1 ), + ], + puncture = [ + 1, 4, 7, 10, 16, 19, 22, 28, 31, 34, 40, 43, + 46, 52, 55, 58, 64, 67, 70, 76, 79, 82, 88, 91, + 94, 100, 103, 106, 112, 115, 118, 124, 127, 130, 136, 139, + 142, 148, 151, 154, 160, 163, 166, 172, 175, 178, 184, 187, + 190, 196, 199, 202, 208, 211, 214, 220, 223, 226, 232, 235, + 238, 244, 247, 250, 256, 259, 262, 268, 271, 274, 280, 283, + 286, 292, 295, 298, 304, 307, 310, 316, 319, 322, 325, 328, + 331, 334, 337, 340, 343, 346, 349, 352, 355, 358, 361, 364, + 367, 370, 373, 376, 379, 382, 385, 388, 391, 394, 397, 400, + 403, 406, 409, 412, 415, 418, 421, 424, 427, 430, 433, 436, + 439, 442, 445, 448, 451, 454, 457, 460, 463, 466, 469, 472, + 475, 478, 481, 484, 487, 490, 493, 496, 499, 502, 505, 508, + 511, 514, 517, 520, 523, 526, 529, 532, 535, 538, 541, 544, + 547, 550, 553, 556, 559, 562, 565, 568, 571, 574, 577, 580, + 583, 586, 589, 592, 595, 598, 601, 604, 607, 609, 610, 613, + 616, 619, 621, 622, 625, 627, 628, 631, 633, 634, 636, 637, + 639, 640, -1 + ], + name = 'tch_afs_10_2', + description = [ + "TCH/AFS 10.2 kbits convolutional code:", + "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", + "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", + "G3/G3 = 1", + ] + ), -# TCH_AFS_7_95 definition -TCH_AFS_7_95 = ConvolutionalCode( - 165, - [ - ( 1, 1 ), - ( G5, G4 ), - ( G6, G4 ), - ], - puncture = [ - 1, 2, 4, 5, 8, 22, 70, 118, 166, 214, 262, 310, - 317, 319, 325, 332, 334, 341, 343, 349, 356, 358, 365, 367, - 373, 380, 382, 385, 389, 391, 397, 404, 406, 409, 413, 415, - 421, 428, 430, 433, 437, 439, 445, 452, 454, 457, 461, 463, - 469, 476, 478, 481, 485, 487, 490, 493, 500, 502, 503, 505, - 506, 508, 509, 511, 512, -1 - ], - name = 'tch_afs_7_95', - description = [ - "TCH/AFS 7.95 kbits convolutional code:", - "G4/G4 = 1", - "G5/G4 = 1 + D + D4 + D6 / 1 + D2 + D3 + D5 + D6", - "G6/G4 = 1 + D + D2 + D3 + D4 + D6 / 1 + D2 + D3 + D5 + D6", - ] -) + # TCH_AFS_7_95 definition + ConvolutionalCode( + 165, + [ + ( 1, 1 ), + ( G5, G4 ), + ( G6, G4 ), + ], + puncture = [ + 1, 2, 4, 5, 8, 22, 70, 118, 166, 214, 262, 310, + 317, 319, 325, 332, 334, 341, 343, 349, 356, 358, 365, 367, + 373, 380, 382, 385, 389, 391, 397, 404, 406, 409, 413, 415, + 421, 428, 430, 433, 437, 439, 445, 452, 454, 457, 461, 463, + 469, 476, 478, 481, 485, 487, 490, 493, 500, 502, 503, 505, + 506, 508, 509, 511, 512, -1 + ], + name = 'tch_afs_7_95', + description = [ + "TCH/AFS 7.95 kbits convolutional code:", + "G4/G4 = 1", + "G5/G4 = 1 + D + D4 + D6 / 1 + D2 + D3 + D5 + D6", + "G6/G4 = 1 + D + D2 + D3 + D4 + D6 / 1 + D2 + D3 + D5 + D6", + ] + ), -# TCH_AFS_7_4 definition -TCH_AFS_7_4 = ConvolutionalCode( - 154, - [ - ( G1, G3 ), - ( G2, G3 ), - ( 1, 1 ), - ], - puncture = [ - 0, 355, 361, 367, 373, 379, 385, 391, 397, 403, 409, 415, - 421, 427, 433, 439, 445, 451, 457, 460, 463, 466, 468, 469, - 471, 472, -1 - ], - name = 'tch_afs_7_4', - description = [ - "TCH/AFS 7.4 kbits convolutional code:", - "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", - "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", - "G3/G3 = 1", - ] -) + # TCH_AFS_7_4 definition + ConvolutionalCode( + 154, + [ + ( G1, G3 ), + ( G2, G3 ), + ( 1, 1 ), + ], + puncture = [ + 0, 355, 361, 367, 373, 379, 385, 391, 397, 403, 409, 415, + 421, 427, 433, 439, 445, 451, 457, 460, 463, 466, 468, 469, + 471, 472, -1 + ], + name = 'tch_afs_7_4', + description = [ + "TCH/AFS 7.4 kbits convolutional code:", + "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", + "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", + "G3/G3 = 1", + ] + ), -# TCH_AFS_6_7 definition -TCH_AFS_6_7 = ConvolutionalCode( - 140, - [ - ( G1, G3 ), - ( G2, G3 ), - ( 1, 1 ), - ( 1, 1 ), - ], - puncture = [ - 1, 3, 7, 11, 15, 27, 39, 55, 67, 79, 95, 107, - 119, 135, 147, 159, 175, 187, 199, 215, 227, 239, 255, 267, - 279, 287, 291, 295, 299, 303, 307, 311, 315, 319, 323, 327, - 331, 335, 339, 343, 347, 351, 355, 359, 363, 367, 369, 371, - 375, 377, 379, 383, 385, 387, 391, 393, 395, 399, 401, 403, - 407, 409, 411, 415, 417, 419, 423, 425, 427, 431, 433, 435, - 439, 441, 443, 447, 449, 451, 455, 457, 459, 463, 465, 467, - 471, 473, 475, 479, 481, 483, 487, 489, 491, 495, 497, 499, - 503, 505, 507, 511, 513, 515, 519, 521, 523, 527, 529, 531, - 535, 537, 539, 543, 545, 547, 549, 551, 553, 555, 557, 559, - 561, 563, 565, 567, 569, 571, 573, 575, -1 - ], - name = 'tch_afs_6_7', - description = [ - "TCH/AFS 6.7 kbits convolutional code:", - "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", - "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", - "G3/G3 = 1", - "G3/G3 = 1", - ] -) + # TCH_AFS_6_7 definition + ConvolutionalCode( + 140, + [ + ( G1, G3 ), + ( G2, G3 ), + ( 1, 1 ), + ( 1, 1 ), + ], + puncture = [ + 1, 3, 7, 11, 15, 27, 39, 55, 67, 79, 95, 107, + 119, 135, 147, 159, 175, 187, 199, 215, 227, 239, 255, 267, + 279, 287, 291, 295, 299, 303, 307, 311, 315, 319, 323, 327, + 331, 335, 339, 343, 347, 351, 355, 359, 363, 367, 369, 371, + 375, 377, 379, 383, 385, 387, 391, 393, 395, 399, 401, 403, + 407, 409, 411, 415, 417, 419, 423, 425, 427, 431, 433, 435, + 439, 441, 443, 447, 449, 451, 455, 457, 459, 463, 465, 467, + 471, 473, 475, 479, 481, 483, 487, 489, 491, 495, 497, 499, + 503, 505, 507, 511, 513, 515, 519, 521, 523, 527, 529, 531, + 535, 537, 539, 543, 545, 547, 549, 551, 553, 555, 557, 559, + 561, 563, 565, 567, 569, 571, 573, 575, -1 + ], + name = 'tch_afs_6_7', + description = [ + "TCH/AFS 6.7 kbits convolutional code:", + "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", + "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", + "G3/G3 = 1", + "G3/G3 = 1", + ] + ), -# TCH_AFS_5_9 definition -TCH_AFS_5_9 = ConvolutionalCode( - 124, - [ - ( G4, G6 ), - ( G5, G6 ), - ( 1, 1), - ( 1, 1), - ], - puncture = [ - 0, 1, 3, 5, 7, 11, 15, 31, 47, 63, 79, 95, - 111, 127, 143, 159, 175, 191, 207, 223, 239, 255, 271, 287, - 303, 319, 327, 331, 335, 343, 347, 351, 359, 363, 367, 375, - 379, 383, 391, 395, 399, 407, 411, 415, 423, 427, 431, 439, - 443, 447, 455, 459, 463, 467, 471, 475, 479, 483, 487, 491, - 495, 499, 503, 507, 509, 511, 512, 513, 515, 516, 517, 519, - -1 - ], - name = 'tch_afs_5_9', - description = [ - "TCH/AFS 5.9 kbits convolutional code:", - "124 bits", - "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", - "G5/G6 = 1 + D + D4 + D6 / 1 + D + D2 + D3 + D4 + D6", - "G6/G6 = 1", - "G6/G6 = 1", - ] -) + # TCH_AFS_5_9 definition + ConvolutionalCode( + 124, + [ + ( G4, G6 ), + ( G5, G6 ), + ( 1, 1), + ( 1, 1), + ], + puncture = [ + 0, 1, 3, 5, 7, 11, 15, 31, 47, 63, 79, 95, + 111, 127, 143, 159, 175, 191, 207, 223, 239, 255, 271, 287, + 303, 319, 327, 331, 335, 343, 347, 351, 359, 363, 367, 375, + 379, 383, 391, 395, 399, 407, 411, 415, 423, 427, 431, 439, + 443, 447, 455, 459, 463, 467, 471, 475, 479, 483, 487, 491, + 495, 499, 503, 507, 509, 511, 512, 513, 515, 516, 517, 519, + -1 + ], + name = 'tch_afs_5_9', + description = [ + "TCH/AFS 5.9 kbits convolutional code:", + "124 bits", + "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", + "G5/G6 = 1 + D + D4 + D6 / 1 + D + D2 + D3 + D4 + D6", + "G6/G6 = 1", + "G6/G6 = 1", + ] + ), -# TCH_AFS_5_15 definition -TCH_AFS_5_15 = ConvolutionalCode( - 109, - [ - ( G1, G3 ), - ( G1, G3 ), - ( G2, G3 ), - ( 1, 1 ), - ( 1, 1 ), - ], - puncture = [ - 0, 4, 5, 9, 10, 14, 15, 20, 25, 30, 35, 40, - 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, - 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, - 290, 300, 310, 315, 320, 325, 330, 334, 335, 340, 344, 345, - 350, 354, 355, 360, 364, 365, 370, 374, 375, 380, 384, 385, - 390, 394, 395, 400, 404, 405, 410, 414, 415, 420, 424, 425, - 430, 434, 435, 440, 444, 445, 450, 454, 455, 460, 464, 465, - 470, 474, 475, 480, 484, 485, 490, 494, 495, 500, 504, 505, - 510, 514, 515, 520, 524, 525, 529, 530, 534, 535, 539, 540, - 544, 545, 549, 550, 554, 555, 559, 560, 564, -1 - ], - name = 'tch_afs_5_15', - description = [ - "TCH/AFS 5.15 kbits convolutional code:", - "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", - "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", - "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", - "G3/G3 = 1", - "G3/G3 = 1", - ] -) + # TCH_AFS_5_15 definition + ConvolutionalCode( + 109, + [ + ( G1, G3 ), + ( G1, G3 ), + ( G2, G3 ), + ( 1, 1 ), + ( 1, 1 ), + ], + puncture = [ + 0, 4, 5, 9, 10, 14, 15, 20, 25, 30, 35, 40, + 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, + 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, + 290, 300, 310, 315, 320, 325, 330, 334, 335, 340, 344, 345, + 350, 354, 355, 360, 364, 365, 370, 374, 375, 380, 384, 385, + 390, 394, 395, 400, 404, 405, 410, 414, 415, 420, 424, 425, + 430, 434, 435, 440, 444, 445, 450, 454, 455, 460, 464, 465, + 470, 474, 475, 480, 484, 485, 490, 494, 495, 500, 504, 505, + 510, 514, 515, 520, 524, 525, 529, 530, 534, 535, 539, 540, + 544, 545, 549, 550, 554, 555, 559, 560, 564, -1 + ], + name = 'tch_afs_5_15', + description = [ + "TCH/AFS 5.15 kbits convolutional code:", + "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", + "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", + "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", + "G3/G3 = 1", + "G3/G3 = 1", + ] + ), -# TCH_AFS_4_75 definition -TCH_AFS_4_75 = ConvolutionalCode( - 101, - [ - ( G4, G6 ), - ( G4, G6 ), - ( G5, G6 ), - ( 1, 1 ), - ( 1, 1 ), - ], - puncture = [ - 0, 1, 2, 4, 5, 7, 9, 15, 25, 35, 45, 55, - 65, 75, 85, 95, 105, 115, 125, 135, 145, 155, 165, 175, - 185, 195, 205, 215, 225, 235, 245, 255, 265, 275, 285, 295, - 305, 315, 325, 335, 345, 355, 365, 375, 385, 395, 400, 405, - 410, 415, 420, 425, 430, 435, 440, 445, 450, 455, 459, 460, - 465, 470, 475, 479, 480, 485, 490, 495, 499, 500, 505, 509, - 510, 515, 517, 519, 520, 522, 524, 525, 526, 527, 529, 530, - 531, 532, 534, -1 - ], - name = 'tch_afs_4_75', - description = [ - "TCH/AFS 4.75 kbits convolutional code:", - "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", - "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", - "G5/G6 = 1 + D + D4 + D6 / 1 + D + D2 + D3 + D4 + D6", - "G6/G6 = 1", - "G6/G6 = 1", - ] -) + # TCH_AFS_4_75 definition + ConvolutionalCode( + 101, + [ + ( G4, G6 ), + ( G4, G6 ), + ( G5, G6 ), + ( 1, 1 ), + ( 1, 1 ), + ], + puncture = [ + 0, 1, 2, 4, 5, 7, 9, 15, 25, 35, 45, 55, + 65, 75, 85, 95, 105, 115, 125, 135, 145, 155, 165, 175, + 185, 195, 205, 215, 225, 235, 245, 255, 265, 275, 285, 295, + 305, 315, 325, 335, 345, 355, 365, 375, 385, 395, 400, 405, + 410, 415, 420, 425, 430, 435, 440, 445, 450, 455, 459, 460, + 465, 470, 475, 479, 480, 485, 490, 495, 499, 500, 505, 509, + 510, 515, 517, 519, 520, 522, 524, 525, 526, 527, 529, 530, + 531, 532, 534, -1 + ], + name = 'tch_afs_4_75', + description = [ + "TCH/AFS 4.75 kbits convolutional code:", + "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", + "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", + "G5/G6 = 1 + D + D4 + D6 / 1 + D + D2 + D3 + D4 + D6", + "G6/G6 = 1", + "G6/G6 = 1", + ] + ) +] -def gen_c(dest, pref, code): - f = open(os.path.join(dest, 'conv_' + code.name + '_gen.c'), 'w') +if __name__ == '__main__': + path = sys.argv[1] if len(sys.argv) > 1 else os.getcwd() + prefix = "gsm0503" + + print >>sys.stderr, "Generating convolutional codes..." + + # Open a new file for writing + f = open(os.path.join(path, "gsm0503_conv.c"), 'w') print >>f, mod_license print >>f, "#include " print >>f, "#include " - code.gen_tables(pref, f) -if __name__ == '__main__': - print >>sys.stderr, "Generating convolutional codes..." - prefix = "gsm0503" - path = sys.argv[1] if len(sys.argv) > 1 else os.getcwd() - gen_c(path, prefix, xCCH) - gen_c(path, prefix, CS2) - gen_c(path, prefix, CS3) - gen_c(path, prefix, TCH_AFS_12_2) - gen_c(path, prefix, TCH_AFS_10_2) - gen_c(path, prefix, TCH_AFS_7_95) - gen_c(path, prefix, TCH_AFS_7_4) - gen_c(path, prefix, TCH_AFS_6_7) - gen_c(path, prefix, TCH_AFS_5_9) - gen_c(path, prefix, TCH_AFS_5_15) - gen_c(path, prefix, TCH_AFS_4_75) - print >>sys.stderr, "\tdone." + # Generate the tables one by one + for code in conv_codes: + print >>sys.stderr, "Generate '%s' definition" % code.name + code.gen_tables(prefix, f) + + print >>sys.stderr, "Generation complete." -- To view, visit https://gerrit.osmocom.org/828 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib4e4ee5fdde38429e68e3b2fa50ec03a18f59daa 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 From gerrit-no-reply at lists.osmocom.org Wed Oct 19 17:30:35 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 19 Oct 2016 17:30:35 +0000 Subject: [PATCH] libosmocore[master]: utils/conv_gen.py: improve output formatting 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/829 to look at the new patch set (#8). utils/conv_gen.py: improve output formatting To keep the generated tables readable, line with should be limited. So, now there are the following limitations: - _print_term(): up to 12 numbers per line, - _print_puncture(): up to 12 numbers per line, - _print_x(): up to 4 blocks per line. Change-Id: I95256c4ad402a3c088bdb6c5a5cda8b17c31881c --- M utils/conv_gen.py 1 file changed, 32 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/29/829/8 diff --git a/utils/conv_gen.py b/utils/conv_gen.py index 38ea63b..715a146 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -129,17 +129,22 @@ return ns, nb def _print_term(self, fi, num_states, pack = False): - d = [] + items = [] + for state in range(num_states): if pack: x = pack(self.next_term_output(state)) else: x = self.next_term_state(state) - d.append("%d, " % x) - print >>fi, "\t%s" % ''.join(d) + items.append(x) + + # Up to 12 numbers should be placed per line + print_formatted(items, "%3d, ", 12, fi) def _print_x(self, fi, num_states, pack = False): + items = [] + for state in range(num_states): if pack: x0 = pack(self.next_output(state, 0)) @@ -148,7 +153,14 @@ x0 = self.next_state(state, 0) x1 = self.next_state(state, 1) - print >>fi, "\t{ %2d, %2d }," % (x0, x1) + items.append((x0, x1)) + + # Up to 4 blocks should be placed per line + print_formatted(items, "{ %2d, %2d }, ", 4, fi) + + def _print_puncture(self, fi): + # Up to 12 numbers should be placed per line + print_formatted(self.puncture, "%3d, ", 12, fi) def gen_tables(self, pref, fi): pack = lambda n: \ @@ -175,8 +187,7 @@ if len(self.puncture): print >>fi, "\nstatic const int %s_puncture[] = {" % self.name - for p in self.puncture: - print >>fi, "\t%d," % p + self._print_puncture(fi) print >>fi, "};" # Write description as a multi-line comment @@ -207,6 +218,21 @@ 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): + counter = 0 + + # Print initial indent + fi.write("\t") + + for item in items: + if counter > 0 and counter % count == 0: + fi.write("\n\t") + + fi.write(format % item) + counter += 1 + + fi.write("\n") + # Polynomials according to 3GPP TS 05.03 Annex B G0 = poly(0, 3, 4) G1 = poly(0, 1, 3, 4) -- To view, visit https://gerrit.osmocom.org/829 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I95256c4ad402a3c088bdb6c5a5cda8b17c31881c Gerrit-PatchSet: 8 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Wed Oct 19 21:32:49 2016 From: gerrit-no-reply at lists.osmocom.org (Tom Tsou) Date: Wed, 19 Oct 2016 21:32:49 +0000 Subject: [PATCH] osmo-trx[master]: uhd: Set minimum supported version to 3.9.0 Message-ID: Review at https://gerrit.osmocom.org/1117 uhd: Set minimum supported version to 3.9.0 Versions of UHD prior to 3.9.0 are no longer supported. Rather then backport and ifdef UHD version specific API and behavioral changes, set minimum support to the current LTS release, which is 3.9.0. Change-Id: Id7d15b52cd4e45f1d856a6ef3a84832a28f2dd04 Signed-off-by: Tom Tsou --- M Transceiver52M/UHDDevice.cpp M configure.ac 2 files changed, 2 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/17/1117/1 diff --git a/Transceiver52M/UHDDevice.cpp b/Transceiver52M/UHDDevice.cpp index 89ca2a3..651aa06 100644 --- a/Transceiver52M/UHDDevice.cpp +++ b/Transceiver52M/UHDDevice.cpp @@ -84,15 +84,9 @@ /* * 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 7e394c2..b41382f 100644 --- a/configure.ac +++ b/configure.ac @@ -97,12 +97,9 @@ ]) AS_IF([test "x$with_usrp1" != "xyes"],[ - 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(UHD, uhd >= 003.009) 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/1117 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id7d15b52cd4e45f1d856a6ef3a84832a28f2dd04 Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Tom Tsou From gerrit-no-reply at lists.osmocom.org Wed Oct 19 22:28:25 2016 From: gerrit-no-reply at lists.osmocom.org (Tom Tsou) Date: Wed, 19 Oct 2016 22:28:25 +0000 Subject: [PATCH] osmo-trx[master]: transceiver: Fix command build warning Message-ID: Review at https://gerrit.osmocom.org/1118 transceiver: Fix command build warning Place conditional brackets on handover table reset. Reset table only on successful start or restart. Change-Id: I74032b49785bd68835a0a68cb0f14cdaab4fcd26 --- M Transceiver52M/Transceiver.cpp 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/18/1118/1 diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp index 4db0aaa..f156ad4 100644 --- a/Transceiver52M/Transceiver.cpp +++ b/Transceiver52M/Transceiver.cpp @@ -744,14 +744,15 @@ sprintf(response,"RSP POWEROFF 0"); } else if (strcmp(command,"POWERON")==0) { - if (!start()) + if (!start()) { sprintf(response,"RSP POWERON 1"); - else + } else { sprintf(response,"RSP POWERON 0"); for (int i = 0; i < 8; i++) { for (int j = 0; j < 8; j++) mHandover[i][j] = false; } + } } else if (strcmp(command,"HANDOVER")==0){ int ts=0,ss=0; -- To view, visit https://gerrit.osmocom.org/1118 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I74032b49785bd68835a0a68cb0f14cdaab4fcd26 Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Tom Tsou From gerrit-no-reply at lists.osmocom.org Thu Oct 20 10:37:58 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 20 Oct 2016 10:37:58 +0000 Subject: [PATCH] libosmo-abis[master]: NOT FOR MERGE Message-ID: Review at https://gerrit.osmocom.org/1119 NOT FOR MERGE Change-Id: I2e002b33c5fe5bfe5c8dff66553fc14e8f26ecb2 --- M configure.ac 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/19/1119/1 diff --git a/configure.ac b/configure.ac index f463c2e..5ef63a1 100644 --- a/configure.ac +++ b/configure.ac @@ -1,3 +1,5 @@ +-- TEST -- + AC_INIT([libosmo-abis], m4_esyscmd([./git-version-gen .tarball-version]), [openbsc at lists.osmocom.org]) -- To view, visit https://gerrit.osmocom.org/1119 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2e002b33c5fe5bfe5c8dff66553fc14e8f26ecb2 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 20 10:39:33 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 20 Oct 2016 10:39:33 +0000 Subject: [ABANDON] libosmo-abis[master]: NOT FOR MERGE In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: NOT FOR MERGE ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/1119 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I2e002b33c5fe5bfe5c8dff66553fc14e8f26ecb2 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Oct 20 10:51:12 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 20 Oct 2016 10:51:12 +0000 Subject: [PATCH] libosmo-abis[master]: lapd: adding support for ericsson's lapd dialect Message-ID: Review at https://gerrit.osmocom.org/1120 lapd: adding support for ericsson's lapd dialect - add new lapd profile to support ericssons specific lapd params - add function to switch between lapd profiles Change-Id: I892af57013d7ab4216e9e2d0873a69129aaeb8e5 --- M include/osmocom/abis/lapd.h M src/input/lapd.c 2 files changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/20/1120/1 diff --git a/include/osmocom/abis/lapd.h b/include/osmocom/abis/lapd.h index 2987633..06caa92 100644 --- a/include/osmocom/abis/lapd.h +++ b/include/osmocom/abis/lapd.h @@ -20,6 +20,7 @@ extern const struct lapd_profile lapd_profile_isdn; extern const struct lapd_profile lapd_profile_abis; +extern const struct lapd_profile lapd_profile_abis_ericsson; extern const struct lapd_profile lapd_profile_sat; struct lapd_instance { @@ -63,6 +64,10 @@ void *rx_cbdata), void *rx_cbdata, const struct lapd_profile *profile); +/* Change lapd-profile on the fly (use with caution!) */ +void lapd_instance_set_profile(struct lapd_instance *li, + const struct lapd_profile *profile); + void lapd_instance_free(struct lapd_instance *li); /* Start a (user-side) SAP for the specified TEI/SAPI on the LAPD instance */ diff --git a/src/input/lapd.c b/src/input/lapd.c index ac24fd8..4b3179f 100644 --- a/src/input/lapd.c +++ b/src/input/lapd.c @@ -95,6 +95,18 @@ .short_address = 0 }; +const struct lapd_profile lapd_profile_abis_ericsson = { + .k = LAPD_SET_K(2,1), + .n200 = 300, + .n201 = 260, + .n202 = 0, /* infinite */ + .t200_sec = 0, .t200_usec = 300000, + .t201_sec = 1, .t201_usec = 0, + .t202_sec = 2, .t202_usec = 0, + .t203_sec = 10, .t203_usec = 0, + .short_address = 0 +}; + const struct lapd_profile lapd_profile_sat = { .k = LAPD_SET_K(15,15), .n200 = 5, @@ -664,6 +676,13 @@ return li; } +/* Change lapd-profile on the fly (use with caution!) */ +void lapd_instance_set_profile(struct lapd_instance *li, + const struct lapd_profile *profile) +{ + memcpy(&li->profile, profile, sizeof(li->profile)); +} + void lapd_instance_free(struct lapd_instance *li) { struct lapd_tei *teip, *teip2; -- To view, visit https://gerrit.osmocom.org/1120 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I892af57013d7ab4216e9e2d0873a69129aaeb8e5 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Thu Oct 20 11:42:02 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 20 Oct 2016 11:42:02 +0000 Subject: osmo-pcu[master]: jenkins.sh: use osmo-build-dep.sh, output testlogs In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1116 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I34c19ed7c80aa56bd131f738f37324aed1cd73db Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu 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 Oct 20 11:42:05 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 20 Oct 2016 11:42:05 +0000 Subject: [MERGED] osmo-pcu[master]: jenkins.sh: use osmo-build-dep.sh, output testlogs In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: jenkins.sh: use osmo-build-dep.sh, output testlogs ...................................................................... jenkins.sh: use osmo-build-dep.sh, output testlogs Also make cosmetically similar to the other jenkins.sh scripts in various osmo repositories. Change-Id: I34c19ed7c80aa56bd131f738f37324aed1cd73db --- M contrib/jenkins.sh 1 file changed, 16 insertions(+), 11 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 7b456c2..fb0fb2f 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -10,9 +10,10 @@ base="$PWD" deps="$base/deps" inst="$deps/install" +export deps inst +mkdir "$deps" || true rm -rf "$inst" -mkdir -p "$deps" # Collect configure options for osmo-pcu PCU_CONFIG="" @@ -30,6 +31,7 @@ api_incl="$inst/include/sysmocom/femtobts/" mkdir -p "$api_incl" cp include/*.h "$api_incl" + cd "$base" elif [ -z "$with_dsp" -o "$with_dsp" = none ]; then echo "Direct DSP access disabled" @@ -48,19 +50,22 @@ fi # Build deps -cd "$deps" -osmo-deps.sh libosmocore -cd libosmocore -autoreconf --install --force -./configure --prefix="$inst" -$MAKE $PARALLEL_MAKE install +osmo-build-dep.sh libosmocore -export PKG_CONFIG_PATH="$inst/lib/pkgconfig" +export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" export LD_LIBRARY_PATH="$inst/lib" -# Build osmo-pcu -cd "$base" +set +x +echo +echo +echo +echo " =============================== osmo-pcu ===============================" +echo +set -x + autoreconf --install --force ./configure $PCU_CONFIG $MAKE $PARALLEL_MAKE -DISTCHECK_CONFIGURE_FLAGS="$PCU_CONFIG" AM_DISTCHECK_CONFIGURE_FLAGS="$PCU_CONFIG" $MAKE distcheck +DISTCHECK_CONFIGURE_FLAGS="$PCU_CONFIG" AM_DISTCHECK_CONFIGURE_FLAGS="$PCU_CONFIG" \ + $MAKE distcheck \ + || cat-testlogs.sh -- To view, visit https://gerrit.osmocom.org/1116 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I34c19ed7c80aa56bd131f738f37324aed1cd73db Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 20 11:42:36 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 20 Oct 2016 11:42:36 +0000 Subject: [MERGED] osmo-iuh[master]: cosmetic: hnbgw: addr related renames, move define, move com... In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: cosmetic: hnbgw: addr related renames, move define, move comment ...................................................................... cosmetic: hnbgw: addr related renames, move define, move comment Prepare for parameterization of IuCS and IuPS addresses: Conform internal variable naming to local-ip, local-port, remote-ip, remote-port (instead of bind-ip). Rename HNBGW_IUH_LOCAL_IP_DEFAULT to HNGGW_LOCAL_IP_DEFAULT to be more general and move it to the top. Move a function doc comment to the .c file. Change-Id: Ice85941c978498e3ddf41d151248507e7f56cb5d --- M include/osmocom/iuh/hnbgw.h M src/hnbgw.c M src/hnbgw_vty.c 3 files changed, 22 insertions(+), 22 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/iuh/hnbgw.h b/include/osmocom/iuh/hnbgw.h index dfc9d82..6b5a855 100644 --- a/include/osmocom/iuh/hnbgw.h +++ b/include/osmocom/iuh/hnbgw.h @@ -19,6 +19,8 @@ }; +#define HNBGW_LOCAL_IP_DEFAULT "0.0.0.0" + /* 25.467 Section 7.1 */ #define IUH_DEFAULT_SCTP_PORT 29169 #define RNA_DEFAULT_SCTP_PORT 25471 @@ -106,13 +108,11 @@ struct hnb_context *hnb; }; -#define HNBGW_IUH_LOCAL_IP_DEFAULT "0.0.0.0" - struct hnb_gw { struct { - const char *iuh_bind_addr; + const char *iuh_local_ip; /*! SCTP port for Iuh listening */ - uint16_t iuh_listen_port; + uint16_t iuh_local_port; /*! The UDP port where we receive multiplexed CS user * plane traffic from HNBs */ uint16_t iuh_cs_mux_port; @@ -149,8 +149,4 @@ void hnbgw_vty_init(struct hnb_gw *gw, void *tall_ctx); -/* - * Return IP address passed to the hnbgw/iuh/bind command, or - * IUH_BIND_ADDR_DEFAULT - */ -const char *hnbgw_get_iuh_bind_addr(struct hnb_gw *gw); +const char *hnbgw_get_iuh_local_ip(struct hnb_gw *gw); diff --git a/src/hnbgw.c b/src/hnbgw.c index 8d6dbb1..eb36367 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -76,7 +76,7 @@ { struct hnb_gw *gw = talloc_zero(ctx, struct hnb_gw); - gw->config.iuh_listen_port = IUH_DEFAULT_SCTP_PORT; + gw->config.iuh_local_port = IUH_DEFAULT_SCTP_PORT; gw->next_ue_ctx_id = 23; INIT_LLIST_HEAD(&gw->hnb_list); @@ -308,11 +308,15 @@ return 0; } -const char *hnbgw_get_iuh_bind_addr(struct hnb_gw *gw) +/* + * Return IP address passed to the hnbgw/iuh/local-ip command, or + * HNBGW_LOCAL_IP_DEFAULT. + */ +const char *hnbgw_get_iuh_local_ip(struct hnb_gw *gw) { - const char *addr = gw->config.iuh_bind_addr; + const char *addr = gw->config.iuh_local_ip; if (!addr) - addr = HNBGW_IUH_LOCAL_IP_DEFAULT; + addr = HNBGW_LOCAL_IP_DEFAULT; return addr; } @@ -507,8 +511,8 @@ g_hnb_gw->cnlink_ps = hnbgw_cnlink_init(g_hnb_gw, "127.0.0.2", SUA_PORT, 1); LOGP(DMAIN, LOGL_NOTICE, "Listening for Iuh at %s %d\n", - hnbgw_get_iuh_bind_addr(g_hnb_gw), - g_hnb_gw->config.iuh_listen_port); + hnbgw_get_iuh_local_ip(g_hnb_gw), + g_hnb_gw->config.iuh_local_port); srv = osmo_stream_srv_link_create(tall_hnb_ctx); if (!srv) { perror("cannot create server"); @@ -516,8 +520,8 @@ } osmo_stream_srv_link_set_data(srv, g_hnb_gw); osmo_stream_srv_link_set_proto(srv, IPPROTO_SCTP); - osmo_stream_srv_link_set_addr(srv, hnbgw_get_iuh_bind_addr(g_hnb_gw)); - osmo_stream_srv_link_set_port(srv, g_hnb_gw->config.iuh_listen_port); + osmo_stream_srv_link_set_addr(srv, hnbgw_get_iuh_local_ip(g_hnb_gw)); + osmo_stream_srv_link_set_port(srv, g_hnb_gw->config.iuh_local_port); osmo_stream_srv_link_set_accept_cb(srv, accept_cb); if (osmo_stream_srv_link_open(srv) < 0) { diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index 5dee41a..93c1f9a 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -107,10 +107,10 @@ DEFUN(cfg_hnbgw_iuh_local_ip, cfg_hnbgw_iuh_local_ip_cmd, "local-ip A.B.C.D", "Accept Iuh connections on local interface\n" - "Local interface IP address (default: " HNBGW_IUH_LOCAL_IP_DEFAULT ")") + "Local interface IP address (default: " HNBGW_LOCAL_IP_DEFAULT ")") { - talloc_free((void*)g_hnb_gw->config.iuh_bind_addr); - g_hnb_gw->config.iuh_bind_addr = talloc_strdup(tall_hnb_ctx, argv[0]); + talloc_free((void*)g_hnb_gw->config.iuh_local_ip); + g_hnb_gw->config.iuh_local_ip = talloc_strdup(tall_hnb_ctx, argv[0]); return CMD_SUCCESS; } @@ -136,8 +136,8 @@ vty_out(vty, " iuh%s", VTY_NEWLINE); - addr = g_hnb_gw->config.iuh_bind_addr; - if (addr && (strcmp(addr, HNBGW_IUH_LOCAL_IP_DEFAULT) != 0)) + addr = g_hnb_gw->config.iuh_local_ip; + if (addr && (strcmp(addr, HNBGW_LOCAL_IP_DEFAULT) != 0)) vty_out(vty, " local-ip %s%s", addr, VTY_NEWLINE); if (g_hnb_gw->config.hnbap_allow_tmsi) -- To view, visit https://gerrit.osmocom.org/1059 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ice85941c978498e3ddf41d151248507e7f56cb5d Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh 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 Oct 20 11:45:13 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 20 Oct 2016 11:45:13 +0000 Subject: osmo-gsm-manuals[master]: OsmoBTS/abis/rsl: split dyn TS ladder diagrams to fit on page In-Reply-To: References: Message-ID: Patch Set 4: anything wrong with this patch ... ? The other manuals patches all got +2, but this is still empty. -- To view, visit https://gerrit.osmocom.org/1091 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If90250123a85cd275f07c69ee64c6e10a7269f06 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals 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 Oct 20 12:04:40 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 20 Oct 2016 12:04:40 +0000 Subject: libosmocore[master]: utils/conv_gen.py: generate a single file In-Reply-To: References: Message-ID: Patch Set 9: (1 comment) https://gerrit.osmocom.org/#/c/828/9//COMMIT_MSG Commit Message: Line 19: file. This optimization is currently WIP. Excellent, this is a huge improvement, thanks! -- To view, visit https://gerrit.osmocom.org/828 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib4e4ee5fdde38429e68e3b2fa50ec03a18f59daa 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-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Oct 20 12:31:18 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 20 Oct 2016 12:31:18 +0000 Subject: libosmocore[master]: utils/conv_gen.py: generate a single file In-Reply-To: References: Message-ID: Patch Set 9: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/828 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib4e4ee5fdde38429e68e3b2fa50ec03a18f59daa 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-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Oct 20 13:22:18 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 20 Oct 2016 13:22:18 +0000 Subject: libosmo-abis[master]: lapd: adding support for ericsson's lapd dialect In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 this patch seems techincally OK, but it lacks a description both in the commit message as well as in the code (above the new lapd profile) what is different and why. It needs to state the SABM too frequent or too rare will fail to establish LAPD datalinks to Ericsson RBS, and that the value of 300ms has been emprically tested and seems to work at least with RBS2308 and RBS2111. -- To view, visit https://gerrit.osmocom.org/1120 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I892af57013d7ab4216e9e2d0873a69129aaeb8e5 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis 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 Oct 20 14:38:28 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 20 Oct 2016 14:38:28 +0000 Subject: [PATCH] libosmo-abis[master]: lapd: adding support for ericsson's lapd dialect 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/1120 to look at the new patch set (#2). lapd: adding support for ericsson's lapd dialect Ericsson's RBS2111-BTS (and similar) implements a lapdm dialect which uses a link establishment method that differs from the standard. While the BSC is transmitting sabm frames on one specific timeslot, the BTS will periodically scan through all timeslots to check for incoming sabm frames. When the BTS detcts the sabm fames on one of the timeslots it will stay there and continue to commence the link establishment. The described procedure requires a slightly modified lapd profile, the t200 retransmission timeout has to be configured to exactly 300 msek. Otherwise the link establishment will fail. Since the BTS will switch from timeslot to timeslot most of the sabm frames will not be seen by the BTS, so the maximum retransmission has to be increased. This patch suggests a maximum retry count of 300, which is an educated guess and has worked fine during our tests. Change-Id: I892af57013d7ab4216e9e2d0873a69129aaeb8e5 --- M include/osmocom/abis/lapd.h M src/input/lapd.c 2 files changed, 37 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/20/1120/2 diff --git a/include/osmocom/abis/lapd.h b/include/osmocom/abis/lapd.h index 2987633..697f558 100644 --- a/include/osmocom/abis/lapd.h +++ b/include/osmocom/abis/lapd.h @@ -18,8 +18,10 @@ int short_address; }; +/* predefined lapd profiles (see lapd.c for definition) */ extern const struct lapd_profile lapd_profile_isdn; extern const struct lapd_profile lapd_profile_abis; +extern const struct lapd_profile lapd_profile_abis_ericsson; extern const struct lapd_profile lapd_profile_sat; struct lapd_instance { @@ -63,6 +65,13 @@ void *rx_cbdata), void *rx_cbdata, const struct lapd_profile *profile); +/* In rare cases (e.g. Ericsson's lapd dialect), it may be necessary to + * exchange the lapd profile on the fly. lapd_instance_set_profile() + * allwos to set the lapd profile on a lapd instance danymically to + * one of the lapd profiles define above. */ +void lapd_instance_set_profile(struct lapd_instance *li, + const struct lapd_profile *profile); + void lapd_instance_free(struct lapd_instance *li); /* Start a (user-side) SAP for the specified TEI/SAPI on the LAPD instance */ diff --git a/src/input/lapd.c b/src/input/lapd.c index ac24fd8..f5909b4 100644 --- a/src/input/lapd.c +++ b/src/input/lapd.c @@ -95,6 +95,27 @@ .short_address = 0 }; +/* Ericssons OM2000 lapd dialect requires a sabm frame retransmission + * timeout of exactly 300 msek. Shorter or longer retransmission will + * cause the link establishment to fail permanently. Since the BTS is + * periodically scanning through all timeslots to find the timeslot + * where the bsc is transmitting its sabm frames the normal maximum + * retransmission (n200) of 3 is not enough. In order not to miss + * the bts, n200 has been increased to 300, which is an educated + * guess. */ + +const struct lapd_profile lapd_profile_abis_ericsson = { + .k = LAPD_SET_K(2,1), + .n200 = 300, + .n201 = 260, + .n202 = 0, /* infinite */ + .t200_sec = 0, .t200_usec = 300000, + .t201_sec = 1, .t201_usec = 0, + .t202_sec = 2, .t202_usec = 0, + .t203_sec = 10, .t203_usec = 0, + .short_address = 0 +}; + const struct lapd_profile lapd_profile_sat = { .k = LAPD_SET_K(15,15), .n200 = 5, @@ -664,6 +685,13 @@ return li; } +/* Change lapd-profile on the fly (use with caution!) */ +void lapd_instance_set_profile(struct lapd_instance *li, + const struct lapd_profile *profile) +{ + memcpy(&li->profile, profile, sizeof(li->profile)); +} + void lapd_instance_free(struct lapd_instance *li) { struct lapd_tei *teip, *teip2; -- To view, visit https://gerrit.osmocom.org/1120 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I892af57013d7ab4216e9e2d0873a69129aaeb8e5 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Oct 20 14:41:25 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 20 Oct 2016 14:41:25 +0000 Subject: [PATCH] libosmo-abis[master]: lapd: adding support for ericsson's lapd dialect 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/1120 to look at the new patch set (#3). lapd: adding support for ericsson's lapd dialect Ericsson's RBS2111-BTS (and similar) implements a lapdm dialect which uses a link establishment method that differs from the standard. While the BSC is transmitting sabm frames on one specific timeslot, the BTS will periodically scan through all timeslots to check for incoming sabm frames. When the BTS detcts the sabm fames on one of the timeslots it will stay there and continue to commence the link establishment. The described procedure requires a slightly modified lapd profile, the t200 retransmission timeout has to be configured to exactly 300 msek. Otherwise the link establishment will fail. Since the BTS will switch from timeslot to timeslot most of the sabm frames will not be seen by the BTS, so the maximum retransmission has to be increased. This patch suggests a maximum retry count of 300, which is an educated guess and has worked fine during our tests. Change-Id: I892af57013d7ab4216e9e2d0873a69129aaeb8e5 --- M include/osmocom/abis/lapd.h M src/input/lapd.c 2 files changed, 37 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/20/1120/3 diff --git a/include/osmocom/abis/lapd.h b/include/osmocom/abis/lapd.h index 2987633..d618187 100644 --- a/include/osmocom/abis/lapd.h +++ b/include/osmocom/abis/lapd.h @@ -18,8 +18,10 @@ int short_address; }; +/* predefined lapd profiles (see lapd.c for definition) */ extern const struct lapd_profile lapd_profile_isdn; extern const struct lapd_profile lapd_profile_abis; +extern const struct lapd_profile lapd_profile_abis_ericsson; extern const struct lapd_profile lapd_profile_sat; struct lapd_instance { @@ -63,6 +65,13 @@ void *rx_cbdata), void *rx_cbdata, const struct lapd_profile *profile); +/* In rare cases (e.g. Ericsson's lapd dialect), it may be necessary to + * exchange the lapd profile on the fly. lapd_instance_set_profile() + * allwos to set the lapd profile on a lapd instance danymically to + * one of the lapd profiles define above. */ +void lapd_instance_set_profile(struct lapd_instance *li, + const struct lapd_profile *profile); + void lapd_instance_free(struct lapd_instance *li); /* Start a (user-side) SAP for the specified TEI/SAPI on the LAPD instance */ diff --git a/src/input/lapd.c b/src/input/lapd.c index ac24fd8..f5909b4 100644 --- a/src/input/lapd.c +++ b/src/input/lapd.c @@ -95,6 +95,27 @@ .short_address = 0 }; +/* Ericssons OM2000 lapd dialect requires a sabm frame retransmission + * timeout of exactly 300 msek. Shorter or longer retransmission will + * cause the link establishment to fail permanently. Since the BTS is + * periodically scanning through all timeslots to find the timeslot + * where the bsc is transmitting its sabm frames the normal maximum + * retransmission (n200) of 3 is not enough. In order not to miss + * the bts, n200 has been increased to 300, which is an educated + * guess. */ + +const struct lapd_profile lapd_profile_abis_ericsson = { + .k = LAPD_SET_K(2,1), + .n200 = 300, + .n201 = 260, + .n202 = 0, /* infinite */ + .t200_sec = 0, .t200_usec = 300000, + .t201_sec = 1, .t201_usec = 0, + .t202_sec = 2, .t202_usec = 0, + .t203_sec = 10, .t203_usec = 0, + .short_address = 0 +}; + const struct lapd_profile lapd_profile_sat = { .k = LAPD_SET_K(15,15), .n200 = 5, @@ -664,6 +685,13 @@ return li; } +/* Change lapd-profile on the fly (use with caution!) */ +void lapd_instance_set_profile(struct lapd_instance *li, + const struct lapd_profile *profile) +{ + memcpy(&li->profile, profile, sizeof(li->profile)); +} + void lapd_instance_free(struct lapd_instance *li) { struct lapd_tei *teip, *teip2; -- To view, visit https://gerrit.osmocom.org/1120 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I892af57013d7ab4216e9e2d0873a69129aaeb8e5 Gerrit-PatchSet: 3 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Oct 20 14:48:08 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 20 Oct 2016 14:48:08 +0000 Subject: [ABANDON] osmo-bts[master]: octphy: improved channel measurement In-Reply-To: References: Message-ID: dexter has abandoned this change. Change subject: octphy: improved channel measurement ...................................................................... Abandoned checked back with octasic, this patch can be abandoned. -- To view, visit https://gerrit.osmocom.org/904 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ib2de74e8ec6549f867ac0a04c554167b664ce9b6 Gerrit-PatchSet: 7 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 Thu Oct 20 15:59:17 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 20 Oct 2016 15:59:17 +0000 Subject: [PATCH] libosmocore[master]: Revert "Constify ctrl_cmd struct fields where appropriate" Message-ID: Review at https://gerrit.osmocom.org/1121 Revert "Constify ctrl_cmd struct fields where appropriate" This reverts commit ed9d6da5df98538adc70aa03cb569eb9505d04b6. The commit is good as such, but it causes many compiler warnings in the OpenBSC build. We want this to be re-applied as soon as we have patches ready that fix the fallout in openbsc.git. See also https://lists.osmocom.org/pipermail/openbsc/2016-October/009802.html Related: OS#1829 Change-Id: I722ad60232a6ef5b4cb984b92c42851de26b3ccd --- M TODO-RELEASE M include/osmocom/ctrl/control_cmd.h 2 files changed, 3 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/21/1121/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index b67d6dd..648b6a6 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -4,4 +4,3 @@ libosmocore change major size of ph_data_param struct changed / Extend L1SAP PH-DATA with presence information libosmocore change major size of ph_data_param struct changed / Extend L1SAP PH-DATA with measurement information libosmocore change major size of ph_tch_param struct changed / Extend with RTP Marker -libosmocore change minor mark as const id, variable & value fields of ctrl_cmd struct diff --git a/include/osmocom/ctrl/control_cmd.h b/include/osmocom/ctrl/control_cmd.h index cd96038..8f2eaa2 100644 --- a/include/osmocom/ctrl/control_cmd.h +++ b/include/osmocom/ctrl/control_cmd.h @@ -53,10 +53,10 @@ struct ctrl_cmd { struct ctrl_connection *ccon; enum ctrl_type type; - const char *id; + char *id; void *node; - const char *variable; - const char *value; + char *variable; + char *value; char *reply; }; -- To view, visit https://gerrit.osmocom.org/1121 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I722ad60232a6ef5b4cb984b92c42851de26b3ccd Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 20 16:03:14 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 20 Oct 2016 16:03:14 +0000 Subject: libosmocore[master]: Revert "Constify ctrl_cmd struct fields where appropriate" In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1121 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I722ad60232a6ef5b4cb984b92c42851de26b3ccd Gerrit-PatchSet: 1 Gerrit-Project: libosmocore 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 Thu Oct 20 23:55:04 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 20 Oct 2016 23:55:04 +0000 Subject: [PATCH] openbsc[master]: info log: iu: add line break to and tweak rx RAB Ass Resp log Message-ID: Review at https://gerrit.osmocom.org/1122 info log: iu: add line break to and tweak rx RAB Ass Resp log Change-Id: I50e701493f3951a43506cc37753a30d47f8d601f --- M openbsc/src/libiu/iu.c 1 file changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/22/1122/1 diff --git a/openbsc/src/libiu/iu.c b/openbsc/src/libiu/iu.c index 837385e..87a02d8 100644 --- a/openbsc/src/libiu/iu.c +++ b/openbsc/src/libiu/iu.c @@ -411,7 +411,8 @@ { int rc = -1; - LOGP(DRANAP, LOGL_INFO, "RAB Asignment Response:"); + LOGP(DRANAP, LOGL_INFO, + "Rx RAB Assignment Response for UE conn_id %u\n", ctx->conn_id); if (ies->presenceMask & RAB_ASSIGNMENTRESPONSEIES_RANAP_RAB_SETUPORMODIFIEDLIST_PRESENT) { /* TODO: Iterate over list of SetupOrModifiedList IEs and handle each one */ RANAP_IE_t *ranap_ie = ies->raB_SetupOrModifiedList.raB_SetupOrModifiedList_ies.list.array[0]; @@ -427,8 +428,6 @@ ranap_free_rab_setupormodifieditemies(&setup_ies); } - - LOGPC(DRANAP, LOGL_INFO, "\n"); return rc; } -- To view, visit https://gerrit.osmocom.org/1122 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I50e701493f3951a43506cc37753a30d47f8d601f Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 21 00:01:09 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 21 Oct 2016 00:01:09 +0000 Subject: [PATCH] openbsc[master]: Add empty libxsc Message-ID: Review at https://gerrit.osmocom.org/1123 Add empty libxsc This will gradually soak up code shared by libbsc and libmsc. Change-Id: If34e2bd38a099d0799238337468d56e0305ab8ae --- M openbsc/configure.ac M openbsc/include/openbsc/Makefile.am A openbsc/include/openbsc/xsc.h M openbsc/src/Makefile.am A openbsc/src/libxsc/Makefile.am A openbsc/src/libxsc/xsc.c A openbsc/src/libxsc/xsc_vty.c 7 files changed, 62 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/23/1123/1 diff --git a/openbsc/configure.ac b/openbsc/configure.ac index e2575c1..0e9ce98 100644 --- a/openbsc/configure.ac +++ b/openbsc/configure.ac @@ -214,6 +214,7 @@ src/libcommon/Makefile src/libfilter/Makefile src/libiu/Makefile + src/libxsc/Makefile src/osmo-nitb/Makefile src/osmo-bsc/Makefile src/osmo-bsc_nat/Makefile diff --git a/openbsc/include/openbsc/Makefile.am b/openbsc/include/openbsc/Makefile.am index c6a0149..1bec4f8 100644 --- a/openbsc/include/openbsc/Makefile.am +++ b/openbsc/include/openbsc/Makefile.am @@ -81,6 +81,7 @@ vty.h \ v42bis.h \ v42bis_private.h \ + xsc.h \ $(NULL) openbsc_HEADERS = \ diff --git a/openbsc/include/openbsc/xsc.h b/openbsc/include/openbsc/xsc.h new file mode 100644 index 0000000..6f70f09 --- /dev/null +++ b/openbsc/include/openbsc/xsc.h @@ -0,0 +1 @@ +#pragma once diff --git a/openbsc/src/Makefile.am b/openbsc/src/Makefile.am index 272292a..df95f94 100644 --- a/openbsc/src/Makefile.am +++ b/openbsc/src/Makefile.am @@ -27,6 +27,7 @@ libmsc \ libtrau \ libfilter \ + libxsc \ $(NULL) # Conditional Libraries diff --git a/openbsc/src/libxsc/Makefile.am b/openbsc/src/libxsc/Makefile.am new file mode 100644 index 0000000..c42ae20 --- /dev/null +++ b/openbsc/src/libxsc/Makefile.am @@ -0,0 +1,20 @@ +AM_CPPFLAGS = \ + $(all_includes) \ + -I$(top_srcdir)/include \ + -I$(top_builddir) \ + $(NULL) + +AM_CFLAGS = \ + -Wall \ + $(LIBOSMOCORE_CFLAGS) \ + $(LIBOSMOGSM_CFLAGS) \ + $(LIBOSMOVTY_CFLAGS) \ + $(LIBOSMOABIS_CFLAGS) \ + $(COVERAGE_CFLAGS) \ + $(NULL) + +noinst_LIBRARIES = libxsc.a + +libxsc_a_SOURCES = \ + xsc.c \ + xsc_vty.c diff --git a/openbsc/src/libxsc/xsc.c b/openbsc/src/libxsc/xsc.c new file mode 100644 index 0000000..141179b --- /dev/null +++ b/openbsc/src/libxsc/xsc.c @@ -0,0 +1,19 @@ +/* Code used by both libbsc and libmsc (xsc means "BSC or MSC"). + * + * (C) 2016 by sysmocom s.m.f.c. + * 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 . + * + */ diff --git a/openbsc/src/libxsc/xsc_vty.c b/openbsc/src/libxsc/xsc_vty.c new file mode 100644 index 0000000..141179b --- /dev/null +++ b/openbsc/src/libxsc/xsc_vty.c @@ -0,0 +1,19 @@ +/* Code used by both libbsc and libmsc (xsc means "BSC or MSC"). + * + * (C) 2016 by sysmocom s.m.f.c. + * 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 . + * + */ -- To view, visit https://gerrit.osmocom.org/1123 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If34e2bd38a099d0799238337468d56e0305ab8ae Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 21 00:01:09 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 21 Oct 2016 00:01:09 +0000 Subject: [PATCH] openbsc[master]: define mncc_recv_cb_t to avoid code dup Message-ID: Review at https://gerrit.osmocom.org/1124 define mncc_recv_cb_t to avoid code dup Put mncc_recv_cb_t in xsc.h to avoid header include complications: if placing right above struct gsm_network, one must include gsm_data.h to use mncc_recv_cb_t as function parameter in a header, which will include gsm_data_shared.h, which will include xsc.h (future knowledge). Since I will need to use mncc_recv_cb_t in xsc.h, including gsm_data.h from there would introduce an #include loop. Avoid that and define mncc_recv_cb_t in xsc.h to begin with. Change-Id: I2e64cffa563750ce9f3172ffba6f9cf5b9280e9c --- M openbsc/include/openbsc/bss.h M openbsc/include/openbsc/gsm_data.h M openbsc/include/openbsc/xsc.h M openbsc/src/libbsc/bsc_init.c M openbsc/src/libbsc/net_init.c 5 files changed, 13 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/24/1124/1 diff --git a/openbsc/include/openbsc/bss.h b/openbsc/include/openbsc/bss.h index 49df547..d73776f 100644 --- a/openbsc/include/openbsc/bss.h +++ b/openbsc/include/openbsc/bss.h @@ -1,11 +1,12 @@ #ifndef _BSS_H_ #define _BSS_H_ -struct gsm_network; +#include + struct msgb; /* start and stop network */ -extern int bsc_bootstrap_network(int (*mncc_recv)(struct gsm_network *, struct msgb *), const char *cfg_file); +extern int bsc_bootstrap_network(mncc_recv_cb_t mncc_recv, const char *cfg_file); extern int bsc_shutdown_net(struct gsm_network *net); /* register all supported BTS */ diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index c7e2347..18c01f7 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -14,6 +14,7 @@ #include #include +#include /** annotations for msgb ownership */ #define __uses @@ -298,7 +299,7 @@ /* layer 4 */ struct mncc_sock_state *mncc_state; - int (*mncc_recv) (struct gsm_network *net, struct msgb *msg); + mncc_recv_cb_t mncc_recv; struct llist_head upqueue; struct llist_head trans_list; struct bsc_api *bsc_api; @@ -407,7 +408,7 @@ struct gsm_network *gsm_network_init(void *ctx, uint16_t country_code, uint16_t network_code, - int (*mncc_recv)(struct gsm_network *, struct msgb *)); + mncc_recv_cb_t mncc_recv); int gsm_set_bts_type(struct gsm_bts *bts, enum gsm_bts_type type); diff --git a/openbsc/include/openbsc/xsc.h b/openbsc/include/openbsc/xsc.h index 6f70f09..612d754 100644 --- a/openbsc/include/openbsc/xsc.h +++ b/openbsc/include/openbsc/xsc.h @@ -1 +1,6 @@ #pragma once + +struct msgb; +struct gsm_network; + +typedef int (*mncc_recv_cb_t)(struct gsm_network *, struct msgb *); diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c index bf6e056..a1becf8 100644 --- a/openbsc/src/libbsc/bsc_init.c +++ b/openbsc/src/libbsc/bsc_init.c @@ -475,8 +475,7 @@ return 0; } -int bsc_bootstrap_network(int (*mncc_recv)(struct gsm_network *, struct msgb *), - const char *config_file) +int bsc_bootstrap_network(mncc_recv_cb_t mncc_recv, const char *config_file) { struct gsm_bts *bts; int rc; diff --git a/openbsc/src/libbsc/net_init.c b/openbsc/src/libbsc/net_init.c index 57e3599..da13a52 100644 --- a/openbsc/src/libbsc/net_init.c +++ b/openbsc/src/libbsc/net_init.c @@ -26,7 +26,7 @@ struct gsm_network *gsm_network_init(void *ctx, uint16_t country_code, uint16_t network_code, - int (*mncc_recv)(struct gsm_network *, struct msgb *)) + mncc_recv_cb_t mncc_recv) { struct gsm_network *net; const char *default_regexp = ".*"; -- To view, visit https://gerrit.osmocom.org/1124 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2e64cffa563750ce9f3172ffba6f9cf5b9280e9c Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 21 00:01:10 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 21 Oct 2016 00:01:10 +0000 Subject: [PATCH] openbsc[master]: move to libxsc: net init 1: rename to bsc_network_init Message-ID: Review at https://gerrit.osmocom.org/1125 move to libxsc: net init 1: rename to bsc_network_init The gsm_network_init() function initializes a whole lot of BSC specific stuff. Aiming to move some of it to libxsc, first rename it to bsc_network_init(). This will retain the BSC specific stuff when the move is done. Adjust all callers. Future: osmo-cscn will call the more generic part and not the BSC specific part. Change-Id: I4816ae19374390fc5c64972f7cad2e9ec3d8bcc3 --- M openbsc/include/openbsc/gsm_data.h M openbsc/src/ipaccess/ipaccess-config.c M openbsc/src/libbsc/bsc_init.c M openbsc/src/libbsc/net_init.c M openbsc/src/utils/bs11_config.c M openbsc/tests/channel/channel_test.c M openbsc/tests/gsm0408/gsm0408_test.c 7 files changed, 10 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/25/1125/1 diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 18c01f7..fd862bb 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -405,7 +405,7 @@ extern void talloc_ctx_init(void *ctx_root); -struct gsm_network *gsm_network_init(void *ctx, +struct gsm_network *bsc_network_init(void *ctx, uint16_t country_code, uint16_t network_code, mncc_recv_cb_t mncc_recv); diff --git a/openbsc/src/ipaccess/ipaccess-config.c b/openbsc/src/ipaccess/ipaccess-config.c index 3c2d6cc..06589f7 100644 --- a/openbsc/src/ipaccess/ipaccess-config.c +++ b/openbsc/src/ipaccess/ipaccess-config.c @@ -986,7 +986,7 @@ } libosmo_abis_init(tall_ctx_config); - bsc_gsmnet = gsm_network_init(tall_bsc_ctx, 1, 1, NULL); + bsc_gsmnet = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); if (!bsc_gsmnet) exit(1); diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c index a1becf8..214926b 100644 --- a/openbsc/src/libbsc/bsc_init.c +++ b/openbsc/src/libbsc/bsc_init.c @@ -36,6 +36,7 @@ #include #include #include +#include /* global pointer to the gsm network data structure */ extern struct gsm_network *bsc_gsmnet; @@ -481,7 +482,7 @@ int rc; /* initialize our data structures */ - bsc_gsmnet = gsm_network_init(tall_bsc_ctx, 1, 1, mncc_recv); + bsc_gsmnet = bsc_network_init(tall_bsc_ctx, 1, 1, mncc_recv); if (!bsc_gsmnet) return -ENOMEM; diff --git a/openbsc/src/libbsc/net_init.c b/openbsc/src/libbsc/net_init.c index da13a52..07a4423 100644 --- a/openbsc/src/libbsc/net_init.c +++ b/openbsc/src/libbsc/net_init.c @@ -17,13 +17,14 @@ * */ +#include #include #include #include #include -struct gsm_network *gsm_network_init(void *ctx, +struct gsm_network *bsc_network_init(void *ctx, uint16_t country_code, uint16_t network_code, mncc_recv_cb_t mncc_recv) diff --git a/openbsc/src/utils/bs11_config.c b/openbsc/src/utils/bs11_config.c index 7356b82..0f1f852 100644 --- a/openbsc/src/utils/bs11_config.c +++ b/openbsc/src/utils/bs11_config.c @@ -897,7 +897,7 @@ handle_options(argc, argv); bts_model_bs11_init(); - gsmnet = gsm_network_init(tall_bs11cfg_ctx, 1, 1, NULL); + gsmnet = bsc_network_init(tall_bs11cfg_ctx, 1, 1, NULL); if (!gsmnet) { fprintf(stderr, "Unable to allocate gsm network\n"); exit(1); diff --git a/openbsc/tests/channel/channel_test.c b/openbsc/tests/channel/channel_test.c index b4a5fb1..0c730a2 100644 --- a/openbsc/tests/channel/channel_test.c +++ b/openbsc/tests/channel/channel_test.c @@ -66,7 +66,7 @@ printf("Testing the gsm_subscriber chan logic\n"); /* Create a dummy network */ - network = gsm_network_init(tall_bsc_ctx, 1, 1, NULL); + network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); if (!network) exit(1); bts = gsm_bts_alloc(network); diff --git a/openbsc/tests/gsm0408/gsm0408_test.c b/openbsc/tests/gsm0408/gsm0408_test.c index e81394f..15248f2 100644 --- a/openbsc/tests/gsm0408/gsm0408_test.c +++ b/openbsc/tests/gsm0408/gsm0408_test.c @@ -122,7 +122,7 @@ static inline void test_si2q_u(void) { struct gsm_bts *bts; - struct gsm_network *network = gsm_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); printf("Testing SYSINFO_TYPE_2quater UARFCN generation:\n"); if (!network) @@ -149,7 +149,7 @@ static inline void test_si2q_e(void) { struct gsm_bts *bts; - struct gsm_network *network = gsm_network_init(tall_bsc_ctx, 1, 1, NULL); + struct gsm_network *network = bsc_network_init(tall_bsc_ctx, 1, 1, NULL); printf("Testing SYSINFO_TYPE_2quater EARFCN generation:\n"); if (!network) -- To view, visit https://gerrit.osmocom.org/1125 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4816ae19374390fc5c64972f7cad2e9ec3d8bcc3 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 21 00:01:10 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 21 Oct 2016 00:01:10 +0000 Subject: [PATCH] openbsc[master]: move to libxsc: net init 2: move bsc_network_init decl to os... Message-ID: Review at https://gerrit.osmocom.org/1126 move to libxsc: net init 2: move bsc_network_init decl to osmo_bsc.h bsc_network_init() is more fit to live in a BSC specific header. Change-Id: I9edfb1e748bb1cb484fadd48b0406f5b3098e89b --- M openbsc/include/openbsc/gsm_data.h M openbsc/include/openbsc/osmo_bsc.h M openbsc/src/ipaccess/ipaccess-config.c M openbsc/src/utils/bs11_config.c M openbsc/tests/channel/channel_test.c M openbsc/tests/gsm0408/gsm0408_test.c 6 files changed, 9 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/26/1126/1 diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index fd862bb..07279a9 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -405,11 +405,6 @@ extern void talloc_ctx_init(void *ctx_root); -struct gsm_network *bsc_network_init(void *ctx, - uint16_t country_code, - uint16_t network_code, - mncc_recv_cb_t mncc_recv); - int gsm_set_bts_type(struct gsm_bts *bts, enum gsm_bts_type type); /* Get reference to a neighbor cell on a given BCCH ARFCN */ diff --git a/openbsc/include/openbsc/osmo_bsc.h b/openbsc/include/openbsc/osmo_bsc.h index fd5303d..ada89ea 100644 --- a/openbsc/include/openbsc/osmo_bsc.h +++ b/openbsc/include/openbsc/osmo_bsc.h @@ -46,6 +46,11 @@ struct bsc_filter_state filter_state; }; +struct gsm_network *bsc_network_init(void *ctx, + uint16_t country_code, + uint16_t network_code, + mncc_recv_cb_t mncc_recv); + struct bsc_api *osmo_bsc_api(); int bsc_queue_for_msc(struct osmo_bsc_sccp_con *conn, struct msgb *msg); diff --git a/openbsc/src/ipaccess/ipaccess-config.c b/openbsc/src/ipaccess/ipaccess-config.c index 06589f7..83e42f7 100644 --- a/openbsc/src/ipaccess/ipaccess-config.c +++ b/openbsc/src/ipaccess/ipaccess-config.c @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/openbsc/src/utils/bs11_config.c b/openbsc/src/utils/bs11_config.c index 0f1f852..a831fca 100644 --- a/openbsc/src/utils/bs11_config.c +++ b/openbsc/src/utils/bs11_config.c @@ -32,7 +32,7 @@ #include -#include +#include #include #include #include diff --git a/openbsc/tests/channel/channel_test.c b/openbsc/tests/channel/channel_test.c index 0c730a2..f0e4732 100644 --- a/openbsc/tests/channel/channel_test.c +++ b/openbsc/tests/channel/channel_test.c @@ -25,6 +25,7 @@ #include #include +#include #include #include #include diff --git a/openbsc/tests/gsm0408/gsm0408_test.c b/openbsc/tests/gsm0408/gsm0408_test.c index 15248f2..b63205b 100644 --- a/openbsc/tests/gsm0408/gsm0408_test.c +++ b/openbsc/tests/gsm0408/gsm0408_test.c @@ -24,6 +24,7 @@ #include #include +#include #include #include #include -- To view, visit https://gerrit.osmocom.org/1126 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9edfb1e748bb1cb484fadd48b0406f5b3098e89b Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 21 00:01:10 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 21 Oct 2016 00:01:10 +0000 Subject: [PATCH] openbsc[master]: move to libxsc: net init 3: actual move Message-ID: Review at https://gerrit.osmocom.org/1127 move to libxsc: net init 3: actual move Reincarnate gsm_network_init() as the parts not specific to libbsc. Move from bsc_network_init() those bits that are not BSC specific (and useful for upcoming osmo-cscn). Add libxsc to all linkages that use gsm_network_init(). Note: the only requirement to allow linking gsm_network_init() without libbsc is to keep the call to gsm_net_update_ctype() out of libxsc. The other items are kept out of libxsc because it makes sense semantically. But the separation is not strong in that the BSC specific data members are of course still omnipresent in struct gsm_network. If bsc_network_init() is not called, these are not initialized properly -- for now no users of uninitialized members exist. So this is just a first step towards a sensible split of the BSC and MSC gsm_network structs. The long term aim should be to have entirely separate structs with some common general items. Change-Id: If06316b97002390dc9a434686750cb96193ea63b --- M openbsc/include/openbsc/xsc.h M openbsc/src/ipaccess/Makefile.am M openbsc/src/libbsc/net_init.c M openbsc/src/libxsc/xsc.c M openbsc/src/osmo-bsc/Makefile.am M openbsc/src/osmo-bsc_nat/Makefile.am M openbsc/src/osmo-nitb/Makefile.am M openbsc/src/utils/Makefile.am M openbsc/tests/bsc-nat/Makefile.am M openbsc/tests/bsc/Makefile.am M openbsc/tests/channel/Makefile.am M openbsc/tests/db/Makefile.am M openbsc/tests/gsm0408/Makefile.am M openbsc/tests/subscr/Makefile.am M openbsc/tests/trau/Makefile.am 15 files changed, 85 insertions(+), 36 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/27/1127/1 diff --git a/openbsc/include/openbsc/xsc.h b/openbsc/include/openbsc/xsc.h index 612d754..8549a83 100644 --- a/openbsc/include/openbsc/xsc.h +++ b/openbsc/include/openbsc/xsc.h @@ -1,6 +1,13 @@ #pragma once +#include + struct msgb; struct gsm_network; typedef int (*mncc_recv_cb_t)(struct gsm_network *, struct msgb *); + +struct gsm_network *gsm_network_init(void *ctx, + uint16_t country_code, + uint16_t network_code, + mncc_recv_cb_t mncc_recv); diff --git a/openbsc/src/ipaccess/Makefile.am b/openbsc/src/ipaccess/Makefile.am index 784a578..16f3337 100644 --- a/openbsc/src/ipaccess/Makefile.am +++ b/openbsc/src/ipaccess/Makefile.am @@ -48,6 +48,7 @@ # FIXME: resolve the bogus dependencies patched around here: ipaccess_config_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ + $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBCRYPT) \ diff --git a/openbsc/src/libbsc/net_init.c b/openbsc/src/libbsc/net_init.c index 07a4423..d58dd16 100644 --- a/openbsc/src/libbsc/net_init.c +++ b/openbsc/src/libbsc/net_init.c @@ -17,12 +17,9 @@ * */ +#include #include -#include #include -#include - -#include struct gsm_network *bsc_network_init(void *ctx, uint16_t country_code, @@ -30,11 +27,8 @@ mncc_recv_cb_t mncc_recv) { struct gsm_network *net; - const char *default_regexp = ".*"; - - net = talloc_zero(ctx, struct gsm_network); - if (!net) - return NULL; + + net = gsm_network_init(ctx, country_code, network_code, mncc_recv); net->bsc_data = talloc_zero(net, struct osmo_bsc_data); if (!net->bsc_data) { @@ -42,27 +36,11 @@ return NULL; } - net->subscr_group = talloc_zero(net, struct gsm_subscriber_group); - if (!net->subscr_group) { - talloc_free(net); - return NULL; - } - - if (gsm_parse_reg(net, &net->authorized_regexp, &net->authorized_reg_str, 1, - &default_regexp) != 0) - return NULL; - /* Init back pointer */ net->bsc_data->auto_off_timeout = -1; net->bsc_data->network = net; INIT_LLIST_HEAD(&net->bsc_data->mscs); - net->subscr_group->net = net; - net->auto_create_subscr = true; - net->auto_assign_exten = true; - - net->country_code = country_code; - net->network_code = network_code; net->num_bts = 0; net->reject_cause = GSM48_REJECT_ROAMING_NOT_ALLOWED; net->T3101 = GSM_T3101_DEFAULT; @@ -79,22 +57,12 @@ net->handover.pwr_hysteresis = 3; net->handover.max_distance = 9999; - INIT_LLIST_HEAD(&net->trans_list); - INIT_LLIST_HEAD(&net->upqueue); INIT_LLIST_HEAD(&net->bts_list); - INIT_LLIST_HEAD(&net->subscr_conns); /* init statistics */ net->bsc_ctrs = rate_ctr_group_alloc(net, &bsc_ctrg_desc, 0); - net->msc_ctrs = rate_ctr_group_alloc(net, &msc_ctrg_desc, 0); - net->active_calls = osmo_counter_alloc("msc.active_calls"); - net->mncc_recv = mncc_recv; - net->ext_min = GSM_MIN_EXTEN; - net->ext_max = GSM_MAX_EXTEN; gsm_net_update_ctype(net); - - net->dyn_ts_allow_tch_f = true; return net; } diff --git a/openbsc/src/libxsc/xsc.c b/openbsc/src/libxsc/xsc.c index 141179b..acb40ec 100644 --- a/openbsc/src/libxsc/xsc.c +++ b/openbsc/src/libxsc/xsc.c @@ -1,6 +1,8 @@ /* Code used by both libbsc and libmsc (xsc means "BSC or MSC"). * * (C) 2016 by sysmocom s.m.f.c. + * (C) 2008-2010 by Harald Welte + * (C) 2014 by Holger Hans Peter Freyther * All Rights Reserved * * This program is free software; you can redistribute it and/or modify @@ -17,3 +19,64 @@ * along with this program. If not, see . * */ + +#include + +#include + +#include +#include +#include + +/* Warning: if bsc_network_init() is not called, some of the members of + * gsm_network are not initialized properly and must not be used! (In + * particular the llist heads and stats counters.) + * The long term aim should be to have entirely separate structs for libbsc and + * libmsc with some common general items. + */ +struct gsm_network *gsm_network_init(void *ctx, + uint16_t country_code, + uint16_t network_code, + mncc_recv_cb_t mncc_recv) +{ + struct gsm_network *net; + + const char *default_regexp = ".*"; + + net = talloc_zero(ctx, struct gsm_network); + if (!net) + return NULL; + + net->subscr_group = talloc_zero(net, struct gsm_subscriber_group); + if (!net->subscr_group) { + talloc_free(net); + return NULL; + } + + if (gsm_parse_reg(net, &net->authorized_regexp, &net->authorized_reg_str, 1, + &default_regexp) != 0) + return NULL; + + net->subscr_group->net = net; + net->auto_create_subscr = true; + net->auto_assign_exten = true; + + net->country_code = country_code; + net->network_code = network_code; + + INIT_LLIST_HEAD(&net->trans_list); + INIT_LLIST_HEAD(&net->upqueue); + INIT_LLIST_HEAD(&net->subscr_conns); + + /* init statistics */ + net->msc_ctrs = rate_ctr_group_alloc(net, &msc_ctrg_desc, 0); + net->active_calls = osmo_counter_alloc("msc.active_calls"); + + net->mncc_recv = mncc_recv; + net->ext_min = GSM_MIN_EXTEN; + net->ext_max = GSM_MAX_EXTEN; + + net->dyn_ts_allow_tch_f = true; + + return net; +} diff --git a/openbsc/src/osmo-bsc/Makefile.am b/openbsc/src/osmo-bsc/Makefile.am index 2dbfeb8..7d38999 100644 --- a/openbsc/src/osmo-bsc/Makefile.am +++ b/openbsc/src/osmo-bsc/Makefile.am @@ -41,6 +41,7 @@ osmo_bsc_LDADD = \ $(top_builddir)/src/libfilter/libfilter.a \ $(top_builddir)/src/libbsc/libbsc.a \ + $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libmsc/libmsc.a \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ diff --git a/openbsc/src/osmo-bsc_nat/Makefile.am b/openbsc/src/osmo-bsc_nat/Makefile.am index 6027f27..667cd86 100644 --- a/openbsc/src/osmo-bsc_nat/Makefile.am +++ b/openbsc/src/osmo-bsc_nat/Makefile.am @@ -42,6 +42,7 @@ osmo_bsc_nat_LDADD = \ $(top_builddir)/src/libmgcp/libmgcp.a \ $(top_builddir)/src/libbsc/libbsc.a \ + $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(top_builddir)/src/libfilter/libfilter.a \ diff --git a/openbsc/src/osmo-nitb/Makefile.am b/openbsc/src/osmo-nitb/Makefile.am index 60514c0..5063423 100644 --- a/openbsc/src/osmo-nitb/Makefile.am +++ b/openbsc/src/osmo-nitb/Makefile.am @@ -29,6 +29,7 @@ osmo_nitb_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ + $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libmsc/libmsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ diff --git a/openbsc/src/utils/Makefile.am b/openbsc/src/utils/Makefile.am index 7fcc4e3..0228202 100644 --- a/openbsc/src/utils/Makefile.am +++ b/openbsc/src/utils/Makefile.am @@ -50,6 +50,7 @@ bs11_config_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ + $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ diff --git a/openbsc/tests/bsc-nat/Makefile.am b/openbsc/tests/bsc-nat/Makefile.am index fa55d27..2d00af9 100644 --- a/openbsc/tests/bsc-nat/Makefile.am +++ b/openbsc/tests/bsc-nat/Makefile.am @@ -44,6 +44,7 @@ bsc_nat_test_LDADD = \ $(top_builddir)/src/libfilter/libfilter.a \ $(top_builddir)/src/libbsc/libbsc.a \ + $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libmgcp/libmgcp.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ diff --git a/openbsc/tests/bsc/Makefile.am b/openbsc/tests/bsc/Makefile.am index ddfa437..fdc0b87 100644 --- a/openbsc/tests/bsc/Makefile.am +++ b/openbsc/tests/bsc/Makefile.am @@ -33,6 +33,7 @@ bsc_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libmsc/libmsc.a \ + $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libmgcp/libmgcp.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ diff --git a/openbsc/tests/channel/Makefile.am b/openbsc/tests/channel/Makefile.am index 5654572..50db62f 100644 --- a/openbsc/tests/channel/Makefile.am +++ b/openbsc/tests/channel/Makefile.am @@ -26,6 +26,7 @@ channel_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libmsc/libmsc.a \ + $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/openbsc/tests/db/Makefile.am b/openbsc/tests/db/Makefile.am index c4da31c..2f04d5b 100644 --- a/openbsc/tests/db/Makefile.am +++ b/openbsc/tests/db/Makefile.am @@ -35,6 +35,7 @@ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libmsc/libmsc.a \ $(top_builddir)/src/libbsc/libbsc.a \ + $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ @@ -45,4 +46,3 @@ $(LIBCRYPTO_LIBS) \ -ldbi \ $(NULL) - diff --git a/openbsc/tests/gsm0408/Makefile.am b/openbsc/tests/gsm0408/Makefile.am index 11fa6b9..57e6798 100644 --- a/openbsc/tests/gsm0408/Makefile.am +++ b/openbsc/tests/gsm0408/Makefile.am @@ -25,6 +25,7 @@ gsm0408_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libmsc/libmsc.a \ + $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ diff --git a/openbsc/tests/subscr/Makefile.am b/openbsc/tests/subscr/Makefile.am index fb863d8..367d516 100644 --- a/openbsc/tests/subscr/Makefile.am +++ b/openbsc/tests/subscr/Makefile.am @@ -33,6 +33,7 @@ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libmsc/libmsc.a \ $(top_builddir)/src/libbsc/libbsc.a \ + $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ diff --git a/openbsc/tests/trau/Makefile.am b/openbsc/tests/trau/Makefile.am index 93ce88e..c5fdf7a 100644 --- a/openbsc/tests/trau/Makefile.am +++ b/openbsc/tests/trau/Makefile.am @@ -33,6 +33,7 @@ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libmsc/libmsc.a \ $(top_builddir)/src/libbsc/libbsc.a \ + $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ -- To view, visit https://gerrit.osmocom.org/1127 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If06316b97002390dc9a434686750cb96193ea63b Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 21 00:01:10 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 21 Oct 2016 00:01:10 +0000 Subject: [PATCH] openbsc[master]: move to libxsc: gsm48_create_mm_serv_rej(), gsm48_create_loc... Message-ID: Review at https://gerrit.osmocom.org/1128 move to libxsc: gsm48_create_mm_serv_rej(), gsm48_create_loc_upd_rej() Used by libbsc, libmsc as well as osmo-bsc and osmo-bsc_nat. Moving gsm48_create* to libxsc affects linking of osmo-bsc_nat, resulting in undefined references to gsm48_extract_mi() and gsm48_paging_extract_mi(); fix that by placing libfilter.a left of libbsc.a upon linker invocation. Change-Id: I212c2567b56191022b683674c1c4daf842839946 --- M openbsc/src/libbsc/gsm_04_08_utils.c M openbsc/src/libxsc/xsc.c M openbsc/src/osmo-bsc_nat/Makefile.am 3 files changed, 34 insertions(+), 34 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/28/1128/1 diff --git a/openbsc/src/libbsc/gsm_04_08_utils.c b/openbsc/src/libbsc/gsm_04_08_utils.c index 46df108..98f0790 100644 --- a/openbsc/src/libbsc/gsm_04_08_utils.c +++ b/openbsc/src/libbsc/gsm_04_08_utils.c @@ -634,39 +634,6 @@ return 0; } -struct msgb *gsm48_create_mm_serv_rej(enum gsm48_reject_value value) -{ - struct msgb *msg; - struct gsm48_hdr *gh; - - msg = gsm48_msgb_alloc_name("GSM 04.08 SERV REJ"); - if (!msg) - return NULL; - - gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh) + 1); - gh->proto_discr = GSM48_PDISC_MM; - gh->msg_type = GSM48_MT_MM_CM_SERV_REJ; - gh->data[0] = value; - - return msg; -} - -struct msgb *gsm48_create_loc_upd_rej(uint8_t cause) -{ - struct gsm48_hdr *gh; - struct msgb *msg; - - msg = gsm48_msgb_alloc_name("GSM 04.08 LOC UPD REJ"); - if (!msg) - return NULL; - - gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh) + 1); - gh->proto_discr = GSM48_PDISC_MM; - gh->msg_type = GSM48_MT_MM_LOC_UPD_REJECT; - gh->data[0] = cause; - return msg; -} - /* 9.2.5 CM service accept */ int gsm48_tx_mm_serv_ack(struct gsm_subscriber_connection *conn) { diff --git a/openbsc/src/libxsc/xsc.c b/openbsc/src/libxsc/xsc.c index acb40ec..138be11 100644 --- a/openbsc/src/libxsc/xsc.c +++ b/openbsc/src/libxsc/xsc.c @@ -80,3 +80,36 @@ return net; } + +struct msgb *gsm48_create_mm_serv_rej(enum gsm48_reject_value value) +{ + struct msgb *msg; + struct gsm48_hdr *gh; + + msg = gsm48_msgb_alloc_name("GSM 04.08 SERV REJ"); + if (!msg) + return NULL; + + gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh) + 1); + gh->proto_discr = GSM48_PDISC_MM; + gh->msg_type = GSM48_MT_MM_CM_SERV_REJ; + gh->data[0] = value; + + return msg; +} + +struct msgb *gsm48_create_loc_upd_rej(uint8_t cause) +{ + struct gsm48_hdr *gh; + struct msgb *msg; + + msg = gsm48_msgb_alloc_name("GSM 04.08 LOC UPD REJ"); + if (!msg) + return NULL; + + gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh) + 1); + gh->proto_discr = GSM48_PDISC_MM; + gh->msg_type = GSM48_MT_MM_LOC_UPD_REJECT; + gh->data[0] = cause; + return msg; +} diff --git a/openbsc/src/osmo-bsc_nat/Makefile.am b/openbsc/src/osmo-bsc_nat/Makefile.am index 667cd86..679b476 100644 --- a/openbsc/src/osmo-bsc_nat/Makefile.am +++ b/openbsc/src/osmo-bsc_nat/Makefile.am @@ -41,11 +41,11 @@ osmo_bsc_nat_LDADD = \ $(top_builddir)/src/libmgcp/libmgcp.a \ + $(top_builddir)/src/libfilter/libfilter.a \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ - $(top_builddir)/src/libfilter/libfilter.a \ $(LIBOSMOSCCP_LIBS) \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ -- To view, visit https://gerrit.osmocom.org/1128 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I212c2567b56191022b683674c1c4daf842839946 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 21 00:01:11 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 21 Oct 2016 00:01:11 +0000 Subject: [PATCH] openbsc[master]: move to libxsc: factor out gen of USSD notify and release co... Message-ID: Review at https://gerrit.osmocom.org/1129 move to libxsc: factor out gen of USSD notify and release complete -- TODO subscr_conn Both libmsc and libbsc need distinct gsm0480_send_ussdNotify() and gsm0480_send_releaseComplete() functions to account for the distinct subscriber connection structs. The current functions live in libmsc, so add the same in libbsc in new file gsm_04_80_utils.c. To avoid too much code dup, move the message generation part of gsm0480_send_ussdNotify() and gsm0480_send_releaseComplete() to new functions gsm0480_gen_ussdNotify() and gsm0480_gen_releaseComplete(), placed in libxsc. Change-Id: I33a84e3c28576ced91d2ea24103123431f551173 --- M openbsc/include/openbsc/gsm_04_80.h M openbsc/src/libbsc/Makefile.am A openbsc/src/libbsc/gsm_04_80_utils.c M openbsc/src/libmsc/gsm_04_80.c M openbsc/src/libmsc/vty_interface_layer3.c M openbsc/src/libxsc/xsc.c M openbsc/src/osmo-bsc/osmo_bsc_api.c M openbsc/src/osmo-bsc/osmo_bsc_ctrl.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_sccp.c 11 files changed, 106 insertions(+), 39 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/29/1129/1 diff --git a/openbsc/include/openbsc/gsm_04_80.h b/openbsc/include/openbsc/gsm_04_80.h index 0a60652..3682c89 100644 --- a/openbsc/include/openbsc/gsm_04_80.h +++ b/openbsc/include/openbsc/gsm_04_80.h @@ -14,7 +14,16 @@ const struct msgb *msg, const struct ussd_request *request); -int gsm0480_send_ussdNotify(struct gsm_subscriber_connection *conn, int level, const char *text); -int gsm0480_send_releaseComplete(struct gsm_subscriber_connection *conn); +struct msgb *gsm0480_gen_ussdNotify(int level, const char *text); +struct msgb *gsm0480_gen_releaseComplete(void); + +int msc_gsm0480_send_ussdNotify(struct gsm_subscriber_connection *conn, + int level, const char *text); +int msc_gsm0480_send_releaseComplete(struct gsm_subscriber_connection *conn); + +/* TODO: move to a bsc_*.h file? */ +int bsc_gsm0480_send_ussdNotify(struct gsm_subscriber_connection *conn, + int level, const char *text); +int bsc_gsm0480_send_releaseComplete(struct gsm_subscriber_connection *conn); #endif diff --git a/openbsc/src/libbsc/Makefile.am b/openbsc/src/libbsc/Makefile.am index 4728e23..28f556a 100644 --- a/openbsc/src/libbsc/Makefile.am +++ b/openbsc/src/libbsc/Makefile.am @@ -41,6 +41,7 @@ bsc_api.c \ bsc_msc.c bsc_vty.c \ gsm_04_08_utils.c \ + gsm_04_80_utils.c \ bsc_init.c \ bts_init.c \ bsc_rf_ctrl.c \ @@ -50,4 +51,3 @@ net_init.c \ bsc_dyn_ts.c \ $(NULL) - diff --git a/openbsc/src/libbsc/gsm_04_80_utils.c b/openbsc/src/libbsc/gsm_04_80_utils.c new file mode 100644 index 0000000..c96259d --- /dev/null +++ b/openbsc/src/libbsc/gsm_04_80_utils.c @@ -0,0 +1,40 @@ +/* OpenBSC utility functions for 3GPP TS 04.80 */ + +/* (C) 2016 by sysmocom s.m.f.c. GmbH + * + * 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 + +int bsc_gsm0480_send_ussdNotify(struct gsm_subscriber_connection *conn, int + level, const char *text) +{ + struct msgb *msg = gsm0480_gen_ussdNotify(level, text); + if (!msg) + return -1; + return gsm0808_submit_dtap(conn, msg, 0, 0); +} + +int bsc_gsm0480_send_releaseComplete(struct gsm_subscriber_connection *conn) +{ + struct msgb *msg = gsm0480_gen_releaseComplete(); + if (!msg) + return -1; + return gsm0808_submit_dtap(conn, msg, 0, 0); +} diff --git a/openbsc/src/libmsc/gsm_04_80.c b/openbsc/src/libmsc/gsm_04_80.c index f1d75f2..b8d950f 100644 --- a/openbsc/src/libmsc/gsm_04_80.c +++ b/openbsc/src/libmsc/gsm_04_80.c @@ -138,38 +138,18 @@ return gsm0808_submit_dtap(conn, msg, 0, 0); } -int gsm0480_send_ussdNotify(struct gsm_subscriber_connection *conn, int level, const char *text) +int msc_gsm0480_send_ussdNotify(struct gsm_subscriber_connection *conn, int level, const char *text) { - struct gsm48_hdr *gh; - struct msgb *msg; - - msg = gsm0480_create_unstructuredSS_Notify(level, text); + struct msgb *msg = gsm0480_gen_ussdNotify(level, text); if (!msg) return -1; - - gsm0480_wrap_invoke(msg, GSM0480_OP_CODE_USS_NOTIFY, 0); - gsm0480_wrap_facility(msg); - - /* And finally pre-pend the L3 header */ - gh = (struct gsm48_hdr *) msgb_push(msg, sizeof(*gh)); - gh->proto_discr = GSM48_PDISC_NC_SS; - gh->msg_type = GSM0480_MTYPE_REGISTER; - return gsm0808_submit_dtap(conn, msg, 0, 0); } -int gsm0480_send_releaseComplete(struct gsm_subscriber_connection *conn) +int msc_gsm0480_send_releaseComplete(struct gsm_subscriber_connection *conn) { - struct gsm48_hdr *gh; - struct msgb *msg; - - msg = gsm48_msgb_alloc_name("GSM 04.08 USSD REL COMPL"); + struct msgb *msg = gsm0480_gen_releaseComplete(); if (!msg) return -1; - - gh = (struct gsm48_hdr *) msgb_push(msg, sizeof(*gh)); - gh->proto_discr = GSM48_PDISC_NC_SS; - gh->msg_type = GSM0480_MTYPE_RELEASE_COMPLETE; - return gsm0808_submit_dtap(conn, msg, 0, 0); } diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index 6f0006c..956302e 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -473,8 +473,8 @@ return CMD_WARNING; } - gsm0480_send_ussdNotify(conn, level, text); - gsm0480_send_releaseComplete(conn); + msc_gsm0480_send_ussdNotify(conn, level, text); + msc_gsm0480_send_releaseComplete(conn); subscr_put(subscr); talloc_free(text); diff --git a/openbsc/src/libxsc/xsc.c b/openbsc/src/libxsc/xsc.c index 138be11..04bc53e 100644 --- a/openbsc/src/libxsc/xsc.c +++ b/openbsc/src/libxsc/xsc.c @@ -113,3 +113,39 @@ gh->data[0] = cause; return msg; } + +struct msgb *gsm0480_gen_ussdNotify(int level, const char *text) +{ + struct gsm48_hdr *gh; + struct msgb *msg; + + msg = gsm0480_create_unstructuredSS_Notify(level, text); + if (!msg) + return NULL; + + gsm0480_wrap_invoke(msg, GSM0480_OP_CODE_USS_NOTIFY, 0); + gsm0480_wrap_facility(msg); + + /* And finally pre-pend the L3 header */ + gh = (struct gsm48_hdr *) msgb_push(msg, sizeof(*gh)); + gh->proto_discr = GSM48_PDISC_NC_SS; + gh->msg_type = GSM0480_MTYPE_REGISTER; + + return msg; +} + +struct msgb *gsm0480_gen_releaseComplete(void) +{ + struct gsm48_hdr *gh; + struct msgb *msg; + + msg = gsm48_msgb_alloc_name("GSM 04.08 USSD REL COMPL"); + if (!msg) + return NULL; + + gh = (struct gsm48_hdr *) msgb_push(msg, sizeof(*gh)); + gh->proto_discr = GSM48_PDISC_NC_SS; + gh->msg_type = GSM0480_MTYPE_RELEASE_COMPLETE; + + return msg; +} diff --git a/openbsc/src/osmo-bsc/osmo_bsc_api.c b/openbsc/src/osmo-bsc/osmo_bsc_api.c index d31e6c1..e759805 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_api.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_api.c @@ -205,8 +205,8 @@ gsm48_tx_mm_serv_ack(conn); LOGP(DMSC, LOGL_INFO, "Sending USSD message: '%s'\n", text); - gsm0480_send_ussdNotify(conn, 1, text); - gsm0480_send_releaseComplete(conn); + bsc_gsm0480_send_ussdNotify(conn, 1, text); + bsc_gsm0480_send_releaseComplete(conn); } /* diff --git a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c index 3010b55..84b7b92 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c @@ -598,8 +598,8 @@ * the release complete when we get a returnResultLast * for this invoke id. */ - gsm0480_send_releaseComplete(conn); - gsm0480_send_ussdNotify(conn, alert, text_str); + bsc_gsm0480_send_releaseComplete(conn); + bsc_gsm0480_send_ussdNotify(conn, alert, text_str); cmd->reply = "Found a connection"; break; } diff --git a/openbsc/src/osmo-bsc/osmo_bsc_filter.c b/openbsc/src/osmo-bsc/osmo_bsc_filter.c index 14e0b71..8fc899e 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_filter.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_filter.c @@ -246,8 +246,9 @@ int bsc_send_welcome_ussd(struct gsm_subscriber_connection *conn) { - gsm0480_send_ussdNotify(conn, 1, conn->sccp_con->msc->ussd_welcome_txt); - gsm0480_send_releaseComplete(conn); + bsc_gsm0480_send_ussdNotify(conn, 1, + conn->sccp_con->msc->ussd_welcome_txt); + bsc_gsm0480_send_releaseComplete(conn); return 0; } diff --git a/openbsc/src/osmo-bsc/osmo_bsc_grace.c b/openbsc/src/osmo-bsc/osmo_bsc_grace.c index e6194ab..c1d7c6a 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_grace.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_grace.c @@ -112,8 +112,8 @@ if (lchan->state != LCHAN_S_ACTIVE) return -1; - gsm0480_send_ussdNotify(conn, 0, text); - gsm0480_send_releaseComplete(conn); + bsc_gsm0480_send_ussdNotify(conn, 0, text); + bsc_gsm0480_send_releaseComplete(conn); return 0; } diff --git a/openbsc/src/osmo-bsc/osmo_bsc_sccp.c b/openbsc/src/osmo-bsc/osmo_bsc_sccp.c index 86b27be..fa060da 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_sccp.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_sccp.c @@ -285,8 +285,9 @@ return; /* send USSD notification */ - gsm0480_send_ussdNotify(conn, 1, conn->sccp_con->msc->ussd_msc_lost_txt); - gsm0480_send_releaseComplete(conn); + bsc_gsm0480_send_ussdNotify(conn, 1, + conn->sccp_con->msc->ussd_msc_lost_txt); + bsc_gsm0480_send_releaseComplete(conn); } static void bsc_notify_and_close_conns(struct bsc_msc_connection *msc_con) -- To view, visit https://gerrit.osmocom.org/1129 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I33a84e3c28576ced91d2ea24103123431f551173 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 21 00:01:11 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 21 Oct 2016 00:01:11 +0000 Subject: [PATCH] openbsc[master]: factor out & introduce struct gsm_encr, in xsc.h Message-ID: Review at https://gerrit.osmocom.org/1130 factor out & introduce struct gsm_encr, in xsc.h Factor out encryption info from struct gsm_lchan as struct gsm_encr, placed in xsc.h. Change-Id: I94015fb9dd511c37c1e3058a0963c780b3f700ac Future: this will be used by libmsc's subscriber connection, for osmo-cscn. --- M openbsc/include/openbsc/gsm_data_shared.h M openbsc/include/openbsc/xsc.h 2 files changed, 11 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/30/1130/1 diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index 487a3f3..0221685 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -24,6 +24,8 @@ #include #endif +#include + struct osmo_bsc_data; struct osmo_bsc_sccp_con; @@ -104,7 +106,6 @@ struct gsm_bts *bts; }; -#define MAX_A5_KEY_LEN (128/8) #define A38_XOR_MIN_KEY_LEN 12 #define A38_XOR_MAX_KEY_LEN 16 #define A38_COMP128_KEY_LEN 16 @@ -206,11 +207,7 @@ uint8_t bs_power; uint8_t ms_power; /* Encryption information */ - struct { - uint8_t alg_id; - uint8_t key_len; - uint8_t key[MAX_A5_KEY_LEN]; - } encr; + struct gsm_encr encr; /* AMR bits */ uint8_t mr_ms_lv[7]; diff --git a/openbsc/include/openbsc/xsc.h b/openbsc/include/openbsc/xsc.h index 8549a83..172d6e6 100644 --- a/openbsc/include/openbsc/xsc.h +++ b/openbsc/include/openbsc/xsc.h @@ -7,6 +7,14 @@ typedef int (*mncc_recv_cb_t)(struct gsm_network *, struct msgb *); +#define MAX_A5_KEY_LEN (128/8) + +struct gsm_encr { + uint8_t alg_id; + uint8_t key_len; + uint8_t key[MAX_A5_KEY_LEN]; +}; + struct gsm_network *gsm_network_init(void *ctx, uint16_t country_code, uint16_t network_code, -- To view, visit https://gerrit.osmocom.org/1130 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I94015fb9dd511c37c1e3058a0963c780b3f700ac Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 21 00:01:11 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 21 Oct 2016 00:01:11 +0000 Subject: [PATCH] openbsc[master]: sms_next_rp_msg_ref(): use direct pointer to next_rp_ref cou... Message-ID: Review at https://gerrit.osmocom.org/1131 sms_next_rp_msg_ref(): use direct pointer to next_rp_ref counter libbsc and libmsc will have separate subscriber connection structs. Hence don't rely on gsm_subscriber_connection, but work on a direct pointer to the counter for the next RP reference. The only very thin function in gsm_04_11_helper.c thus becomes obsolete: drop the entire file. Change-Id: I2a2e9ba6a981a385d1f8f07acbe03536ffed0072 --- M openbsc/include/openbsc/gsm_04_11.h M openbsc/src/libmsc/Makefile.am M openbsc/src/libmsc/gsm_04_11.c D openbsc/src/libmsc/gsm_04_11_helper.c M openbsc/src/libxsc/xsc.c M openbsc/tests/gsm0408/gsm0408_test.c 6 files changed, 20 insertions(+), 43 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/31/1131/1 diff --git a/openbsc/include/openbsc/gsm_04_11.h b/openbsc/include/openbsc/gsm_04_11.h index 00c3a19..149de90 100644 --- a/openbsc/include/openbsc/gsm_04_11.h +++ b/openbsc/include/openbsc/gsm_04_11.h @@ -38,5 +38,5 @@ struct gsm_sms *sms); void gsm411_sapi_n_reject(struct gsm_subscriber_connection *conn); -uint8_t sms_next_rp_msg_ref(struct gsm_subscriber_connection *conn); +uint8_t sms_next_rp_msg_ref(uint8_t *next_rp_ref); #endif diff --git a/openbsc/src/libmsc/Makefile.am b/openbsc/src/libmsc/Makefile.am index d236d3a..9d966db 100644 --- a/openbsc/src/libmsc/Makefile.am +++ b/openbsc/src/libmsc/Makefile.am @@ -27,7 +27,6 @@ db.c \ gsm_04_08.c \ gsm_04_11.c \ - gsm_04_11_helper.c \ gsm_04_80.c \ gsm_subscriber.c \ mncc.c \ diff --git a/openbsc/src/libmsc/gsm_04_11.c b/openbsc/src/libmsc/gsm_04_11.c index 3a2effe..48a87e0 100644 --- a/openbsc/src/libmsc/gsm_04_11.c +++ b/openbsc/src/libmsc/gsm_04_11.c @@ -873,7 +873,7 @@ struct msgb *msg = gsm411_msgb_alloc(); struct gsm_trans *trans; uint8_t *data, *rp_ud_len; - uint8_t msg_ref = sms_next_rp_msg_ref(conn); + uint8_t msg_ref = sms_next_rp_msg_ref(&conn->next_rp_ref); int transaction_id; int rc; diff --git a/openbsc/src/libmsc/gsm_04_11_helper.c b/openbsc/src/libmsc/gsm_04_11_helper.c deleted file mode 100644 index f48c6de..0000000 --- a/openbsc/src/libmsc/gsm_04_11_helper.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Helpers for SMS/GSM 04.11 */ -/* - * (C) 2014 by Holger Hans Peter Freyther - * - * 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 - -uint8_t sms_next_rp_msg_ref(struct gsm_subscriber_connection *conn) -{ - const uint8_t rp_msg_ref = conn->next_rp_ref; - /* - * This should wrap as the valid range is 0 to 255. We only - * transfer one SMS at a time so we don't need to check if - * the id has been already assigned. - */ - conn->next_rp_ref += 1; - - return rp_msg_ref; -} - diff --git a/openbsc/src/libxsc/xsc.c b/openbsc/src/libxsc/xsc.c index 04bc53e..3692a3a 100644 --- a/openbsc/src/libxsc/xsc.c +++ b/openbsc/src/libxsc/xsc.c @@ -27,6 +27,8 @@ #include #include #include +#include +#include /* Warning: if bsc_network_init() is not called, some of the members of * gsm_network are not initialized properly and must not be used! (In @@ -149,3 +151,16 @@ return msg; } + +uint8_t sms_next_rp_msg_ref(uint8_t *next_rp_ref) +{ + const uint8_t rp_msg_ref = *next_rp_ref; + /* + * This should wrap as the valid range is 0 to 255. We only + * transfer one SMS at a time so we don't need to check if + * the id has been already assigned. + */ + *next_rp_ref += 1; + + return rp_msg_ref; +} diff --git a/openbsc/tests/gsm0408/gsm0408_test.c b/openbsc/tests/gsm0408/gsm0408_test.c index b63205b..a44c04a 100644 --- a/openbsc/tests/gsm0408/gsm0408_test.c +++ b/openbsc/tests/gsm0408/gsm0408_test.c @@ -563,15 +563,15 @@ memset(&conn, 0, sizeof(conn)); conn.next_rp_ref = 255; - res = sms_next_rp_msg_ref(&conn); + res = sms_next_rp_msg_ref(&conn.next_rp_ref); printf("Allocated reference: %d\n", res); OSMO_ASSERT(res == 255); - res = sms_next_rp_msg_ref(&conn); + res = sms_next_rp_msg_ref(&conn.next_rp_ref); printf("Allocated reference: %d\n", res); OSMO_ASSERT(res == 0); - res = sms_next_rp_msg_ref(&conn); + res = sms_next_rp_msg_ref(&conn.next_rp_ref); printf("Allocated reference: %d\n", res); OSMO_ASSERT(res == 1); } -- To view, visit https://gerrit.osmocom.org/1131 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2a2e9ba6a981a385d1f8f07acbe03536ffed0072 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 21 00:01:11 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 21 Oct 2016 00:01:11 +0000 Subject: [PATCH] openbsc[master]: tests: drop unused libmsc, unneeded duplicate libbsc linking Message-ID: Review at https://gerrit.osmocom.org/1132 tests: drop unused libmsc, unneeded duplicate libbsc linking Because of libxsc, tests/gsm0408,subscr,trau no longer need libmsc. Change-Id: I9073eba41a1cd3136ed7a9def6fe8aaf282eaa18 --- M openbsc/tests/gsm0408/Makefile.am M openbsc/tests/subscr/Makefile.am M openbsc/tests/trau/Makefile.am 3 files changed, 0 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/32/1132/1 diff --git a/openbsc/tests/gsm0408/Makefile.am b/openbsc/tests/gsm0408/Makefile.am index 57e6798..ac14de5 100644 --- a/openbsc/tests/gsm0408/Makefile.am +++ b/openbsc/tests/gsm0408/Makefile.am @@ -24,7 +24,6 @@ gsm0408_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libmsc/libmsc.a \ $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ diff --git a/openbsc/tests/subscr/Makefile.am b/openbsc/tests/subscr/Makefile.am index 367d516..b9a853c 100644 --- a/openbsc/tests/subscr/Makefile.am +++ b/openbsc/tests/subscr/Makefile.am @@ -31,8 +31,6 @@ subscr_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libmsc/libmsc.a \ - $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ diff --git a/openbsc/tests/trau/Makefile.am b/openbsc/tests/trau/Makefile.am index c5fdf7a..02bb2c8 100644 --- a/openbsc/tests/trau/Makefile.am +++ b/openbsc/tests/trau/Makefile.am @@ -31,8 +31,6 @@ trau_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libmsc/libmsc.a \ - $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ -- To view, visit https://gerrit.osmocom.org/1132 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9073eba41a1cd3136ed7a9def6fe8aaf282eaa18 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 21 00:01:11 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 21 Oct 2016 00:01:11 +0000 Subject: [PATCH] openbsc[master]: move to libxsc: global vty gsm_network pointer Message-ID: Review at https://gerrit.osmocom.org/1133 move to libxsc: global vty gsm_network pointer Move gsmnet_from_vty() and the bsc_gsmnet global to xsc_vty.c. Rename bsc_gsmnet to vty_global_gsm_network and make it static to xsc_vty.c, to clearly mark the global variable for VTY use only. Introduce xsc_vty_init() to set vty_global_gsm_network. Change-Id: I26c5c47de08f899b896813d09612d5cb2f8e42d6 --- M openbsc/include/openbsc/xsc.h M openbsc/src/libbsc/bsc_vty.c M openbsc/src/libxsc/xsc_vty.c 3 files changed, 32 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/33/1133/1 diff --git a/openbsc/include/openbsc/xsc.h b/openbsc/include/openbsc/xsc.h index 172d6e6..a2f43eb 100644 --- a/openbsc/include/openbsc/xsc.h +++ b/openbsc/include/openbsc/xsc.h @@ -7,6 +7,8 @@ typedef int (*mncc_recv_cb_t)(struct gsm_network *, struct msgb *); +struct vty; + #define MAX_A5_KEY_LEN (128/8) struct gsm_encr { @@ -19,3 +21,6 @@ uint16_t country_code, uint16_t network_code, mncc_recv_cb_t mncc_recv); + +int xsc_vty_init(struct gsm_network *network); +struct gsm_network *gsmnet_from_vty(struct vty *v); diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index cb0b1d8..020fba3 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -131,21 +131,6 @@ 1, }; -extern struct gsm_network *bsc_gsmnet; - -struct gsm_network *gsmnet_from_vty(struct vty *v) -{ - /* In case we read from the config file, the vty->priv cannot - * point to a struct telnet_connection, and thus conn->priv - * will not point to the gsm_network structure */ -#if 0 - struct telnet_connection *conn = v->priv; - return (struct gsm_network *) conn->priv; -#else - return bsc_gsmnet; -#endif -} - static int dummy_config_write(struct vty *v) { return CMD_SUCCESS; @@ -3939,7 +3924,7 @@ uint8_t buf[88]; int rc; - bts = gsm_bts_num(bsc_gsmnet, bts_nr); + bts = gsm_bts_num(gsmnet_from_vty(vty), bts_nr); if (!bts) { vty_out(vty, "%% No such BTS (%d)%s", bts_nr, VTY_NEWLINE); return CMD_WARNING; @@ -3990,7 +3975,7 @@ int ts_nr = atoi(argv[2]); int activate; - bts = gsm_bts_num(bsc_gsmnet, bts_nr); + bts = gsm_bts_num(gsmnet_from_vty(vty), bts_nr); if (!bts) { vty_out(vty, "%% No such BTS (%d)%s", bts_nr, VTY_NEWLINE); return CMD_WARNING; @@ -4052,6 +4037,7 @@ "BTS Vendor/Type\n", "\n", "", 0); + xsc_vty_init(network); install_element_ve(&show_net_cmd); install_element_ve(&show_bts_cmd); diff --git a/openbsc/src/libxsc/xsc_vty.c b/openbsc/src/libxsc/xsc_vty.c index 141179b..0de4a9d 100644 --- a/openbsc/src/libxsc/xsc_vty.c +++ b/openbsc/src/libxsc/xsc_vty.c @@ -1,6 +1,7 @@ /* Code used by both libbsc and libmsc (xsc means "BSC or MSC"). * * (C) 2016 by sysmocom s.m.f.c. + * (C) 2008-2010 by Harald Welte * All Rights Reserved * * This program is free software; you can redistribute it and/or modify @@ -17,3 +18,26 @@ * along with this program. If not, see . * */ + +#include + +static struct gsm_network *vty_global_gsm_network = NULL; + +/* initialize VTY elements used in both BSC and MSC */ +int xsc_vty_init(struct gsm_network *network) +{ + OSMO_ASSERT(vty_global_gsm_network == NULL); + vty_global_gsm_network = network; +} + +struct gsm_network *gsmnet_from_vty(struct vty *v) +{ + /* It can't hurt to force callers to continue to pass the vty instance + * to this function, in case we'd like to retrieve the global + * gsm_network instance from the vty at some point in the future. But + * until then, just return the global pointer, which should have been + * initialized by xsc_vty_init(). + */ + OSMO_ASSERT(vty_global_gsm_network); + return vty_global_gsm_network; +} -- To view, visit https://gerrit.osmocom.org/1133 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I26c5c47de08f899b896813d09612d5cb2f8e42d6 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 21 00:01:11 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 21 Oct 2016 00:01:11 +0000 Subject: [PATCH] openbsc[master]: move to libxsc: network VTY that isn't BSC-specific Message-ID: Review at https://gerrit.osmocom.org/1134 move to libxsc: network VTY that isn't BSC-specific Keep only BSC specific bits of the 'network' VTY node in bsc_vty.c, move more general VTY commands to xsc_vty.c. Add arg to xsc_vty_init() to pass a config_write_net() function. Pass a libbsc specific config_write_net() function. Future: upcoming omso-cscn will re-use the VTY bits moved to libxsc and pass a different config_write_net() function. Change-Id: I871b7b32a0c56fdce983e409cf244ec487d24e71 --- M openbsc/include/openbsc/xsc.h M openbsc/src/libbsc/bsc_vty.c M openbsc/src/libxsc/xsc_vty.c 3 files changed, 211 insertions(+), 194 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/34/1134/1 diff --git a/openbsc/include/openbsc/xsc.h b/openbsc/include/openbsc/xsc.h index a2f43eb..6432857 100644 --- a/openbsc/include/openbsc/xsc.h +++ b/openbsc/include/openbsc/xsc.h @@ -22,5 +22,6 @@ uint16_t network_code, mncc_recv_cb_t mncc_recv); -int xsc_vty_init(struct gsm_network *network); +int xsc_vty_init(struct gsm_network *network, + int (* config_write_net )(struct vty *)); struct gsm_network *gsmnet_from_vty(struct vty *v); diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index 020fba3..7ae9c0f 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -54,15 +54,13 @@ #include #include +#include + #include #include "../../bscconfig.h" -#define NETWORK_STR "Configure the GSM network\n" -#define CODE_CMD_STR "Code commands\n" -#define NAME_CMD_STR "Name Commands\n" -#define NAME_STR "Name to use\n" #define LCHAN_NR_STR "Logical Channel Number\n" @@ -105,12 +103,6 @@ { BTS_LOC_FIX_2D, "fix2d" }, { BTS_LOC_FIX_3D, "fix3d" }, { 0, NULL } -}; - -struct cmd_node net_node = { - GSMNET_NODE, - "%s(config-net)# ", - 1, }; struct cmd_node bts_node = { @@ -1336,133 +1328,6 @@ return CMD_SUCCESS; } -DEFUN(cfg_net, - cfg_net_cmd, - "network", NETWORK_STR) -{ - vty->index = gsmnet_from_vty(vty); - vty->node = GSMNET_NODE; - - return CMD_SUCCESS; -} - -DEFUN(cfg_net_ncc, - cfg_net_ncc_cmd, - "network country code <1-999>", - "Set the GSM network country code\n" - "Country commands\n" - CODE_CMD_STR - "Network Country Code to use\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - gsmnet->country_code = atoi(argv[0]); - - return CMD_SUCCESS; -} - -DEFUN(cfg_net_mnc, - cfg_net_mnc_cmd, - "mobile network code <0-999>", - "Set the GSM mobile network code\n" - "Network Commands\n" - CODE_CMD_STR - "Mobile Network Code to use\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - gsmnet->network_code = atoi(argv[0]); - - return CMD_SUCCESS; -} - -DEFUN(cfg_net_name_short, - cfg_net_name_short_cmd, - "short name NAME", - "Set the short GSM network name\n" NAME_CMD_STR NAME_STR) -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - bsc_replace_string(gsmnet, &gsmnet->name_short, argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_name_long, - cfg_net_name_long_cmd, - "long name NAME", - "Set the long GSM network name\n" NAME_CMD_STR NAME_STR) -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - bsc_replace_string(gsmnet, &gsmnet->name_long, argv[0]); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_auth_policy, - cfg_net_auth_policy_cmd, - "auth policy (closed|accept-all|regexp|token)", - "Authentication (not cryptographic)\n" - "Set the GSM network authentication policy\n" - "Require the MS to be activated in HLR\n" - "Accept all MS, whether in HLR or not\n" - "Use regular expression for IMSI authorization decision\n" - "Use SMS-token based authentication\n") -{ - enum gsm_auth_policy policy = gsm_auth_policy_parse(argv[0]); - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - gsmnet->auth_policy = policy; - - return CMD_SUCCESS; -} - -DEFUN(cfg_net_authorize_regexp, cfg_net_authorize_regexp_cmd, - "authorized-regexp REGEXP", - "Set regexp for IMSI which will be used for authorization decision\n" - "Regular expression, IMSIs matching it are allowed to use the network\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - if (gsm_parse_reg(gsmnet, &gsmnet->authorized_regexp, - &gsmnet->authorized_reg_str, argc, argv) != 0) { - vty_out(vty, "%%Failed to parse the authorized-regexp: '%s'%s", - argv[0], VTY_NEWLINE); - return CMD_WARNING; - } - - return CMD_SUCCESS; -} - -DEFUN(cfg_net_reject_cause, - cfg_net_reject_cause_cmd, - "location updating reject cause <2-111>", - "Set the reject cause of location updating reject\n" - "Set the reject cause of location updating reject\n" - "Set the reject cause of location updating reject\n" - "Set the reject cause of location updating reject\n" - "Cause Value as Per GSM TS 04.08\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - gsmnet->reject_cause = atoi(argv[0]); - - return CMD_SUCCESS; -} - -DEFUN(cfg_net_encryption, - cfg_net_encryption_cmd, - "encryption a5 (0|1|2|3)", - "Encryption options\n" - "A5 encryption\n" "A5/0: No encryption\n" - "A5/1: Encryption\n" "A5/2: Export-grade Encryption\n" - "A5/3: 'New' Secure Encryption\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - gsmnet->a5_encryption= atoi(argv[0]); - - return CMD_SUCCESS; -} - DEFUN(cfg_net_neci, cfg_net_neci_cmd, "neci (0|1)", @@ -1473,35 +1338,6 @@ gsmnet->neci = atoi(argv[0]); gsm_net_update_ctype(gsmnet); - return CMD_SUCCESS; -} - -DEFUN(cfg_net_rrlp_mode, cfg_net_rrlp_mode_cmd, - "rrlp mode (none|ms-based|ms-preferred|ass-preferred)", - "Radio Resource Location Protocol\n" - "Set the Radio Resource Location Protocol Mode\n" - "Don't send RRLP request\n" - "Request MS-based location\n" - "Request any location, prefer MS-based\n" - "Request any location, prefer MS-assisted\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - gsmnet->rrlp.mode = rrlp_mode_parse(argv[0]); - - return CMD_SUCCESS; -} - -DEFUN(cfg_net_mm_info, cfg_net_mm_info_cmd, - "mm info (0|1)", - "Mobility Management\n" - "Send MM INFO after LOC UPD ACCEPT\n" - "Disable\n" "Enable\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - - gsmnet->send_mm_info = atoi(argv[0]); - return CMD_SUCCESS; } @@ -1654,17 +1490,6 @@ vty_out(vty, "%% 'dtx-used' is now deprecated: use dtx * " "configuration options of BTS instead%s", VTY_NEWLINE); return CMD_SUCCESS; -} - -DEFUN(cfg_net_subscr_keep, - cfg_net_subscr_keep_cmd, - "subscriber-keep-in-ram (0|1)", - "Keep unused subscribers in RAM.\n" - "Delete unused subscribers\n" "Keep unused subscribers\n") -{ - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->subscr_group->keep_subscr = atoi(argv[0]); - return CMD_SUCCESS; } /* per-BTS configuration */ @@ -4037,7 +3862,7 @@ "BTS Vendor/Type\n", "\n", "", 0); - xsc_vty_init(network); + xsc_vty_init(network, config_write_net); install_element_ve(&show_net_cmd); install_element_ve(&show_bts_cmd); @@ -4052,20 +3877,7 @@ logging_vty_add_cmds(cat); osmo_stats_vty_add_cmds(); - install_element(CONFIG_NODE, &cfg_net_cmd); - install_node(&net_node, config_write_net); - vty_install_default(GSMNET_NODE); - install_element(GSMNET_NODE, &cfg_net_ncc_cmd); - install_element(GSMNET_NODE, &cfg_net_mnc_cmd); - install_element(GSMNET_NODE, &cfg_net_name_short_cmd); - install_element(GSMNET_NODE, &cfg_net_name_long_cmd); - install_element(GSMNET_NODE, &cfg_net_auth_policy_cmd); - install_element(GSMNET_NODE, &cfg_net_authorize_regexp_cmd); - install_element(GSMNET_NODE, &cfg_net_reject_cause_cmd); - install_element(GSMNET_NODE, &cfg_net_encryption_cmd); install_element(GSMNET_NODE, &cfg_net_neci_cmd); - install_element(GSMNET_NODE, &cfg_net_rrlp_mode_cmd); - install_element(GSMNET_NODE, &cfg_net_mm_info_cmd); install_element(GSMNET_NODE, &cfg_net_handover_cmd); install_element(GSMNET_NODE, &cfg_net_ho_win_rxlev_avg_cmd); install_element(GSMNET_NODE, &cfg_net_ho_win_rxqual_avg_cmd); @@ -4086,7 +3898,6 @@ install_element(GSMNET_NODE, &cfg_net_T3122_cmd); install_element(GSMNET_NODE, &cfg_net_T3141_cmd); install_element(GSMNET_NODE, &cfg_net_dtx_cmd); - install_element(GSMNET_NODE, &cfg_net_subscr_keep_cmd); install_element(GSMNET_NODE, &cfg_net_pag_any_tch_cmd); install_element(GSMNET_NODE, &cfg_bts_cmd); diff --git a/openbsc/src/libxsc/xsc_vty.c b/openbsc/src/libxsc/xsc_vty.c index 0de4a9d..1564b36 100644 --- a/openbsc/src/libxsc/xsc_vty.c +++ b/openbsc/src/libxsc/xsc_vty.c @@ -19,15 +19,220 @@ * */ +#include + +#include +#include +#include + +#include + #include +#include + +struct cmd_node net_node = { + GSMNET_NODE, + "%s(config-net)# ", + 1, +}; + +#define NETWORK_STR "Configure the GSM network\n" +#define CODE_CMD_STR "Code commands\n" +#define NAME_CMD_STR "Name Commands\n" +#define NAME_STR "Name to use\n" + +DEFUN(cfg_net, + cfg_net_cmd, + "network", NETWORK_STR) +{ + vty->index = gsmnet_from_vty(vty); + vty->node = GSMNET_NODE; + + return CMD_SUCCESS; +} + +DEFUN(cfg_net_ncc, + cfg_net_ncc_cmd, + "network country code <1-999>", + "Set the GSM network country code\n" + "Country commands\n" + CODE_CMD_STR + "Network Country Code to use\n") +{ + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + + gsmnet->country_code = atoi(argv[0]); + + return CMD_SUCCESS; +} + +DEFUN(cfg_net_mnc, + cfg_net_mnc_cmd, + "mobile network code <0-999>", + "Set the GSM mobile network code\n" + "Network Commands\n" + CODE_CMD_STR + "Mobile Network Code to use\n") +{ + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + + gsmnet->network_code = atoi(argv[0]); + + return CMD_SUCCESS; +} + +DEFUN(cfg_net_name_short, + cfg_net_name_short_cmd, + "short name NAME", + "Set the short GSM network name\n" NAME_CMD_STR NAME_STR) +{ + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + + bsc_replace_string(gsmnet, &gsmnet->name_short, argv[0]); + return CMD_SUCCESS; +} + +DEFUN(cfg_net_name_long, + cfg_net_name_long_cmd, + "long name NAME", + "Set the long GSM network name\n" NAME_CMD_STR NAME_STR) +{ + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + + bsc_replace_string(gsmnet, &gsmnet->name_long, argv[0]); + return CMD_SUCCESS; +} + +DEFUN(cfg_net_auth_policy, + cfg_net_auth_policy_cmd, + "auth policy (closed|accept-all|regexp|token)", + "Authentication (not cryptographic)\n" + "Set the GSM network authentication policy\n" + "Require the MS to be activated in HLR\n" + "Accept all MS, whether in HLR or not\n" + "Use regular expression for IMSI authorization decision\n" + "Use SMS-token based authentication\n") +{ + enum gsm_auth_policy policy = gsm_auth_policy_parse(argv[0]); + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + + gsmnet->auth_policy = policy; + + return CMD_SUCCESS; +} + +DEFUN(cfg_net_authorize_regexp, cfg_net_authorize_regexp_cmd, + "authorized-regexp REGEXP", + "Set regexp for IMSI which will be used for authorization decision\n" + "Regular expression, IMSIs matching it are allowed to use the network\n") +{ + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + if (gsm_parse_reg(gsmnet, &gsmnet->authorized_regexp, + &gsmnet->authorized_reg_str, argc, argv) != 0) { + vty_out(vty, "%%Failed to parse the authorized-regexp: '%s'%s", + argv[0], VTY_NEWLINE); + return CMD_WARNING; + } + + return CMD_SUCCESS; +} + +DEFUN(cfg_net_reject_cause, + cfg_net_reject_cause_cmd, + "location updating reject cause <2-111>", + "Set the reject cause of location updating reject\n" + "Set the reject cause of location updating reject\n" + "Set the reject cause of location updating reject\n" + "Set the reject cause of location updating reject\n" + "Cause Value as Per GSM TS 04.08\n") +{ + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + + gsmnet->reject_cause = atoi(argv[0]); + + return CMD_SUCCESS; +} + +DEFUN(cfg_net_encryption, + cfg_net_encryption_cmd, + "encryption a5 (0|1|2|3)", + "Encryption options\n" + "A5 encryption\n" "A5/0: No encryption\n" + "A5/1: Encryption\n" "A5/2: Export-grade Encryption\n" + "A5/3: 'New' Secure Encryption\n") +{ + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + + gsmnet->a5_encryption= atoi(argv[0]); + + return CMD_SUCCESS; +} + +DEFUN(cfg_net_rrlp_mode, cfg_net_rrlp_mode_cmd, + "rrlp mode (none|ms-based|ms-preferred|ass-preferred)", + "Radio Resource Location Protocol\n" + "Set the Radio Resource Location Protocol Mode\n" + "Don't send RRLP request\n" + "Request MS-based location\n" + "Request any location, prefer MS-based\n" + "Request any location, prefer MS-assisted\n") +{ + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + + gsmnet->rrlp.mode = rrlp_mode_parse(argv[0]); + + return CMD_SUCCESS; +} + +DEFUN(cfg_net_mm_info, cfg_net_mm_info_cmd, + "mm info (0|1)", + "Mobility Management\n" + "Send MM INFO after LOC UPD ACCEPT\n" + "Disable\n" "Enable\n") +{ + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + + gsmnet->send_mm_info = atoi(argv[0]); + + return CMD_SUCCESS; +} + +DEFUN(cfg_net_subscr_keep, + cfg_net_subscr_keep_cmd, + "subscriber-keep-in-ram (0|1)", + "Keep unused subscribers in RAM.\n" + "Delete unused subscribers\n" "Keep unused subscribers\n") +{ + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + gsmnet->subscr_group->keep_subscr = atoi(argv[0]); + return CMD_SUCCESS; +} static struct gsm_network *vty_global_gsm_network = NULL; /* initialize VTY elements used in both BSC and MSC */ -int xsc_vty_init(struct gsm_network *network) +int xsc_vty_init(struct gsm_network *network, + int (* config_write_net )(struct vty *)) { OSMO_ASSERT(vty_global_gsm_network == NULL); vty_global_gsm_network = network; + + install_element(CONFIG_NODE, &cfg_net_cmd); + install_node(&net_node, config_write_net); + vty_install_default(GSMNET_NODE); + install_element(GSMNET_NODE, &cfg_net_ncc_cmd); + install_element(GSMNET_NODE, &cfg_net_mnc_cmd); + install_element(GSMNET_NODE, &cfg_net_name_short_cmd); + install_element(GSMNET_NODE, &cfg_net_name_long_cmd); + install_element(GSMNET_NODE, &cfg_net_auth_policy_cmd); + install_element(GSMNET_NODE, &cfg_net_authorize_regexp_cmd); + install_element(GSMNET_NODE, &cfg_net_reject_cause_cmd); + install_element(GSMNET_NODE, &cfg_net_encryption_cmd); + install_element(GSMNET_NODE, &cfg_net_rrlp_mode_cmd); + install_element(GSMNET_NODE, &cfg_net_mm_info_cmd); + install_element(GSMNET_NODE, &cfg_net_subscr_keep_cmd); + + return CMD_SUCCESS; } struct gsm_network *gsmnet_from_vty(struct vty *v) -- To view, visit https://gerrit.osmocom.org/1134 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I871b7b32a0c56fdce983e409cf244ec487d24e71 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 21 00:01:11 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 21 Oct 2016 00:01:11 +0000 Subject: [PATCH] openbsc[master]: bsc vty: rename show_net_cmd to bsc_show_net_cmd Message-ID: Review at https://gerrit.osmocom.org/1135 bsc vty: rename show_net_cmd to bsc_show_net_cmd Future: there will be an MSC-land show-net-cmd, so rename to something with bsc in its name. Change-Id: Ifb86698cd57a09f03b935b6d3fcea87eff4cd397 --- M openbsc/src/libbsc/bsc_vty.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/35/1135/1 diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index 7ae9c0f..822c822 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -205,7 +205,7 @@ VTY_NEWLINE); } -DEFUN(show_net, show_net_cmd, "show network", +DEFUN(bsc_show_net, bsc_show_net_cmd, "show network", SHOW_STR "Display information about a GSM NETWORK\n") { struct gsm_network *net = gsmnet_from_vty(vty); @@ -3864,7 +3864,7 @@ xsc_vty_init(network, config_write_net); - install_element_ve(&show_net_cmd); + install_element_ve(&bsc_show_net_cmd); install_element_ve(&show_bts_cmd); install_element_ve(&show_trx_cmd); install_element_ve(&show_ts_cmd); -- To view, visit https://gerrit.osmocom.org/1135 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifb86698cd57a09f03b935b6d3fcea87eff4cd397 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 21 00:01:12 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 21 Oct 2016 00:01:12 +0000 Subject: [PATCH] openbsc[master]: reinvent connection_for_subscr() and move to libmsc Message-ID: Review at https://gerrit.osmocom.org/1136 reinvent connection_for_subscr() and move to libmsc Implement connection_for_subscr() from a completely different angle: instead of looking up lchans in bts structs, look up the subscriber in the global list of gsm_subscriber_connection. static lchan_find() is thus obsoleted. All callers of connection_for_subscr() live in libmsc, so move to libmsc. The move and edit are done in a single commit since the old and new implementation have nothing in common. Future: osmo-cscn will use this, without bts being present. Remove implementation of connection_for_subscr() from channel_test.c -- it is possible that the abort() in there was intended for a regression test, but actually it seems the implementation was merely added for linking reasons, and the abort() added to guard against the NULL return value: no comment nor the commit log indicate that the abort() is test critical; the addition was the only change in channel_test.c for that commit; at the same time a connection_for_subscr() call was added in libmsc. Change-Id: I5e0ba0ecf1726ebd540800f4e98fdfc937c904ff --- M openbsc/src/libbsc/chan_alloc.c M openbsc/src/libmsc/gsm_subscriber.c M openbsc/tests/channel/channel_test.c 3 files changed, 14 insertions(+), 35 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/36/1136/1 diff --git a/openbsc/src/libbsc/chan_alloc.c b/openbsc/src/libbsc/chan_alloc.c index 367139c..0f4d90a 100644 --- a/openbsc/src/libbsc/chan_alloc.c +++ b/openbsc/src/libbsc/chan_alloc.c @@ -481,39 +481,6 @@ return 1; } -static struct gsm_lchan* lchan_find(struct gsm_bts *bts, struct gsm_subscriber *subscr) { - struct gsm_bts_trx *trx; - int ts_no, lchan_no; - - llist_for_each_entry(trx, &bts->trx_list, list) { - for (ts_no = 0; ts_no < 8; ++ts_no) { - for (lchan_no = 0; lchan_no < TS_MAX_LCHAN; ++lchan_no) { - struct gsm_lchan *lchan = - &trx->ts[ts_no].lchan[lchan_no]; - if (lchan->conn && subscr == lchan->conn->subscr) - return lchan; - } - } - } - - return NULL; -} - -struct gsm_subscriber_connection *connection_for_subscr(struct gsm_subscriber *subscr) -{ - struct gsm_bts *bts; - struct gsm_network *net = subscr->group->net; - struct gsm_lchan *lchan; - - llist_for_each_entry(bts, &net->bts_list, list) { - lchan = lchan_find(bts, subscr); - if (lchan) - return lchan->conn; - } - - return NULL; -} - void bts_chan_load(struct pchan_load *cl, const struct gsm_bts *bts) { struct gsm_bts_trx *trx; diff --git a/openbsc/src/libmsc/gsm_subscriber.c b/openbsc/src/libmsc/gsm_subscriber.c index 08198c7..4ec0ead 100644 --- a/openbsc/src/libmsc/gsm_subscriber.c +++ b/openbsc/src/libmsc/gsm_subscriber.c @@ -374,3 +374,17 @@ { db_subscriber_expire(sgrp->net, subscr_expire_callback); } + +struct gsm_subscriber_connection *connection_for_subscr(struct gsm_subscriber *subscr) +{ + /* FIXME: replace this with a backpointer in gsm_subscriber? */ + struct gsm_network *net = subscr->group->net; + struct gsm_subscriber_connection *conn; + + llist_for_each_entry(conn, &net->subscr_conns, entry) { + if (conn->subscr == subscr) + return conn; + } + + return NULL; +} diff --git a/openbsc/tests/channel/channel_test.c b/openbsc/tests/channel/channel_test.c index f0e4732..c7bd342 100644 --- a/openbsc/tests/channel/channel_test.c +++ b/openbsc/tests/channel/channel_test.c @@ -138,8 +138,6 @@ void gsm48_secure_channel() {} void paging_request_stop() {} void vty_out() {} -void* connection_for_subscr(void) { abort(); return NULL; } - struct tlv_definition nm_att_tlvdef; -- To view, visit https://gerrit.osmocom.org/1136 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5e0ba0ecf1726ebd540800f4e98fdfc937c904ff Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 21 00:01:12 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 21 Oct 2016 00:01:12 +0000 Subject: [PATCH] openbsc[master]: Move timezone settings up to network level Message-ID: Review at https://gerrit.osmocom.org/1137 Move timezone settings up to network level Time zone used to be configurable per-BTS. In the upcoming MSC-split, no BTS structures will be available on the MSC level. To simplify, drop the ability to manage several time zones in a core network and place the time zone config on the network VTY level, i.e. in gsm_network. If we are going to re-add fine grained time zone settings, it should probably be tied to the LAC. Adjust time zone VTY config code (to be moved to libxsc in subsequent commit). Adjust time zone Ctrl Interface code. Change-Id: I69848887d92990f3d6f969be80f6ef91f6bdbbe8 --- M openbsc/include/openbsc/gsm_data.h M openbsc/include/openbsc/gsm_data_shared.h M openbsc/src/libbsc/bsc_vty.c M openbsc/src/libmsc/gsm_04_08.c M openbsc/src/osmo-bsc/osmo_bsc_ctrl.c M openbsc/src/osmo-bsc/osmo_bsc_filter.c M openbsc/tests/bsc/bsc_test.c 7 files changed, 83 insertions(+), 83 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/37/1137/1 diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 07279a9..fc17bfd 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -263,6 +263,13 @@ #define GSM_T3113_DEFAULT 60 #define GSM_T3122_DEFAULT 10 +struct gsm_tz { + int override; /* if 0, use system's time zone instead. */ + int hr; /* hour */ + int mn; /* minute */ + int dst; /* daylight savings */ +}; + struct gsm_network { /* global parameters */ uint16_t country_code; @@ -357,6 +364,13 @@ /* all active subscriber connections. */ struct llist_head subscr_conns; + + /* if override is nonzero, this timezone data is used for all MM + * contexts. */ + /* TODO: in OsmoNITB, tz-override used to be BTS-specific. To enable + * 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; }; struct osmo_esme; diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index 0221685..fcdf319 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -646,14 +646,6 @@ /* buffers where we put the pre-computed SI */ sysinfo_buf_t si_buf[_MAX_SYSINFO_TYPE]; - /* TimeZone hours, mins, and bts specific */ - struct { - int hr; - int mn; - int override; - int dst; - } tz; - /* ip.accesss Unit ID's have Site/BTS/TRX layout */ union { struct { diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index 822c822..a5bda5d 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -554,14 +554,6 @@ if (bts->dtxd) vty_out(vty, " dtx downlink%s", VTY_NEWLINE); vty_out(vty, " base_station_id_code %u%s", bts->bsic, VTY_NEWLINE); - if (bts->tz.override != 0) { - if (bts->tz.dst) - vty_out(vty, " timezone %d %d %d%s", - bts->tz.hr, bts->tz.mn, bts->tz.dst, VTY_NEWLINE); - else - vty_out(vty, " timezone %d %d%s", - bts->tz.hr, bts->tz.mn, VTY_NEWLINE); - } vty_out(vty, " ms max power %u%s", bts->ms_max_power, VTY_NEWLINE); vty_out(vty, " cell reselection hysteresis %u%s", bts->si_common.cell_sel_par.cell_resel_hyst*2, VTY_NEWLINE); @@ -817,6 +809,15 @@ vty_out(vty, " timer t3141 %u%s", gsmnet->T3141, VTY_NEWLINE); vty_out(vty, " subscriber-keep-in-ram %d%s", gsmnet->subscr_group->keep_subscr, VTY_NEWLINE); + if (gsmnet->tz.override != 0) { + if (gsmnet->tz.dst) + vty_out(vty, " timezone %d %d %d%s", + gsmnet->tz.hr, gsmnet->tz.mn, gsmnet->tz.dst, + VTY_NEWLINE); + else + vty_out(vty, " timezone %d %d%s", + gsmnet->tz.hr, gsmnet->tz.mn, VTY_NEWLINE); + } return CMD_SUCCESS; } @@ -1685,10 +1686,10 @@ return CMD_SUCCESS; } -DEFUN(cfg_bts_timezone, - cfg_bts_timezone_cmd, +DEFUN(cfg_net_timezone, + cfg_net_timezone_cmd, "timezone <-19-19> (0|15|30|45)", - "Set the Timezone Offset of this BTS\n" + "Set the Timezone Offset of the network\n" "Timezone offset (hours)\n" "Timezone offset (00 minutes)\n" "Timezone offset (15 minutes)\n" @@ -1696,22 +1697,22 @@ "Timezone offset (45 minutes)\n" ) { - struct gsm_bts *bts = vty->index; + struct gsm_network *net = vty->index; int tzhr = atoi(argv[0]); int tzmn = atoi(argv[1]); - bts->tz.hr = tzhr; - bts->tz.mn = tzmn; - bts->tz.dst = 0; - bts->tz.override = 1; + net->tz.hr = tzhr; + net->tz.mn = tzmn; + net->tz.dst = 0; + net->tz.override = 1; return CMD_SUCCESS; } -DEFUN(cfg_bts_timezone_dst, - cfg_bts_timezone_dst_cmd, +DEFUN(cfg_net_timezone_dst, + cfg_net_timezone_dst_cmd, "timezone <-19-19> (0|15|30|45) <0-2>", - "Set the Timezone Offset of this BTS\n" + "Set the Timezone Offset of the network\n" "Timezone offset (hours)\n" "Timezone offset (00 minutes)\n" "Timezone offset (15 minutes)\n" @@ -1720,28 +1721,28 @@ "DST offset (hours)\n" ) { - struct gsm_bts *bts = vty->index; + struct gsm_network *net = vty->index; int tzhr = atoi(argv[0]); int tzmn = atoi(argv[1]); int tzdst = atoi(argv[2]); - bts->tz.hr = tzhr; - bts->tz.mn = tzmn; - bts->tz.dst = tzdst; - bts->tz.override = 1; + net->tz.hr = tzhr; + net->tz.mn = tzmn; + net->tz.dst = tzdst; + net->tz.override = 1; return CMD_SUCCESS; } -DEFUN(cfg_bts_no_timezone, - cfg_bts_no_timezone_cmd, +DEFUN(cfg_net_no_timezone, + cfg_net_no_timezone_cmd, "no timezone", NO_STR - "Disable BTS specific timezone\n") + "Disable network timezone override, use system tz\n") { - struct gsm_bts *bts = vty->index; + struct gsm_network *net = vty->index; - bts->tz.override = 0; + net->tz.override = 0; return CMD_SUCCESS; } @@ -3899,6 +3900,9 @@ install_element(GSMNET_NODE, &cfg_net_T3141_cmd); install_element(GSMNET_NODE, &cfg_net_dtx_cmd); install_element(GSMNET_NODE, &cfg_net_pag_any_tch_cmd); + install_element(GSMNET_NODE, &cfg_net_timezone_cmd); + install_element(GSMNET_NODE, &cfg_net_timezone_dst_cmd); + install_element(GSMNET_NODE, &cfg_net_no_timezone_cmd); install_element(GSMNET_NODE, &cfg_bts_cmd); install_node(&bts_node, config_write_bts); @@ -3917,9 +3921,6 @@ install_element(BTS_NODE, &cfg_bts_bsic_cmd); install_element(BTS_NODE, &cfg_bts_unit_id_cmd); install_element(BTS_NODE, &cfg_bts_rsl_ip_cmd); - install_element(BTS_NODE, &cfg_bts_timezone_cmd); - install_element(BTS_NODE, &cfg_bts_timezone_dst_cmd); - install_element(BTS_NODE, &cfg_bts_no_timezone_cmd); install_element(BTS_NODE, &cfg_bts_nokia_site_skip_reset_cmd); install_element(BTS_NODE, &cfg_bts_nokia_site_no_loc_rel_cnf_cmd); install_element(BTS_NODE, &cfg_bts_nokia_site_bts_reset_timer_cnf_cmd); diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index a22e3c2..a871c19 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -733,7 +733,6 @@ struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 MM INF"); struct gsm48_hdr *gh; struct gsm_network *net = conn->network; - struct gsm_bts *bts = conn->bts; uint8_t *ptr8; int name_len, name_pad; @@ -821,23 +820,23 @@ ptr8[5] = bcdify(gmt_time->tm_min); ptr8[6] = bcdify(gmt_time->tm_sec); - if (bts->tz.override) { + if (net->tz.override) { /* Convert tz.hr and tz.mn to units */ - if (bts->tz.hr < 0) { - tzunits = ((bts->tz.hr/-1)*4); - tzunits = tzunits + (bts->tz.mn/15); + if (net->tz.hr < 0) { + tzunits = ((net->tz.hr/-1)*4); + tzunits = tzunits + (net->tz.mn/15); ptr8[7] = bcdify(tzunits); /* Set negative time */ ptr8[7] |= 0x08; } else { - tzunits = bts->tz.hr*4; - tzunits = tzunits + (bts->tz.mn/15); + tzunits = net->tz.hr*4; + tzunits = tzunits + (net->tz.mn/15); ptr8[7] = bcdify(tzunits); } /* Convert DST value */ - if (bts->tz.dst >= 0 && bts->tz.dst <= 2) - dst = bts->tz.dst; + if (net->tz.dst >= 0 && net->tz.dst <= 2) + dst = net->tz.dst; } else { /* Need to get GSM offset and convert into 15 min units */ diff --git a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c index 84b7b92..556d362 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c @@ -362,18 +362,15 @@ return 1; } -CTRL_CMD_DEFINE(bts_timezone, "timezone"); -static int get_bts_timezone(struct ctrl_cmd *cmd, void *data) +CTRL_CMD_DEFINE(net_timezone, "timezone"); +static int get_net_timezone(struct ctrl_cmd *cmd, void *data) { - struct gsm_bts *bts = (struct gsm_bts *) cmd->node; - if (!bts) { - cmd->reply = "bts not found."; - return CTRL_CMD_ERROR; - } + struct gsm_network *net = (struct gsm_network*)cmd->node; - if (bts->tz.override) + struct gsm_tz *tz = &net->tz; + if (tz->override) cmd->reply = talloc_asprintf(cmd, "%d,%d,%d", - bts->tz.hr, bts->tz.mn, bts->tz.dst); + tz->hr, tz->mn, tz->dst); else cmd->reply = talloc_asprintf(cmd, "off"); @@ -385,16 +382,11 @@ return CTRL_CMD_REPLY; } -static int set_bts_timezone(struct ctrl_cmd *cmd, void *data) +static int set_net_timezone(struct ctrl_cmd *cmd, void *data) { char *saveptr, *hourstr, *minstr, *dststr, *tmp = 0; int override; - struct gsm_bts *bts = (struct gsm_bts *) cmd->node; - - if (!bts) { - cmd->reply = "bts not found."; - return CTRL_CMD_ERROR; - } + struct gsm_network *net = (struct gsm_network*)cmd->node; tmp = talloc_strdup(cmd, cmd->value); if (!tmp) @@ -409,25 +401,26 @@ if (hourstr != NULL) override = strcasecmp(hourstr, "off") != 0; - bts->tz.override = override; + struct gsm_tz *tz = &net->tz; + tz->override = override; if (override) { - bts->tz.hr = hourstr ? atol(hourstr) : 0; - bts->tz.mn = minstr ? atol(minstr) : 0; - bts->tz.dst = dststr ? atol(dststr) : 0; + tz->hr = hourstr ? atol(hourstr) : 0; + tz->mn = minstr ? atol(minstr) : 0; + tz->dst = dststr ? atol(dststr) : 0; } talloc_free(tmp); tmp = NULL; - return get_bts_timezone(cmd, data); + return get_net_timezone(cmd, data); oom: cmd->reply = "OOM"; return CTRL_CMD_ERROR; } -static int verify_bts_timezone(struct ctrl_cmd *cmd, const char *value, void *data) +static int verify_net_timezone(struct ctrl_cmd *cmd, const char *value, void *data) { char *saveptr, *hourstr, *minstr, *dststr, *tmp; int override, tz_hours, tz_mins, tz_dst; @@ -655,7 +648,7 @@ rc = ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_loc); if (rc) goto end; - rc = ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_timezone); + rc = ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_timezone); if (rc) goto end; rc = ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_msc_connection_status); diff --git a/openbsc/src/osmo-bsc/osmo_bsc_filter.c b/openbsc/src/osmo-bsc/osmo_bsc_filter.c index 8fc899e..3b5f57e 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_filter.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_filter.c @@ -271,23 +271,24 @@ return 0; /* Is TZ patching enabled? */ - if (!bts->tz.override) + struct gsm_tz *tz = &bts->network->tz; + if (!tz->override) return 0; /* Convert tz.hr and tz.mn to units */ - if (bts->tz.hr < 0) { - tzunits = -bts->tz.hr*4; + if (tz->hr < 0) { + tzunits = -tz->hr*4; tzbsd |= 0x08; } else - tzunits = bts->tz.hr*4; + tzunits = tz->hr*4; - tzunits = tzunits + (bts->tz.mn/15); + tzunits = tzunits + (tz->mn/15); tzbsd |= (tzunits % 10)*0x10 + (tzunits / 10); /* Convert DST value */ - if (bts->tz.dst >= 0 && bts->tz.dst <= 2) - dst = bts->tz.dst; + if (tz->dst >= 0 && tz->dst <= 2) + dst = tz->dst; if (TLVP_PRESENT(&tp, GSM48_IE_UTC)) { LOGP(DMSC, LOGL_DEBUG, diff --git a/openbsc/tests/bsc/bsc_test.c b/openbsc/tests/bsc/bsc_test.c index 6d41941..7174828 100644 --- a/openbsc/tests/bsc/bsc_test.c +++ b/openbsc/tests/bsc/bsc_test.c @@ -147,10 +147,10 @@ struct msgb *msg = msgb_alloc(4096, "test-message"); int is_set = 0; - bts->tz.hr = get_int(test_def->params, test_def->n_params, "tz_hr", 0, &is_set); - bts->tz.mn = get_int(test_def->params, test_def->n_params, "tz_mn", 0, &is_set); - bts->tz.dst = get_int(test_def->params, test_def->n_params, "tz_dst", 0, &is_set); - bts->tz.override = 1; + net->tz.hr = get_int(test_def->params, test_def->n_params, "tz_hr", 0, &is_set); + net->tz.mn = get_int(test_def->params, test_def->n_params, "tz_mn", 0, &is_set); + net->tz.dst = get_int(test_def->params, test_def->n_params, "tz_dst", 0, &is_set); + net->tz.override = 1; printf("Going to test item: %d\n", i); msg->l3h = msgb_put(msg, test_def->length); -- To view, visit https://gerrit.osmocom.org/1137 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I69848887d92990f3d6f969be80f6ef91f6bdbbe8 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 21 00:01:12 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 21 Oct 2016 00:01:12 +0000 Subject: [PATCH] openbsc[master]: move to libxsc: net timezone VTY config Message-ID: Review at https://gerrit.osmocom.org/1138 move to libxsc: net timezone VTY config Leave the timezone VTY output in libbsc's config_write_net(), until the BSC/MSC separation of struct gsm_network is completed. Change-Id: I9712b2e07b4f1ab8d2e4ad40a8d771e98ed25b20 --- M openbsc/src/libbsc/bsc_vty.c M openbsc/src/libxsc/xsc_vty.c 2 files changed, 64 insertions(+), 64 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/38/1138/1 diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index a5bda5d..9891f4f 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -1686,67 +1686,6 @@ return CMD_SUCCESS; } -DEFUN(cfg_net_timezone, - cfg_net_timezone_cmd, - "timezone <-19-19> (0|15|30|45)", - "Set the Timezone Offset of the network\n" - "Timezone offset (hours)\n" - "Timezone offset (00 minutes)\n" - "Timezone offset (15 minutes)\n" - "Timezone offset (30 minutes)\n" - "Timezone offset (45 minutes)\n" - ) -{ - struct gsm_network *net = vty->index; - int tzhr = atoi(argv[0]); - int tzmn = atoi(argv[1]); - - net->tz.hr = tzhr; - net->tz.mn = tzmn; - net->tz.dst = 0; - net->tz.override = 1; - - return CMD_SUCCESS; -} - -DEFUN(cfg_net_timezone_dst, - cfg_net_timezone_dst_cmd, - "timezone <-19-19> (0|15|30|45) <0-2>", - "Set the Timezone Offset of the network\n" - "Timezone offset (hours)\n" - "Timezone offset (00 minutes)\n" - "Timezone offset (15 minutes)\n" - "Timezone offset (30 minutes)\n" - "Timezone offset (45 minutes)\n" - "DST offset (hours)\n" - ) -{ - struct gsm_network *net = vty->index; - int tzhr = atoi(argv[0]); - int tzmn = atoi(argv[1]); - int tzdst = atoi(argv[2]); - - net->tz.hr = tzhr; - net->tz.mn = tzmn; - net->tz.dst = tzdst; - net->tz.override = 1; - - return CMD_SUCCESS; -} - -DEFUN(cfg_net_no_timezone, - cfg_net_no_timezone_cmd, - "no timezone", - NO_STR - "Disable network timezone override, use system tz\n") -{ - struct gsm_network *net = vty->index; - - net->tz.override = 0; - - return CMD_SUCCESS; -} - DEFUN(cfg_bts_unit_id, cfg_bts_unit_id_cmd, "ip.access unit_id <0-65534> <0-255>", @@ -3900,9 +3839,6 @@ install_element(GSMNET_NODE, &cfg_net_T3141_cmd); install_element(GSMNET_NODE, &cfg_net_dtx_cmd); install_element(GSMNET_NODE, &cfg_net_pag_any_tch_cmd); - install_element(GSMNET_NODE, &cfg_net_timezone_cmd); - install_element(GSMNET_NODE, &cfg_net_timezone_dst_cmd); - install_element(GSMNET_NODE, &cfg_net_no_timezone_cmd); install_element(GSMNET_NODE, &cfg_bts_cmd); install_node(&bts_node, config_write_bts); diff --git a/openbsc/src/libxsc/xsc_vty.c b/openbsc/src/libxsc/xsc_vty.c index 1564b36..0b22f09 100644 --- a/openbsc/src/libxsc/xsc_vty.c +++ b/openbsc/src/libxsc/xsc_vty.c @@ -208,6 +208,67 @@ return CMD_SUCCESS; } +DEFUN(cfg_net_timezone, + cfg_net_timezone_cmd, + "timezone <-19-19> (0|15|30|45)", + "Set the Timezone Offset of the network\n" + "Timezone offset (hours)\n" + "Timezone offset (00 minutes)\n" + "Timezone offset (15 minutes)\n" + "Timezone offset (30 minutes)\n" + "Timezone offset (45 minutes)\n" + ) +{ + struct gsm_network *net = vty->index; + int tzhr = atoi(argv[0]); + int tzmn = atoi(argv[1]); + + net->tz.hr = tzhr; + net->tz.mn = tzmn; + net->tz.dst = 0; + net->tz.override = 1; + + return CMD_SUCCESS; +} + +DEFUN(cfg_net_timezone_dst, + cfg_net_timezone_dst_cmd, + "timezone <-19-19> (0|15|30|45) <0-2>", + "Set the Timezone Offset of the network\n" + "Timezone offset (hours)\n" + "Timezone offset (00 minutes)\n" + "Timezone offset (15 minutes)\n" + "Timezone offset (30 minutes)\n" + "Timezone offset (45 minutes)\n" + "DST offset (hours)\n" + ) +{ + struct gsm_network *net = vty->index; + int tzhr = atoi(argv[0]); + int tzmn = atoi(argv[1]); + int tzdst = atoi(argv[2]); + + net->tz.hr = tzhr; + net->tz.mn = tzmn; + net->tz.dst = tzdst; + net->tz.override = 1; + + return CMD_SUCCESS; +} + +DEFUN(cfg_net_no_timezone, + cfg_net_no_timezone_cmd, + "no timezone", + NO_STR + "Disable network timezone override, use system tz\n") +{ + struct gsm_network *net = vty->index; + + net->tz.override = 0; + + return CMD_SUCCESS; +} + static struct gsm_network *vty_global_gsm_network = NULL; /* initialize VTY elements used in both BSC and MSC */ @@ -231,6 +292,9 @@ install_element(GSMNET_NODE, &cfg_net_rrlp_mode_cmd); install_element(GSMNET_NODE, &cfg_net_mm_info_cmd); install_element(GSMNET_NODE, &cfg_net_subscr_keep_cmd); + install_element(GSMNET_NODE, &cfg_net_timezone_cmd); + install_element(GSMNET_NODE, &cfg_net_timezone_dst_cmd); + install_element(GSMNET_NODE, &cfg_net_no_timezone_cmd); return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/1138 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9712b2e07b4f1ab8d2e4ad40a8d771e98ed25b20 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 21 00:01:12 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 21 Oct 2016 00:01:12 +0000 Subject: [PATCH] openbsc[master]: split subscr_con_allocate()/_free() in bsc_ and msc_ Message-ID: Review at https://gerrit.osmocom.org/1139 split subscr_con_allocate()/_free() in bsc_ and msc_ Rename current subscr_con_allocate() and subscr_con_free to bsc_*, and add two separate msc_subscr_con_allocate() and _free(). The msc_subscr_con_free() ignores all lchan members. In libbsc use bsc_*, in libmsc use msc_*. Change-Id: I3cf7c7cafdf4672ec7b26058bba8a77159855257 Future: there will be distinct subscr conns for libbsc and libmsc. --- M openbsc/include/openbsc/gsm_data.h M openbsc/src/libbsc/bsc_api.c M openbsc/src/libmsc/gsm_04_08.c M openbsc/src/libmsc/osmo_msc.c M openbsc/src/osmo-bsc/osmo_bsc_api.c M openbsc/src/osmo-bsc/osmo_bsc_bssap.c M openbsc/src/osmo-bsc/osmo_bsc_sccp.c 7 files changed, 42 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/39/1139/1 diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index fc17bfd..6385092 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -512,8 +512,11 @@ int gsm_btsmodel_set_feature(struct gsm_bts_model *model, enum gsm_bts_features feat); int gsm_bts_model_register(struct gsm_bts_model *model); -struct gsm_subscriber_connection *subscr_con_allocate(struct gsm_lchan *lchan); -void subscr_con_free(struct gsm_subscriber_connection *conn); +struct gsm_subscriber_connection *bsc_subscr_con_allocate(struct gsm_lchan *lchan); +void bsc_subscr_con_free(struct gsm_subscriber_connection *conn); + +struct gsm_subscriber_connection *msc_subscr_con_allocate(struct gsm_network *network); +void msc_subscr_con_free(struct gsm_subscriber_connection *conn); struct gsm_bts *gsm_bts_alloc_register(struct gsm_network *net, enum gsm_bts_type type, diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c index cc12e9f..eda7368 100644 --- a/openbsc/src/libbsc/bsc_api.c +++ b/openbsc/src/libbsc/bsc_api.c @@ -238,7 +238,7 @@ return 0; } -struct gsm_subscriber_connection *subscr_con_allocate(struct gsm_lchan *lchan) +struct gsm_subscriber_connection *bsc_subscr_con_allocate(struct gsm_lchan *lchan) { struct gsm_subscriber_connection *conn; struct gsm_network *net = lchan->ts->trx->bts->network; @@ -255,8 +255,7 @@ return conn; } -/* TODO: move subscriber put here... */ -void subscr_con_free(struct gsm_subscriber_connection *conn) +void bsc_subscr_con_free(struct gsm_subscriber_connection *conn) { if (!conn) return; @@ -678,7 +677,7 @@ } else { /* allocate a new connection */ rc = BSC_API_CONN_POL_REJECT; - lchan->conn = subscr_con_allocate(msg->lchan); + lchan->conn = bsc_subscr_con_allocate(msg->lchan); if (!lchan->conn) { lchan_release(lchan, 1, RSL_REL_NORMAL); return -1; @@ -689,7 +688,7 @@ if (rc != BSC_API_CONN_POL_ACCEPT) { lchan->conn->lchan = NULL; - subscr_con_free(lchan->conn); + bsc_subscr_con_free(lchan->conn); lchan_release(lchan, 1, RSL_REL_NORMAL); } } @@ -848,7 +847,7 @@ gsm0808_clear(conn); if (destruct) - subscr_con_free(conn); + bsc_subscr_con_free(conn); } static void handle_chan_ack(struct gsm_subscriber_connection *conn, diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index a871c19..4ff7cbb 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -3683,6 +3683,33 @@ return 0; } +struct gsm_subscriber_connection *msc_subscr_con_allocate(struct gsm_network *network) +{ + struct gsm_subscriber_connection *conn; + + conn = talloc_zero(network, struct gsm_subscriber_connection); + if (!conn) + return NULL; + + conn->network = network; + llist_add_tail(&conn->entry, &network->subscr_conns); + return conn; +} + +void msc_subscr_con_free(struct gsm_subscriber_connection *conn) +{ + if (!conn) + return; + + if (conn->subscr) { + subscr_put(conn->subscr); + conn->subscr = NULL; + } + + llist_del(&conn->entry); + talloc_free(conn); +} + /* Main entry point for GSM 04.08/44.008 Layer 3 data (e.g. from the BSC). */ int gsm0408_dispatch(struct gsm_subscriber_connection *conn, struct msgb *msg) { diff --git a/openbsc/src/libmsc/osmo_msc.c b/openbsc/src/libmsc/osmo_msc.c index 604c100..12a5117 100644 --- a/openbsc/src/libmsc/osmo_msc.c +++ b/openbsc/src/libmsc/osmo_msc.c @@ -173,5 +173,5 @@ conn->in_release = 1; gsm0808_clear(conn); - subscr_con_free(conn); + msc_subscr_con_free(conn); } diff --git a/openbsc/src/osmo-bsc/osmo_bsc_api.c b/openbsc/src/osmo-bsc/osmo_bsc_api.c index e759805..4742e8d 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_api.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_api.c @@ -330,7 +330,7 @@ _conn->sccp_con = NULL; if (complete_layer3(_conn, msg, msc) != BSC_API_CONN_POL_ACCEPT) { gsm0808_clear(_conn); - subscr_con_free(_conn); + bsc_subscr_con_free(_conn); return 1; } diff --git a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c index a60940d..f38c97f 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c @@ -185,7 +185,7 @@ if (conn->conn) { LOGP(DMSC, LOGL_INFO, "Releasing all transactions on %p\n", conn); gsm0808_clear(conn->conn); - subscr_con_free(conn->conn); + bsc_subscr_con_free(conn->conn); conn->conn = NULL; } diff --git a/openbsc/src/osmo-bsc/osmo_bsc_sccp.c b/openbsc/src/osmo-bsc/osmo_bsc_sccp.c index fa060da..4bde1e9 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_sccp.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_sccp.c @@ -84,7 +84,7 @@ LOGP(DMSC, LOGL_ERROR, "ERROR: The lchan is still associated.\n"); gsm0808_clear(con_data->conn); - subscr_con_free(con_data->conn); + bsc_subscr_con_free(con_data->conn); con_data->conn = NULL; } @@ -107,7 +107,7 @@ { if (data->conn) { gsm0808_clear(data->conn); - subscr_con_free(data->conn); + bsc_subscr_con_free(data->conn); data->conn = NULL; } -- To view, visit https://gerrit.osmocom.org/1139 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3cf7c7cafdf4672ec7b26058bba8a77159855257 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 21 00:01:12 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 21 Oct 2016 00:01:12 +0000 Subject: [PATCH] openbsc[master]: split bsc_bootstrap_network() in alloc and config Message-ID: Review at https://gerrit.osmocom.org/1140 split bsc_bootstrap_network() in alloc and config Change-Id: I480a09a31a79766ad07b627dd5238b7e37f3be7a --- M openbsc/include/openbsc/bss.h M openbsc/src/libbsc/bsc_init.c M openbsc/src/osmo-bsc/osmo_bsc_main.c M openbsc/src/osmo-nitb/bsc_hack.c 4 files changed, 33 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/40/1140/1 diff --git a/openbsc/include/openbsc/bss.h b/openbsc/include/openbsc/bss.h index d73776f..9f16bf7 100644 --- a/openbsc/include/openbsc/bss.h +++ b/openbsc/include/openbsc/bss.h @@ -6,7 +6,8 @@ struct msgb; /* start and stop network */ -extern int bsc_bootstrap_network(mncc_recv_cb_t mncc_recv, const char *cfg_file); +extern int bsc_network_alloc(mncc_recv_cb_t mncc_recv); +extern int bsc_network_configure(const char *cfg_file); extern int bsc_shutdown_net(struct gsm_network *net); /* register all supported BTS */ diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c index 214926b..e6f5814 100644 --- a/openbsc/src/libbsc/bsc_init.c +++ b/openbsc/src/libbsc/bsc_init.c @@ -476,12 +476,8 @@ return 0; } -int bsc_bootstrap_network(mncc_recv_cb_t mncc_recv, const char *config_file) +int bsc_network_alloc(mncc_recv_cb_t mncc_recv) { - struct gsm_bts *bts; - int rc; - - /* initialize our data structures */ bsc_gsmnet = bsc_network_init(tall_bsc_ctx, 1, 1, mncc_recv); if (!bsc_gsmnet) return -ENOMEM; @@ -489,6 +485,14 @@ bsc_gsmnet->name_long = talloc_strdup(bsc_gsmnet, "OpenBSC"); bsc_gsmnet->name_short = talloc_strdup(bsc_gsmnet, "OpenBSC"); + return 0; +} + +int bsc_network_configure(const char *config_file) +{ + struct gsm_bts *bts; + int rc; + rc = vty_read_config_file(config_file, NULL); if (rc < 0) { LOGP(DNM, LOGL_FATAL, "Failed to parse the config file: '%s'\n", config_file); diff --git a/openbsc/src/osmo-bsc/osmo_bsc_main.c b/openbsc/src/osmo-bsc/osmo_bsc_main.c index daab55b..b6b1ae1 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_main.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_main.c @@ -220,8 +220,12 @@ /* initialize SCCP */ sccp_set_log_area(DSCCP); - - rc = bsc_bootstrap_network(NULL, config_file); + rc = bsc_network_alloc(NULL); + if (rc) { + fprintf(stderr, "Allocation failed. exiting.\n"); + exit(1); + } + rc = bsc_network_configure(config_file); if (rc < 0) { fprintf(stderr, "Bootstrapping the network failed. exiting.\n"); exit(1); diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c index 28dbb6f..4e15b2d 100644 --- a/openbsc/src/osmo-nitb/bsc_hack.c +++ b/openbsc/src/osmo-nitb/bsc_hack.c @@ -284,15 +284,26 @@ /* internal MNCC handler or MNCC socket? */ if (mncc_sock_path) { - rc = bsc_bootstrap_network(mncc_sock_from_cc, config_file); - if (rc >= 0) - mncc_sock_init(bsc_gsmnet, mncc_sock_path); + rc = bsc_network_alloc(mncc_sock_from_cc); + if (rc) { + fprintf(stderr, "Allocation failed. Exiting.\n"); + exit(1); + } + mncc_sock_init(bsc_gsmnet, mncc_sock_path); } else { DEBUGP(DMNCC, "Using internal MNCC handler.\n"); - rc = bsc_bootstrap_network(int_mncc_recv, config_file); + rc = bsc_network_alloc(int_mncc_recv); + if (rc) { + fprintf(stderr, "Allocation failed. Exiting.\n"); + exit(1); + } } - if (rc < 0) + rc = bsc_network_configure(config_file); + if (rc < 0) { + fprintf(stderr, "Reading config failed. Exiting.\n"); exit(1); + } + #ifdef BUILD_SMPP smpp_openbsc_start(bsc_gsmnet); #endif -- To view, visit https://gerrit.osmocom.org/1140 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I480a09a31a79766ad07b627dd5238b7e37f3be7a Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 21 00:01:12 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 21 Oct 2016 00:01:12 +0000 Subject: [PATCH] openbsc[master]: osmo-nitb: exit when MNCC socket init failed Message-ID: Review at https://gerrit.osmocom.org/1141 osmo-nitb: exit when MNCC socket init failed Change-Id: Icef97bb5da9840b810fe6f4b4da6abd4baa66915 --- M openbsc/src/osmo-nitb/bsc_hack.c 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/41/1141/1 diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c index 4e15b2d..df17eb6 100644 --- a/openbsc/src/osmo-nitb/bsc_hack.c +++ b/openbsc/src/osmo-nitb/bsc_hack.c @@ -289,7 +289,11 @@ fprintf(stderr, "Allocation failed. Exiting.\n"); exit(1); } - mncc_sock_init(bsc_gsmnet, mncc_sock_path); + rc = mncc_sock_init(bsc_gsmnet, mncc_sock_path); + if (rc) { + fprintf(stderr, "MNCC socket initialization failed. exiting.\n"); + exit(1); + } } else { DEBUGP(DMNCC, "Using internal MNCC handler.\n"); rc = bsc_network_alloc(int_mncc_recv); -- To view, visit https://gerrit.osmocom.org/1141 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icef97bb5da9840b810fe6f4b4da6abd4baa66915 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 21 00:01:12 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 21 Oct 2016 00:01:12 +0000 Subject: [PATCH] openbsc[master]: gsm_subscriber_connection: mark BSC specific items Message-ID: Review at https://gerrit.osmocom.org/1142 gsm_subscriber_connection: mark BSC specific items The struct shall be split in two later. Change-Id: Ib9666225fb9bfec2cf1e364343560571869fe6a7 --- M openbsc/include/openbsc/gsm_data.h 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/42/1142/1 diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 6385092..38a8055 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -132,19 +132,19 @@ int mncc_rtp_connect_pending; /* bsc structures */ - struct osmo_bsc_sccp_con *sccp_con; + struct osmo_bsc_sccp_con *sccp_con; /* BSC */ /* back pointers */ struct gsm_network *network; int in_release; - struct gsm_lchan *lchan; - struct gsm_lchan *ho_lchan; - struct gsm_bts *bts; + struct gsm_lchan *lchan; /* BSC */ + struct gsm_lchan *ho_lchan; /* BSC */ + struct gsm_bts *bts; /* BSC */ /* for assignment handling */ - struct osmo_timer_list T10; - struct gsm_lchan *secondary_lchan; + struct osmo_timer_list T10; /* BSC */ + struct gsm_lchan *secondary_lchan; /* BSC */ }; -- To view, visit https://gerrit.osmocom.org/1142 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib9666225fb9bfec2cf1e364343560571869fe6a7 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 21 00:04:16 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 21 Oct 2016 00:04:16 +0000 Subject: openbsc[master]: Move timezone settings up to network level In-Reply-To: References: Message-ID: Patch Set 1: This actually removes a feature from OsmoNITB: the ability to have different time zones per BTS. Is this fine now, or do we want to postpone this? -- To view, visit https://gerrit.osmocom.org/1137 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I69848887d92990f3d6f969be80f6ef91f6bdbbe8 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Oct 21 00:11:34 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 21 Oct 2016 00:11:34 +0000 Subject: [PATCH] openbsc[master]: move to libxsc: factor out gen of USSD notify and release co... In-Reply-To: References: Message-ID: move to libxsc: factor out gen of USSD notify and release complete Both libmsc and libbsc will need distinct gsm0480_send_ussdNotify() and gsm0480_send_releaseComplete() functions, since there will be distinct subscriber connection structs. The current functions live in libmsc, so add the same in libbsc in new file gsm_04_80_utils.c. To avoid too much code dup, move the message generation part of gsm0480_send_ussdNotify() and gsm0480_send_releaseComplete() to new functions gsm0480_gen_ussdNotify() and gsm0480_gen_releaseComplete(), placed in libxsc. Change-Id: I33a84e3c28576ced91d2ea24103123431f551173 --- M openbsc/include/openbsc/gsm_04_80.h M openbsc/src/libbsc/Makefile.am A openbsc/src/libbsc/gsm_04_80_utils.c M openbsc/src/libmsc/gsm_04_80.c M openbsc/src/libmsc/vty_interface_layer3.c M openbsc/src/libxsc/xsc.c M openbsc/src/osmo-bsc/osmo_bsc_api.c M openbsc/src/osmo-bsc/osmo_bsc_ctrl.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_sccp.c 11 files changed, 105 insertions(+), 39 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/29/1129/2 diff --git a/openbsc/include/openbsc/gsm_04_80.h b/openbsc/include/openbsc/gsm_04_80.h index 0a60652..7f46895 100644 --- a/openbsc/include/openbsc/gsm_04_80.h +++ b/openbsc/include/openbsc/gsm_04_80.h @@ -14,7 +14,15 @@ const struct msgb *msg, const struct ussd_request *request); -int gsm0480_send_ussdNotify(struct gsm_subscriber_connection *conn, int level, const char *text); -int gsm0480_send_releaseComplete(struct gsm_subscriber_connection *conn); +struct msgb *gsm0480_gen_ussdNotify(int level, const char *text); +struct msgb *gsm0480_gen_releaseComplete(void); + +int msc_gsm0480_send_ussdNotify(struct gsm_subscriber_connection *conn, + int level, const char *text); +int msc_gsm0480_send_releaseComplete(struct gsm_subscriber_connection *conn); + +int bsc_gsm0480_send_ussdNotify(struct gsm_subscriber_connection *conn, + int level, const char *text); +int bsc_gsm0480_send_releaseComplete(struct gsm_subscriber_connection *conn); #endif diff --git a/openbsc/src/libbsc/Makefile.am b/openbsc/src/libbsc/Makefile.am index 4728e23..28f556a 100644 --- a/openbsc/src/libbsc/Makefile.am +++ b/openbsc/src/libbsc/Makefile.am @@ -41,6 +41,7 @@ bsc_api.c \ bsc_msc.c bsc_vty.c \ gsm_04_08_utils.c \ + gsm_04_80_utils.c \ bsc_init.c \ bts_init.c \ bsc_rf_ctrl.c \ @@ -50,4 +51,3 @@ net_init.c \ bsc_dyn_ts.c \ $(NULL) - diff --git a/openbsc/src/libbsc/gsm_04_80_utils.c b/openbsc/src/libbsc/gsm_04_80_utils.c new file mode 100644 index 0000000..c96259d --- /dev/null +++ b/openbsc/src/libbsc/gsm_04_80_utils.c @@ -0,0 +1,40 @@ +/* OpenBSC utility functions for 3GPP TS 04.80 */ + +/* (C) 2016 by sysmocom s.m.f.c. GmbH + * + * 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 + +int bsc_gsm0480_send_ussdNotify(struct gsm_subscriber_connection *conn, int + level, const char *text) +{ + struct msgb *msg = gsm0480_gen_ussdNotify(level, text); + if (!msg) + return -1; + return gsm0808_submit_dtap(conn, msg, 0, 0); +} + +int bsc_gsm0480_send_releaseComplete(struct gsm_subscriber_connection *conn) +{ + struct msgb *msg = gsm0480_gen_releaseComplete(); + if (!msg) + return -1; + return gsm0808_submit_dtap(conn, msg, 0, 0); +} diff --git a/openbsc/src/libmsc/gsm_04_80.c b/openbsc/src/libmsc/gsm_04_80.c index f1d75f2..b8d950f 100644 --- a/openbsc/src/libmsc/gsm_04_80.c +++ b/openbsc/src/libmsc/gsm_04_80.c @@ -138,38 +138,18 @@ return gsm0808_submit_dtap(conn, msg, 0, 0); } -int gsm0480_send_ussdNotify(struct gsm_subscriber_connection *conn, int level, const char *text) +int msc_gsm0480_send_ussdNotify(struct gsm_subscriber_connection *conn, int level, const char *text) { - struct gsm48_hdr *gh; - struct msgb *msg; - - msg = gsm0480_create_unstructuredSS_Notify(level, text); + struct msgb *msg = gsm0480_gen_ussdNotify(level, text); if (!msg) return -1; - - gsm0480_wrap_invoke(msg, GSM0480_OP_CODE_USS_NOTIFY, 0); - gsm0480_wrap_facility(msg); - - /* And finally pre-pend the L3 header */ - gh = (struct gsm48_hdr *) msgb_push(msg, sizeof(*gh)); - gh->proto_discr = GSM48_PDISC_NC_SS; - gh->msg_type = GSM0480_MTYPE_REGISTER; - return gsm0808_submit_dtap(conn, msg, 0, 0); } -int gsm0480_send_releaseComplete(struct gsm_subscriber_connection *conn) +int msc_gsm0480_send_releaseComplete(struct gsm_subscriber_connection *conn) { - struct gsm48_hdr *gh; - struct msgb *msg; - - msg = gsm48_msgb_alloc_name("GSM 04.08 USSD REL COMPL"); + struct msgb *msg = gsm0480_gen_releaseComplete(); if (!msg) return -1; - - gh = (struct gsm48_hdr *) msgb_push(msg, sizeof(*gh)); - gh->proto_discr = GSM48_PDISC_NC_SS; - gh->msg_type = GSM0480_MTYPE_RELEASE_COMPLETE; - return gsm0808_submit_dtap(conn, msg, 0, 0); } diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index 6f0006c..956302e 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -473,8 +473,8 @@ return CMD_WARNING; } - gsm0480_send_ussdNotify(conn, level, text); - gsm0480_send_releaseComplete(conn); + msc_gsm0480_send_ussdNotify(conn, level, text); + msc_gsm0480_send_releaseComplete(conn); subscr_put(subscr); talloc_free(text); diff --git a/openbsc/src/libxsc/xsc.c b/openbsc/src/libxsc/xsc.c index 138be11..04bc53e 100644 --- a/openbsc/src/libxsc/xsc.c +++ b/openbsc/src/libxsc/xsc.c @@ -113,3 +113,39 @@ gh->data[0] = cause; return msg; } + +struct msgb *gsm0480_gen_ussdNotify(int level, const char *text) +{ + struct gsm48_hdr *gh; + struct msgb *msg; + + msg = gsm0480_create_unstructuredSS_Notify(level, text); + if (!msg) + return NULL; + + gsm0480_wrap_invoke(msg, GSM0480_OP_CODE_USS_NOTIFY, 0); + gsm0480_wrap_facility(msg); + + /* And finally pre-pend the L3 header */ + gh = (struct gsm48_hdr *) msgb_push(msg, sizeof(*gh)); + gh->proto_discr = GSM48_PDISC_NC_SS; + gh->msg_type = GSM0480_MTYPE_REGISTER; + + return msg; +} + +struct msgb *gsm0480_gen_releaseComplete(void) +{ + struct gsm48_hdr *gh; + struct msgb *msg; + + msg = gsm48_msgb_alloc_name("GSM 04.08 USSD REL COMPL"); + if (!msg) + return NULL; + + gh = (struct gsm48_hdr *) msgb_push(msg, sizeof(*gh)); + gh->proto_discr = GSM48_PDISC_NC_SS; + gh->msg_type = GSM0480_MTYPE_RELEASE_COMPLETE; + + return msg; +} diff --git a/openbsc/src/osmo-bsc/osmo_bsc_api.c b/openbsc/src/osmo-bsc/osmo_bsc_api.c index d31e6c1..e759805 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_api.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_api.c @@ -205,8 +205,8 @@ gsm48_tx_mm_serv_ack(conn); LOGP(DMSC, LOGL_INFO, "Sending USSD message: '%s'\n", text); - gsm0480_send_ussdNotify(conn, 1, text); - gsm0480_send_releaseComplete(conn); + bsc_gsm0480_send_ussdNotify(conn, 1, text); + bsc_gsm0480_send_releaseComplete(conn); } /* diff --git a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c index 3010b55..84b7b92 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c @@ -598,8 +598,8 @@ * the release complete when we get a returnResultLast * for this invoke id. */ - gsm0480_send_releaseComplete(conn); - gsm0480_send_ussdNotify(conn, alert, text_str); + bsc_gsm0480_send_releaseComplete(conn); + bsc_gsm0480_send_ussdNotify(conn, alert, text_str); cmd->reply = "Found a connection"; break; } diff --git a/openbsc/src/osmo-bsc/osmo_bsc_filter.c b/openbsc/src/osmo-bsc/osmo_bsc_filter.c index 14e0b71..8fc899e 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_filter.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_filter.c @@ -246,8 +246,9 @@ int bsc_send_welcome_ussd(struct gsm_subscriber_connection *conn) { - gsm0480_send_ussdNotify(conn, 1, conn->sccp_con->msc->ussd_welcome_txt); - gsm0480_send_releaseComplete(conn); + bsc_gsm0480_send_ussdNotify(conn, 1, + conn->sccp_con->msc->ussd_welcome_txt); + bsc_gsm0480_send_releaseComplete(conn); return 0; } diff --git a/openbsc/src/osmo-bsc/osmo_bsc_grace.c b/openbsc/src/osmo-bsc/osmo_bsc_grace.c index e6194ab..c1d7c6a 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_grace.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_grace.c @@ -112,8 +112,8 @@ if (lchan->state != LCHAN_S_ACTIVE) return -1; - gsm0480_send_ussdNotify(conn, 0, text); - gsm0480_send_releaseComplete(conn); + bsc_gsm0480_send_ussdNotify(conn, 0, text); + bsc_gsm0480_send_releaseComplete(conn); return 0; } diff --git a/openbsc/src/osmo-bsc/osmo_bsc_sccp.c b/openbsc/src/osmo-bsc/osmo_bsc_sccp.c index 86b27be..fa060da 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_sccp.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_sccp.c @@ -285,8 +285,9 @@ return; /* send USSD notification */ - gsm0480_send_ussdNotify(conn, 1, conn->sccp_con->msc->ussd_msc_lost_txt); - gsm0480_send_releaseComplete(conn); + bsc_gsm0480_send_ussdNotify(conn, 1, + conn->sccp_con->msc->ussd_msc_lost_txt); + bsc_gsm0480_send_releaseComplete(conn); } static void bsc_notify_and_close_conns(struct bsc_msc_connection *msc_con) -- To view, visit https://gerrit.osmocom.org/1129 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I33a84e3c28576ced91d2ea24103123431f551173 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 21 00:16:35 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 21 Oct 2016 00:16:35 +0000 Subject: [PATCH] openbsc[master]: move to libxsc: net init 3: actual move In-Reply-To: References: Message-ID: move to libxsc: net init 3: actual move Reincarnate gsm_network_init() as the parts not specific to libbsc. Move from bsc_network_init() those bits that are not BSC specific (and useful for upcoming osmo-cscn). Add libxsc to all linkages that use gsm_network_init(). Note: the only requirement to allow linking gsm_network_init() without libbsc is to keep the call to gsm_net_update_ctype() out of libxsc. The other items are kept out of libxsc because it makes sense semantically. But the separation is not strong in that the BSC specific data members are of course still omnipresent in struct gsm_network. If bsc_network_init() is not called, these are not initialized properly -- for now no users of uninitialized members exist. So this is just a first step towards a sensible split of the BSC and MSC gsm_network structs. The long term aim should be to have entirely separate structs with some common general items. Change-Id: If06316b97002390dc9a434686750cb96193ea63b --- M openbsc/include/openbsc/xsc.h M openbsc/src/ipaccess/Makefile.am M openbsc/src/libbsc/net_init.c M openbsc/src/libxsc/xsc.c M openbsc/src/osmo-bsc/Makefile.am M openbsc/src/osmo-bsc_nat/Makefile.am M openbsc/src/osmo-nitb/Makefile.am M openbsc/src/utils/Makefile.am M openbsc/tests/bsc-nat/Makefile.am M openbsc/tests/bsc/Makefile.am M openbsc/tests/channel/Makefile.am M openbsc/tests/db/Makefile.am M openbsc/tests/gsm0408/Makefile.am M openbsc/tests/subscr/Makefile.am M openbsc/tests/trau/Makefile.am 15 files changed, 84 insertions(+), 35 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/27/1127/2 diff --git a/openbsc/include/openbsc/xsc.h b/openbsc/include/openbsc/xsc.h index 612d754..8549a83 100644 --- a/openbsc/include/openbsc/xsc.h +++ b/openbsc/include/openbsc/xsc.h @@ -1,6 +1,13 @@ #pragma once +#include + struct msgb; struct gsm_network; typedef int (*mncc_recv_cb_t)(struct gsm_network *, struct msgb *); + +struct gsm_network *gsm_network_init(void *ctx, + uint16_t country_code, + uint16_t network_code, + mncc_recv_cb_t mncc_recv); diff --git a/openbsc/src/ipaccess/Makefile.am b/openbsc/src/ipaccess/Makefile.am index 784a578..16f3337 100644 --- a/openbsc/src/ipaccess/Makefile.am +++ b/openbsc/src/ipaccess/Makefile.am @@ -48,6 +48,7 @@ # FIXME: resolve the bogus dependencies patched around here: ipaccess_config_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ + $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBCRYPT) \ diff --git a/openbsc/src/libbsc/net_init.c b/openbsc/src/libbsc/net_init.c index 07a4423..b3780d0 100644 --- a/openbsc/src/libbsc/net_init.c +++ b/openbsc/src/libbsc/net_init.c @@ -17,12 +17,9 @@ * */ +#include #include -#include #include -#include - -#include struct gsm_network *bsc_network_init(void *ctx, uint16_t country_code, @@ -30,11 +27,8 @@ mncc_recv_cb_t mncc_recv) { struct gsm_network *net; - const char *default_regexp = ".*"; - net = talloc_zero(ctx, struct gsm_network); - if (!net) - return NULL; + net = gsm_network_init(ctx, country_code, network_code, mncc_recv); net->bsc_data = talloc_zero(net, struct osmo_bsc_data); if (!net->bsc_data) { @@ -42,27 +36,11 @@ return NULL; } - net->subscr_group = talloc_zero(net, struct gsm_subscriber_group); - if (!net->subscr_group) { - talloc_free(net); - return NULL; - } - - if (gsm_parse_reg(net, &net->authorized_regexp, &net->authorized_reg_str, 1, - &default_regexp) != 0) - return NULL; - /* Init back pointer */ net->bsc_data->auto_off_timeout = -1; net->bsc_data->network = net; INIT_LLIST_HEAD(&net->bsc_data->mscs); - net->subscr_group->net = net; - net->auto_create_subscr = true; - net->auto_assign_exten = true; - - net->country_code = country_code; - net->network_code = network_code; net->num_bts = 0; net->reject_cause = GSM48_REJECT_ROAMING_NOT_ALLOWED; net->T3101 = GSM_T3101_DEFAULT; @@ -79,22 +57,12 @@ net->handover.pwr_hysteresis = 3; net->handover.max_distance = 9999; - INIT_LLIST_HEAD(&net->trans_list); - INIT_LLIST_HEAD(&net->upqueue); INIT_LLIST_HEAD(&net->bts_list); - INIT_LLIST_HEAD(&net->subscr_conns); /* init statistics */ net->bsc_ctrs = rate_ctr_group_alloc(net, &bsc_ctrg_desc, 0); - net->msc_ctrs = rate_ctr_group_alloc(net, &msc_ctrg_desc, 0); - net->active_calls = osmo_counter_alloc("msc.active_calls"); - net->mncc_recv = mncc_recv; - net->ext_min = GSM_MIN_EXTEN; - net->ext_max = GSM_MAX_EXTEN; gsm_net_update_ctype(net); - - net->dyn_ts_allow_tch_f = true; return net; } diff --git a/openbsc/src/libxsc/xsc.c b/openbsc/src/libxsc/xsc.c index 141179b..acb40ec 100644 --- a/openbsc/src/libxsc/xsc.c +++ b/openbsc/src/libxsc/xsc.c @@ -1,6 +1,8 @@ /* Code used by both libbsc and libmsc (xsc means "BSC or MSC"). * * (C) 2016 by sysmocom s.m.f.c. + * (C) 2008-2010 by Harald Welte + * (C) 2014 by Holger Hans Peter Freyther * All Rights Reserved * * This program is free software; you can redistribute it and/or modify @@ -17,3 +19,64 @@ * along with this program. If not, see . * */ + +#include + +#include + +#include +#include +#include + +/* Warning: if bsc_network_init() is not called, some of the members of + * gsm_network are not initialized properly and must not be used! (In + * particular the llist heads and stats counters.) + * The long term aim should be to have entirely separate structs for libbsc and + * libmsc with some common general items. + */ +struct gsm_network *gsm_network_init(void *ctx, + uint16_t country_code, + uint16_t network_code, + mncc_recv_cb_t mncc_recv) +{ + struct gsm_network *net; + + const char *default_regexp = ".*"; + + net = talloc_zero(ctx, struct gsm_network); + if (!net) + return NULL; + + net->subscr_group = talloc_zero(net, struct gsm_subscriber_group); + if (!net->subscr_group) { + talloc_free(net); + return NULL; + } + + if (gsm_parse_reg(net, &net->authorized_regexp, &net->authorized_reg_str, 1, + &default_regexp) != 0) + return NULL; + + net->subscr_group->net = net; + net->auto_create_subscr = true; + net->auto_assign_exten = true; + + net->country_code = country_code; + net->network_code = network_code; + + INIT_LLIST_HEAD(&net->trans_list); + INIT_LLIST_HEAD(&net->upqueue); + INIT_LLIST_HEAD(&net->subscr_conns); + + /* init statistics */ + net->msc_ctrs = rate_ctr_group_alloc(net, &msc_ctrg_desc, 0); + net->active_calls = osmo_counter_alloc("msc.active_calls"); + + net->mncc_recv = mncc_recv; + net->ext_min = GSM_MIN_EXTEN; + net->ext_max = GSM_MAX_EXTEN; + + net->dyn_ts_allow_tch_f = true; + + return net; +} diff --git a/openbsc/src/osmo-bsc/Makefile.am b/openbsc/src/osmo-bsc/Makefile.am index 2dbfeb8..7d38999 100644 --- a/openbsc/src/osmo-bsc/Makefile.am +++ b/openbsc/src/osmo-bsc/Makefile.am @@ -41,6 +41,7 @@ osmo_bsc_LDADD = \ $(top_builddir)/src/libfilter/libfilter.a \ $(top_builddir)/src/libbsc/libbsc.a \ + $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libmsc/libmsc.a \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ diff --git a/openbsc/src/osmo-bsc_nat/Makefile.am b/openbsc/src/osmo-bsc_nat/Makefile.am index 6027f27..667cd86 100644 --- a/openbsc/src/osmo-bsc_nat/Makefile.am +++ b/openbsc/src/osmo-bsc_nat/Makefile.am @@ -42,6 +42,7 @@ osmo_bsc_nat_LDADD = \ $(top_builddir)/src/libmgcp/libmgcp.a \ $(top_builddir)/src/libbsc/libbsc.a \ + $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(top_builddir)/src/libfilter/libfilter.a \ diff --git a/openbsc/src/osmo-nitb/Makefile.am b/openbsc/src/osmo-nitb/Makefile.am index 60514c0..5063423 100644 --- a/openbsc/src/osmo-nitb/Makefile.am +++ b/openbsc/src/osmo-nitb/Makefile.am @@ -29,6 +29,7 @@ osmo_nitb_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ + $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libmsc/libmsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ diff --git a/openbsc/src/utils/Makefile.am b/openbsc/src/utils/Makefile.am index 7fcc4e3..0228202 100644 --- a/openbsc/src/utils/Makefile.am +++ b/openbsc/src/utils/Makefile.am @@ -50,6 +50,7 @@ bs11_config_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ + $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ diff --git a/openbsc/tests/bsc-nat/Makefile.am b/openbsc/tests/bsc-nat/Makefile.am index fa55d27..2d00af9 100644 --- a/openbsc/tests/bsc-nat/Makefile.am +++ b/openbsc/tests/bsc-nat/Makefile.am @@ -44,6 +44,7 @@ bsc_nat_test_LDADD = \ $(top_builddir)/src/libfilter/libfilter.a \ $(top_builddir)/src/libbsc/libbsc.a \ + $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libmgcp/libmgcp.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ diff --git a/openbsc/tests/bsc/Makefile.am b/openbsc/tests/bsc/Makefile.am index ddfa437..fdc0b87 100644 --- a/openbsc/tests/bsc/Makefile.am +++ b/openbsc/tests/bsc/Makefile.am @@ -33,6 +33,7 @@ bsc_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libmsc/libmsc.a \ + $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libmgcp/libmgcp.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ diff --git a/openbsc/tests/channel/Makefile.am b/openbsc/tests/channel/Makefile.am index 5654572..50db62f 100644 --- a/openbsc/tests/channel/Makefile.am +++ b/openbsc/tests/channel/Makefile.am @@ -26,6 +26,7 @@ channel_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libmsc/libmsc.a \ + $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ diff --git a/openbsc/tests/db/Makefile.am b/openbsc/tests/db/Makefile.am index c4da31c..2f04d5b 100644 --- a/openbsc/tests/db/Makefile.am +++ b/openbsc/tests/db/Makefile.am @@ -35,6 +35,7 @@ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libmsc/libmsc.a \ $(top_builddir)/src/libbsc/libbsc.a \ + $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ @@ -45,4 +46,3 @@ $(LIBCRYPTO_LIBS) \ -ldbi \ $(NULL) - diff --git a/openbsc/tests/gsm0408/Makefile.am b/openbsc/tests/gsm0408/Makefile.am index 11fa6b9..57e6798 100644 --- a/openbsc/tests/gsm0408/Makefile.am +++ b/openbsc/tests/gsm0408/Makefile.am @@ -25,6 +25,7 @@ gsm0408_test_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libmsc/libmsc.a \ + $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ diff --git a/openbsc/tests/subscr/Makefile.am b/openbsc/tests/subscr/Makefile.am index fb863d8..367d516 100644 --- a/openbsc/tests/subscr/Makefile.am +++ b/openbsc/tests/subscr/Makefile.am @@ -33,6 +33,7 @@ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libmsc/libmsc.a \ $(top_builddir)/src/libbsc/libbsc.a \ + $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ diff --git a/openbsc/tests/trau/Makefile.am b/openbsc/tests/trau/Makefile.am index 93ce88e..c5fdf7a 100644 --- a/openbsc/tests/trau/Makefile.am +++ b/openbsc/tests/trau/Makefile.am @@ -33,6 +33,7 @@ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libmsc/libmsc.a \ $(top_builddir)/src/libbsc/libbsc.a \ + $(top_builddir)/src/libxsc/libxsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) \ -- To view, visit https://gerrit.osmocom.org/1127 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If06316b97002390dc9a434686750cb96193ea63b Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 21 14:03:34 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 21 Oct 2016 14:03:34 +0000 Subject: openbsc[master]: move to libxsc: global vty gsm_network pointer In-Reply-To: References: Message-ID: Patch Set 2: I need to fix the order of patches here. The 'split bsc_bootstrap_network() in alloc and config' needs to come before this in order to solve the chicken/egg problem of passing a valid gsm_network pointer to vty init, and using the vty during gsm_network bootstrap. -- To view, visit https://gerrit.osmocom.org/1133 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I26c5c47de08f899b896813d09612d5cb2f8e42d6 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 Oct 21 14:04:30 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 21 Oct 2016 14:04:30 +0000 Subject: [MERGED] libosmocore[master]: Revert "Constify ctrl_cmd struct fields where appropriate" In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: Revert "Constify ctrl_cmd struct fields where appropriate" ...................................................................... Revert "Constify ctrl_cmd struct fields where appropriate" This reverts commit ed9d6da5df98538adc70aa03cb569eb9505d04b6. The commit is good as such, but it causes many compiler warnings in the OpenBSC build. We want this to be re-applied as soon as we have patches ready that fix the fallout in openbsc.git. See also https://lists.osmocom.org/pipermail/openbsc/2016-October/009802.html Related: OS#1829 Change-Id: I722ad60232a6ef5b4cb984b92c42851de26b3ccd --- M TODO-RELEASE M include/osmocom/ctrl/control_cmd.h 2 files changed, 3 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/TODO-RELEASE b/TODO-RELEASE index b67d6dd..648b6a6 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -4,4 +4,3 @@ libosmocore change major size of ph_data_param struct changed / Extend L1SAP PH-DATA with presence information libosmocore change major size of ph_data_param struct changed / Extend L1SAP PH-DATA with measurement information libosmocore change major size of ph_tch_param struct changed / Extend with RTP Marker -libosmocore change minor mark as const id, variable & value fields of ctrl_cmd struct diff --git a/include/osmocom/ctrl/control_cmd.h b/include/osmocom/ctrl/control_cmd.h index cd96038..8f2eaa2 100644 --- a/include/osmocom/ctrl/control_cmd.h +++ b/include/osmocom/ctrl/control_cmd.h @@ -53,10 +53,10 @@ struct ctrl_cmd { struct ctrl_connection *ccon; enum ctrl_type type; - const char *id; + char *id; void *node; - const char *variable; - const char *value; + char *variable; + char *value; char *reply; }; -- To view, visit https://gerrit.osmocom.org/1121 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I722ad60232a6ef5b4cb984b92c42851de26b3ccd Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri Oct 21 14:35:09 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 21 Oct 2016 14:35:09 +0000 Subject: [PATCH] osmo-bts[master]: Add tools to check DTX operation Message-ID: Review at https://gerrit.osmocom.org/1143 Add tools to check DTX operation * dsp.sh can parse superfemto-compatible DSP log output to properly sort records into MT/MO and DL/UL parts * dtx_check.gawk can process output of dsp.sh and check for common scheduling errors Change-Id: Ib1c70c4543b24c2a05a7df8eec5ce3f4eda2c02e Related: OS#1801 --- A contrib/dsp.sh A contrib/dtx_check.gawk 2 files changed, 163 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/43/1143/1 diff --git a/contrib/dsp.sh b/contrib/dsp.sh new file mode 100755 index 0000000..8be20bf --- /dev/null +++ b/contrib/dsp.sh @@ -0,0 +1,99 @@ +#!/bin/sh + +# Split common DSP call log file into 4 separate call leg files (MO/MT & DL/UL) with events in format "FN EVENT_TYPE": +# MO Mobile Originated +# MT Mobile Terminated +# DL DownLink (BTS -> L1) +# UL UpLink (L1 -> BTS) + +if [ -z $1 ]; then + echo "expecting DSP log file name as parameter" + exit 1 +fi + +# MO handle appear 1st in the logs +MO=$(grep 'h=' $1 | head -n 1 | cut -f2 -d',' | cut -f2 -d= | cut -f1 -d']') + +# direction markers: +DLST="_CodeBurst" +ULST="_DecodeAndIdentify" + +# DL sed filters: +D_EMP='s/ Empty frame request/EMPTY/' +D_FAC='s/ Coding a FACCH frame!/FACCH/' +D_FST='s/ Coding a RTP SID First frame !!/FIRST/' +D_UPD='s/ Coding a RTP SID Update frame !!/UPDATE/' +D_SPE='s/ Coding a RTP Speech frame !!/SPEECH/' +D_ONS='s/ Coding a Onset frame !!/ONSET/' +D_FO1='s/ A speech frame is following a NoData or SID First without an Onset./FORCED_FIRST/' +D_FO2='s/ A speech frame is following a NoData without an Onset./FORCED_NODATA/' + +# UL sed filters: +U_NOD='s/ It is a No Data frame !!/NODATA/' +U_ONS='s/ It is an ONSET frame !!/ONSET/' +U_UPD='s/ It is a SID UPDATE frame !!/UPDATE/' +U_FST='s/ It is a SID FIRST frame !!/FIRST/' +U_SPE='s/ It is a SPEECH frame !!/SPEECH/' + +DL () { # filter downlink-related entries + cat $1 | grep $DLST > $1.DL.tmp +} + +UL () { # uplink does not require special fix + cat $1 | grep $ULST > $1.UL.tmp.fix +} + +DL $1 +UL $1 + +FIX() { # add MO/MT marker from preceding line to inserted ONSETs so filtering works as expected + cat $1.DL.tmp | awk 'BEGIN{ FS="h="; H="" } { if (NF > 1) { H = $2; print $1 "h=" $2 } else { print $1 ", h=" H } }' > $1.DL.tmp.fix +} + +FIX $1 + +MO() { # filter MO call DL or UL logs + grep "h=$MO" $1.tmp.fix > $1.MO.raw +} + +MT() { # filter MT call DL or UL logs + grep -v "h=$MO" $1.tmp.fix > $1.MT.raw +} + +MO $1.DL +MT $1.DL +MO $1.UL +MT $1.UL + +PREP() { # prepare logs for reformatting + cat $1.raw | cut -f2 -d')' | cut -f1 -d',' | cut -f2 -d'>' | sed 's/\[u32Fn/fn/' | sed 's/fn = /fn=/' | sed 's/fn=//' | sed 's/\[Fn=//' | sed 's/ An Onset will be inserted.//' > $1.tmp1 +} + +PREP "$1.DL.MT" +PREP "$1.DL.MO" +PREP "$1.UL.MT" +PREP "$1.UL.MO" + +RD() { # reformat DL logs for consistency checks + cat $1.tmp1 | sed "$D_FST" | sed "$D_SPE" | sed "$D_UPD" | sed "$D_ONS" | sed "$D_EMP" | sed "$D_FAC" | sed "$D_FO1" | sed "$D_FO2" > $1.tmp2 +} + +RU() { # reformat UL logs for consistency checks + cat $1.tmp1 | sed "$U_FST" | sed "$U_SPE" | sed "$U_UPD" | sed "$U_ONS" | sed "$U_NOD" > $1.tmp2 +} + +RD "$1.DL.MT" +RD "$1.DL.MO" +RU "$1.UL.MT" +RU "$1.UL.MO" + +SW() { # swap fields + cat $1.tmp2 | awk '{ print $2, $1 }' > $1 +} + +SW "$1.DL.MT" +SW "$1.DL.MO" +SW "$1.UL.MT" +SW "$1.UL.MO" + +rm $1.*.tmp* diff --git a/contrib/dtx_check.gawk b/contrib/dtx_check.gawk new file mode 100755 index 0000000..a8cb32c --- /dev/null +++ b/contrib/dtx_check.gawk @@ -0,0 +1,64 @@ +#!/usr/bin/gawk -f + +# Expected input format: FN TYPE + +BEGIN { + DELTA = 0 + ERR = 0 + FN = 0 + TYPE = "" + CHK = "" + U_MAX = 8 * 20 + 120 / 26 + U_MIN = 8 * 20 - 120 / 26 + F_MAX = 3 * 20 + 120 / 26 + F_MIN = 3 * 20 - 120 / 26 +} + +{ + if (NR > 1) { # we have data from previous record to compare to + DELTA = ($1 - FN) * 120 / 26 + CHK = "OK" + if ("UPDATE" == TYPE || "FIRST" == TYPE) { # check for missing ONSET: + if ("FACCH" == $2 || "SPEECH" == $2) { + CHK = "FAIL: missing ONSET" + ERR++ + } + } + if ("OK" == CHK) { # check inter-SID distances: + if ("UPDATE" == TYPE) { + if (DELTA > U_MAX) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too big " DELTA "ms > " U_MAX "ms" + ERR++ + } + if ("UPDATE" == $2) { + if (DELTA < U_MIN) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too small " DELTA "ms < " U_MIN "ms" + ERR++ + } + } + } + if ("FIRST" == TYPE) { + if (DELTA > F_MAX) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID FIRST (@" FN ") too big " DELTA "ms > " F_MAX "ms" + ERR++ + } + if ("UPDATE" == $2) { + if (DELTA < F_MIN) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too small " DELTA "ms < " F_MIN "ms" + ERR++ + } + } + } + } + # FIXME: FACCH-specific checks? + } + print $1, $2, CHK, TYPE, DELTA + if ($2 != "EMPTY") { # skip over EMPTY records + TYPE = $2 + FN = $1 + } +} + +END { + print "check completed: found " ERR " errors in " NR " records" +} -- To view, visit https://gerrit.osmocom.org/1143 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib1c70c4543b24c2a05a7df8eec5ce3f4eda2c02e Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Oct 21 14:35:09 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 21 Oct 2016 14:35:09 +0000 Subject: [PATCH] osmo-bts[master]: Fix DTX DL AMR SIDscheduling logic Message-ID: Review at https://gerrit.osmocom.org/1144 Fix DTX DL AMR SIDscheduling logic Previously SID UPDATE was sometimes scheduled incorrectly. Fix this by: * avoid rounding error when computing scheduling time difference from FN * properly saving and updating cached SID type and FN Change-Id: I7acffae4792e7bddc2ae19a2f04ee921dc194c36 Related: OS#1801 --- M src/common/msg_utils.c 1 file changed, 14 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/44/1144/1 diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index f00a71a..8769060 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -116,8 +116,11 @@ ARRAY_SIZE(lchan->tch.dtx.cache) - amr); lchan->tch.dtx.len = copy_len + amr; - lchan->tch.dtx.fn = fn; - lchan->tch.dtx.is_update = update; + /* SID FIRST is special because it's both sent and cached: */ + if (update == 0) { + lchan->tch.dtx.fn = fn; + lchan->tch.dtx.is_update = false; /* Mark SID FIRST explicitly */ + } memcpy(lchan->tch.dtx.cache + amr, l1_payload, copy_len); } @@ -128,6 +131,7 @@ * \param[in] rtp_pl_len length of rtp_pl * \param[in] fn Frame Number for which we check scheduling * \param[in] l1_payload buffer where CMR and CMI prefix should be added + * \param[in] marker RTP Marker bit * \param[out] len Length of expected L1 payload * \param[out] ft_out Frame Type to be populated after decoding * \returns 0 in case of success; negative on error @@ -219,18 +223,18 @@ static inline bool dtx_amr_sid_optional(const struct gsm_lchan *lchan, uint32_t fn) { - /* Compute approx. time delta based on Fn duration */ - uint32_t delta = GSM_FN_TO_MS(fn - lchan->tch.dtx.fn); + /* Compute approx. time delta x26 based on Fn duration */ + uint32_t dx26 = 120 * (fn - lchan->tch.dtx.fn); - /* according to 3GPP TS 26.093 A.5.1.1: */ - if (lchan->tch.dtx.is_update) { - /* SID UPDATE should be repeated every 8th RTP frame */ - if (delta < GSM_RTP_FRAME_DURATION_MS * 8) + /* according to 3GPP TS 26.093 A.5.1.1: + (*26) to avoid float math, add 1 FN tolerance (-120) */ + if (lchan->tch.dtx.is_update) { /* SID UPDATE: every 8th RTP frame */ + if (dx26 < GSM_RTP_FRAME_DURATION_MS * 8 * 26 - 120) return true; return false; } /* 3rd frame after SID FIRST should be SID UPDATE */ - if (delta < GSM_RTP_FRAME_DURATION_MS * 3) + if (dx26 < GSM_RTP_FRAME_DURATION_MS * 3 * 26 - 120) return true; return false; } @@ -288,6 +292,7 @@ if (lchan->tch.dtx.len) { memcpy(dst, lchan->tch.dtx.cache, lchan->tch.dtx.len); lchan->tch.dtx.fn = fn; + lchan->tch.dtx.is_update = true; /* SID UPDATE sent */ return lchan->tch.dtx.len + 1; } -- To view, visit https://gerrit.osmocom.org/1144 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7acffae4792e7bddc2ae19a2f04ee921dc194c36 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Oct 21 15:07:01 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 21 Oct 2016 15:07:01 +0000 Subject: [PATCH] osmo-bts[master]: Add tools to check DTX operation In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1143 to look at the new patch set (#2). Add tools to check DTX operation * dsp.sh can parse superfemto-compatible DSP log output to properly sort records into MT/MO and DL/UL parts * dtx_check.gawk can process output of dsp.sh and check for common scheduling errors Change-Id: Ib1c70c4543b24c2a05a7df8eec5ce3f4eda2c02e Related: OS#1801 --- A contrib/dsp.sh A contrib/dtx_check.gawk 2 files changed, 163 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/43/1143/2 diff --git a/contrib/dsp.sh b/contrib/dsp.sh new file mode 100755 index 0000000..39d5070 --- /dev/null +++ b/contrib/dsp.sh @@ -0,0 +1,99 @@ +#!/bin/sh + +# Split common DSP call log file into 4 separate call leg files (MO/MT & DL/UL) with events in format "FN EVENT_TYPE": +# MO Mobile Originated +# MT Mobile Terminated +# DL DownLink (BTS -> L1) +# UL UpLink (L1 -> BTS) + +if [ -z $1 ]; then + echo "expecting DSP log file name as parameter" + exit 1 +fi + +# MO handle appear 1st in the logs +MO=$(grep 'h=' $1 | head -n 1 | cut -f2 -d',' | cut -f2 -d= | cut -f1 -d']') + +# direction markers: +DLST="_CodeBurst" +ULST="_DecodeAndIdentify" + +# DL sed filters: +D_EMP='s/ Empty frame request/EMPTY/' +D_FAC='s/ Coding a FACCH frame!/FACCH/' +D_FST='s/ Coding a RTP SID First frame !!/FIRST/' +D_UPD='s/ Coding a RTP SID Update frame !!/UPDATE/' +D_SPE='s/ Coding a RTP Speech frame !!/SPEECH/' +D_ONS='s/ Coding a Onset frame !!/ONSET/' +D_FO1='s/ A speech frame is following a NoData or SID First without an Onset./FORCED_FIRST/' +D_FO2='s/ A speech frame is following a NoData without an Onset./FORCED_NODATA/' + +# UL sed filters: +U_NOD='s/ It is a No Data frame !!/NODATA/' +U_ONS='s/ It is an ONSET frame !!/ONSET/' +U_UPD='s/ It is a SID UPDATE frame !!/UPDATE/' +U_FST='s/ It is a SID FIRST frame !!/FIRST/' +U_SPE='s/ It is a SPEECH frame !!/SPEECH/' + +DL () { # filter downlink-related entries + grep $DLST $1 > $1.DL.tmp +} + +UL () { # uplink does not require special fix + grep $ULST $1 > $1.UL.tmp.fix +} + +DL $1 +UL $1 + +FIX() { # add MO/MT marker from preceding line to inserted ONSETs so filtering works as expected + cat $1.DL.tmp | awk 'BEGIN{ FS="h="; H="" } { if (NF > 1) { H = $2; print $1 "h=" $2 } else { print $1 ", h=" H } }' > $1.DL.tmp.fix +} + +FIX $1 + +MO() { # filter MO call DL or UL logs + grep "h=$MO" $1.tmp.fix > $1.MO.raw +} + +MT() { # filter MT call DL or UL logs + grep -v "h=$MO" $1.tmp.fix > $1.MT.raw +} + +MO $1.DL +MT $1.DL +MO $1.UL +MT $1.UL + +PREP() { # prepare logs for reformatting + cat $1.raw | cut -f2 -d')' | cut -f1 -d',' | cut -f2 -d'>' | sed 's/\[u32Fn/fn/' | sed 's/fn = /fn=/' | sed 's/fn=//' | sed 's/\[Fn=//' | sed 's/ An Onset will be inserted.//' > $1.tmp1 +} + +PREP "$1.DL.MT" +PREP "$1.DL.MO" +PREP "$1.UL.MT" +PREP "$1.UL.MO" + +RD() { # reformat DL logs for consistency checks + cat $1.tmp1 | sed "$D_FST" | sed "$D_SPE" | sed "$D_UPD" | sed "$D_ONS" | sed "$D_EMP" | sed "$D_FAC" | sed "$D_FO1" | sed "$D_FO2" > $1.tmp2 +} + +RU() { # reformat UL logs for consistency checks + cat $1.tmp1 | sed "$U_FST" | sed "$U_SPE" | sed "$U_UPD" | sed "$U_ONS" | sed "$U_NOD" > $1.tmp2 +} + +RD "$1.DL.MT" +RD "$1.DL.MO" +RU "$1.UL.MT" +RU "$1.UL.MO" + +SW() { # swap fields + cat $1.tmp2 | awk '{ print $2, $1 }' > $1 +} + +SW "$1.DL.MT" +SW "$1.DL.MO" +SW "$1.UL.MT" +SW "$1.UL.MO" + +rm $1.*.tmp* diff --git a/contrib/dtx_check.gawk b/contrib/dtx_check.gawk new file mode 100755 index 0000000..a8cb32c --- /dev/null +++ b/contrib/dtx_check.gawk @@ -0,0 +1,64 @@ +#!/usr/bin/gawk -f + +# Expected input format: FN TYPE + +BEGIN { + DELTA = 0 + ERR = 0 + FN = 0 + TYPE = "" + CHK = "" + U_MAX = 8 * 20 + 120 / 26 + U_MIN = 8 * 20 - 120 / 26 + F_MAX = 3 * 20 + 120 / 26 + F_MIN = 3 * 20 - 120 / 26 +} + +{ + if (NR > 1) { # we have data from previous record to compare to + DELTA = ($1 - FN) * 120 / 26 + CHK = "OK" + if ("UPDATE" == TYPE || "FIRST" == TYPE) { # check for missing ONSET: + if ("FACCH" == $2 || "SPEECH" == $2) { + CHK = "FAIL: missing ONSET" + ERR++ + } + } + if ("OK" == CHK) { # check inter-SID distances: + if ("UPDATE" == TYPE) { + if (DELTA > U_MAX) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too big " DELTA "ms > " U_MAX "ms" + ERR++ + } + if ("UPDATE" == $2) { + if (DELTA < U_MIN) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too small " DELTA "ms < " U_MIN "ms" + ERR++ + } + } + } + if ("FIRST" == TYPE) { + if (DELTA > F_MAX) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID FIRST (@" FN ") too big " DELTA "ms > " F_MAX "ms" + ERR++ + } + if ("UPDATE" == $2) { + if (DELTA < F_MIN) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too small " DELTA "ms < " F_MIN "ms" + ERR++ + } + } + } + } + # FIXME: FACCH-specific checks? + } + print $1, $2, CHK, TYPE, DELTA + if ($2 != "EMPTY") { # skip over EMPTY records + TYPE = $2 + FN = $1 + } +} + +END { + print "check completed: found " ERR " errors in " NR " records" +} -- To view, visit https://gerrit.osmocom.org/1143 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib1c70c4543b24c2a05a7df8eec5ce3f4eda2c02e 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 Fri Oct 21 16:43:50 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 21 Oct 2016 16:43:50 +0000 Subject: [PATCH] osmo-bts[master]: DTX DL: split ONSET state handling Message-ID: Review at https://gerrit.osmocom.org/1145 DTX DL: split ONSET state handling Handling ONSET cause by Voice and FACCH separately. In case of Voice we have RTP payload which we have to cache and send in next response to L1 while FACCH do not have any payload which have to be cached. Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Related: OS#1801 --- M src/osmo-bts-litecell15/tch.c 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/45/1145/1 diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index b251388..c23ef0d 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -284,9 +284,15 @@ /* DTX DL-specific logic below: */ switch (lchan->tch.dtx.dl_amr_fsm->state) { - case ST_ONSET_V: case ST_ONSET_F: *payload_type = GsmL1_TchPlType_Amr_Onset; + /* Next SID after FACCH ONSET is always FIRST */ + lchan->tch.dtx.is_update = false; + *len = 1; + /* There is nothing to cache for FACCH ONSET */ + return 0; + case ST_ONSET_V: + *payload_type = GsmL1_TchPlType_Amr_Onset; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); *len = 1; return 1; -- To view, visit https://gerrit.osmocom.org/1145 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Oct 21 17:41:15 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 21 Oct 2016 17:41:15 +0000 Subject: [PATCH] libosmo-abis[master]: Extend RTP RX callback parameters Message-ID: Review at https://gerrit.osmocom.org/1146 Extend RTP RX callback parameters While debugging low-level RTP issues it is handy to be able to match exact RTP packet with the payload available to higher-level functions. Having Sequence number and Timestamp RTP fields as parameter to receiving callback is the easiest way to do so. Change-Id: I0c9b08d247d7342d6139badca77ce64fda0cf274 --- M TODO-RELEASE M include/osmocom/trau/osmo_ortp.h M src/trau/osmo_ortp.c 3 files changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/46/1146/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index 3af993e..128778a 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -1,3 +1,4 @@ #library what description / commit summary line libosmo-abis API change major: add parameter to rx_cb() callack in osmo_ortp.h libosmo-abis API change major: add parameter to struct input_signal_data +libosmo-abis API change major: add parameters to rx_cb() callack in osmo_ortp.h diff --git a/include/osmocom/trau/osmo_ortp.h b/include/osmocom/trau/osmo_ortp.h index 1c0b223..9eb176f 100644 --- a/include/osmocom/trau/osmo_ortp.h +++ b/include/osmocom/trau/osmo_ortp.h @@ -55,7 +55,8 @@ /*! \brief callback for incoming data */ void (*rx_cb)(struct osmo_rtp_socket *rs, const uint8_t *payload, - unsigned int payload_len, bool marker); + unsigned int payload_len, uint16_t seq_number, + uint32_t timestamp, bool marker); /*! \brief Receive user timestamp, to be incremented by user */ uint32_t rx_user_ts; diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index e3c6234..c756a9a 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -161,6 +161,8 @@ if (rs->rx_cb) rs->rx_cb(rs, mblk->b_rptr, mblk->b_wptr - mblk->b_rptr, + rtp_get_seqnumber(mblk), + rtp_get_timestamp(mblk), rtp_get_markbit(mblk)); //rs->rx_user_ts += 160; freemsg(mblk); -- To view, visit https://gerrit.osmocom.org/1146 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0c9b08d247d7342d6139badca77ce64fda0cf274 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Oct 21 17:45:19 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 21 Oct 2016 17:45:19 +0000 Subject: [PATCH] libosmo-abis[master]: Extend RTP RX callback parameters In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1146 to look at the new patch set (#2). Extend RTP RX callback parameters While debugging low-level RTP issues it is handy to be able to match exact RTP packet with the payload available to higher-level functions. Having Sequence number and Timestamp RTP fields as parameter to receiving callback is the easiest way to do so. Change-Id: I0c9b08d247d7342d6139badca77ce64fda0cf274 --- M TODO-RELEASE M include/osmocom/trau/osmo_ortp.h M src/trau/osmo_ortp.c 3 files changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/46/1146/2 diff --git a/TODO-RELEASE b/TODO-RELEASE index 3af993e..128778a 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -1,3 +1,4 @@ #library what description / commit summary line libosmo-abis API change major: add parameter to rx_cb() callack in osmo_ortp.h libosmo-abis API change major: add parameter to struct input_signal_data +libosmo-abis API change major: add parameters to rx_cb() callack in osmo_ortp.h diff --git a/include/osmocom/trau/osmo_ortp.h b/include/osmocom/trau/osmo_ortp.h index 1c0b223..9eb176f 100644 --- a/include/osmocom/trau/osmo_ortp.h +++ b/include/osmocom/trau/osmo_ortp.h @@ -55,7 +55,8 @@ /*! \brief callback for incoming data */ void (*rx_cb)(struct osmo_rtp_socket *rs, const uint8_t *payload, - unsigned int payload_len, bool marker); + unsigned int payload_len, uint16_t seq_number, + uint32_t timestamp, bool marker); /*! \brief Receive user timestamp, to be incremented by user */ uint32_t rx_user_ts; diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index e3c6234..e990487 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -161,6 +161,8 @@ if (rs->rx_cb) rs->rx_cb(rs, mblk->b_rptr, mblk->b_wptr - mblk->b_rptr, + rtp_get_seqnumber(mblk), + rtp_get_timestamp(mblk), rtp_get_markbit(mblk)); //rs->rx_user_ts += 160; freemsg(mblk); @@ -192,6 +194,8 @@ if (rs->rx_cb) rs->rx_cb(rs, mblk->b_rptr, mblk->b_wptr - mblk->b_rptr, + rtp_get_seqnumber(mblk), + rtp_get_timestamp(mblk), rtp_get_markbit(mblk)); freemsg(mblk); } else -- To view, visit https://gerrit.osmocom.org/1146 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0c9b08d247d7342d6139badca77ce64fda0cf274 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Oct 21 17:54:43 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 21 Oct 2016 17:54:43 +0000 Subject: [PATCH] osmo-bts[master]: Extend RTP RX callback parameters Message-ID: Review at https://gerrit.osmocom.org/1147 Extend RTP RX callback parameters Adopt to change in libosmo-abis to accept additional parameters in RTP RX callback function. Change-Id: Icf41e568f041e87b38e6192af0be90c42362bfee --- M include/osmo-bts/l1sap.h M src/common/l1sap.c 2 files changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/47/1147/1 diff --git a/include/osmo-bts/l1sap.h b/include/osmo-bts/l1sap.h index 77bfbaa..97a2f04 100644 --- a/include/osmo-bts/l1sap.h +++ b/include/osmo-bts/l1sap.h @@ -63,7 +63,8 @@ /* call-back function for incoming RTP */ void l1sap_rtp_rx_cb(struct osmo_rtp_socket *rs, const uint8_t *rtp_pl, - unsigned int rtp_pl_len, bool marker); + unsigned int rtp_pl_len, uint16_t seq_number, + uint32_t timestamp, bool marker); /* channel control */ int l1sap_chan_act(struct gsm_bts_trx *trx, uint8_t chan_nr, struct tlv_parsed *tp); diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 59866a2..13d8a94 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1060,7 +1060,8 @@ /*! \brief call-back function for incoming RTP */ void l1sap_rtp_rx_cb(struct osmo_rtp_socket *rs, const uint8_t *rtp_pl, - unsigned int rtp_pl_len, bool marker) + unsigned int rtp_pl_len, uint16_t seq_number, + uint32_t timestamp, bool marker) { struct gsm_lchan *lchan = rs->priv; struct msgb *msg, *tmp; -- To view, visit https://gerrit.osmocom.org/1147 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icf41e568f041e87b38e6192af0be90c42362bfee Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Sun Oct 23 07:26:09 2016 From: gerrit-no-reply at lists.osmocom.org (tnt) Date: Sun, 23 Oct 2016 07:26:09 +0000 Subject: libosmocore[master]: utils/conv_gen.py: generate a single file In-Reply-To: References: Message-ID: Patch Set 9: Code-Review+1 Looks good. Ideally in the future I'd like this tool to support other codes than GSM and so I'd like to split the code definition file from the code generation, but for now this is a step in the right direction. -- To view, visit https://gerrit.osmocom.org/828 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib4e4ee5fdde38429e68e3b2fa50ec03a18f59daa 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 Sun Oct 23 07:34:06 2016 From: gerrit-no-reply at lists.osmocom.org (tnt) Date: Sun, 23 Oct 2016 07:34:06 +0000 Subject: libosmocore[master]: utils/conv_gen.py: improve output formatting In-Reply-To: References: Message-ID: Patch Set 8: Code-Review+1 Ideally in the future I'd like the number of digits ( '%2d' '%3d' ) to be automatically computed based on the table content. Maybe even compute the number of items per line automatically. I'm also not a big fan of mixing the "print >>fi" and the fi.write() approach but tbh I much prefer the .write approach that this patch uses and so we can in the future move everything to it. But this is definitely an improvement over the existing and since what I describe above would change anything for the current codes, I don't see any reason not to merge this. -- To view, visit https://gerrit.osmocom.org/829 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I95256c4ad402a3c088bdb6c5a5cda8b17c31881c Gerrit-PatchSet: 8 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Oct 23 07:36:30 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 23 Oct 2016 07:36:30 +0000 Subject: libosmocore[master]: utils/conv_gen.py: improve output formatting In-Reply-To: References: Message-ID: Patch Set 8: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/829 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I95256c4ad402a3c088bdb6c5a5cda8b17c31881c Gerrit-PatchSet: 8 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Oct 23 07:36:47 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 23 Oct 2016 07:36:47 +0000 Subject: libosmocore[master]: utils/conv_gen.py: improve output formatting In-Reply-To: References: Message-ID: Patch Set 8: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/829 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I95256c4ad402a3c088bdb6c5a5cda8b17c31881c Gerrit-PatchSet: 8 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Oct 23 07:37:59 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 23 Oct 2016 07:37:59 +0000 Subject: libosmocore[master]: utils/conv_gen.py: generate a single file In-Reply-To: References: Message-ID: Patch Set 9: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/828 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib4e4ee5fdde38429e68e3b2fa50ec03a18f59daa 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 Sun Oct 23 07:38:16 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 23 Oct 2016 07:38:16 +0000 Subject: [MERGED] libosmocore[master]: utils/conv_gen.py: generate a single file In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: utils/conv_gen.py: generate a single file ...................................................................... utils/conv_gen.py: generate a single file Instead of generating every convolutional code into a separate file (such as conv_xcch_gen.c, conv_cs3_gen.c), it is better to have a single file, containing all definitions, because as many convolutional codes we add, as many entries we will have to add into 'src/gsm/Makefile.am'. This approach increases readability of the Makefile.am, and also makes us able to share some data between some convolutional code definitions. For example: xCCH, RACH, SCH, TCH/F, both CS2 and CS3 may use the same *_state[][2] and *_output[][2] arrays within a single file. This optimization is currently WIP. Change-Id: Ib4e4ee5fdde38429e68e3b2fa50ec03a18f59daa --- M .gitignore M src/gsm/Makefile.am M utils/conv_gen.py 3 files changed, 310 insertions(+), 315 deletions(-) Approvals: tnt: Looks good to me, but someone else must approve 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 5165364..90c8c85 100644 --- a/.gitignore +++ b/.gitignore @@ -110,7 +110,7 @@ doc/*.tag src/crc*gen.c -src/gsm/conv*gen.c +src/gsm/gsm0503_conv.c include/osmocom/core/crc*gen.h include/osmocom/core/bit*gen.h diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index 2071413..3877f78 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -18,16 +18,11 @@ gprs_cipher_core.c gprs_rlc.c gsm0480.c abis_nm.c gsm0502.c \ gsm0411_utils.c gsm0411_smc.c gsm0411_smr.c \ lapd_core.c lapdm.c kasumi.c gsm_04_08_gprs.c \ - conv_cs2_gen.c conv_cs3_gen.c conv_xcch_gen.c \ - conv_tch_afs_12_2_gen.c conv_tch_afs_10_2_gen.c \ - conv_tch_afs_7_95_gen.c conv_tch_afs_7_4_gen.c \ - conv_tch_afs_6_7_gen.c conv_tch_afs_5_9_gen.c \ - conv_tch_afs_5_15_gen.c conv_tch_afs_4_75_gen.c \ auth_core.c auth_comp128v1.c auth_comp128v23.c \ auth_milenage.c milenage/aes-encblock.c gea.c \ 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 + gsup.c gprs_gea.c gsm0503_conv.c libgsmint_la_LDFLAGS = -no-undefined libgsmint_la_LIBADD = $(top_builddir)/src/libosmocore.la @@ -37,5 +32,8 @@ EXTRA_DIST = libosmogsm.map -conv%gen.c: $(top_srcdir)/utils/conv_gen.py +# Convolutional codes generation +gsm0503_conv.c: $(AM_V_GEN)python2 $(top_srcdir)/utils/conv_gen.py + +CLEANFILES = gsm0503_conv.c diff --git a/utils/conv_gen.py b/utils/conv_gen.py index a4f918f..38ea63b 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -222,325 +222,322 @@ ( G1, 1 ), ] -# xCCH definition -xCCH = ConvolutionalCode( - 224, - CCH_poly, - name = "xcch", - description = [ - "xCCH convolutional code:", - "228 bits blocks, rate 1/2, k = 5", - "G0 = 1 + D3 + D4", - "G1 = 1 + D + D3 + D4", - ] -) +conv_codes = [ + # xCCH definition + ConvolutionalCode( + 224, + CCH_poly, + name = "xcch", + description = [ + "xCCH convolutional code:", + "228 bits blocks, rate 1/2, k = 5", + "G0 = 1 + D3 + D4", + "G1 = 1 + D + D3 + D4", + ] + ), -# CS2 definition -CS2 = ConvolutionalCode( - 290, - CCH_poly, - puncture = [ - 15, 19, 23, 27, 31, 35, 43, 47, 51, 55, 59, 63, 67, 71, - 75, 79, 83, 91, 95, 99, 103, 107, 111, 115, 119, 123, 127, 131, - 139, 143, 147, 151, 155, 159, 163, 167, 171, 175, 179, 187, 191, 195, - 199, 203, 207, 211, 215, 219, 223, 227, 235, 239, 243, 247, 251, 255, - 259, 263, 267, 271, 275, 283, 287, 291, 295, 299, 303, 307, 311, 315, - 319, 323, 331, 335, 339, 343, 347, 351, 355, 359, 363, 367, 371, 379, - 383, 387, 391, 395, 399, 403, 407, 411, 415, 419, 427, 431, 435, 439, - 443, 447, 451, 455, 459, 463, 467, 475, 479, 483, 487, 491, 495, 499, - 503, 507, 511, 515, 523, 527, 531, 535, 539, 543, 547, 551, 555, 559, - 563, 571, 575, 579, 583, 587, -1 - ], - name = "cs2", - description = [ - "CS2 convolutional code:", - "G0 = 1 + D3 + D4", - "G1 = 1 + D + D3 + D4", - ] -) + # CS2 definition + ConvolutionalCode( + 290, + CCH_poly, + puncture = [ + 15, 19, 23, 27, 31, 35, 43, 47, 51, 55, 59, 63, 67, 71, + 75, 79, 83, 91, 95, 99, 103, 107, 111, 115, 119, 123, 127, 131, + 139, 143, 147, 151, 155, 159, 163, 167, 171, 175, 179, 187, 191, 195, + 199, 203, 207, 211, 215, 219, 223, 227, 235, 239, 243, 247, 251, 255, + 259, 263, 267, 271, 275, 283, 287, 291, 295, 299, 303, 307, 311, 315, + 319, 323, 331, 335, 339, 343, 347, 351, 355, 359, 363, 367, 371, 379, + 383, 387, 391, 395, 399, 403, 407, 411, 415, 419, 427, 431, 435, 439, + 443, 447, 451, 455, 459, 463, 467, 475, 479, 483, 487, 491, 495, 499, + 503, 507, 511, 515, 523, 527, 531, 535, 539, 543, 547, 551, 555, 559, + 563, 571, 575, 579, 583, 587, -1 + ], + name = "cs2", + description = [ + "CS2 convolutional code:", + "G0 = 1 + D3 + D4", + "G1 = 1 + D + D3 + D4", + ] + ), -# CS3 definition -CS3 = ConvolutionalCode( - 334, - CCH_poly, - puncture = [ - 15, 17, 21, 23, 27, 29, 33, 35, 39, 41, 45, 47, 51, 53, - 57, 59, 63, 65, 69, 71, 75, 77, 81, 83, 87, 89, 93, 95, - 99, 101, 105, 107, 111, 113, 117, 119, 123, 125, 129, 131, 135, 137, - 141, 143, 147, 149, 153, 155, 159, 161, 165, 167, 171, 173, 177, 179, - 183, 185, 189, 191, 195, 197, 201, 203, 207, 209, 213, 215, 219, 221, - 225, 227, 231, 233, 237, 239, 243, 245, 249, 251, 255, 257, 261, 263, - 267, 269, 273, 275, 279, 281, 285, 287, 291, 293, 297, 299, 303, 305, - 309, 311, 315, 317, 321, 323, 327, 329, 333, 335, 339, 341, 345, 347, - 351, 353, 357, 359, 363, 365, 369, 371, 375, 377, 381, 383, 387, 389, - 393, 395, 399, 401, 405, 407, 411, 413, 417, 419, 423, 425, 429, 431, - 435, 437, 441, 443, 447, 449, 453, 455, 459, 461, 465, 467, 471, 473, - 477, 479, 483, 485, 489, 491, 495, 497, 501, 503, 507, 509, 513, 515, - 519, 521, 525, 527, 531, 533, 537, 539, 543, 545, 549, 551, 555, 557, - 561, 563, 567, 569, 573, 575, 579, 581, 585, 587, 591, 593, 597, 599, - 603, 605, 609, 611, 615, 617, 621, 623, 627, 629, 633, 635, 639, 641, - 645, 647, 651, 653, 657, 659, 663, 665, 669, 671, -1 - ], - name = "cs3", - description = [ - "CS3 convolutional code:", - "G0 = 1 + D3 + D4", - "G1 = 1 + D + D3 + D4", - ] -) + # CS3 definition + ConvolutionalCode( + 334, + CCH_poly, + puncture = [ + 15, 17, 21, 23, 27, 29, 33, 35, 39, 41, 45, 47, 51, 53, + 57, 59, 63, 65, 69, 71, 75, 77, 81, 83, 87, 89, 93, 95, + 99, 101, 105, 107, 111, 113, 117, 119, 123, 125, 129, 131, 135, 137, + 141, 143, 147, 149, 153, 155, 159, 161, 165, 167, 171, 173, 177, 179, + 183, 185, 189, 191, 195, 197, 201, 203, 207, 209, 213, 215, 219, 221, + 225, 227, 231, 233, 237, 239, 243, 245, 249, 251, 255, 257, 261, 263, + 267, 269, 273, 275, 279, 281, 285, 287, 291, 293, 297, 299, 303, 305, + 309, 311, 315, 317, 321, 323, 327, 329, 333, 335, 339, 341, 345, 347, + 351, 353, 357, 359, 363, 365, 369, 371, 375, 377, 381, 383, 387, 389, + 393, 395, 399, 401, 405, 407, 411, 413, 417, 419, 423, 425, 429, 431, + 435, 437, 441, 443, 447, 449, 453, 455, 459, 461, 465, 467, 471, 473, + 477, 479, 483, 485, 489, 491, 495, 497, 501, 503, 507, 509, 513, 515, + 519, 521, 525, 527, 531, 533, 537, 539, 543, 545, 549, 551, 555, 557, + 561, 563, 567, 569, 573, 575, 579, 581, 585, 587, 591, 593, 597, 599, + 603, 605, 609, 611, 615, 617, 621, 623, 627, 629, 633, 635, 639, 641, + 645, 647, 651, 653, 657, 659, 663, 665, 669, 671, -1 + ], + name = "cs3", + description = [ + "CS3 convolutional code:", + "G0 = 1 + D3 + D4", + "G1 = 1 + D + D3 + D4", + ] + ), -# TCH_AFS_12_2 definition -TCH_AFS_12_2 = ConvolutionalCode( - 250, - [ - ( 1, 1 ), - ( G1, G0 ), - ], - puncture = [ - 321, 325, 329, 333, 337, 341, 345, 349, 353, 357, 361, 363, - 365, 369, 373, 377, 379, 381, 385, 389, 393, 395, 397, 401, - 405, 409, 411, 413, 417, 421, 425, 427, 429, 433, 437, 441, - 443, 445, 449, 453, 457, 459, 461, 465, 469, 473, 475, 477, - 481, 485, 489, 491, 493, 495, 497, 499, 501, 503, 505, 507, - -1 - ], - name = 'tch_afs_12_2', - description = [ - "TCH/AFS 12.2 kbits convolutional code:", - "250 bits block, rate 1/2, punctured", - "G0/G0 = 1", - "G1/G0 = 1 + D + D3 + D4 / 1 + D3 + D4", - ] -) + # TCH_AFS_12_2 definition + ConvolutionalCode( + 250, + [ + ( 1, 1 ), + ( G1, G0 ), + ], + puncture = [ + 321, 325, 329, 333, 337, 341, 345, 349, 353, 357, 361, 363, + 365, 369, 373, 377, 379, 381, 385, 389, 393, 395, 397, 401, + 405, 409, 411, 413, 417, 421, 425, 427, 429, 433, 437, 441, + 443, 445, 449, 453, 457, 459, 461, 465, 469, 473, 475, 477, + 481, 485, 489, 491, 493, 495, 497, 499, 501, 503, 505, 507, + -1 + ], + name = 'tch_afs_12_2', + description = [ + "TCH/AFS 12.2 kbits convolutional code:", + "250 bits block, rate 1/2, punctured", + "G0/G0 = 1", + "G1/G0 = 1 + D + D3 + D4 / 1 + D3 + D4", + ] + ), -# TCH_AFS_10_2 definition -TCH_AFS_10_2 = ConvolutionalCode( - 210, - [ - ( G1, G3 ), - ( G2, G3 ), - ( 1, 1 ), - ], - puncture = [ - 1, 4, 7, 10, 16, 19, 22, 28, 31, 34, 40, 43, - 46, 52, 55, 58, 64, 67, 70, 76, 79, 82, 88, 91, - 94, 100, 103, 106, 112, 115, 118, 124, 127, 130, 136, 139, - 142, 148, 151, 154, 160, 163, 166, 172, 175, 178, 184, 187, - 190, 196, 199, 202, 208, 211, 214, 220, 223, 226, 232, 235, - 238, 244, 247, 250, 256, 259, 262, 268, 271, 274, 280, 283, - 286, 292, 295, 298, 304, 307, 310, 316, 319, 322, 325, 328, - 331, 334, 337, 340, 343, 346, 349, 352, 355, 358, 361, 364, - 367, 370, 373, 376, 379, 382, 385, 388, 391, 394, 397, 400, - 403, 406, 409, 412, 415, 418, 421, 424, 427, 430, 433, 436, - 439, 442, 445, 448, 451, 454, 457, 460, 463, 466, 469, 472, - 475, 478, 481, 484, 487, 490, 493, 496, 499, 502, 505, 508, - 511, 514, 517, 520, 523, 526, 529, 532, 535, 538, 541, 544, - 547, 550, 553, 556, 559, 562, 565, 568, 571, 574, 577, 580, - 583, 586, 589, 592, 595, 598, 601, 604, 607, 609, 610, 613, - 616, 619, 621, 622, 625, 627, 628, 631, 633, 634, 636, 637, - 639, 640, -1 - ], - name = 'tch_afs_10_2', - description = [ - "TCH/AFS 10.2 kbits convolutional code:", - "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", - "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", - "G3/G3 = 1", - ] -) + # TCH_AFS_10_2 definition + ConvolutionalCode( + 210, + [ + ( G1, G3 ), + ( G2, G3 ), + ( 1, 1 ), + ], + puncture = [ + 1, 4, 7, 10, 16, 19, 22, 28, 31, 34, 40, 43, + 46, 52, 55, 58, 64, 67, 70, 76, 79, 82, 88, 91, + 94, 100, 103, 106, 112, 115, 118, 124, 127, 130, 136, 139, + 142, 148, 151, 154, 160, 163, 166, 172, 175, 178, 184, 187, + 190, 196, 199, 202, 208, 211, 214, 220, 223, 226, 232, 235, + 238, 244, 247, 250, 256, 259, 262, 268, 271, 274, 280, 283, + 286, 292, 295, 298, 304, 307, 310, 316, 319, 322, 325, 328, + 331, 334, 337, 340, 343, 346, 349, 352, 355, 358, 361, 364, + 367, 370, 373, 376, 379, 382, 385, 388, 391, 394, 397, 400, + 403, 406, 409, 412, 415, 418, 421, 424, 427, 430, 433, 436, + 439, 442, 445, 448, 451, 454, 457, 460, 463, 466, 469, 472, + 475, 478, 481, 484, 487, 490, 493, 496, 499, 502, 505, 508, + 511, 514, 517, 520, 523, 526, 529, 532, 535, 538, 541, 544, + 547, 550, 553, 556, 559, 562, 565, 568, 571, 574, 577, 580, + 583, 586, 589, 592, 595, 598, 601, 604, 607, 609, 610, 613, + 616, 619, 621, 622, 625, 627, 628, 631, 633, 634, 636, 637, + 639, 640, -1 + ], + name = 'tch_afs_10_2', + description = [ + "TCH/AFS 10.2 kbits convolutional code:", + "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", + "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", + "G3/G3 = 1", + ] + ), -# TCH_AFS_7_95 definition -TCH_AFS_7_95 = ConvolutionalCode( - 165, - [ - ( 1, 1 ), - ( G5, G4 ), - ( G6, G4 ), - ], - puncture = [ - 1, 2, 4, 5, 8, 22, 70, 118, 166, 214, 262, 310, - 317, 319, 325, 332, 334, 341, 343, 349, 356, 358, 365, 367, - 373, 380, 382, 385, 389, 391, 397, 404, 406, 409, 413, 415, - 421, 428, 430, 433, 437, 439, 445, 452, 454, 457, 461, 463, - 469, 476, 478, 481, 485, 487, 490, 493, 500, 502, 503, 505, - 506, 508, 509, 511, 512, -1 - ], - name = 'tch_afs_7_95', - description = [ - "TCH/AFS 7.95 kbits convolutional code:", - "G4/G4 = 1", - "G5/G4 = 1 + D + D4 + D6 / 1 + D2 + D3 + D5 + D6", - "G6/G4 = 1 + D + D2 + D3 + D4 + D6 / 1 + D2 + D3 + D5 + D6", - ] -) + # TCH_AFS_7_95 definition + ConvolutionalCode( + 165, + [ + ( 1, 1 ), + ( G5, G4 ), + ( G6, G4 ), + ], + puncture = [ + 1, 2, 4, 5, 8, 22, 70, 118, 166, 214, 262, 310, + 317, 319, 325, 332, 334, 341, 343, 349, 356, 358, 365, 367, + 373, 380, 382, 385, 389, 391, 397, 404, 406, 409, 413, 415, + 421, 428, 430, 433, 437, 439, 445, 452, 454, 457, 461, 463, + 469, 476, 478, 481, 485, 487, 490, 493, 500, 502, 503, 505, + 506, 508, 509, 511, 512, -1 + ], + name = 'tch_afs_7_95', + description = [ + "TCH/AFS 7.95 kbits convolutional code:", + "G4/G4 = 1", + "G5/G4 = 1 + D + D4 + D6 / 1 + D2 + D3 + D5 + D6", + "G6/G4 = 1 + D + D2 + D3 + D4 + D6 / 1 + D2 + D3 + D5 + D6", + ] + ), -# TCH_AFS_7_4 definition -TCH_AFS_7_4 = ConvolutionalCode( - 154, - [ - ( G1, G3 ), - ( G2, G3 ), - ( 1, 1 ), - ], - puncture = [ - 0, 355, 361, 367, 373, 379, 385, 391, 397, 403, 409, 415, - 421, 427, 433, 439, 445, 451, 457, 460, 463, 466, 468, 469, - 471, 472, -1 - ], - name = 'tch_afs_7_4', - description = [ - "TCH/AFS 7.4 kbits convolutional code:", - "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", - "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", - "G3/G3 = 1", - ] -) + # TCH_AFS_7_4 definition + ConvolutionalCode( + 154, + [ + ( G1, G3 ), + ( G2, G3 ), + ( 1, 1 ), + ], + puncture = [ + 0, 355, 361, 367, 373, 379, 385, 391, 397, 403, 409, 415, + 421, 427, 433, 439, 445, 451, 457, 460, 463, 466, 468, 469, + 471, 472, -1 + ], + name = 'tch_afs_7_4', + description = [ + "TCH/AFS 7.4 kbits convolutional code:", + "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", + "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", + "G3/G3 = 1", + ] + ), -# TCH_AFS_6_7 definition -TCH_AFS_6_7 = ConvolutionalCode( - 140, - [ - ( G1, G3 ), - ( G2, G3 ), - ( 1, 1 ), - ( 1, 1 ), - ], - puncture = [ - 1, 3, 7, 11, 15, 27, 39, 55, 67, 79, 95, 107, - 119, 135, 147, 159, 175, 187, 199, 215, 227, 239, 255, 267, - 279, 287, 291, 295, 299, 303, 307, 311, 315, 319, 323, 327, - 331, 335, 339, 343, 347, 351, 355, 359, 363, 367, 369, 371, - 375, 377, 379, 383, 385, 387, 391, 393, 395, 399, 401, 403, - 407, 409, 411, 415, 417, 419, 423, 425, 427, 431, 433, 435, - 439, 441, 443, 447, 449, 451, 455, 457, 459, 463, 465, 467, - 471, 473, 475, 479, 481, 483, 487, 489, 491, 495, 497, 499, - 503, 505, 507, 511, 513, 515, 519, 521, 523, 527, 529, 531, - 535, 537, 539, 543, 545, 547, 549, 551, 553, 555, 557, 559, - 561, 563, 565, 567, 569, 571, 573, 575, -1 - ], - name = 'tch_afs_6_7', - description = [ - "TCH/AFS 6.7 kbits convolutional code:", - "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", - "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", - "G3/G3 = 1", - "G3/G3 = 1", - ] -) + # TCH_AFS_6_7 definition + ConvolutionalCode( + 140, + [ + ( G1, G3 ), + ( G2, G3 ), + ( 1, 1 ), + ( 1, 1 ), + ], + puncture = [ + 1, 3, 7, 11, 15, 27, 39, 55, 67, 79, 95, 107, + 119, 135, 147, 159, 175, 187, 199, 215, 227, 239, 255, 267, + 279, 287, 291, 295, 299, 303, 307, 311, 315, 319, 323, 327, + 331, 335, 339, 343, 347, 351, 355, 359, 363, 367, 369, 371, + 375, 377, 379, 383, 385, 387, 391, 393, 395, 399, 401, 403, + 407, 409, 411, 415, 417, 419, 423, 425, 427, 431, 433, 435, + 439, 441, 443, 447, 449, 451, 455, 457, 459, 463, 465, 467, + 471, 473, 475, 479, 481, 483, 487, 489, 491, 495, 497, 499, + 503, 505, 507, 511, 513, 515, 519, 521, 523, 527, 529, 531, + 535, 537, 539, 543, 545, 547, 549, 551, 553, 555, 557, 559, + 561, 563, 565, 567, 569, 571, 573, 575, -1 + ], + name = 'tch_afs_6_7', + description = [ + "TCH/AFS 6.7 kbits convolutional code:", + "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", + "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", + "G3/G3 = 1", + "G3/G3 = 1", + ] + ), -# TCH_AFS_5_9 definition -TCH_AFS_5_9 = ConvolutionalCode( - 124, - [ - ( G4, G6 ), - ( G5, G6 ), - ( 1, 1), - ( 1, 1), - ], - puncture = [ - 0, 1, 3, 5, 7, 11, 15, 31, 47, 63, 79, 95, - 111, 127, 143, 159, 175, 191, 207, 223, 239, 255, 271, 287, - 303, 319, 327, 331, 335, 343, 347, 351, 359, 363, 367, 375, - 379, 383, 391, 395, 399, 407, 411, 415, 423, 427, 431, 439, - 443, 447, 455, 459, 463, 467, 471, 475, 479, 483, 487, 491, - 495, 499, 503, 507, 509, 511, 512, 513, 515, 516, 517, 519, - -1 - ], - name = 'tch_afs_5_9', - description = [ - "TCH/AFS 5.9 kbits convolutional code:", - "124 bits", - "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", - "G5/G6 = 1 + D + D4 + D6 / 1 + D + D2 + D3 + D4 + D6", - "G6/G6 = 1", - "G6/G6 = 1", - ] -) + # TCH_AFS_5_9 definition + ConvolutionalCode( + 124, + [ + ( G4, G6 ), + ( G5, G6 ), + ( 1, 1), + ( 1, 1), + ], + puncture = [ + 0, 1, 3, 5, 7, 11, 15, 31, 47, 63, 79, 95, + 111, 127, 143, 159, 175, 191, 207, 223, 239, 255, 271, 287, + 303, 319, 327, 331, 335, 343, 347, 351, 359, 363, 367, 375, + 379, 383, 391, 395, 399, 407, 411, 415, 423, 427, 431, 439, + 443, 447, 455, 459, 463, 467, 471, 475, 479, 483, 487, 491, + 495, 499, 503, 507, 509, 511, 512, 513, 515, 516, 517, 519, + -1 + ], + name = 'tch_afs_5_9', + description = [ + "TCH/AFS 5.9 kbits convolutional code:", + "124 bits", + "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", + "G5/G6 = 1 + D + D4 + D6 / 1 + D + D2 + D3 + D4 + D6", + "G6/G6 = 1", + "G6/G6 = 1", + ] + ), -# TCH_AFS_5_15 definition -TCH_AFS_5_15 = ConvolutionalCode( - 109, - [ - ( G1, G3 ), - ( G1, G3 ), - ( G2, G3 ), - ( 1, 1 ), - ( 1, 1 ), - ], - puncture = [ - 0, 4, 5, 9, 10, 14, 15, 20, 25, 30, 35, 40, - 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, - 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, - 290, 300, 310, 315, 320, 325, 330, 334, 335, 340, 344, 345, - 350, 354, 355, 360, 364, 365, 370, 374, 375, 380, 384, 385, - 390, 394, 395, 400, 404, 405, 410, 414, 415, 420, 424, 425, - 430, 434, 435, 440, 444, 445, 450, 454, 455, 460, 464, 465, - 470, 474, 475, 480, 484, 485, 490, 494, 495, 500, 504, 505, - 510, 514, 515, 520, 524, 525, 529, 530, 534, 535, 539, 540, - 544, 545, 549, 550, 554, 555, 559, 560, 564, -1 - ], - name = 'tch_afs_5_15', - description = [ - "TCH/AFS 5.15 kbits convolutional code:", - "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", - "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", - "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", - "G3/G3 = 1", - "G3/G3 = 1", - ] -) + # TCH_AFS_5_15 definition + ConvolutionalCode( + 109, + [ + ( G1, G3 ), + ( G1, G3 ), + ( G2, G3 ), + ( 1, 1 ), + ( 1, 1 ), + ], + puncture = [ + 0, 4, 5, 9, 10, 14, 15, 20, 25, 30, 35, 40, + 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, + 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, + 290, 300, 310, 315, 320, 325, 330, 334, 335, 340, 344, 345, + 350, 354, 355, 360, 364, 365, 370, 374, 375, 380, 384, 385, + 390, 394, 395, 400, 404, 405, 410, 414, 415, 420, 424, 425, + 430, 434, 435, 440, 444, 445, 450, 454, 455, 460, 464, 465, + 470, 474, 475, 480, 484, 485, 490, 494, 495, 500, 504, 505, + 510, 514, 515, 520, 524, 525, 529, 530, 534, 535, 539, 540, + 544, 545, 549, 550, 554, 555, 559, 560, 564, -1 + ], + name = 'tch_afs_5_15', + description = [ + "TCH/AFS 5.15 kbits convolutional code:", + "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", + "G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4", + "G2/G3 = 1 + D2 + D4 / 1 + D + D2 + D3 + D4", + "G3/G3 = 1", + "G3/G3 = 1", + ] + ), -# TCH_AFS_4_75 definition -TCH_AFS_4_75 = ConvolutionalCode( - 101, - [ - ( G4, G6 ), - ( G4, G6 ), - ( G5, G6 ), - ( 1, 1 ), - ( 1, 1 ), - ], - puncture = [ - 0, 1, 2, 4, 5, 7, 9, 15, 25, 35, 45, 55, - 65, 75, 85, 95, 105, 115, 125, 135, 145, 155, 165, 175, - 185, 195, 205, 215, 225, 235, 245, 255, 265, 275, 285, 295, - 305, 315, 325, 335, 345, 355, 365, 375, 385, 395, 400, 405, - 410, 415, 420, 425, 430, 435, 440, 445, 450, 455, 459, 460, - 465, 470, 475, 479, 480, 485, 490, 495, 499, 500, 505, 509, - 510, 515, 517, 519, 520, 522, 524, 525, 526, 527, 529, 530, - 531, 532, 534, -1 - ], - name = 'tch_afs_4_75', - description = [ - "TCH/AFS 4.75 kbits convolutional code:", - "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", - "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", - "G5/G6 = 1 + D + D4 + D6 / 1 + D + D2 + D3 + D4 + D6", - "G6/G6 = 1", - "G6/G6 = 1", - ] -) + # TCH_AFS_4_75 definition + ConvolutionalCode( + 101, + [ + ( G4, G6 ), + ( G4, G6 ), + ( G5, G6 ), + ( 1, 1 ), + ( 1, 1 ), + ], + puncture = [ + 0, 1, 2, 4, 5, 7, 9, 15, 25, 35, 45, 55, + 65, 75, 85, 95, 105, 115, 125, 135, 145, 155, 165, 175, + 185, 195, 205, 215, 225, 235, 245, 255, 265, 275, 285, 295, + 305, 315, 325, 335, 345, 355, 365, 375, 385, 395, 400, 405, + 410, 415, 420, 425, 430, 435, 440, 445, 450, 455, 459, 460, + 465, 470, 475, 479, 480, 485, 490, 495, 499, 500, 505, 509, + 510, 515, 517, 519, 520, 522, 524, 525, 526, 527, 529, 530, + 531, 532, 534, -1 + ], + name = 'tch_afs_4_75', + description = [ + "TCH/AFS 4.75 kbits convolutional code:", + "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", + "G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6", + "G5/G6 = 1 + D + D4 + D6 / 1 + D + D2 + D3 + D4 + D6", + "G6/G6 = 1", + "G6/G6 = 1", + ] + ) +] -def gen_c(dest, pref, code): - f = open(os.path.join(dest, 'conv_' + code.name + '_gen.c'), 'w') +if __name__ == '__main__': + path = sys.argv[1] if len(sys.argv) > 1 else os.getcwd() + prefix = "gsm0503" + + print >>sys.stderr, "Generating convolutional codes..." + + # Open a new file for writing + f = open(os.path.join(path, "gsm0503_conv.c"), 'w') print >>f, mod_license print >>f, "#include " print >>f, "#include " - code.gen_tables(pref, f) -if __name__ == '__main__': - print >>sys.stderr, "Generating convolutional codes..." - prefix = "gsm0503" - path = sys.argv[1] if len(sys.argv) > 1 else os.getcwd() - gen_c(path, prefix, xCCH) - gen_c(path, prefix, CS2) - gen_c(path, prefix, CS3) - gen_c(path, prefix, TCH_AFS_12_2) - gen_c(path, prefix, TCH_AFS_10_2) - gen_c(path, prefix, TCH_AFS_7_95) - gen_c(path, prefix, TCH_AFS_7_4) - gen_c(path, prefix, TCH_AFS_6_7) - gen_c(path, prefix, TCH_AFS_5_9) - gen_c(path, prefix, TCH_AFS_5_15) - gen_c(path, prefix, TCH_AFS_4_75) - print >>sys.stderr, "\tdone." + # Generate the tables one by one + for code in conv_codes: + print >>sys.stderr, "Generate '%s' definition" % code.name + code.gen_tables(prefix, f) + + print >>sys.stderr, "Generation complete." -- To view, visit https://gerrit.osmocom.org/828 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib4e4ee5fdde38429e68e3b2fa50ec03a18f59daa 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 Sun Oct 23 07:38:16 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 23 Oct 2016 07:38:16 +0000 Subject: [MERGED] libosmocore[master]: utils/conv_gen.py: improve output formatting In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: utils/conv_gen.py: improve output formatting ...................................................................... utils/conv_gen.py: improve output formatting To keep the generated tables readable, line with should be limited. So, now there are the following limitations: - _print_term(): up to 12 numbers per line, - _print_puncture(): up to 12 numbers per line, - _print_x(): up to 4 blocks per line. Change-Id: I95256c4ad402a3c088bdb6c5a5cda8b17c31881c --- M utils/conv_gen.py 1 file changed, 32 insertions(+), 6 deletions(-) Approvals: tnt: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/utils/conv_gen.py b/utils/conv_gen.py index 38ea63b..715a146 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -129,17 +129,22 @@ return ns, nb def _print_term(self, fi, num_states, pack = False): - d = [] + items = [] + for state in range(num_states): if pack: x = pack(self.next_term_output(state)) else: x = self.next_term_state(state) - d.append("%d, " % x) - print >>fi, "\t%s" % ''.join(d) + items.append(x) + + # Up to 12 numbers should be placed per line + print_formatted(items, "%3d, ", 12, fi) def _print_x(self, fi, num_states, pack = False): + items = [] + for state in range(num_states): if pack: x0 = pack(self.next_output(state, 0)) @@ -148,7 +153,14 @@ x0 = self.next_state(state, 0) x1 = self.next_state(state, 1) - print >>fi, "\t{ %2d, %2d }," % (x0, x1) + items.append((x0, x1)) + + # Up to 4 blocks should be placed per line + print_formatted(items, "{ %2d, %2d }, ", 4, fi) + + def _print_puncture(self, fi): + # Up to 12 numbers should be placed per line + print_formatted(self.puncture, "%3d, ", 12, fi) def gen_tables(self, pref, fi): pack = lambda n: \ @@ -175,8 +187,7 @@ if len(self.puncture): print >>fi, "\nstatic const int %s_puncture[] = {" % self.name - for p in self.puncture: - print >>fi, "\t%d," % p + self._print_puncture(fi) print >>fi, "};" # Write description as a multi-line comment @@ -207,6 +218,21 @@ 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): + counter = 0 + + # Print initial indent + fi.write("\t") + + for item in items: + if counter > 0 and counter % count == 0: + fi.write("\n\t") + + fi.write(format % item) + counter += 1 + + fi.write("\n") + # Polynomials according to 3GPP TS 05.03 Annex B G0 = poly(0, 3, 4) G1 = poly(0, 1, 3, 4) -- To view, visit https://gerrit.osmocom.org/829 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I95256c4ad402a3c088bdb6c5a5cda8b17c31881c Gerrit-PatchSet: 9 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt From gerrit-no-reply at lists.osmocom.org Sun Oct 23 07:38:16 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 23 Oct 2016 07:38:16 +0000 Subject: [MERGED] libosmocore[master]: utils/conv_gen.py: add RACH, SCH and TCH/AHS definitions In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: utils/conv_gen.py: add RACH, SCH and TCH/AHS definitions ...................................................................... utils/conv_gen.py: add RACH, SCH and TCH/AHS definitions Change-Id: I0ea7151f4e8119a8798a9e129b951559e56b0d93 --- M include/osmocom/gsm/gsm0503.h M src/gsm/libosmogsm.map M utils/conv_gen.py 3 files changed, 212 insertions(+), 1 deletion(-) Approvals: Tom Tsou: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gsm/gsm0503.h b/include/osmocom/gsm/gsm0503.h index 2da4b16..862dc3f 100644 --- a/include/osmocom/gsm/gsm0503.h +++ b/include/osmocom/gsm/gsm0503.h @@ -36,10 +36,26 @@ */ 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 */ @@ -72,3 +88,27 @@ /*! \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; diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index dc8559f..9eff4d3 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -71,8 +71,12 @@ gsm0502_calc_paging_group; gsm0503_xcch; +gsm0503_rach; +gsm0503_sch; gsm0503_cs2; gsm0503_cs3; +gsm0503_tch_fr; +gsm0503_tch_hr; gsm0503_tch_afs_12_2; gsm0503_tch_afs_10_2; gsm0503_tch_afs_7_95; @@ -81,6 +85,12 @@ gsm0503_tch_afs_5_9; gsm0503_tch_afs_5_15; gsm0503_tch_afs_4_75; +gsm0503_tch_ahs_7_95; +gsm0503_tch_ahs_7_4; +gsm0503_tch_ahs_6_7; +gsm0503_tch_ahs_5_9; +gsm0503_tch_ahs_5_15; +gsm0503_tch_ahs_4_75; gsm0808_att_tlvdef; gsm0808_bssap_name; diff --git a/utils/conv_gen.py b/utils/conv_gen.py index 715a146..c067104 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -262,6 +262,22 @@ ] ), + # RACH definition + ConvolutionalCode( + 14, + CCH_poly, + name = "rach", + description = ["RACH convolutional code"] + ), + + # SCH definition + ConvolutionalCode( + 35, + CCH_poly, + name = "sch", + description = ["SCH convolutional code"] + ), + # CS2 definition ConvolutionalCode( 290, @@ -546,7 +562,152 @@ "G6/G6 = 1", "G6/G6 = 1", ] - ) + ), + + # TCH_FR definition + ConvolutionalCode( + 185, + CCH_poly, + name = "tch_fr", + description = ["TCH/F convolutional code"] + ), + + # TCH_HR definition + ConvolutionalCode( + 98, + [ + ( G4, 1 ), + ( G5, 1 ), + ( G6, 1 ), + ], + puncture = [ + 1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, + 37, 40, 43, 46, 49, 52, 55, 58, 61, 64, 67, 70, + 73, 76, 79, 82, 85, 88, 91, 94, 97, 100, 103, 106, + 109, 112, 115, 118, 121, 124, 127, 130, 133, 136, 139, 142, + 145, 148, 151, 154, 157, 160, 163, 166, 169, 172, 175, 178, + 181, 184, 187, 190, 193, 196, 199, 202, 205, 208, 211, 214, + 217, 220, 223, 226, 229, 232, 235, 238, 241, 244, 247, 250, + 253, 256, 259, 262, 265, 268, 271, 274, 277, 280, 283, 295, + 298, 301, 304, 307, 310, -1, + ], + name = "tch_hr", + description = ["TCH/H convolutional code"] + ), + + # TCH_AHS_7_95 definition + ConvolutionalCode( + 129, + [ + ( 1, 1 ), + ( G1, G0 ), + ], + puncture = [ + 1, 3, 5, 7, 11, 15, 19, 23, 27, 31, 35, 43, + 47, 51, 55, 59, 63, 67, 71, 79, 83, 87, 91, 95, + 99, 103, 107, 115, 119, 123, 127, 131, 135, 139, 143, 151, + 155, 159, 163, 167, 171, 175, 177, 179, 183, 185, 187, 191, + 193, 195, 197, 199, 203, 205, 207, 211, 213, 215, 219, 221, + 223, 227, 229, 231, 233, 235, 239, 241, 243, 247, 249, 251, + 255, 257, 259, 261, 263, 265, -1, + ], + name = "tch_ahs_7_95", + description = ["TCH/AHS 7.95 kbits convolutional code"] + ), + + # TCH_AHS_7_4 definition + ConvolutionalCode( + 126, + [ + ( 1, 1 ), + ( G1, G0 ), + ], + puncture = [ + 1, 3, 7, 11, 19, 23, 27, 35, 39, 43, 51, 55, + 59, 67, 71, 75, 83, 87, 91, 99, 103, 107, 115, 119, + 123, 131, 135, 139, 143, 147, 151, 155, 159, 163, 167, 171, + 175, 179, 183, 187, 191, 195, 199, 203, 207, 211, 215, 219, + 221, 223, 227, 229, 231, 235, 237, 239, 243, 245, 247, 251, + 253, 255, 257, 259, -1, + ], + name = "tch_ahs_7_4", + description = ["TCH/AHS 7.4 kbits convolutional code"] + ), + + # TCH_AHS_6_7 definition + ConvolutionalCode( + 116, + [ + ( 1, 1 ), + ( G1, G0 ), + ], + puncture = [ + 1, 3, 9, 19, 29, 39, 49, 59, 69, 79, 89, 99, + 109, 119, 129, 139, 149, 159, 167, 169, 177, 179, 187, 189, + 197, 199, 203, 207, 209, 213, 217, 219, 223, 227, 229, 231, + 233, 235, 237, 239, -1, + ], + name = "tch_ahs_6_7", + description = ["TCH/AHS 6.7 kbits convolutional code"] + ), + + # TCH_AHS_5_9 definition + ConvolutionalCode( + 108, + [ + ( 1, 1 ), + ( G1, G0 ), + ], + puncture = [ + 1, 15, 71, 127, 139, 151, 163, 175, 187, 195, 203, 211, + 215, 219, 221, 223, -1, + ], + name = "tch_ahs_5_9", + description = ["TCH/AHS 5.9 kbits convolutional code"] + ), + + # TCH_AHS_5_15 definition + ConvolutionalCode( + 97, + [ + ( G1, G3 ), + ( G2, G3 ), + ( 1, 1 ), + ], + puncture = [ + 0, 1, 3, 4, 6, 9, 12, 15, 18, 21, 27, 33, + 39, 45, 51, 54, 57, 63, 69, 75, 81, 87, 90, 93, + 99, 105, 111, 117, 123, 126, 129, 135, 141, 147, 153, 159, + 162, 165, 168, 171, 174, 177, 180, 183, 186, 189, 192, 195, + 198, 201, 204, 207, 210, 213, 216, 219, 222, 225, 228, 231, + 234, 237, 240, 243, 244, 246, 249, 252, 255, 256, 258, 261, + 264, 267, 268, 270, 273, 276, 279, 280, 282, 285, 288, 289, + 291, 294, 295, 297, 298, 300, 301, -1, + ], + name = "tch_ahs_5_15", + description = ["TCH/AHS 5.15 kbits convolutional code"] + ), + + # TCH_AHS_4_75 definition + ConvolutionalCode( + 89, + [ + ( 1, 1 ), + ( G5, G4 ), + ( G6, G4 ), + ], + puncture = [ + 1, 2, 4, 5, 7, 8, 10, 13, 16, 22, 28, 34, + 40, 46, 52, 58, 64, 70, 76, 82, 88, 94, 100, 106, + 112, 118, 124, 130, 136, 142, 148, 151, 154, 160, 163, 166, + 172, 175, 178, 184, 187, 190, 196, 199, 202, 208, 211, 214, + 220, 223, 226, 232, 235, 238, 241, 244, 247, 250, 253, 256, + 259, 262, 265, 268, 271, 274, 275, 277, 278, 280, 281, 283, + 284, -1, + ], + name = "tch_ahs_4_75", + description = ["TCH/AHS 4.75 kbits convolutional code"] + ), ] if __name__ == '__main__': -- To view, visit https://gerrit.osmocom.org/831 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0ea7151f4e8119a8798a9e129b951559e56b0d93 Gerrit-PatchSet: 8 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Tom Tsou From gerrit-no-reply at lists.osmocom.org Sun Oct 23 07:38:16 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 23 Oct 2016 07:38:16 +0000 Subject: [MERGED] libosmocore[master]: gsm/gsm0503.h: fix typo In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gsm/gsm0503.h: fix typo ...................................................................... gsm/gsm0503.h: fix typo Change-Id: I263d61111544eeb7227e1e0e8f2d14479eae2079 --- M include/osmocom/gsm/gsm0503.h 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Tom Tsou: Looks good to me, but someone else must approve 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/gsm/gsm0503.h b/include/osmocom/gsm/gsm0503.h index cf1c976..2da4b16 100644 --- a/include/osmocom/gsm/gsm0503.h +++ b/include/osmocom/gsm/gsm0503.h @@ -26,7 +26,7 @@ #include -/*! \file conv_gen.h +/*! \file gsm0503.h * Osmocom convolutional encoder/decoder for xCCH channels, see 3GPP TS 05.03 */ -- To view, visit https://gerrit.osmocom.org/830 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I263d61111544eeb7227e1e0e8f2d14479eae2079 Gerrit-PatchSet: 8 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Tom Tsou From gerrit-no-reply at lists.osmocom.org Sun Oct 23 07:38:17 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 23 Oct 2016 07:38:17 +0000 Subject: [MERGED] libosmocore[master]: utils/conv_gen.py: add EDGE MCS 1-9 definitions In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: utils/conv_gen.py: add EDGE MCS 1-9 definitions ...................................................................... utils/conv_gen.py: add EDGE MCS 1-9 definitions Change-Id: Ie1452342f524a8b60f2babc07398a1d9c9e06aa3 --- M include/osmocom/gsm/gsm0503.h M src/gsm/libosmogsm.map M utils/conv_gen.py 3 files changed, 301 insertions(+), 1 deletion(-) Approvals: Tom Tsou: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gsm/gsm0503.h b/include/osmocom/gsm/gsm0503.h index 862dc3f..de28ad2 100644 --- a/include/osmocom/gsm/gsm0503.h +++ b/include/osmocom/gsm/gsm0503.h @@ -112,3 +112,63 @@ /*! \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/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 9eff4d3..a83f92c 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -91,6 +91,21 @@ gsm0503_tch_ahs_5_9; gsm0503_tch_ahs_5_15; gsm0503_tch_ahs_4_75; +gsm0503_mcs1_dl_hdr; +gsm0503_mcs1_ul_hdr; +gsm0503_mcs1; +gsm0503_mcs2; +gsm0503_mcs3; +gsm0503_mcs4; +gsm0503_mcs5_dl_hdr; +gsm0503_mcs5_ul_hdr; +gsm0503_mcs5; +gsm0503_mcs6; +gsm0503_mcs7_dl_hdr; +gsm0503_mcs7_ul_hdr; +gsm0503_mcs7; +gsm0503_mcs8; +gsm0503_mcs9; gsm0808_att_tlvdef; gsm0808_bssap_name; diff --git a/utils/conv_gen.py b/utils/conv_gen.py index 865a5ee..5eb7ac1 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -28,12 +28,13 @@ class ConvolutionalCode(object): def __init__(self, block_len, polys, name, - description = None, puncture = []): + description = None, puncture = [], term_type = 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 # Infos self.name = name @@ -202,6 +203,8 @@ print >>fi, "\t.N = %d," % self.rate_inv print >>fi, "\t.K = %d," % self.k print >>fi, "\t.len = %d," % self.block_len + if self.term_type is not None: + print >>fi, "\t.term = %s," % self.term_type print >>fi, "\t.next_output = %s_output," % self.name print >>fi, "\t.next_state = %s_state," % self.name if self.recursive: @@ -246,6 +249,12 @@ CCH_poly = [ ( G0, 1 ), ( G1, 1 ), +] + +MCS_poly = [ + ( G4, 1 ), + ( G7, 1 ), + ( G5, 1 ), ] conv_codes = [ @@ -708,6 +717,222 @@ name = "tch_ahs_4_75", description = ["TCH/AHS 4.75 kbits convolutional code"] ), + + # EDGE MCS1_DL_HDR definition + ConvolutionalCode( + 36, + MCS_poly, + name = "mcs1_dl_hdr", + term_type = "CONV_TERM_TAIL_BITING", + description = [ + "EDGE MCS-1 DL header convolutional code:", + "42 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS1_UL_HDR definition + ConvolutionalCode( + 39, + MCS_poly, + name = "mcs1_ul_hdr", + term_type = "CONV_TERM_TAIL_BITING", + description = [ + "EDGE MCS-1 UL header convolutional code:", + "45 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS1 definition + ConvolutionalCode( + 190, + MCS_poly, + name = "mcs1", + description = [ + "EDGE MCS-1 data convolutional code:", + "196 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS2 definition + ConvolutionalCode( + 238, + MCS_poly, + name = "mcs2", + description = [ + "EDGE MCS-2 data convolutional code:", + "244 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS3 definition + ConvolutionalCode( + 310, + MCS_poly, + name = "mcs3", + description = [ + "EDGE MCS-3 data convolutional code:", + "316 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS4 definition + ConvolutionalCode( + 366, + MCS_poly, + name = "mcs4", + description = [ + "EDGE MCS-4 data convolutional code:", + "372 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS5_DL_HDR definition + ConvolutionalCode( + 33, + MCS_poly, + name = "mcs5_dl_hdr", + term_type = "CONV_TERM_TAIL_BITING", + description = [ + "EDGE MCS-5 DL header convolutional code:", + "39 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS5_UL_HDR definition + ConvolutionalCode( + 45, + MCS_poly, + name = "mcs5_ul_hdr", + term_type = "CONV_TERM_TAIL_BITING", + description = [ + "EDGE MCS-5 UL header convolutional code:", + "51 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS5 definition + ConvolutionalCode( + 462, + MCS_poly, + name = "mcs5", + description = [ + "EDGE MCS-5 data convolutional code:", + "468 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS6 definition + ConvolutionalCode( + 606, + MCS_poly, + name = "mcs6", + description = [ + "EDGE MCS-6 data convolutional code:", + "612 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS7_DL_HDR definition + ConvolutionalCode( + 45, + MCS_poly, + name = "mcs7_dl_hdr", + term_type = "CONV_TERM_TAIL_BITING", + description = [ + "EDGE MCS-7 DL header convolutional code:", + "51 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS7_UL_HDR definition + ConvolutionalCode( + 54, + MCS_poly, + name = "mcs7_ul_hdr", + term_type = "CONV_TERM_TAIL_BITING", + description = [ + "EDGE MCS-7 UL header convolutional code:", + "60 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS7 definition + ConvolutionalCode( + 462, + MCS_poly, + name = "mcs7", + description = [ + "EDGE MCS-7 data convolutional code:", + "468 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS8 definition + ConvolutionalCode( + 558, + MCS_poly, + name = "mcs8", + description = [ + "EDGE MCS-8 data convolutional code:", + "564 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), + + # EDGE MCS9 definition + ConvolutionalCode( + 606, + MCS_poly, + name = "mcs9", + description = [ + "EDGE MCS-9 data convolutional code:", + "612 bits blocks, rate 1/3, k = 7", + "G4 = 1 + D2 + D3 + D5 + D6", + "G7 = 1 + D + D2 + D3 + D6", + "G5 = 1 + D + D4 + D6" + ] + ), ] if __name__ == '__main__': -- To view, visit https://gerrit.osmocom.org/837 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie1452342f524a8b60f2babc07398a1d9c9e06aa3 Gerrit-PatchSet: 8 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Sun Oct 23 07:38:17 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 23 Oct 2016 07:38:17 +0000 Subject: [MERGED] libosmocore[master]: utils/conv_gen.py: fix some typos In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: utils/conv_gen.py: fix some typos ...................................................................... utils/conv_gen.py: fix some typos Change-Id: I3327b92715744af4ef61496ef0121555d9d24799 --- M utils/conv_gen.py 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: Tom Tsou: Looks good to me, but someone else must approve Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/utils/conv_gen.py b/utils/conv_gen.py index c067104..865a5ee 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -39,7 +39,7 @@ self.name = name self.description = description - # Handle polynoms (and check for recursion) + # Handle polynomials (and check for recursion) self.polys = [(1, 1) if x[0] == x[1] else x for x in polys] # Determine the polynomial degree @@ -51,11 +51,11 @@ rp = [x[1] for x in self.polys if x[1] != 1] if rp: if not all([x == rp[0] for x in rp]): - raise ValueError("Bad polynoms: " - "Can't have multiple different divider polynoms!") + raise ValueError("Bad polynomials: " + "Can't have multiple different divider polynomials!") if not all([x[0] == 1 for x in polys if x[1] == 1]): - raise ValueError("Bad polynoms: " + raise ValueError("Bad polynomials: " "Can't have a '1' divider with a non '1' dividend " "in a recursive code") @@ -87,7 +87,7 @@ src = (ns & 1) | (state << 1) - # Scan polynoms + # Scan polynomials rv = [] for p_n, p_d in self.polys: if self.recursive and p_d == 1: @@ -106,7 +106,7 @@ src = (ns & 1) | (state << 1) - # Scan polynoms + # Scan polynomials rv = [] for p_n, p_d in self.polys: if self.recursive and p_d == 1: -- To view, visit https://gerrit.osmocom.org/836 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3327b92715744af4ef61496ef0121555d9d24799 Gerrit-PatchSet: 8 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Tom Tsou From gerrit-no-reply at lists.osmocom.org Sun Oct 23 07:39:19 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 23 Oct 2016 07:39:19 +0000 Subject: libosmo-abis[master]: Extend RTP RX callback parameters In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1146 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0c9b08d247d7342d6139badca77ce64fda0cf274 Gerrit-PatchSet: 2 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 Sun Oct 23 07:39:21 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 23 Oct 2016 07:39:21 +0000 Subject: osmo-bts[master]: Extend RTP RX callback parameters In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1147 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icf41e568f041e87b38e6192af0be90c42362bfee 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 Sun Oct 23 07:39:31 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 23 Oct 2016 07:39:31 +0000 Subject: [MERGED] libosmo-abis[master]: Extend RTP RX callback parameters In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Extend RTP RX callback parameters ...................................................................... Extend RTP RX callback parameters While debugging low-level RTP issues it is handy to be able to match exact RTP packet with the payload available to higher-level functions. Having Sequence number and Timestamp RTP fields as parameter to receiving callback is the easiest way to do so. Change-Id: I0c9b08d247d7342d6139badca77ce64fda0cf274 --- M TODO-RELEASE M include/osmocom/trau/osmo_ortp.h M src/trau/osmo_ortp.c 3 files changed, 7 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/TODO-RELEASE b/TODO-RELEASE index 3af993e..128778a 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -1,3 +1,4 @@ #library what description / commit summary line libosmo-abis API change major: add parameter to rx_cb() callack in osmo_ortp.h libosmo-abis API change major: add parameter to struct input_signal_data +libosmo-abis API change major: add parameters to rx_cb() callack in osmo_ortp.h diff --git a/include/osmocom/trau/osmo_ortp.h b/include/osmocom/trau/osmo_ortp.h index 1c0b223..9eb176f 100644 --- a/include/osmocom/trau/osmo_ortp.h +++ b/include/osmocom/trau/osmo_ortp.h @@ -55,7 +55,8 @@ /*! \brief callback for incoming data */ void (*rx_cb)(struct osmo_rtp_socket *rs, const uint8_t *payload, - unsigned int payload_len, bool marker); + unsigned int payload_len, uint16_t seq_number, + uint32_t timestamp, bool marker); /*! \brief Receive user timestamp, to be incremented by user */ uint32_t rx_user_ts; diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index e3c6234..e990487 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -161,6 +161,8 @@ if (rs->rx_cb) rs->rx_cb(rs, mblk->b_rptr, mblk->b_wptr - mblk->b_rptr, + rtp_get_seqnumber(mblk), + rtp_get_timestamp(mblk), rtp_get_markbit(mblk)); //rs->rx_user_ts += 160; freemsg(mblk); @@ -192,6 +194,8 @@ if (rs->rx_cb) rs->rx_cb(rs, mblk->b_rptr, mblk->b_wptr - mblk->b_rptr, + rtp_get_seqnumber(mblk), + rtp_get_timestamp(mblk), rtp_get_markbit(mblk)); freemsg(mblk); } else -- To view, visit https://gerrit.osmocom.org/1146 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0c9b08d247d7342d6139badca77ce64fda0cf274 Gerrit-PatchSet: 2 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 Sun Oct 23 07:39:43 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 23 Oct 2016 07:39:43 +0000 Subject: [MERGED] osmo-bts[master]: Extend RTP RX callback parameters In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Extend RTP RX callback parameters ...................................................................... Extend RTP RX callback parameters Adopt to change in libosmo-abis to accept additional parameters in RTP RX callback function. Change-Id: Icf41e568f041e87b38e6192af0be90c42362bfee --- M include/osmo-bts/l1sap.h M src/common/l1sap.c 2 files changed, 4 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmo-bts/l1sap.h b/include/osmo-bts/l1sap.h index 77bfbaa..97a2f04 100644 --- a/include/osmo-bts/l1sap.h +++ b/include/osmo-bts/l1sap.h @@ -63,7 +63,8 @@ /* call-back function for incoming RTP */ void l1sap_rtp_rx_cb(struct osmo_rtp_socket *rs, const uint8_t *rtp_pl, - unsigned int rtp_pl_len, bool marker); + unsigned int rtp_pl_len, uint16_t seq_number, + uint32_t timestamp, bool marker); /* channel control */ int l1sap_chan_act(struct gsm_bts_trx *trx, uint8_t chan_nr, struct tlv_parsed *tp); diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 59866a2..13d8a94 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1060,7 +1060,8 @@ /*! \brief call-back function for incoming RTP */ void l1sap_rtp_rx_cb(struct osmo_rtp_socket *rs, const uint8_t *rtp_pl, - unsigned int rtp_pl_len, bool marker) + unsigned int rtp_pl_len, uint16_t seq_number, + uint32_t timestamp, bool marker) { struct gsm_lchan *lchan = rs->priv; struct msgb *msg, *tmp; -- To view, visit https://gerrit.osmocom.org/1147 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icf41e568f041e87b38e6192af0be90c42362bfee 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 Sun Oct 23 07:40:14 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 23 Oct 2016 07:40:14 +0000 Subject: osmo-bts[master]: DTX HR - fix array size calculation In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1063 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I68ec1be33fb743977121d654187d85d6b8451e2b 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 Sun Oct 23 07:40:53 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 23 Oct 2016 07:40:53 +0000 Subject: osmo-bts[master]: Add tools to check DTX operation In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1143 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib1c70c4543b24c2a05a7df8eec5ce3f4eda2c02e Gerrit-PatchSet: 2 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 Sun Oct 23 07:41:37 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 23 Oct 2016 07:41:37 +0000 Subject: osmo-bts[master]: Add tools to check DTX operation In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 the naming, commit and the script source code top should explain what BTS model(s) this can be used on, and which not. -- To view, visit https://gerrit.osmocom.org/1143 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib1c70c4543b24c2a05a7df8eec5ce3f4eda2c02e Gerrit-PatchSet: 2 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 Sun Oct 23 07:42:18 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 23 Oct 2016 07:42:18 +0000 Subject: osmo-bts[master]: DTX DL: split ONSET state handling In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 this is a LC15 specific commit. This needs to have [lc15] or similar in the subject name, and the commit message should explain why other bts models do not need a similar fix. -- To view, visit https://gerrit.osmocom.org/1145 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 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 Sun Oct 23 07:43:10 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 23 Oct 2016 07:43:10 +0000 Subject: osmo-bts[master]: Fix DTX DL AMR SIDscheduling logic In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1144 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7acffae4792e7bddc2ae19a2f04ee921dc194c36 Gerrit-PatchSet: 2 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 Sun Oct 23 07:44:06 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 23 Oct 2016 07:44:06 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: fix 'make clean': shell glob, ignore failure In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: fix 'make clean': shell glob, ignore failure ...................................................................... fix 'make clean': shell glob, ignore failure Unfortunately a glob like osmo-x__*.{svg,png} doesn't work, so have the suffixes in separate globs. Add dashes to indicate that failure should be ignored. Change-Id: I6bc4d9ea72b43a573acbc860c23397f748de2c7b --- M OsmoBSC/Makefile M OsmoBTS/Makefile M OsmoMGCP/Makefile M OsmoNAT/Makefile M OsmoNITB/Makefile M OsmoPCU/Makefile M OsmoSGSN/Makefile 7 files changed, 25 insertions(+), 14 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoBSC/Makefile b/OsmoBSC/Makefile index 9fc6f26..284ac3b 100644 --- a/OsmoBSC/Makefile +++ b/OsmoBSC/Makefile @@ -23,8 +23,10 @@ osmobsc-usermanual.pdf: chapters/*.adoc clean: - rm -rf $(cleanfiles) - rm -rf osmobsc-usermanual__*.{svg,png,check} + -rm -rf $(cleanfiles) + -rm osmobsc-usermanual__*.png + -rm osmobsc-usermanual__*.svg + -rm osmobsc-usermanual*.check gen-bsc-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoBTS/Makefile b/OsmoBTS/Makefile index f2c873a..73430fc 100644 --- a/OsmoBTS/Makefile +++ b/OsmoBTS/Makefile @@ -22,9 +22,13 @@ osmobts-usermanual.pdf: chapters/*.adoc clean: - rm -rf $(cleanfiles) - rm -rf osmobts-abis__*.{svg,png,check} - rm -rf osmobts-usermanual__*.{svg,png,check} + -rm -rf $(cleanfiles) + -rm osmobts-abis__*.png + -rm osmobts-abis__*.svg + -rm osmobts-usermanual__*.png + -rm osmobts-usermanual__*.svg + -rm osmobts-abis*.check + -rm osmobts-usermanual*.check gen-bts-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoMGCP/Makefile b/OsmoMGCP/Makefile index aba8e3d..9aff12b 100644 --- a/OsmoMGCP/Makefile +++ b/OsmoMGCP/Makefile @@ -16,7 +16,7 @@ include ../build/Makefile.inc clean: - rm -rf $(cleanfiles) + -rm -rf $(cleanfiles) gen-mgcp-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoNAT/Makefile b/OsmoNAT/Makefile index 3ace4d2..d7302e6 100644 --- a/OsmoNAT/Makefile +++ b/OsmoNAT/Makefile @@ -16,7 +16,7 @@ include ../build/Makefile.inc clean: - rm -rf $(cleanfiles) + -rm -rf $(cleanfiles) gen-nat-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoNITB/Makefile b/OsmoNITB/Makefile index e68b9b0..99cd317 100644 --- a/OsmoNITB/Makefile +++ b/OsmoNITB/Makefile @@ -22,8 +22,10 @@ osmonitb-usermanual.pdf: chapters/*.adoc clean: - rm -rf $(cleanfiles) - rm -rf osmonitb-usermanual__*.{svg,png,check} + -rm -rf $(cleanfiles) + -rm osmonitb-usermanual__*.svg + -rm osmonitb-usermanual__*.png + -rm osmonitb-usermanual.check gen-nitb-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoPCU/Makefile b/OsmoPCU/Makefile index 1f06183..a83b909 100644 --- a/OsmoPCU/Makefile +++ b/OsmoPCU/Makefile @@ -23,9 +23,11 @@ osmopcu-usermanual.pdf: chapters/*.adoc clean: - rm -rf $(cleanfiles) - rm -rf gen-vty-docbook - rm -rf osmopcu-usermanual__*.{svg,png,check} + -rm -rf $(cleanfiles) + -rm -rf gen-vty-docbook + -rm osmopcu-usermanual__*.png + -rm osmopcu-usermanual__*.svg + -rm osmopcu-usermanual.check gen-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ diff --git a/OsmoSGSN/Makefile b/OsmoSGSN/Makefile index 7df5168..6f7d28d 100644 --- a/OsmoSGSN/Makefile +++ b/OsmoSGSN/Makefile @@ -22,8 +22,9 @@ osmosgsn-usermanual.pdf: chapters/*.adoc clean: - rm -rf osmosgsn-usermanual__*.{svg,png,check} - rm -rf $(cleanfiles) + -rm -rf $(cleanfiles) + -rm osmosgsn-usermanual__*.svg osmosgsn-usermanual__*.png + -rm osmosgsn-usermanual.check gen-sgsn-vty-docbook: FORCE $(call command,xsltproc -o generated/combined1.xml \ -- To view, visit https://gerrit.osmocom.org/1096 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6bc4d9ea72b43a573acbc860c23397f748de2c7b Gerrit-PatchSet: 5 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Oct 23 07:44:06 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 23 Oct 2016 07:44:06 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: jenkins.sh: call 'make check' In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: jenkins.sh: call 'make check' ...................................................................... jenkins.sh: call 'make check' Preceding commits have eradicated all warnings found by the 'make check' target being added here. Call from jenkins.sh now that it will no longer fail. Change-Id: I4e1a15b7a7ed50637b1c020dcd962f42d3ced08f --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 2e1d617..a6f51a8 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -12,3 +12,4 @@ cd "$base" $MAKE $PARALLEL_MAKE LIBOSMO_DIR="$deps/libosmocore" +$MAKE $PARALLEL_MAKE LIBOSMO_DIR="$deps/libosmocore" check -- To view, visit https://gerrit.osmocom.org/1095 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4e1a15b7a7ed50637b1c020dcd962f42d3ced08f Gerrit-PatchSet: 5 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Oct 23 07:44:06 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 23 Oct 2016 07:44:06 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: jenkins.sh: use sh instead of bash In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: jenkins.sh: use sh instead of bash ...................................................................... jenkins.sh: use sh instead of bash Change-Id: Ia65e960dc7d74e6bb7a2463316d09622e9788c97 Suggested-by: msuraev --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index a6f51a8..14af8cc 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh set -ex -- To view, visit https://gerrit.osmocom.org/1100 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia65e960dc7d74e6bb7a2463316d09622e9788c97 Gerrit-PatchSet: 4 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Oct 23 07:44:06 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 23 Oct 2016 07:44:06 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoNITB: include abis.adoc from common/chapters/ In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoNITB: include abis.adoc from common/chapters/ ...................................................................... OsmoNITB: include abis.adoc from common/chapters/ Change-Id: If3d92fe19d402d77b0db0eb9d00efef0a8d02122 --- M OsmoNITB/osmonitb-usermanual.adoc 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/OsmoNITB/osmonitb-usermanual.adoc b/OsmoNITB/osmonitb-usermanual.adoc index 8c48476..ec219d9 100644 --- a/OsmoNITB/osmonitb-usermanual.adoc +++ b/OsmoNITB/osmonitb-usermanual.adoc @@ -31,7 +31,7 @@ include::../common/chapters/control_if.adoc[] -include::chapters/abis.adoc[] +include::../common/chapters/abis.adoc[] include::../common/chapters/port_numbers.adoc[] -- To view, visit https://gerrit.osmocom.org/1094 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If3d92fe19d402d77b0db0eb9d00efef0a8d02122 Gerrit-PatchSet: 5 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Oct 23 07:44:06 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 23 Oct 2016 07:44:06 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoBSC+NITB/running: fix title levels, one too deep In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoBSC+NITB/running: fix title levels, one too deep ...................................................................... OsmoBSC+NITB/running: fix title levels, one too deep Change-Id: If81e44c9a0774e5de39cc536989cef5cb214a224 --- M OsmoBSC/chapters/running.adoc M OsmoNITB/chapters/running.adoc 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/OsmoBSC/chapters/running.adoc b/OsmoBSC/chapters/running.adoc index 4be6809..6747a29 100644 --- a/OsmoBSC/chapters/running.adoc +++ b/OsmoBSC/chapters/running.adoc @@ -3,11 +3,11 @@ The OsmoBSC executable (`osmo-bsc`) offers the following command-line arguments: -==== SYNOPSIS +=== SYNOPSIS *osmo-bsc* [-h|-V] [-d 'DBGMASK'] [-D] [-c 'CONFIGFILE'] [-s] [-T] [-e 'LOGLEVEL'] [-l 'IP'] [-r 'RFCTL'] -==== OPTIONS +=== OPTIONS *-h, --help*:: Print a short help message about the supported options diff --git a/OsmoNITB/chapters/running.adoc b/OsmoNITB/chapters/running.adoc index 423ecf7..ae2c3fc 100644 --- a/OsmoNITB/chapters/running.adoc +++ b/OsmoNITB/chapters/running.adoc @@ -3,11 +3,11 @@ The OsmoNITB executable (`osmo-nitb`) offers the following command-line arguments: -==== SYNOPSIS +=== SYNOPSIS *osmo-nitb* [-h|-V] [-d 'DBGMASK'] [-D] [-c 'CONFIGFILE'] [-s] [-T] [-e 'LOGLEVEL'] [-l 'DATABASE'] [-a] [-P] [-m] [-C] [-r 'RFCTL'] -==== OPTIONS +=== OPTIONS *-h, --help*:: Print a short help message about the supported options -- To view, visit https://gerrit.osmocom.org/1092 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If81e44c9a0774e5de39cc536989cef5cb214a224 Gerrit-PatchSet: 5 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Oct 23 07:44:06 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 23 Oct 2016 07:44:06 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoBSC: include bts-examples.adoc from OsmoNITB In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: OsmoBSC: include bts-examples.adoc from OsmoNITB ...................................................................... OsmoBSC: include bts-examples.adoc from OsmoNITB Change-Id: I6b6d8c413762c710453b228f846216961b578597 --- M OsmoBSC/osmobsc-usermanual.adoc 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/OsmoBSC/osmobsc-usermanual.adoc b/OsmoBSC/osmobsc-usermanual.adoc index bf1f924..25bd35b 100644 --- a/OsmoBSC/osmobsc-usermanual.adoc +++ b/OsmoBSC/osmobsc-usermanual.adoc @@ -17,7 +17,7 @@ include::../common/chapters/bts.adoc[] -include::chapters/bts-examples.adoc[] +include::../OsmoNITB/chapters/bts-examples.adoc[] include::../common/chapters/bsc.adoc[] -- To view, visit https://gerrit.osmocom.org/1093 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6b6d8c413762c710453b228f846216961b578597 Gerrit-PatchSet: 5 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun Oct 23 07:48:05 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Sun, 23 Oct 2016 07:48:05 +0000 Subject: openbsc[master]: Add empty libxsc In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 Pleae don't be discouraged, I just want to put my foot in the door here before we commit this. I don't think the name is particularly explatory. Without reviewing all the code (which I cannot do at this very instance) it is a bit confusing that we have 'libcommon' for shared code between programs, but then a 'libxsc' for other shared code between programs. In general my wish would be to have a clear separation of the data structures, i.e. those used by the bsc and those used by the msc. A BSC would link only the BSC specific part (from libbsc). A MSC/CSCN would lnk only the MSC specific part. And a NITB would link both parts. -- To view, visit https://gerrit.osmocom.org/1123 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If34e2bd38a099d0799238337468d56e0305ab8ae Gerrit-PatchSet: 1 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 Sun Oct 23 20:30:43 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sun, 23 Oct 2016 20:30:43 +0000 Subject: [PATCH] libosmocore[master]: socket: export osmo_sockaddr_equal() as library function Message-ID: Review at https://gerrit.osmocom.org/1148 socket: export osmo_sockaddr_equal() as library function Change-Id: I174fe1b894e5da0fefed81f95546c24776233421 --- M include/osmocom/core/socket.h M src/socket.c 2 files changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/48/1148/1 diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h index 6ef0912..43d21c5 100644 --- a/include/osmocom/core/socket.h +++ b/include/osmocom/core/socket.h @@ -38,4 +38,7 @@ int osmo_sock_unix_init_ofd(struct osmo_fd *ofd, uint16_t type, uint8_t proto, const char *socket_path, unsigned int flags); +int osmo_sockaddr_equal(const struct sockaddr *a, + const struct sockaddr *b, unsigned int len); + /*! @} */ diff --git a/src/socket.c b/src/socket.c index 19c513a..9efc62e 100644 --- a/src/socket.c +++ b/src/socket.c @@ -252,7 +252,7 @@ return osmo_sock_init(ss->sa_family, type, proto, host, port, flags); } -static int sockaddr_equal(const struct sockaddr *a, +int osmo_sockaddr_equal(const struct sockaddr *a, const struct sockaddr *b, unsigned int len) { struct sockaddr_in *sin_a, *sin_b; @@ -297,7 +297,7 @@ for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) { if (!ifa->ifa_addr) continue; - if (sockaddr_equal(ifa->ifa_addr, addr, addrlen)) + if (osmo_sockaddr_equal(ifa->ifa_addr, addr, addrlen)) return 1; } -- To view, visit https://gerrit.osmocom.org/1148 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I174fe1b894e5da0fefed81f95546c24776233421 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Sun Oct 23 22:59:23 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sun, 23 Oct 2016 22:59:23 +0000 Subject: libosmocore[master]: socket: export osmo_sockaddr_equal() as library function In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 on hold... -- To view, visit https://gerrit.osmocom.org/1148 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I174fe1b894e5da0fefed81f95546c24776233421 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Oct 23 23:06:03 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 23 Oct 2016 23:06:03 +0000 Subject: openbsc[master]: Add empty libxsc In-Reply-To: References: Message-ID: Patch Set 1: libxsc is intended to contain things common to libbsc and libmsc, but which are not used by gprs/*, utils/* nor ipaccess/*. The sysmocom/iu branch commits show the shared code between libbsc and libmsc: basically all that is found in libxsc at sysmocom/iu branch head. Proper separation of gsm_network and gsm_subscriber_connection is still a TODO though, and is one of the things that would be up next (besides nano3G voice). -- To view, visit https://gerrit.osmocom.org/1123 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If34e2bd38a099d0799238337468d56e0305ab8ae Gerrit-PatchSet: 1 Gerrit-Project: openbsc 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 Sun Oct 23 23:08:46 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 23 Oct 2016 23:08:46 +0000 Subject: openbsc[master]: Add empty libxsc In-Reply-To: References: Message-ID: Patch Set 1: BTW, the name was your idea ;) most accurate would be something like libbsc-msc-common, but that's a tad long. libcscommon, i.e. circuit switched common? libcommon-cs? -- To view, visit https://gerrit.osmocom.org/1123 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If34e2bd38a099d0799238337468d56e0305ab8ae Gerrit-PatchSet: 1 Gerrit-Project: openbsc 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 Oct 24 00:15:40 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 24 Oct 2016 00:15:40 +0000 Subject: [PATCH] openbsc[master]: split bsc_bootstrap_network() in alloc and config In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1140 to look at the new patch set (#3). split bsc_bootstrap_network() in alloc and config For patch clarity, keep some code dup to be removed in a subsequent patch. In the same sense don't change the fact that mncc_sock_init()'s return value is ignored. The global gsm_network instance 'bsc_gsmnet' is basically only used by the VTY, and a future patch will "hide" that global in a vty .c file. In a nutshell, I want to - first allocate a gsm_network, - then initialize the VTY passing the gsm_network pointer, - and then read the config file using the initialized VTY. So far, bsc_bootstrap_network() allocates the gsm_network and reads the config file right away, which only works by sharing the extern bsc_gsmnet pointer, which I would like to uncouple. Change-Id: I480a09a31a79766ad07b627dd5238b7e37f3be7a --- M openbsc/include/openbsc/bss.h M openbsc/src/libbsc/bsc_init.c M openbsc/src/osmo-bsc/osmo_bsc_main.c M openbsc/src/osmo-nitb/bsc_hack.c 4 files changed, 33 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/40/1140/3 diff --git a/openbsc/include/openbsc/bss.h b/openbsc/include/openbsc/bss.h index d73776f..9f16bf7 100644 --- a/openbsc/include/openbsc/bss.h +++ b/openbsc/include/openbsc/bss.h @@ -6,7 +6,8 @@ struct msgb; /* start and stop network */ -extern int bsc_bootstrap_network(mncc_recv_cb_t mncc_recv, const char *cfg_file); +extern int bsc_network_alloc(mncc_recv_cb_t mncc_recv); +extern int bsc_network_configure(const char *cfg_file); extern int bsc_shutdown_net(struct gsm_network *net); /* register all supported BTS */ diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c index 214926b..e6f5814 100644 --- a/openbsc/src/libbsc/bsc_init.c +++ b/openbsc/src/libbsc/bsc_init.c @@ -476,12 +476,8 @@ return 0; } -int bsc_bootstrap_network(mncc_recv_cb_t mncc_recv, const char *config_file) +int bsc_network_alloc(mncc_recv_cb_t mncc_recv) { - struct gsm_bts *bts; - int rc; - - /* initialize our data structures */ bsc_gsmnet = bsc_network_init(tall_bsc_ctx, 1, 1, mncc_recv); if (!bsc_gsmnet) return -ENOMEM; @@ -489,6 +485,14 @@ bsc_gsmnet->name_long = talloc_strdup(bsc_gsmnet, "OpenBSC"); bsc_gsmnet->name_short = talloc_strdup(bsc_gsmnet, "OpenBSC"); + return 0; +} + +int bsc_network_configure(const char *config_file) +{ + struct gsm_bts *bts; + int rc; + rc = vty_read_config_file(config_file, NULL); if (rc < 0) { LOGP(DNM, LOGL_FATAL, "Failed to parse the config file: '%s'\n", config_file); diff --git a/openbsc/src/osmo-bsc/osmo_bsc_main.c b/openbsc/src/osmo-bsc/osmo_bsc_main.c index daab55b..b6b1ae1 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_main.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_main.c @@ -220,8 +220,12 @@ /* initialize SCCP */ sccp_set_log_area(DSCCP); - - rc = bsc_bootstrap_network(NULL, config_file); + rc = bsc_network_alloc(NULL); + if (rc) { + fprintf(stderr, "Allocation failed. exiting.\n"); + exit(1); + } + rc = bsc_network_configure(config_file); if (rc < 0) { fprintf(stderr, "Bootstrapping the network failed. exiting.\n"); exit(1); diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c index 28dbb6f..4e15b2d 100644 --- a/openbsc/src/osmo-nitb/bsc_hack.c +++ b/openbsc/src/osmo-nitb/bsc_hack.c @@ -284,15 +284,26 @@ /* internal MNCC handler or MNCC socket? */ if (mncc_sock_path) { - rc = bsc_bootstrap_network(mncc_sock_from_cc, config_file); - if (rc >= 0) - mncc_sock_init(bsc_gsmnet, mncc_sock_path); + rc = bsc_network_alloc(mncc_sock_from_cc); + if (rc) { + fprintf(stderr, "Allocation failed. Exiting.\n"); + exit(1); + } + mncc_sock_init(bsc_gsmnet, mncc_sock_path); } else { DEBUGP(DMNCC, "Using internal MNCC handler.\n"); - rc = bsc_bootstrap_network(int_mncc_recv, config_file); + rc = bsc_network_alloc(int_mncc_recv); + if (rc) { + fprintf(stderr, "Allocation failed. Exiting.\n"); + exit(1); + } } - if (rc < 0) + rc = bsc_network_configure(config_file); + if (rc < 0) { + fprintf(stderr, "Reading config failed. Exiting.\n"); exit(1); + } + #ifdef BUILD_SMPP smpp_openbsc_start(bsc_gsmnet); #endif -- To view, visit https://gerrit.osmocom.org/1140 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I480a09a31a79766ad07b627dd5238b7e37f3be7a 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 Oct 24 00:15:40 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 24 Oct 2016 00:15:40 +0000 Subject: [PATCH] openbsc[master]: osmo-nitb: exit when MNCC socket init failed In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1141 to look at the new patch set (#3). osmo-nitb: exit when MNCC socket init failed Change-Id: Icef97bb5da9840b810fe6f4b4da6abd4baa66915 --- M openbsc/src/osmo-nitb/bsc_hack.c 1 file changed, 7 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/41/1141/3 diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c index a664cdb..4c0ad8c 100644 --- a/openbsc/src/osmo-nitb/bsc_hack.c +++ b/openbsc/src/osmo-nitb/bsc_hack.c @@ -291,9 +291,13 @@ #endif /* Initialize MNCC socket if appropriate */ - if (mncc_sock_path) - mncc_sock_init(bsc_gsmnet, mncc_sock_path); - else + if (mncc_sock_path) { + rc = mncc_sock_init(bsc_gsmnet, mncc_sock_path); + if (rc) { + fprintf(stderr, "MNCC socket initialization failed. exiting.\n"); + exit(1); + } + } else DEBUGP(DMNCC, "Using internal MNCC handler.\n"); /* Read the config */ -- To view, visit https://gerrit.osmocom.org/1141 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Icef97bb5da9840b810fe6f4b4da6abd4baa66915 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 Oct 24 00:15:41 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 24 Oct 2016 00:15:41 +0000 Subject: [PATCH] openbsc[master]: global gsm_network: move allocation further up Message-ID: Review at https://gerrit.osmocom.org/1150 global gsm_network: move allocation further up Now that bsc_network_alloc() is separate, move it to before the VTY init (a subsequent patch will pass the gsm_network instance as a parameter to vty_init()). bsc_hack.c: drop the comment that says about the VTY init: "This needs to precede handle_options()" -- it is not accurate. Actually move the handle_options() above both vty_init() and the bsc_network_alloc() calls, to be able to decide which mncc callback to pass to bsc_network_alloc. It would make sense to set this later on, but that would require further refactoring of the bsc_network_init() and gsm_network_init() signatures, so not in this patch. Change-Id: Ie6a7037e703b5a2d08ceeb20d35f197aaddc9d1b --- M openbsc/src/osmo-bsc/osmo_bsc_main.c M openbsc/src/osmo-nitb/bsc_hack.c 2 files changed, 25 insertions(+), 23 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/50/1150/1 diff --git a/openbsc/src/osmo-bsc/osmo_bsc_main.c b/openbsc/src/osmo-bsc/osmo_bsc_main.c index b6b1ae1..1d96bb4 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_main.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_main.c @@ -194,6 +194,13 @@ tall_bsc_ctx = talloc_named_const(NULL, 1, "openbsc"); msgb_talloc_ctx_init(tall_bsc_ctx, 0); + /* Allocate global gsm_network struct */ + rc = bsc_network_alloc(NULL); + if (rc) { + fprintf(stderr, "Allocation failed. exiting.\n"); + exit(1); + } + osmo_init_logging(&log_info); osmo_stats_init(tall_bsc_ctx); @@ -220,11 +227,7 @@ /* initialize SCCP */ sccp_set_log_area(DSCCP); - rc = bsc_network_alloc(NULL); - if (rc) { - fprintf(stderr, "Allocation failed. exiting.\n"); - exit(1); - } + /* Read the config */ rc = bsc_network_configure(config_file); if (rc < 0) { fprintf(stderr, "Bootstrapping the network failed. exiting.\n"); diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c index 4e15b2d..a664cdb 100644 --- a/openbsc/src/osmo-nitb/bsc_hack.c +++ b/openbsc/src/osmo-nitb/bsc_hack.c @@ -269,7 +269,18 @@ osmo_stats_init(tall_bsc_ctx); bts_init(); - /* This needs to precede handle_options() */ + /* Parse options */ + handle_options(argc, argv); + + /* Allocate global gsm_network struct; choose socket/internal MNCC */ + rc = bsc_network_alloc(mncc_sock_path? + mncc_sock_from_cc : int_mncc_recv); + if (rc) { + fprintf(stderr, "Allocation failed. Exiting.\n"); + exit(1); + } + + /* Initialize VTY */ vty_init(&vty_info); bsc_vty_init(&log_info, bsc_gsmnet); ctrl_vty_init(tall_bsc_ctx); @@ -279,25 +290,13 @@ return -1; #endif - /* parse options */ - handle_options(argc, argv); - - /* internal MNCC handler or MNCC socket? */ - if (mncc_sock_path) { - rc = bsc_network_alloc(mncc_sock_from_cc); - if (rc) { - fprintf(stderr, "Allocation failed. Exiting.\n"); - exit(1); - } + /* Initialize MNCC socket if appropriate */ + if (mncc_sock_path) mncc_sock_init(bsc_gsmnet, mncc_sock_path); - } else { + else DEBUGP(DMNCC, "Using internal MNCC handler.\n"); - rc = bsc_network_alloc(int_mncc_recv); - if (rc) { - fprintf(stderr, "Allocation failed. Exiting.\n"); - exit(1); - } - } + + /* Read the config */ rc = bsc_network_configure(config_file); if (rc < 0) { fprintf(stderr, "Reading config failed. Exiting.\n"); -- To view, visit https://gerrit.osmocom.org/1150 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie6a7037e703b5a2d08ceeb20d35f197aaddc9d1b Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 24 00:20:27 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 24 Oct 2016 00:20:27 +0000 Subject: openbsc[master]: move to libxsc: global vty gsm_network pointer In-Reply-To: References: Message-ID: Patch Set 3: branch was rebased to yield this order of patches: * #1140 "split bsc_bootstrap_network() in alloc and config", then * #1150 "global gsm_network: move allocation further up", then * #1133 "move to libxsc: global vty gsm_network pointer" -- To view, visit https://gerrit.osmocom.org/1133 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I26c5c47de08f899b896813d09612d5cb2f8e42d6 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 Mon Oct 24 00:20:45 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 24 Oct 2016 00:20:45 +0000 Subject: openbsc[master]: split bsc_bootstrap_network() in alloc and config In-Reply-To: References: Message-ID: Patch Set 3: branch was rebased to yield this order of patches: * #1140 "split bsc_bootstrap_network() in alloc and config", then * #1150 "global gsm_network: move allocation further up", then * #1133 "move to libxsc: global vty gsm_network pointer" -- To view, visit https://gerrit.osmocom.org/1140 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I480a09a31a79766ad07b627dd5238b7e37f3be7a 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 Mon Oct 24 00:20:56 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 24 Oct 2016 00:20:56 +0000 Subject: openbsc[master]: global gsm_network: move allocation further up In-Reply-To: References: Message-ID: Patch Set 1: branch was rebased to yield this order of patches: * #1140 "split bsc_bootstrap_network() in alloc and config", then * #1150 "global gsm_network: move allocation further up", then * #1133 "move to libxsc: global vty gsm_network pointer" -- To view, visit https://gerrit.osmocom.org/1150 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie6a7037e703b5a2d08ceeb20d35f197aaddc9d1b Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Oct 24 02:13:51 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 24 Oct 2016 02:13:51 +0000 Subject: openbsc[master]: Move timezone settings up to network level In-Reply-To: References: Message-ID: Patch Set 3: This patch needs adjustment to the testTimezone vty test -- To view, visit https://gerrit.osmocom.org/1137 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I69848887d92990f3d6f969be80f6ef91f6bdbbe8 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 Mon Oct 24 02:17:22 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 24 Oct 2016 02:17:22 +0000 Subject: openbsc[master]: Move timezone settings up to network level In-Reply-To: References: Message-ID: Patch Set 3: rather the testTimezone CTRL test and the testNetworkTimezone VTY test -- To view, visit https://gerrit.osmocom.org/1137 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I69848887d92990f3d6f969be80f6ef91f6bdbbe8 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 Mon Oct 24 06:54:49 2016 From: gerrit-no-reply at lists.osmocom.org (pravin) Date: Mon, 24 Oct 2016 06:54:49 +0000 Subject: [PATCH] osmo-pcu[master]: Fix issues in URBB generation in EGPRS PUAN In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/412 to look at the new patch set (#3). Fix issues in URBB generation in EGPRS PUAN Below issue in uncompresed bitmap generation is addressed 1. Corrected the number of bits that is included in URBB 2. If length is not present, 0s are coded as remaining bits Along with this, code is restructured to enable addition of compression support Change-Id: Ie5c25b6ee30f2f1b613e923c234b03a6ffe12ae2 --- M src/encoding.cpp M tests/tbf/TbfTest.err 2 files changed, 39 insertions(+), 36 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/12/412/3 diff --git a/src/encoding.cpp b/src/encoding.cpp index 7d3fa14..3325a49 100644 --- a/src/encoding.cpp +++ b/src/encoding.cpp @@ -332,7 +332,7 @@ if (!use_egprs) { bitvec_write_field(dest, wp,0x0,1); // Message escape - bitvec_write_field(dest, wp,tbf->current_cs().to_num()-1, 2); // CHANNEL_CODING_COMMAND + bitvec_write_field(dest, wp, tbf->current_cs().to_num()-1, 2); // CHANNEL_CODING_COMMAND bitvec_write_field(dest, wp,0x1,1); // TLLI_BLOCK_CHANNEL_CODING bitvec_write_field(dest, wp,0x1,1); // switch TIMING_ADVANCE_VALUE = on bitvec_write_field(dest, wp,tbf->ta(),6); // TIMING_ADVANCE_VALUE @@ -355,7 +355,7 @@ bitvec_write_field(dest, wp,ws_enc,5); // EGPRS Window Size bitvec_write_field(dest, wp,0x0,1); // No Access Technologies Request bitvec_write_field(dest, wp,0x0,1); // No ARAC RETRANSMISSION REQUEST - bitvec_write_field(dest, wp,0x1,1); // TLLI_BLOCK_CHANNEL_CODING + bitvec_write_field(dest, wp, 0x1, 1); // TLLI_BLOCK_CHANNEL_CODING bitvec_write_field(dest, wp,0x0,1); // No BEP_PERIOD2 bitvec_write_field(dest, wp,0x1,1); // switch TIMING_ADVANCE_VALUE = on @@ -612,14 +612,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 */ @@ -627,33 +630,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 @@ -664,17 +665,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 8c6b78c..effae4c 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -6278,7 +6278,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 @@ -6291,7 +6291,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: newpatchset Gerrit-Change-Id: Ie5c25b6ee30f2f1b613e923c234b03a6ffe12ae2 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: prasadkg From gerrit-no-reply at lists.osmocom.org Mon Oct 24 07:27:37 2016 From: gerrit-no-reply at lists.osmocom.org (pravin) Date: Mon, 24 Oct 2016 07:27:37 +0000 Subject: [PATCH] libosmocore[master]: Add T.4 compression routines 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/415 to look at the new patch set (#2). Add T.4 compression routines Functions for bitmap compression for PUAN is added The compression algorithm is as described in 44.060 Change-Id: Iae153d3639ea6b891c1fc10d7801a435c9492e26 --- M include/osmocom/core/bitvec.h M src/bitvec.c 2 files changed, 55 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/15/415/2 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..718beda 100644 --- a/src/bitvec.c +++ b/src/bitvec.c @@ -575,6 +575,60 @@ 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 + * \returns Number of consecutive bits of \p b in \p bv + */ +unsigned bitvec_rl_curbit(struct bitvec *bv, bool b, int max_bits) +{ + unsigned i = 0; + int temp_res = 0; + int count = 0; + unsigned readIndex = bv->cur_bit; + if (bv->cur_bit % 8 == 0) { + for (i = (bv->cur_bit/8); + i < (max_bits % 8 ? max_bits/8 + 1 : max_bits/8); + i++, count++) { + if ((b ? 0xFF : 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); + } + } + bv->cur_bit = (count * 8) + readIndex; + if (bv->cur_bit > max_bits) + bv->cur_bit = max_bits; + return (bv->cur_bit - readIndex); + } + int pos = bv->cur_bit/8; + + while (readIndex < max_bits && bitvec_read_field(bv, &readIndex, 1) == b) { + if (bv->cur_bit % 8 >= 0) + temp_res++; + else { + pos++; + for (i = pos; + i < (max_bits % 8 ? max_bits/8 + 1 : max_bits/8); + i++, count++) { + if ((b ? 0xFF : 0) != bv->data[i]) { + bv->cur_bit = (count * 8 + + leading_bits(bv->data[i], b) + + temp_res) + readIndex; + return count * 8 + + leading_bits(bv->data[i], b) + + temp_res; + } + } + bv->cur_bit = (temp_res + (count * 8)) + readIndex; + return temp_res + (count * 8); + } + } + bv->cur_bit--; + return temp_res; +} + /*! \brief Shifts bitvec to the left, n MSB bits lost */ void bitvec_shiftl(struct bitvec *bv, unsigned n) { -- To view, visit https://gerrit.osmocom.org/415 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iae153d3639ea6b891c1fc10d7801a435c9492e26 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: prasadkg From gerrit-no-reply at lists.osmocom.org Mon Oct 24 07:35:41 2016 From: gerrit-no-reply at lists.osmocom.org (pravin) Date: Mon, 24 Oct 2016 07:35:41 +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 (#2). 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: I89683e82eda6c80b7328ddb4ec2c2f55d4a687aa --- 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, 538 insertions(+), 29 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/13/413/2 diff --git a/src/egprs_rlc_compression.cpp b/src/egprs_rlc_compression.cpp index f4e6bde..e73a36a 100644 --- a/src/egprs_rlc_compression.cpp +++ b/src/egprs_rlc_compression.cpp @@ -83,9 +83,204 @@ } } } + +/* + * 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 -/* The code words for one run length and zero run length are described in - * table 9.1.10.1 of 3gpp 44.060 + }, + { + 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 3325a49..cc25e46 100644 --- a/src/encoding.cpp +++ b/src/encoding.cpp @@ -24,6 +24,7 @@ #include #include #include +#include extern "C" { #include @@ -332,7 +333,7 @@ if (!use_egprs) { bitvec_write_field(dest, wp,0x0,1); // Message escape - bitvec_write_field(dest, wp, tbf->current_cs().to_num()-1, 2); // CHANNEL_CODING_COMMAND + bitvec_write_field(dest, wp,tbf->current_cs().to_num()-1, 2); // CHANNEL_CODING_COMMAND bitvec_write_field(dest, wp,0x1,1); // TLLI_BLOCK_CHANNEL_CODING bitvec_write_field(dest, wp,0x1,1); // switch TIMING_ADVANCE_VALUE = on bitvec_write_field(dest, wp,tbf->ta(),6); // TIMING_ADVANCE_VALUE @@ -609,20 +610,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 */ @@ -630,27 +655,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 */ @@ -666,14 +731,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" : ""); @@ -705,7 +788,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 ee2635a..696aed5 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; @@ -105,7 +131,8 @@ uint16_t first_bsn, uint16_t *lost, uint16_t *received) { - unsigned num_blocks = rbb->cur_bit; + unsigned num_blocks = rbb->cur_bit > (unsigned)distance() + ? distance() : rbb->cur_bit; unsigned bsn; /* first_bsn is in range V(A)..V(S) */ @@ -217,6 +244,8 @@ void gprs_rlc_window::set_ws(uint16_t ws) { + LOGP(DRLCMAC, LOGL_ERROR, "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 b693418..83b6815 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 0ac8ace..041db4c 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -700,14 +700,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 3205f6e..3f73297 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -465,6 +465,8 @@ struct gprs_rlc_data *block, uint8_t *data, const uint8_t block_idx); + void egprs_calc_ulwindow_size(); + /* Please note that all variables here will be reset when changing * from WAIT RELEASE back to FLOW state (re-use of TBF). * All states that need reset must be in this struct, so this is why diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index f67ffd7..62f55c8 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 @@ -517,3 +519,22 @@ } return assemble_status; } + +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_ERROR, "%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 effae4c..d976876 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -3333,6 +3333,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 @@ -3376,6 +3377,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 @@ -3428,6 +3431,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' @@ -3468,6 +3472,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 @@ -3683,6 +3689,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' @@ -3712,6 +3719,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 @@ -4046,6 +4054,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 @@ -4325,6 +4334,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 @@ -4563,6 +4573,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 @@ -4765,6 +4776,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 @@ -4945,6 +4957,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 @@ -5106,6 +5119,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 @@ -5263,6 +5277,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 @@ -5407,6 +5422,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 @@ -5552,6 +5568,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 @@ -5603,6 +5620,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 @@ -5654,6 +5672,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 @@ -5705,6 +5724,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 @@ -5775,6 +5795,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 @@ -5845,6 +5866,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 @@ -5915,6 +5937,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 @@ -5985,6 +6008,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 @@ -6042,6 +6066,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 @@ -6099,6 +6124,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 @@ -6156,6 +6182,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 @@ -6230,6 +6257,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 @@ -6312,6 +6341,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' @@ -6343,6 +6373,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. @@ -6359,6 +6390,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 @@ -6402,6 +6434,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 @@ -6471,6 +6505,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' -- To view, visit https://gerrit.osmocom.org/413 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I89683e82eda6c80b7328ddb4ec2c2f55d4a687aa Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: prasadkg From gerrit-no-reply at lists.osmocom.org Mon Oct 24 07:37:45 2016 From: gerrit-no-reply at lists.osmocom.org (pravin) Date: Mon, 24 Oct 2016 07:37:45 +0000 Subject: osmo-pcu[master]: Add compression support in EGPRS PUAN In-Reply-To: References: Message-ID: Patch Set 2: > Build Failed > > http://jenkins.osmocom.org/jenkins/job/osmo-pcu-gerrit/400/ : > FAILURE There is a dependency for this patch with libosmocore Gerrit-Change-Id: Iae153d3639ea6b891c1fc10d7801a435c9492e26. Due to this there is jenkins build failure 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: I89683e82eda6c80b7328ddb4ec2c2f55d4a687aa Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: prasadkg Gerrit-Reviewer: pravin Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Oct 24 07:47:05 2016 From: gerrit-no-reply at lists.osmocom.org (pravin) Date: Mon, 24 Oct 2016 07:47:05 +0000 Subject: [PATCH] osmo-pcu[master]: Add test case for testing 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/414 to look at the new patch set (#3). 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,389 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/14/414/3 diff --git a/src/rlc.h b/src/rlc.h index 83b6815..9c3c753 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 uint16_t set_v_r(int); + const uint16_t 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 uint16_t gprs_rlc_ul_window::set_v_r(int v_r) +{ + m_v_r = v_r; +} + +inline const uint16_t 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 c716a55..721a31a 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -1214,6 +1214,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) @@ -1371,6 +1713,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__); +} static void test_tbf_two_phase() { BTS the_bts; @@ -2670,7 +3079,6 @@ vty_init(&pcu_vty_info); pcu_vty_init(&debug_log_info); - test_tbf_base(); test_tbf_tlli_update(); test_tbf_final_ack(TEST_MODE_STANDARD); @@ -2695,6 +3103,7 @@ test_tbf_puan_urbb_len(); test_tbf_update_ws(); test_tbf_li_decoding(); + test_tbf_egprs_two_phase_puan(); 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 d976876..09d0eaf 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -6513,3 +6513,1967 @@ 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 +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: +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 diff --git a/tests/tbf/TbfTest.ok b/tests/tbf/TbfTest.ok index eb870ea..bd89f55 100644 --- a/tests/tbf/TbfTest.ok +++ b/tests/tbf/TbfTest.ok @@ -66,3 +66,5 @@ === end test_tbf_update_ws === === start test_tbf_li_decoding === === end test_tbf_li_decoding === +=== start test_tbf_egprs_two_phase_puan === +=== end test_tbf_egprs_two_phase_puan === -- 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: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: prasadkg From gerrit-no-reply at lists.osmocom.org Mon Oct 24 07:48:37 2016 From: gerrit-no-reply at lists.osmocom.org (pravin) Date: Mon, 24 Oct 2016 07:48:37 +0000 Subject: osmo-pcu[master]: Add test case for testing PUAN In-Reply-To: References: Message-ID: Patch Set 3: > Build Failed > > http://jenkins.osmocom.org/jenkins/job/osmo-pcu-gerrit/401/ : > FAILURE There is a dependency for this patch with libosmocore Gerrit-Change-Id: Iae153d3639ea6b891c1fc10d7801a435c9492e26. Due to this there is jenkins build failure for this patch -- 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: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: prasadkg Gerrit-Reviewer: pravin Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Oct 24 08:43:30 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 24 Oct 2016 08:43:30 +0000 Subject: [MERGED] osmo-bts[master]: DTX HR - fix array size calculation In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: DTX HR - fix array size calculation ...................................................................... DTX HR - fix array size calculation Use ARRAY_SIZE macro for each pointer separately. Fix suggested by Neels Hofmeyr . Change-Id: I68ec1be33fb743977121d654187d85d6b8451e2b Fixes: Coverity CID 150132 --- M src/common/msg_utils.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index f00a71a..393ae90 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -260,7 +260,8 @@ return fn_chk(f, fn, ARRAY_SIZE(f)); else return fn_chk(lchan->nr ? h1 : h0, fn, - ARRAY_SIZE(lchan->nr ? h1 : h0)); + lchan->nr ? ARRAY_SIZE(h1) : + ARRAY_SIZE(h0)); } return false; } -- To view, visit https://gerrit.osmocom.org/1063 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I68ec1be33fb743977121d654187d85d6b8451e2b Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts 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 Oct 24 08:55:20 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 24 Oct 2016 08:55:20 +0000 Subject: [MERGED] osmo-bts[master]: Fix DTX DL AMR SIDscheduling logic In-Reply-To: References: Message-ID: Max has submitted this change and it was merged. Change subject: Fix DTX DL AMR SIDscheduling logic ...................................................................... Fix DTX DL AMR SIDscheduling logic Previously SID UPDATE was sometimes scheduled incorrectly. Fix this by: * avoid rounding error when computing scheduling time difference from FN * properly saving and updating cached SID type and FN Change-Id: I7acffae4792e7bddc2ae19a2f04ee921dc194c36 Related: OS#1801 --- M src/common/msg_utils.c 1 file changed, 14 insertions(+), 9 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 393ae90..9c6f20f 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -116,8 +116,11 @@ ARRAY_SIZE(lchan->tch.dtx.cache) - amr); lchan->tch.dtx.len = copy_len + amr; - lchan->tch.dtx.fn = fn; - lchan->tch.dtx.is_update = update; + /* SID FIRST is special because it's both sent and cached: */ + if (update == 0) { + lchan->tch.dtx.fn = fn; + lchan->tch.dtx.is_update = false; /* Mark SID FIRST explicitly */ + } memcpy(lchan->tch.dtx.cache + amr, l1_payload, copy_len); } @@ -128,6 +131,7 @@ * \param[in] rtp_pl_len length of rtp_pl * \param[in] fn Frame Number for which we check scheduling * \param[in] l1_payload buffer where CMR and CMI prefix should be added + * \param[in] marker RTP Marker bit * \param[out] len Length of expected L1 payload * \param[out] ft_out Frame Type to be populated after decoding * \returns 0 in case of success; negative on error @@ -219,18 +223,18 @@ static inline bool dtx_amr_sid_optional(const struct gsm_lchan *lchan, uint32_t fn) { - /* Compute approx. time delta based on Fn duration */ - uint32_t delta = GSM_FN_TO_MS(fn - lchan->tch.dtx.fn); + /* Compute approx. time delta x26 based on Fn duration */ + uint32_t dx26 = 120 * (fn - lchan->tch.dtx.fn); - /* according to 3GPP TS 26.093 A.5.1.1: */ - if (lchan->tch.dtx.is_update) { - /* SID UPDATE should be repeated every 8th RTP frame */ - if (delta < GSM_RTP_FRAME_DURATION_MS * 8) + /* according to 3GPP TS 26.093 A.5.1.1: + (*26) to avoid float math, add 1 FN tolerance (-120) */ + if (lchan->tch.dtx.is_update) { /* SID UPDATE: every 8th RTP frame */ + if (dx26 < GSM_RTP_FRAME_DURATION_MS * 8 * 26 - 120) return true; return false; } /* 3rd frame after SID FIRST should be SID UPDATE */ - if (delta < GSM_RTP_FRAME_DURATION_MS * 3) + if (dx26 < GSM_RTP_FRAME_DURATION_MS * 3 * 26 - 120) return true; return false; } @@ -289,6 +293,7 @@ if (lchan->tch.dtx.len) { memcpy(dst, lchan->tch.dtx.cache, lchan->tch.dtx.len); lchan->tch.dtx.fn = fn; + lchan->tch.dtx.is_update = true; /* SID UPDATE sent */ return lchan->tch.dtx.len + 1; } -- To view, visit https://gerrit.osmocom.org/1144 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7acffae4792e7bddc2ae19a2f04ee921dc194c36 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts 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 Oct 24 08:59:37 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 24 Oct 2016 08:59:37 +0000 Subject: osmo-pcu[master]: Add test case for testing PUAN In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/414/3/src/rlc.h File src/rlc.h: Line 577: inline const uint16_t gprs_rlc_ul_window::set_v_r(int v_r) Fix the warning or better.. change the return type as the unit tests don't check it anyway. -- 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: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: prasadkg Gerrit-Reviewer: pravin Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Oct 24 09:31:48 2016 From: gerrit-no-reply at lists.osmocom.org (pravin) Date: Mon, 24 Oct 2016 09:31:48 +0000 Subject: [PATCH] osmo-pcu[master]: Add test case for testing 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/414 to look at the new patch set (#4). 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,388 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/14/414/4 diff --git a/src/rlc.h b/src/rlc.h index 83b6815..421941f 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,15 @@ 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 c716a55..721a31a 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -1214,6 +1214,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) @@ -1371,6 +1713,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__); +} static void test_tbf_two_phase() { BTS the_bts; @@ -2670,7 +3079,6 @@ vty_init(&pcu_vty_info); pcu_vty_init(&debug_log_info); - test_tbf_base(); test_tbf_tlli_update(); test_tbf_final_ack(TEST_MODE_STANDARD); @@ -2695,6 +3103,7 @@ test_tbf_puan_urbb_len(); test_tbf_update_ws(); test_tbf_li_decoding(); + test_tbf_egprs_two_phase_puan(); 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 d976876..09d0eaf 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -6513,3 +6513,1967 @@ 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 +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: +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 diff --git a/tests/tbf/TbfTest.ok b/tests/tbf/TbfTest.ok index eb870ea..bd89f55 100644 --- a/tests/tbf/TbfTest.ok +++ b/tests/tbf/TbfTest.ok @@ -66,3 +66,5 @@ === end test_tbf_update_ws === === start test_tbf_li_decoding === === end test_tbf_li_decoding === +=== start test_tbf_egprs_two_phase_puan === +=== end test_tbf_egprs_two_phase_puan === -- 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: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: prasadkg Gerrit-Reviewer: pravin From gerrit-no-reply at lists.osmocom.org Mon Oct 24 10:02:45 2016 From: gerrit-no-reply at lists.osmocom.org (pravin) Date: Mon, 24 Oct 2016 10:02:45 +0000 Subject: osmo-pcu[master]: Add test case for testing PUAN In-Reply-To: References: Message-ID: Patch Set 4: > Build Failed > > http://jenkins.osmocom.org/jenkins/job/osmo-pcu-gerrit/402/ : > FAILURE > Build Failed > > http://jenkins.osmocom.org/jenkins/job/osmo-pcu-gerrit/402/ : > FAILURE > Build Failed > > http://jenkins.osmocom.org/jenkins/job/osmo-pcu-gerrit/402/ : > FAILURE There is a dependency for this patch with libosmocore Gerrit-Change-Id: Iae153d3639ea6b891c1fc10d7801a435c9492e26. Due to this there is jenkins build failure for this patch -- 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: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: prasadkg Gerrit-Reviewer: pravin Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Oct 24 10:03:08 2016 From: gerrit-no-reply at lists.osmocom.org (pravin) Date: Mon, 24 Oct 2016 10:03:08 +0000 Subject: osmo-pcu[master]: Add test case for testing PUAN In-Reply-To: References: Message-ID: Patch Set 4: (1 comment) https://gerrit.osmocom.org/#/c/414/3/src/rlc.h File src/rlc.h: Line 577: inline const void gprs_rlc_ul_window::set_v_r(int v_r) > Fix the warning or better.. change the return type as the unit tests don't Done -- 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: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: prasadkg Gerrit-Reviewer: pravin Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Oct 24 11:27:38 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 24 Oct 2016 11:27:38 +0000 Subject: [PATCH] osmo-bts[master]: Add tools to check DTX operation 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/1143 to look at the new patch set (#4). Add tools to check DTX operation * superfemto.sh can parse superfemto-compatible DSP log output to properly sort records into MT/MO and DL/UL parts * dtx_check.gawk can process output of superfemto.sh and check for common scheduling errors This allows to check lc15 and sysmo for errors in DTX DL scheduling. As dtx_check.gawk is generic it can be used with any other BTS hw (or virtula BTS) as long as raw logs from this hw can be converted to simple input format 'FN EVENT' per-line. Change-Id: Ib1c70c4543b24c2a05a7df8eec5ce3f4eda2c02e Related: OS#1801 --- A contrib/dtx_check.gawk A contrib/superfemto.sh 2 files changed, 163 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/43/1143/4 diff --git a/contrib/dtx_check.gawk b/contrib/dtx_check.gawk new file mode 100755 index 0000000..a8cb32c --- /dev/null +++ b/contrib/dtx_check.gawk @@ -0,0 +1,64 @@ +#!/usr/bin/gawk -f + +# Expected input format: FN TYPE + +BEGIN { + DELTA = 0 + ERR = 0 + FN = 0 + TYPE = "" + CHK = "" + U_MAX = 8 * 20 + 120 / 26 + U_MIN = 8 * 20 - 120 / 26 + F_MAX = 3 * 20 + 120 / 26 + F_MIN = 3 * 20 - 120 / 26 +} + +{ + if (NR > 1) { # we have data from previous record to compare to + DELTA = ($1 - FN) * 120 / 26 + CHK = "OK" + if ("UPDATE" == TYPE || "FIRST" == TYPE) { # check for missing ONSET: + if ("FACCH" == $2 || "SPEECH" == $2) { + CHK = "FAIL: missing ONSET" + ERR++ + } + } + if ("OK" == CHK) { # check inter-SID distances: + if ("UPDATE" == TYPE) { + if (DELTA > U_MAX) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too big " DELTA "ms > " U_MAX "ms" + ERR++ + } + if ("UPDATE" == $2) { + if (DELTA < U_MIN) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too small " DELTA "ms < " U_MIN "ms" + ERR++ + } + } + } + if ("FIRST" == TYPE) { + if (DELTA > F_MAX) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID FIRST (@" FN ") too big " DELTA "ms > " F_MAX "ms" + ERR++ + } + if ("UPDATE" == $2) { + if (DELTA < F_MIN) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too small " DELTA "ms < " F_MIN "ms" + ERR++ + } + } + } + } + # FIXME: FACCH-specific checks? + } + print $1, $2, CHK, TYPE, DELTA + if ($2 != "EMPTY") { # skip over EMPTY records + TYPE = $2 + FN = $1 + } +} + +END { + print "check completed: found " ERR " errors in " NR " records" +} diff --git a/contrib/superfemto.sh b/contrib/superfemto.sh new file mode 100644 index 0000000..8c31d06 --- /dev/null +++ b/contrib/superfemto.sh @@ -0,0 +1,99 @@ +#!/bin/sh + +# Split common DSP call log file (produced by superfemto-compatible firmware) into 4 separate call leg files (MO/MT & DL/UL) with events in format "FN EVENT_TYPE": +# MO Mobile Originated +# MT Mobile Terminated +# DL DownLink (BTS -> L1) +# UL UpLink (L1 -> BTS) + +if [ -z $1 ]; then + echo "expecting DSP log file name as parameter" + exit 1 +fi + +# MO handle appear 1st in the logs +MO=$(grep 'h=' $1 | head -n 1 | cut -f2 -d',' | cut -f2 -d= | cut -f1 -d']') + +# direction markers: +DLST="_CodeBurst" +ULST="_DecodeAndIdentify" + +# DL sed filters: +D_EMP='s/ Empty frame request/EMPTY/' +D_FAC='s/ Coding a FACCH frame!/FACCH/' +D_FST='s/ Coding a RTP SID First frame !!/FIRST/' +D_UPD='s/ Coding a RTP SID Update frame !!/UPDATE/' +D_SPE='s/ Coding a RTP Speech frame !!/SPEECH/' +D_ONS='s/ Coding a Onset frame !!/ONSET/' +D_FO1='s/ A speech frame is following a NoData or SID First without an Onset./FORCED_FIRST/' +D_FO2='s/ A speech frame is following a NoData without an Onset./FORCED_NODATA/' + +# UL sed filters: +U_NOD='s/ It is a No Data frame !!/NODATA/' +U_ONS='s/ It is an ONSET frame !!/ONSET/' +U_UPD='s/ It is a SID UPDATE frame !!/UPDATE/' +U_FST='s/ It is a SID FIRST frame !!/FIRST/' +U_SPE='s/ It is a SPEECH frame !!/SPEECH/' + +DL () { # filter downlink-related entries + grep $DLST $1 > $1.DL.tmp +} + +UL () { # uplink does not require special fix + grep $ULST $1 > $1.UL.tmp.fix +} + +DL $1 +UL $1 + +FIX() { # add MO/MT marker from preceding line to inserted ONSETs so filtering works as expected + cat $1.DL.tmp | awk 'BEGIN{ FS="h="; H="" } { if (NF > 1) { H = $2; print $1 "h=" $2 } else { print $1 ", h=" H } }' > $1.DL.tmp.fix +} + +FIX $1 + +MO() { # filter MO call DL or UL logs + grep "h=$MO" $1.tmp.fix > $1.MO.raw +} + +MT() { # filter MT call DL or UL logs + grep -v "h=$MO" $1.tmp.fix > $1.MT.raw +} + +MO $1.DL +MT $1.DL +MO $1.UL +MT $1.UL + +PREP() { # prepare logs for reformatting + cat $1.raw | cut -f2 -d')' | cut -f1 -d',' | cut -f2 -d'>' | sed 's/\[u32Fn/fn/' | sed 's/fn = /fn=/' | sed 's/fn=//' | sed 's/\[Fn=//' | sed 's/ An Onset will be inserted.//' > $1.tmp1 +} + +PREP "$1.DL.MT" +PREP "$1.DL.MO" +PREP "$1.UL.MT" +PREP "$1.UL.MO" + +RD() { # reformat DL logs for consistency checks + cat $1.tmp1 | sed "$D_FST" | sed "$D_SPE" | sed "$D_UPD" | sed "$D_ONS" | sed "$D_EMP" | sed "$D_FAC" | sed "$D_FO1" | sed "$D_FO2" > $1.tmp2 +} + +RU() { # reformat UL logs for consistency checks + cat $1.tmp1 | sed "$U_FST" | sed "$U_SPE" | sed "$U_UPD" | sed "$U_ONS" | sed "$U_NOD" > $1.tmp2 +} + +RD "$1.DL.MT" +RD "$1.DL.MO" +RU "$1.UL.MT" +RU "$1.UL.MO" + +SW() { # swap fields + cat $1.tmp2 | awk '{ print $2, $1 }' > $1 +} + +SW "$1.DL.MT" +SW "$1.DL.MO" +SW "$1.UL.MT" +SW "$1.UL.MO" + +rm $1.*.tmp* -- To view, visit https://gerrit.osmocom.org/1143 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib1c70c4543b24c2a05a7df8eec5ce3f4eda2c02e Gerrit-PatchSet: 4 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 Mon Oct 24 11:27:38 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 24 Oct 2016 11:27:38 +0000 Subject: [PATCH] osmo-bts[master]: DTX DL: split ONSET state handling 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/1145 to look at the new patch set (#2). DTX DL: split ONSET state handling Handling ONSET cause by Voice and FACCH separately. In case of Voice we have RTP payload which we have to cache and send in next response to L1 while FACCH do not have any payload which have to be cached. This affects lc15 and sysmo hw as there's no FSM-based DTX implementation for other models yet. Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Related: OS#1801 --- M src/osmo-bts-litecell15/tch.c M src/osmo-bts-sysmo/tch.c 2 files changed, 16 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/45/1145/2 diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index b251388..2b55f4e 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -284,11 +284,17 @@ /* DTX DL-specific logic below: */ switch (lchan->tch.dtx.dl_amr_fsm->state) { - case ST_ONSET_V: case ST_ONSET_F: *payload_type = GsmL1_TchPlType_Amr_Onset; + /* Next SID after FACCH ONSET is always FIRST */ + lchan->tch.dtx.is_update = false; + *len = 3; + /* There is nothing to cache for FACCH ONSET */ + return 0; + case ST_ONSET_V: + *payload_type = GsmL1_TchPlType_Amr_Onset; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); - *len = 1; + *len = 3; return 1; case ST_VOICE: *payload_type = GsmL1_TchPlType_Amr; diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index b08ba7e..c6515dd 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -382,11 +382,17 @@ /* DTX DL-specific logic below: */ switch (lchan->tch.dtx.dl_amr_fsm->state) { - case ST_ONSET_V: case ST_ONSET_F: *payload_type = GsmL1_TchPlType_Amr_Onset; + /* Next SID after FACCH ONSET is always FIRST */ + lchan->tch.dtx.is_update = false; + *len = 3; + /* There is nothing to cache for FACCH ONSET */ + return 0; + case ST_ONSET_V: + *payload_type = GsmL1_TchPlType_Amr_Onset; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); - *len = 1; + *len = 3; return 1; case ST_VOICE: *payload_type = GsmL1_TchPlType_Amr; -- To view, visit https://gerrit.osmocom.org/1145 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 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 Mon Oct 24 11:43:24 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 24 Oct 2016 11:43:24 +0000 Subject: osmo-bts[master]: Add tools to check DTX operation In-Reply-To: References: Message-ID: Patch Set 4: Verified-1 -- To view, visit https://gerrit.osmocom.org/1143 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib1c70c4543b24c2a05a7df8eec5ce3f4eda2c02e 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-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Oct 24 12:01:06 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 24 Oct 2016 12:01:06 +0000 Subject: [PATCH] osmo-bts[master]: Add tools to check DTX operation 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/1143 to look at the new patch set (#5). Add tools to check DTX operation * superfemto.sh can parse superfemto-compatible DSP log output to properly sort records into MT/MO and DL/UL parts * dtx_check.gawk can process output of superfemto.sh and check for common scheduling errors This allows to check lc15 and sysmo for errors in DTX DL scheduling. As dtx_check.gawk is generic it can be used with any other BTS hw (or virtula BTS) as long as raw logs from this hw can be converted to simple input format 'FN EVENT' per-line. Change-Id: Ib1c70c4543b24c2a05a7df8eec5ce3f4eda2c02e Related: OS#1801 --- A contrib/dtx_check.gawk A contrib/superfemto.sh 2 files changed, 163 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/43/1143/5 diff --git a/contrib/dtx_check.gawk b/contrib/dtx_check.gawk new file mode 100755 index 0000000..a8cb32c --- /dev/null +++ b/contrib/dtx_check.gawk @@ -0,0 +1,64 @@ +#!/usr/bin/gawk -f + +# Expected input format: FN TYPE + +BEGIN { + DELTA = 0 + ERR = 0 + FN = 0 + TYPE = "" + CHK = "" + U_MAX = 8 * 20 + 120 / 26 + U_MIN = 8 * 20 - 120 / 26 + F_MAX = 3 * 20 + 120 / 26 + F_MIN = 3 * 20 - 120 / 26 +} + +{ + if (NR > 1) { # we have data from previous record to compare to + DELTA = ($1 - FN) * 120 / 26 + CHK = "OK" + if ("UPDATE" == TYPE || "FIRST" == TYPE) { # check for missing ONSET: + if ("FACCH" == $2 || "SPEECH" == $2) { + CHK = "FAIL: missing ONSET" + ERR++ + } + } + if ("OK" == CHK) { # check inter-SID distances: + if ("UPDATE" == TYPE) { + if (DELTA > U_MAX) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too big " DELTA "ms > " U_MAX "ms" + ERR++ + } + if ("UPDATE" == $2) { + if (DELTA < U_MIN) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too small " DELTA "ms < " U_MIN "ms" + ERR++ + } + } + } + if ("FIRST" == TYPE) { + if (DELTA > F_MAX) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID FIRST (@" FN ") too big " DELTA "ms > " F_MAX "ms" + ERR++ + } + if ("UPDATE" == $2) { + if (DELTA < F_MIN) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too small " DELTA "ms < " F_MIN "ms" + ERR++ + } + } + } + } + # FIXME: FACCH-specific checks? + } + print $1, $2, CHK, TYPE, DELTA + if ($2 != "EMPTY") { # skip over EMPTY records + TYPE = $2 + FN = $1 + } +} + +END { + print "check completed: found " ERR " errors in " NR " records" +} diff --git a/contrib/superfemto.sh b/contrib/superfemto.sh new file mode 100755 index 0000000..cb871c0 --- /dev/null +++ b/contrib/superfemto.sh @@ -0,0 +1,99 @@ +#!/bin/sh + +# Split common DSP call log file (produced by superfemto-compatible firmware) into 4 separate call leg files (MO/MT & DL/UL) with events in format "FN EVENT_TYPE": +# MO Mobile Originated +# MT Mobile Terminated +# DL DownLink (BTS -> L1) +# UL UpLink (L1 -> BTS) + +if [ -z $1 ]; then + echo "expecting DSP log file name as parameter" + exit 1 +fi + +# MO handle appear 1st in the logs +MO=$(grep 'h=' $1 | head -n 1 | cut -f2 -d',' | cut -f2 -d= | cut -f1 -d']') + +# direction markers: +DLST="_CodeBurst" +ULST="_DecodeAndIdentify" + +# DL sed filters: +D_EMP='s/ Empty frame request!/EMPTY/' +D_FAC='s/ Coding a FACCH\/F frame !!/FACCH/' +D_FST='s/ Coding a RTP SID First frame !!/FIRST/' +D_UPD='s/ Coding a RTP SID Update frame !!/UPDATE/' +D_SPE='s/ Coding a RTP Speech frame !!/SPEECH/' +D_ONS='s/ Coding a Onset frame !!/ONSET/' +D_FO1='s/ A speech frame is following a NoData or SID First without an Onset./FORCED_FIRST/' +D_FO2='s/ A speech frame is following a NoData without an Onset./FORCED_NODATA/' + +# UL sed filters: +U_NOD='s/ It is a No Data frame !!/NODATA/' +U_ONS='s/ It is an ONSET frame !!/ONSET/' +U_UPD='s/ It is a SID UPDATE frame !!/UPDATE/' +U_FST='s/ It is a SID FIRST frame !!/FIRST/' +U_SPE='s/ It is a SPEECH frame !!/SPEECH/' + +DL () { # filter downlink-related entries + grep $DLST $1 > $1.DL.tmp +} + +UL () { # uplink does not require special fix + grep $ULST $1 > $1.UL.tmp.fix +} + +DL $1 +UL $1 + +FIX() { # add MO/MT marker from preceding line to inserted ONSETs so filtering works as expected + cat $1.DL.tmp | awk 'BEGIN{ FS="h="; H="" } { if (NF > 1) { H = $2; print $1 "h=" $2 } else { print $1 ", h=" H } }' > $1.DL.tmp.fix +} + +FIX $1 + +MO() { # filter MO call DL or UL logs + grep "h=$MO" $1.tmp.fix > $1.MO.raw +} + +MT() { # filter MT call DL or UL logs + grep -v "h=$MO" $1.tmp.fix > $1.MT.raw +} + +MO $1.DL +MT $1.DL +MO $1.UL +MT $1.UL + +PREP() { # prepare logs for reformatting + cat $1.raw | cut -f2 -d')' | cut -f1 -d',' | cut -f2 -d'>' | sed 's/\[u32Fn/fn/' | sed 's/fn = /fn=/' | sed 's/fn=//' | sed 's/\[Fn=//' | sed 's/ An Onset will be inserted.//' > $1.tmp1 +} + +PREP "$1.DL.MT" +PREP "$1.DL.MO" +PREP "$1.UL.MT" +PREP "$1.UL.MO" + +RD() { # reformat DL logs for consistency checks + cat $1.tmp1 | sed "$D_FST" | sed "$D_SPE" | sed "$D_UPD" | sed "$D_ONS" | sed "$D_EMP" | sed "$D_FAC" | sed "$D_FO1" | sed "$D_FO2" > $1.tmp2 +} + +RU() { # reformat UL logs for consistency checks + cat $1.tmp1 | sed "$U_FST" | sed "$U_SPE" | sed "$U_UPD" | sed "$U_ONS" | sed "$U_NOD" > $1.tmp2 +} + +RD "$1.DL.MT" +RD "$1.DL.MO" +RU "$1.UL.MT" +RU "$1.UL.MO" + +SW() { # swap fields + cat $1.tmp2 | awk '{ print $2, $1 }' > $1 +} + +SW "$1.DL.MT" +SW "$1.DL.MO" +SW "$1.UL.MT" +SW "$1.UL.MO" + +rm $1.*.tmp* -- To view, visit https://gerrit.osmocom.org/1143 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib1c70c4543b24c2a05a7df8eec5ce3f4eda2c02e Gerrit-PatchSet: 5 Gerrit-Project: osmo-bts 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 Oct 24 12:12:59 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 24 Oct 2016 12:12:59 +0000 Subject: [PATCH] libosmo-abis[master]: Unify RTP receiving 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/948 to look at the new patch set (#2). Unify RTP receiving * Remove code duplication * Use return value of rtp_get_payload() instead of pointer arithmetic Change-Id: Id42e85b55eab33c5eb81ac7a2cdea7962b2e30ef --- M src/trau/osmo_ortp.c 1 file changed, 19 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/48/948/2 diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index e990487..818aea7 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -143,6 +143,20 @@ rtp_session_resync(rs); } +static inline bool recv_with_cb(struct osmo_rtp_socket *rs) +{ + mblk_t *mblk = rtp_session_recvm_with_ts(rs->sess, rs->rx_user_ts); + if (!mblk) + return false; + + int plen = rtp_get_payload(mblk, &mblk->b_rptr); + /* hand into receiver */ + if (rs->rx_cb) + rs->rx_cb(rs, mblk->b_rptr, plen, rtp_get_seqnumber(mblk), + rtp_get_timestamp(mblk), rtp_get_markbit(mblk)); + freemsg(mblk); + return true; +} /*! \brief poll the socket for incoming data * \param[in] rs the socket to be polled @@ -150,28 +164,14 @@ */ int osmo_rtp_socket_poll(struct osmo_rtp_socket *rs) { - mblk_t *mblk; if (rs->flags & OSMO_RTP_F_DISABLED) return 0; - mblk = rtp_session_recvm_with_ts(rs->sess, rs->rx_user_ts); - if (mblk) { - rtp_get_payload(mblk, &mblk->b_rptr); - /* hand into receiver */ - if (rs->rx_cb) - rs->rx_cb(rs, mblk->b_rptr, - mblk->b_wptr - mblk->b_rptr, - rtp_get_seqnumber(mblk), - rtp_get_timestamp(mblk), - rtp_get_markbit(mblk)); - //rs->rx_user_ts += 160; - freemsg(mblk); + if (recv_with_cb(rs)) return 1; - } else { - LOGP(DLMIB, LOGL_INFO, "osmo_rtp_poll(%u): ERROR!\n", - rs->rx_user_ts); - return 0; - } + + LOGP(DLMIB, LOGL_INFO, "osmo_rtp_poll(%u): ERROR!\n", rs->rx_user_ts); + return 0; } /* Osmo FD callbacks */ @@ -179,7 +179,6 @@ static int osmo_rtp_fd_cb(struct osmo_fd *fd, unsigned int what) { struct osmo_rtp_socket *rs = fd->data; - mblk_t *mblk; if (what & BSC_FD_READ) { /* in polling mode, we don't want to be called here */ @@ -187,18 +186,7 @@ fd->when &= ~BSC_FD_READ; return 0; } - mblk = rtp_session_recvm_with_ts(rs->sess, rs->rx_user_ts); - if (mblk) { - rtp_get_payload(mblk, &mblk->b_rptr); - /* hand into receiver */ - if (rs->rx_cb) - rs->rx_cb(rs, mblk->b_rptr, - mblk->b_wptr - mblk->b_rptr, - rtp_get_seqnumber(mblk), - rtp_get_timestamp(mblk), - rtp_get_markbit(mblk)); - freemsg(mblk); - } else + if (!recv_with_cb(rs)) LOGP(DLMIB, LOGL_INFO, "recvm_with_ts(%u): ERROR!\n", rs->rx_user_ts); rs->rx_user_ts += 160; -- To view, visit https://gerrit.osmocom.org/948 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id42e85b55eab33c5eb81ac7a2cdea7962b2e30ef Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis 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 Oct 24 13:44:33 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 24 Oct 2016 13:44:33 +0000 Subject: osmo-bts[master]: DTX DL: split ONSET state handling In-Reply-To: References: Message-ID: Patch Set 3: Verified-1 -- To view, visit https://gerrit.osmocom.org/1145 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts 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 Oct 24 13:53:38 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Mon, 24 Oct 2016 13:53:38 +0000 Subject: osmo-pcu[master]: EGPRS: fix for EPDAN out of window In-Reply-To: References: Message-ID: Patch Set 5: (1 comment) https://gerrit.osmocom.org/#/c/862/2/src/rlc.cpp File src/rlc.cpp: Line 108: unsigned num_blocks = rbb->cur_bit > (unsigned)distance() > It seems to me then that distance() should return a uint16_t? Yes Neels. It has to return uint16_t. should I change it as part of this commit? -- To view, visit https://gerrit.osmocom.org/862 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id07d178970f168f5389016c1eea31eb6b82057b6 Gerrit-PatchSet: 5 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Oct 24 14:06:17 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Mon, 24 Oct 2016 14:06:17 +0000 Subject: [PATCH] osmo-pcu[master]: EGPRS: add test case to show EPDAN BSN out of window bug 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/861 to look at the new patch set (#8). EGPRS: add test case to show EPDAN BSN out of window bug This patch adds a test case test_tbf_epdan_out_of_rx_window, Which expects a current bug with EPDAN for Interpretation of the bitmap explained in section 9.1.8.2.4 in 44.060 version 7.27.0 Release 7. The specification explains that a bit within the uncompressed bitmap whose corresponding BSN is not within the transmit window shall be ignored. But current PCU implementation drops the EPDAN and does not update status of the BSN which are inside the window. The test's expectation is corrected along with the bug fix in a subsequent commit. Related: OS#1789 Change-Id: If32b67f5c05707155281128b776a90a1e3d587b2 --- M tests/tbf/TbfTest.cpp M tests/tbf/TbfTest.err M tests/tbf/TbfTest.ok 3 files changed, 140 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/61/861/8 diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index c716a55..8fb8bfe 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -26,6 +26,7 @@ #include "pcu_utils.h" #include "gprs_bssgp_pcu.h" #include "pcu_l1_if.h" +#include "decoding.h" extern "C" { #include "pcu_vty.h" @@ -2017,6 +2018,106 @@ printf("=== end %s ===\n", __func__); } +/* + * Test that a bit within the uncompressed bitmap whose BSN is not within + * the transmit window shall be ignored. See section 9.1.8.2.4 of 44.060 + * version 7.27.0 Release 7. + */ +static void test_tbf_epdan_out_of_rx_window(void) +{ + BTS the_bts; + gprs_rlcmac_bts *bts; + uint8_t ms_class = 11; + uint8_t egprs_ms_class = 11; + uint8_t trx_no; + uint32_t tlli = 0xffeeddcc; + gprs_rlcmac_dl_tbf *dl_tbf; + int ts_no = 4; + bitvec *block; + uint8_t bits_data[RLC_EGPRS_MAX_WS/8]; + bitvec bits; + int bsn_begin, bsn_end; + EGPRS_PD_AckNack_t *ack_nack; + RlcMacUplink_t ul_control_block; + gprs_rlc_v_b *prlcmvb; + gprs_rlc_dl_window *prlcdlwindow; + + printf("=== start %s ===\n", __func__); + + bts = the_bts.bts_data(); + + setup_bts(&the_bts, ts_no); + bts->dl_tbf_idle_msec = 200; + bts->egprs_enabled = 1; + /* ARQ II */ + bts->dl_arq_type = EGPRS_ARQ2; + + /* + * Simulate a message captured during over-the-air testing, + * where the following values were observed: + * v_a = 1176, vs = 1288, max sns = 2048, window size = 480. + */ + uint8_t data_msg[23] = {0x40, 0x20, 0x0b, 0xff, 0xd1, + 0x61, 0x00, 0x3e, 0x0e, 0x51, 0x9f, + 0xff, 0xff, 0xfb, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + + dl_tbf = create_dl_tbf(&the_bts, ms_class, egprs_ms_class, &trx_no); + dl_tbf->update_ms(tlli, GPRS_RLCMAC_DL_TBF); + prlcdlwindow = &dl_tbf->m_window; + prlcmvb = &prlcdlwindow->m_v_b; + prlcdlwindow->m_v_s = 1288; + prlcdlwindow->m_v_a = 1176; + prlcdlwindow->set_sns(2048); + prlcdlwindow->set_ws(480); + prlcmvb->mark_unacked(1176); + prlcmvb->mark_unacked(1177); + prlcmvb->mark_unacked(1286); + prlcmvb->mark_unacked(1287); + + OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_FLOW)); + + block = bitvec_alloc(23); + + bitvec_unpack(block, data_msg); + + bits.data = bits_data; + bits.data_len = sizeof(bits_data); + bits.cur_bit = 0; + + decode_gsm_rlcmac_uplink(block, &ul_control_block); + + ack_nack = &ul_control_block.u.Egprs_Packet_Downlink_Ack_Nack; + + OSMO_ASSERT(prlcmvb->is_unacked(1176)); + OSMO_ASSERT(prlcmvb->is_unacked(1177)); + OSMO_ASSERT(prlcmvb->is_unacked(1286)); + OSMO_ASSERT(prlcmvb->is_unacked(1287)); + + Decoding::decode_egprs_acknack_bits( + &ack_nack->EGPRS_AckNack.Desc, &bits, + &bsn_begin, &bsn_end, &dl_tbf->m_window); + + dl_tbf->rcvd_dl_ack( + ack_nack->EGPRS_AckNack.Desc.FINAL_ACK_INDICATION, + bsn_begin, &bits); + /* + * TODO:status of BSN:1176,1177 shall be invalid + * status of BSN:1286,1287 shall be acked. + * both condition fails because of existing bug. Which shall be + * fixed in subsequent commit + */ + + OSMO_ASSERT(prlcmvb->is_unacked(1176)); + OSMO_ASSERT(prlcmvb->is_unacked(1177)); + OSMO_ASSERT(prlcmvb->is_unacked(1286)); + OSMO_ASSERT(prlcmvb->is_unacked(1287)); + + bitvec_free(block); + tbf_free(dl_tbf); + printf("=== end %s ===\n", __func__); +} + static void test_tbf_egprs_two_phase_spb(void) { BTS the_bts; @@ -2695,6 +2796,7 @@ test_tbf_puan_urbb_len(); test_tbf_update_ws(); test_tbf_li_decoding(); + test_tbf_epdan_out_of_rx_window(); 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 8c6b78c..f8e6503 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -6478,3 +6478,39 @@ 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 +Searching for first unallocated TFI: TRX=0 + Found TFI=0. +********** TBF starts here ********** +Allocating DL 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 +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 5, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Assign downlink TS=4 TFI=0 +PDCH(TS 4, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS), 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 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 +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 +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge +- ack: (BSN=1176)"RRRRRRRRRRIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIRRRIRRRRRRRRRRRRRRRRRRRRRRRRRRI"(BSN=1288) R=ACK I=NACK +- ack range is out of V(A)..V(S) range TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Free TBF! +DL packet loss of IMSI= / TLLI=0xffeeddcc: 100% +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! +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 +********** TBF ends here ********** diff --git a/tests/tbf/TbfTest.ok b/tests/tbf/TbfTest.ok index eb870ea..2978d6d 100644 --- a/tests/tbf/TbfTest.ok +++ b/tests/tbf/TbfTest.ok @@ -66,3 +66,5 @@ === end test_tbf_update_ws === === start test_tbf_li_decoding === === end test_tbf_li_decoding === +=== start test_tbf_epdan_out_of_rx_window === +=== end test_tbf_epdan_out_of_rx_window === -- To view, visit https://gerrit.osmocom.org/861 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If32b67f5c05707155281128b776a90a1e3d587b2 Gerrit-PatchSet: 8 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar From gerrit-no-reply at lists.osmocom.org Mon Oct 24 14:06:17 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Mon, 24 Oct 2016 14:06:17 +0000 Subject: [PATCH] osmo-pcu[master]: EGPRS: fix for EPDAN out of window 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/862 to look at the new patch set (#6). EGPRS: fix for EPDAN out of window Fix alignment of EPDAN outside the RLC transmit window, according to section 9.1.8.2.4 in 44.060 version 7.27.0 Release 7. The specification explains that a bit within the uncompressed bitmap whose corresponding BSN is not within the transmit window shall be ignored. Without this fix PCU was dropping the EPDAN message and not updating the status of BSNs which are inside the RLC window. This patch updates the status of the BSNs which are inside the window and ignores the remaining bits. Related: OS#1789 Change-Id: Id07d178970f168f5389016c1eea31eb6b82057b6 --- M src/rlc.cpp M src/rlc.h M src/tbf_dl.cpp M tests/tbf/TbfTest.cpp M tests/tbf/TbfTest.err 5 files changed, 138 insertions(+), 38 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/62/862/6 diff --git a/src/rlc.cpp b/src/rlc.cpp index ee2635a..320c3d0 100644 --- a/src/rlc.cpp +++ b/src/rlc.cpp @@ -105,7 +105,10 @@ uint16_t first_bsn, uint16_t *lost, uint16_t *received) { - unsigned num_blocks = rbb->cur_bit; + /* distance() is guaranteed to be positive because it does &mod_sns() */ + uint16_t dist = distance(); + unsigned num_blocks = rbb->cur_bit > (unsigned)dist + ? dist : rbb->cur_bit; unsigned bsn; /* first_bsn is in range V(A)..V(S) */ diff --git a/src/rlc.h b/src/rlc.h index b693418..b2fcd95 100644 --- a/src/rlc.h +++ b/src/rlc.h @@ -300,7 +300,7 @@ const uint16_t v_s() const; const uint16_t v_s_mod(int offset) const; const uint16_t v_a() const; - const int16_t distance() const; + const uint16_t distance() const; /* Methods to manage reception */ int resend_needed(); @@ -539,7 +539,7 @@ m_v_a = (m_v_a + moves) & mod_sns(); } -inline const int16_t gprs_rlc_dl_window::distance() const +inline const uint16_t gprs_rlc_dl_window::distance() const { return (m_v_s - m_v_a) & mod_sns(); } diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index c89cd03..f3ab0f4 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -847,6 +847,12 @@ unsigned received_packets = 0, lost_packets = 0; unsigned num_blocks = strlen(show_rbb); + /* distance() is guaranteed to be positive because it does &mod_sns() */ + uint16_t distance = m_window.distance(); + + num_blocks = num_blocks > (unsigned)distance + ? distance : num_blocks; + /* SSN - 1 is in range V(A)..V(S)-1 */ for (unsigned int bitpos = 0; bitpos < num_blocks; bitpos++) { bool is_received; @@ -925,7 +931,10 @@ char show_rbb[RLC_MAX_SNS + 1]; int error_rate; struct ana_result ana_res; - unsigned num_blocks = rbb->cur_bit; + /* distance() is guaranteed to be positive because it does &mod_sns() */ + dist = m_window.distance(); + unsigned num_blocks = rbb->cur_bit > (unsigned)dist + ? dist : rbb->cur_bit; unsigned behind_last_bsn = m_window.mod_sns(first_bsn + num_blocks); Decoding::extract_rbb(rbb, show_rbb); @@ -933,25 +942,6 @@ LOGP(DRLCMACDL, LOGL_DEBUG, "- ack: (BSN=%d)\"%s\"" "(BSN=%d) R=ACK I=NACK\n", first_bsn, show_rbb, m_window.mod_sns(behind_last_bsn - 1)); - - /* apply received array to receive state (first_bsn..behind_last_bsn-1) */ - if (num_blocks > 0) { - /* calculate distance of ssn from V(S) */ - dist = m_window.mod_sns(m_window.v_s() - behind_last_bsn); - /* check if distance is less than distance V(A)..V(S) */ - if (dist >= m_window.distance()) { - /* this might happpen, if the downlink assignment - * was not received by ms and the ack refers - * to previous TBF - * FIXME: we should implement polling for - * control ack! - * TODO: check whether this FIXME still makes sense - */ - LOGP(DRLCMACDL, LOGL_NOTICE, "- ack range is out of " - "V(A)..V(S) range %s Free TBF!\n", tbf_name(this)); - return 1; /* indicate to free TBF */ - } - } error_rate = analyse_errors(show_rbb, behind_last_bsn, &ana_res); diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 8fb8bfe..cc48392 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -2101,17 +2101,11 @@ dl_tbf->rcvd_dl_ack( ack_nack->EGPRS_AckNack.Desc.FINAL_ACK_INDICATION, bsn_begin, &bits); - /* - * TODO:status of BSN:1176,1177 shall be invalid - * status of BSN:1286,1287 shall be acked. - * both condition fails because of existing bug. Which shall be - * fixed in subsequent commit - */ - OSMO_ASSERT(prlcmvb->is_unacked(1176)); - OSMO_ASSERT(prlcmvb->is_unacked(1177)); - OSMO_ASSERT(prlcmvb->is_unacked(1286)); - OSMO_ASSERT(prlcmvb->is_unacked(1287)); + OSMO_ASSERT(prlcmvb->is_invalid(1176)); + OSMO_ASSERT(prlcmvb->is_invalid(1177)); + OSMO_ASSERT(prlcmvb->is_acked(1286)); + OSMO_ASSERT(prlcmvb->is_acked(1287)); bitvec_free(block); tbf_free(dl_tbf); diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index f8e6503..fc3a113 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -446,7 +446,7 @@ Sending data request: trx=0 ts=4 sapi=5 arfcn=0 fn=91 block=9 data=07 00 28 0a 41 c6 c7 43 c0 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) downlink acknowledge - ack: (BSN=85)"RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR"(BSN=20) R=ACK I=NACK -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) DL analysis, range=0:21, lost=0, recv=21, skipped=0, bsn=127, info='RRRRRRRRRRRRRRRRRRRRR$..........................................' +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) DL analysis, range=0:21, lost=0, recv=21, skipped=0, bsn=0, info='RRRRRRRRRRRRRRRRRRRRR...........................................' - got ack for BSN=20 - got ack for BSN=19 - got ack for BSN=18 @@ -485,7 +485,7 @@ Sending data request: trx=0 ts=4 sapi=5 arfcn=0 fn=95 block=10 data=07 00 2a 4d 43 c0 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) downlink acknowledge - ack: (BSN=86)"RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR"(BSN=21) R=ACK I=NACK -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) DL analysis, range=21:22, lost=0, recv=1, skipped=0, bsn=20, info='R$..............................................................' +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) DL analysis, range=21:22, lost=0, recv=1, skipped=0, bsn=21, info='R...............................................................' - got ack for BSN=21 - V(B): (V(A)=22)""(V(S)-1=21) A=Acked N=Nacked U=Unacked X=Resend-Unacked I=Invalid Scheduling data message at RTS for DL TFI=0 (TRX=0, TS=4) prio=4 @@ -6504,9 +6504,122 @@ 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 TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge -- ack: (BSN=1176)"RRRRRRRRRRIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIRRRIRRRRRRRRRRRRRRRRRRRRRRRRRRI"(BSN=1288) R=ACK I=NACK -- ack range is out of V(A)..V(S) range TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Free TBF! -DL packet loss of IMSI= / TLLI=0xffeeddcc: 100% +- 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................................................................................................................................................................................................................................................................................................................................................................................' +- got ack for BSN=1176 +- got ack for BSN=1177 +- got ack for BSN=1178 +- got ack for BSN=1179 +- got ack for BSN=1180 +- got ack for BSN=1181 +- got ack for BSN=1182 +- got ack for BSN=1183 +- got ack for BSN=1184 +- got ack for BSN=1185 +- got NACK for BSN=1186 +- got NACK for BSN=1187 +- got NACK for BSN=1188 +- got NACK for BSN=1189 +- got NACK for BSN=1190 +- got NACK for BSN=1191 +- got NACK for BSN=1192 +- got NACK for BSN=1193 +- got NACK for BSN=1194 +- got NACK for BSN=1195 +- got NACK for BSN=1196 +- got NACK for BSN=1197 +- got NACK for BSN=1198 +- got NACK for BSN=1199 +- got NACK for BSN=1200 +- got NACK for BSN=1201 +- got NACK for BSN=1202 +- got NACK for BSN=1203 +- got NACK for BSN=1204 +- got NACK for BSN=1205 +- got NACK for BSN=1206 +- got NACK for BSN=1207 +- got NACK for BSN=1208 +- got NACK for BSN=1209 +- got NACK for BSN=1210 +- got NACK for BSN=1211 +- got NACK for BSN=1212 +- got NACK for BSN=1213 +- got NACK for BSN=1214 +- got NACK for BSN=1215 +- got NACK for BSN=1216 +- got NACK for BSN=1217 +- got NACK for BSN=1218 +- got NACK for BSN=1219 +- got NACK for BSN=1220 +- got NACK for BSN=1221 +- got NACK for BSN=1222 +- got NACK for BSN=1223 +- got NACK for BSN=1224 +- got NACK for BSN=1225 +- got NACK for BSN=1226 +- got NACK for BSN=1227 +- got NACK for BSN=1228 +- got NACK for BSN=1229 +- got NACK for BSN=1230 +- got NACK for BSN=1231 +- got NACK for BSN=1232 +- got NACK for BSN=1233 +- got NACK for BSN=1234 +- got NACK for BSN=1235 +- got NACK for BSN=1236 +- got NACK for BSN=1237 +- got NACK for BSN=1238 +- got NACK for BSN=1239 +- got NACK for BSN=1240 +- got NACK for BSN=1241 +- got NACK for BSN=1242 +- got NACK for BSN=1243 +- got NACK for BSN=1244 +- got NACK for BSN=1245 +- got NACK for BSN=1246 +- got NACK for BSN=1247 +- got NACK for BSN=1248 +- got NACK for BSN=1249 +- got NACK for BSN=1250 +- got NACK for BSN=1251 +- got NACK for BSN=1252 +- got NACK for BSN=1253 +- got NACK for BSN=1254 +- got NACK for BSN=1255 +- got NACK for BSN=1256 +- got NACK for BSN=1257 +- got ack for BSN=1258 +- got ack for BSN=1259 +- got ack for BSN=1260 +- got NACK for BSN=1261 +- got ack for BSN=1262 +- got ack for BSN=1263 +- got ack for BSN=1264 +- got ack for BSN=1265 +- got ack for BSN=1266 +- got ack for BSN=1267 +- got ack for BSN=1268 +- got ack for BSN=1269 +- got ack for BSN=1270 +- got ack for BSN=1271 +- got ack for BSN=1272 +- got ack for BSN=1273 +- got ack for BSN=1274 +- got ack for BSN=1275 +- got ack for BSN=1276 +- got ack for BSN=1277 +- got ack for BSN=1278 +- got ack for BSN=1279 +- got ack for BSN=1280 +- got ack for BSN=1281 +- got ack for BSN=1282 +- got ack for BSN=1283 +- got ack for BSN=1284 +- got ack for BSN=1285 +- got ack for BSN=1286 +- got ack for BSN=1287 +- V(B): (V(A)=1186)"NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNAAANAAAAAAAAAAAAAAAAAAAAAAAAAA"(V(S)-1=1287) A=Acked N=Nacked U=Unacked X=Resend-Unacked I=Invalid +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! -- To view, visit https://gerrit.osmocom.org/862 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id07d178970f168f5389016c1eea31eb6b82057b6 Gerrit-PatchSet: 6 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar From gerrit-no-reply at lists.osmocom.org Mon Oct 24 15:15:23 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 24 Oct 2016 15:15:23 +0000 Subject: osmo-trx[master]: transceiver: Fix command build warning In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1118 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I74032b49785bd68835a0a68cb0f14cdaab4fcd26 Gerrit-PatchSet: 2 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 Mon Oct 24 15:17:56 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 24 Oct 2016 15:17:56 +0000 Subject: osmo-trx[master]: uhd: Set minimum supported version to 3.9.0 In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1117 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id7d15b52cd4e45f1d856a6ef3a84832a28f2dd04 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 Tue Oct 25 00:07:56 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 25 Oct 2016 00:07:56 +0000 Subject: [PATCH] openbsc[master]: Move timezone settings up to network level In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1137 to look at the new patch set (#4). Move timezone settings up to network level Time zone used to be configurable per-BTS. In the upcoming MSC-split, no BTS structures will be available on the MSC level. To simplify, drop the ability to manage several time zones in a core network and place the time zone config on the network VTY level, i.e. in gsm_network. If we are going to re-add fine grained time zone settings, it should probably be tied to the LAC. Adjust time zone VTY config code (to be moved to libxsc in subsequent commit). Adjust time zone Ctrl Interface code. Change-Id: I69848887d92990f3d6f969be80f6ef91f6bdbbe8 --- M openbsc/include/openbsc/gsm_data.h M openbsc/include/openbsc/gsm_data_shared.h M openbsc/src/libbsc/bsc_vty.c M openbsc/src/libmsc/gsm_04_08.c M openbsc/src/osmo-bsc/osmo_bsc_ctrl.c M openbsc/src/osmo-bsc/osmo_bsc_filter.c M openbsc/tests/bsc/bsc_test.c M openbsc/tests/ctrl_test_runner.py M openbsc/tests/vty_test_runner.py 9 files changed, 98 insertions(+), 99 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/37/1137/4 diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 07279a9..fc17bfd 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -263,6 +263,13 @@ #define GSM_T3113_DEFAULT 60 #define GSM_T3122_DEFAULT 10 +struct gsm_tz { + int override; /* if 0, use system's time zone instead. */ + int hr; /* hour */ + int mn; /* minute */ + int dst; /* daylight savings */ +}; + struct gsm_network { /* global parameters */ uint16_t country_code; @@ -357,6 +364,13 @@ /* all active subscriber connections. */ struct llist_head subscr_conns; + + /* if override is nonzero, this timezone data is used for all MM + * contexts. */ + /* TODO: in OsmoNITB, tz-override used to be BTS-specific. To enable + * 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; }; struct osmo_esme; diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index 0221685..fcdf319 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -646,14 +646,6 @@ /* buffers where we put the pre-computed SI */ sysinfo_buf_t si_buf[_MAX_SYSINFO_TYPE]; - /* TimeZone hours, mins, and bts specific */ - struct { - int hr; - int mn; - int override; - int dst; - } tz; - /* ip.accesss Unit ID's have Site/BTS/TRX layout */ union { struct { diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index 822c822..a5bda5d 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -554,14 +554,6 @@ if (bts->dtxd) vty_out(vty, " dtx downlink%s", VTY_NEWLINE); vty_out(vty, " base_station_id_code %u%s", bts->bsic, VTY_NEWLINE); - if (bts->tz.override != 0) { - if (bts->tz.dst) - vty_out(vty, " timezone %d %d %d%s", - bts->tz.hr, bts->tz.mn, bts->tz.dst, VTY_NEWLINE); - else - vty_out(vty, " timezone %d %d%s", - bts->tz.hr, bts->tz.mn, VTY_NEWLINE); - } vty_out(vty, " ms max power %u%s", bts->ms_max_power, VTY_NEWLINE); vty_out(vty, " cell reselection hysteresis %u%s", bts->si_common.cell_sel_par.cell_resel_hyst*2, VTY_NEWLINE); @@ -817,6 +809,15 @@ vty_out(vty, " timer t3141 %u%s", gsmnet->T3141, VTY_NEWLINE); vty_out(vty, " subscriber-keep-in-ram %d%s", gsmnet->subscr_group->keep_subscr, VTY_NEWLINE); + if (gsmnet->tz.override != 0) { + if (gsmnet->tz.dst) + vty_out(vty, " timezone %d %d %d%s", + gsmnet->tz.hr, gsmnet->tz.mn, gsmnet->tz.dst, + VTY_NEWLINE); + else + vty_out(vty, " timezone %d %d%s", + gsmnet->tz.hr, gsmnet->tz.mn, VTY_NEWLINE); + } return CMD_SUCCESS; } @@ -1685,10 +1686,10 @@ return CMD_SUCCESS; } -DEFUN(cfg_bts_timezone, - cfg_bts_timezone_cmd, +DEFUN(cfg_net_timezone, + cfg_net_timezone_cmd, "timezone <-19-19> (0|15|30|45)", - "Set the Timezone Offset of this BTS\n" + "Set the Timezone Offset of the network\n" "Timezone offset (hours)\n" "Timezone offset (00 minutes)\n" "Timezone offset (15 minutes)\n" @@ -1696,22 +1697,22 @@ "Timezone offset (45 minutes)\n" ) { - struct gsm_bts *bts = vty->index; + struct gsm_network *net = vty->index; int tzhr = atoi(argv[0]); int tzmn = atoi(argv[1]); - bts->tz.hr = tzhr; - bts->tz.mn = tzmn; - bts->tz.dst = 0; - bts->tz.override = 1; + net->tz.hr = tzhr; + net->tz.mn = tzmn; + net->tz.dst = 0; + net->tz.override = 1; return CMD_SUCCESS; } -DEFUN(cfg_bts_timezone_dst, - cfg_bts_timezone_dst_cmd, +DEFUN(cfg_net_timezone_dst, + cfg_net_timezone_dst_cmd, "timezone <-19-19> (0|15|30|45) <0-2>", - "Set the Timezone Offset of this BTS\n" + "Set the Timezone Offset of the network\n" "Timezone offset (hours)\n" "Timezone offset (00 minutes)\n" "Timezone offset (15 minutes)\n" @@ -1720,28 +1721,28 @@ "DST offset (hours)\n" ) { - struct gsm_bts *bts = vty->index; + struct gsm_network *net = vty->index; int tzhr = atoi(argv[0]); int tzmn = atoi(argv[1]); int tzdst = atoi(argv[2]); - bts->tz.hr = tzhr; - bts->tz.mn = tzmn; - bts->tz.dst = tzdst; - bts->tz.override = 1; + net->tz.hr = tzhr; + net->tz.mn = tzmn; + net->tz.dst = tzdst; + net->tz.override = 1; return CMD_SUCCESS; } -DEFUN(cfg_bts_no_timezone, - cfg_bts_no_timezone_cmd, +DEFUN(cfg_net_no_timezone, + cfg_net_no_timezone_cmd, "no timezone", NO_STR - "Disable BTS specific timezone\n") + "Disable network timezone override, use system tz\n") { - struct gsm_bts *bts = vty->index; + struct gsm_network *net = vty->index; - bts->tz.override = 0; + net->tz.override = 0; return CMD_SUCCESS; } @@ -3899,6 +3900,9 @@ install_element(GSMNET_NODE, &cfg_net_T3141_cmd); install_element(GSMNET_NODE, &cfg_net_dtx_cmd); install_element(GSMNET_NODE, &cfg_net_pag_any_tch_cmd); + install_element(GSMNET_NODE, &cfg_net_timezone_cmd); + install_element(GSMNET_NODE, &cfg_net_timezone_dst_cmd); + install_element(GSMNET_NODE, &cfg_net_no_timezone_cmd); install_element(GSMNET_NODE, &cfg_bts_cmd); install_node(&bts_node, config_write_bts); @@ -3917,9 +3921,6 @@ install_element(BTS_NODE, &cfg_bts_bsic_cmd); install_element(BTS_NODE, &cfg_bts_unit_id_cmd); install_element(BTS_NODE, &cfg_bts_rsl_ip_cmd); - install_element(BTS_NODE, &cfg_bts_timezone_cmd); - install_element(BTS_NODE, &cfg_bts_timezone_dst_cmd); - install_element(BTS_NODE, &cfg_bts_no_timezone_cmd); install_element(BTS_NODE, &cfg_bts_nokia_site_skip_reset_cmd); install_element(BTS_NODE, &cfg_bts_nokia_site_no_loc_rel_cnf_cmd); install_element(BTS_NODE, &cfg_bts_nokia_site_bts_reset_timer_cnf_cmd); diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index a22e3c2..a871c19 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -733,7 +733,6 @@ struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 MM INF"); struct gsm48_hdr *gh; struct gsm_network *net = conn->network; - struct gsm_bts *bts = conn->bts; uint8_t *ptr8; int name_len, name_pad; @@ -821,23 +820,23 @@ ptr8[5] = bcdify(gmt_time->tm_min); ptr8[6] = bcdify(gmt_time->tm_sec); - if (bts->tz.override) { + if (net->tz.override) { /* Convert tz.hr and tz.mn to units */ - if (bts->tz.hr < 0) { - tzunits = ((bts->tz.hr/-1)*4); - tzunits = tzunits + (bts->tz.mn/15); + if (net->tz.hr < 0) { + tzunits = ((net->tz.hr/-1)*4); + tzunits = tzunits + (net->tz.mn/15); ptr8[7] = bcdify(tzunits); /* Set negative time */ ptr8[7] |= 0x08; } else { - tzunits = bts->tz.hr*4; - tzunits = tzunits + (bts->tz.mn/15); + tzunits = net->tz.hr*4; + tzunits = tzunits + (net->tz.mn/15); ptr8[7] = bcdify(tzunits); } /* Convert DST value */ - if (bts->tz.dst >= 0 && bts->tz.dst <= 2) - dst = bts->tz.dst; + if (net->tz.dst >= 0 && net->tz.dst <= 2) + dst = net->tz.dst; } else { /* Need to get GSM offset and convert into 15 min units */ diff --git a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c index 84b7b92..556d362 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c @@ -362,18 +362,15 @@ return 1; } -CTRL_CMD_DEFINE(bts_timezone, "timezone"); -static int get_bts_timezone(struct ctrl_cmd *cmd, void *data) +CTRL_CMD_DEFINE(net_timezone, "timezone"); +static int get_net_timezone(struct ctrl_cmd *cmd, void *data) { - struct gsm_bts *bts = (struct gsm_bts *) cmd->node; - if (!bts) { - cmd->reply = "bts not found."; - return CTRL_CMD_ERROR; - } + struct gsm_network *net = (struct gsm_network*)cmd->node; - if (bts->tz.override) + struct gsm_tz *tz = &net->tz; + if (tz->override) cmd->reply = talloc_asprintf(cmd, "%d,%d,%d", - bts->tz.hr, bts->tz.mn, bts->tz.dst); + tz->hr, tz->mn, tz->dst); else cmd->reply = talloc_asprintf(cmd, "off"); @@ -385,16 +382,11 @@ return CTRL_CMD_REPLY; } -static int set_bts_timezone(struct ctrl_cmd *cmd, void *data) +static int set_net_timezone(struct ctrl_cmd *cmd, void *data) { char *saveptr, *hourstr, *minstr, *dststr, *tmp = 0; int override; - struct gsm_bts *bts = (struct gsm_bts *) cmd->node; - - if (!bts) { - cmd->reply = "bts not found."; - return CTRL_CMD_ERROR; - } + struct gsm_network *net = (struct gsm_network*)cmd->node; tmp = talloc_strdup(cmd, cmd->value); if (!tmp) @@ -409,25 +401,26 @@ if (hourstr != NULL) override = strcasecmp(hourstr, "off") != 0; - bts->tz.override = override; + struct gsm_tz *tz = &net->tz; + tz->override = override; if (override) { - bts->tz.hr = hourstr ? atol(hourstr) : 0; - bts->tz.mn = minstr ? atol(minstr) : 0; - bts->tz.dst = dststr ? atol(dststr) : 0; + tz->hr = hourstr ? atol(hourstr) : 0; + tz->mn = minstr ? atol(minstr) : 0; + tz->dst = dststr ? atol(dststr) : 0; } talloc_free(tmp); tmp = NULL; - return get_bts_timezone(cmd, data); + return get_net_timezone(cmd, data); oom: cmd->reply = "OOM"; return CTRL_CMD_ERROR; } -static int verify_bts_timezone(struct ctrl_cmd *cmd, const char *value, void *data) +static int verify_net_timezone(struct ctrl_cmd *cmd, const char *value, void *data) { char *saveptr, *hourstr, *minstr, *dststr, *tmp; int override, tz_hours, tz_mins, tz_dst; @@ -655,7 +648,7 @@ rc = ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_loc); if (rc) goto end; - rc = ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_timezone); + rc = ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_timezone); if (rc) goto end; rc = ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_msc_connection_status); diff --git a/openbsc/src/osmo-bsc/osmo_bsc_filter.c b/openbsc/src/osmo-bsc/osmo_bsc_filter.c index 8fc899e..3b5f57e 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_filter.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_filter.c @@ -271,23 +271,24 @@ return 0; /* Is TZ patching enabled? */ - if (!bts->tz.override) + struct gsm_tz *tz = &bts->network->tz; + if (!tz->override) return 0; /* Convert tz.hr and tz.mn to units */ - if (bts->tz.hr < 0) { - tzunits = -bts->tz.hr*4; + if (tz->hr < 0) { + tzunits = -tz->hr*4; tzbsd |= 0x08; } else - tzunits = bts->tz.hr*4; + tzunits = tz->hr*4; - tzunits = tzunits + (bts->tz.mn/15); + tzunits = tzunits + (tz->mn/15); tzbsd |= (tzunits % 10)*0x10 + (tzunits / 10); /* Convert DST value */ - if (bts->tz.dst >= 0 && bts->tz.dst <= 2) - dst = bts->tz.dst; + if (tz->dst >= 0 && tz->dst <= 2) + dst = tz->dst; if (TLVP_PRESENT(&tp, GSM48_IE_UTC)) { LOGP(DMSC, LOGL_DEBUG, diff --git a/openbsc/tests/bsc/bsc_test.c b/openbsc/tests/bsc/bsc_test.c index 6d41941..7174828 100644 --- a/openbsc/tests/bsc/bsc_test.c +++ b/openbsc/tests/bsc/bsc_test.c @@ -147,10 +147,10 @@ struct msgb *msg = msgb_alloc(4096, "test-message"); int is_set = 0; - bts->tz.hr = get_int(test_def->params, test_def->n_params, "tz_hr", 0, &is_set); - bts->tz.mn = get_int(test_def->params, test_def->n_params, "tz_mn", 0, &is_set); - bts->tz.dst = get_int(test_def->params, test_def->n_params, "tz_dst", 0, &is_set); - bts->tz.override = 1; + net->tz.hr = get_int(test_def->params, test_def->n_params, "tz_hr", 0, &is_set); + net->tz.mn = get_int(test_def->params, test_def->n_params, "tz_mn", 0, &is_set); + net->tz.dst = get_int(test_def->params, test_def->n_params, "tz_dst", 0, &is_set); + net->tz.override = 1; printf("Going to test item: %d\n", i); msg->l3h = msgb_put(msg, test_def->length); diff --git a/openbsc/tests/ctrl_test_runner.py b/openbsc/tests/ctrl_test_runner.py index bed685a..4fd831f 100644 --- a/openbsc/tests/ctrl_test_runner.py +++ b/openbsc/tests/ctrl_test_runner.py @@ -331,41 +331,41 @@ self.assertEquals(r['value'], 'state=off,policy=on') def testTimezone(self): - r = self.do_get('bts.0.timezone') + r = self.do_get('timezone') self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.timezone') + self.assertEquals(r['var'], 'timezone') self.assertEquals(r['value'], 'off') - r = self.do_set('bts.0.timezone', '-2,15,2') + r = self.do_set('timezone', '-2,15,2') self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'bts.0.timezone') + self.assertEquals(r['var'], 'timezone') self.assertEquals(r['value'], '-2,15,2') - r = self.do_get('bts.0.timezone') + r = self.do_get('timezone') self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.timezone') + self.assertEquals(r['var'], 'timezone') self.assertEquals(r['value'], '-2,15,2') # Test invalid input - r = self.do_set('bts.0.timezone', '-2,15,2,5,6,7') + r = self.do_set('timezone', '-2,15,2,5,6,7') self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'bts.0.timezone') + self.assertEquals(r['var'], 'timezone') self.assertEquals(r['value'], '-2,15,2') - r = self.do_set('bts.0.timezone', '-2,15') + r = self.do_set('timezone', '-2,15') self.assertEquals(r['mtype'], 'ERROR') - r = self.do_set('bts.0.timezone', '-2') + r = self.do_set('timezone', '-2') self.assertEquals(r['mtype'], 'ERROR') - r = self.do_set('bts.0.timezone', '1') + r = self.do_set('timezone', '1') - r = self.do_set('bts.0.timezone', 'off') + r = self.do_set('timezone', 'off') self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'bts.0.timezone') + self.assertEquals(r['var'], 'timezone') self.assertEquals(r['value'], 'off') - r = self.do_get('bts.0.timezone') + r = self.do_get('timezone') self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.timezone') + self.assertEquals(r['var'], 'timezone') self.assertEquals(r['value'], 'off') def testMcc(self): diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index a73dadd..cf2cf18 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -651,7 +651,6 @@ self.vty.enable() self.vty.verify("configure terminal", ['']) self.vty.verify("network", ['']) - self.vty.verify("bts 0", ['']) # Test invalid input self.vty.verify("timezone", ['% Command incomplete.']) -- To view, visit https://gerrit.osmocom.org/1137 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I69848887d92990f3d6f969be80f6ef91f6bdbbe8 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 Tue Oct 25 00:30:48 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 25 Oct 2016 00:30:48 +0000 Subject: osmo-pcu[master]: EGPRS: fix for EPDAN out of window In-Reply-To: References: Message-ID: Patch Set 6: (1 comment) https://gerrit.osmocom.org/#/c/862/6/src/rlc.h File src/rlc.h: Line 303: const uint16_t distance() const; No, rather not also do this within the same commit. distance() has existed before and if it needs a change in return value, that should be a separate commit on its own, with a separate review and possibly discussion. (It also necessitates checking all callers whether they need to be adjusted to avoid compiler warnings and remain type safe.) Such separate patch could go before or after this patch. If it comes before, the advantage is less casts in this patch, but it also means that this patch has to wait for the other one to be accepted. So I think personally I would make do with the signed return value for now, and *maybe* later on have another patch for the return value, removing type casts... -- To view, visit https://gerrit.osmocom.org/862 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id07d178970f168f5389016c1eea31eb6b82057b6 Gerrit-PatchSet: 6 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Oct 25 00:51:51 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 25 Oct 2016 00:51:51 +0000 Subject: libosmocore[master]: socket: export osmo_sockaddr_equal() as library function In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/1148/1/include/osmocom/core/socket.h File include/osmocom/core/socket.h: Line 42: const struct sockaddr *b, unsigned int len); rest of the file seems to indent to line up with the '(' -- To view, visit https://gerrit.osmocom.org/1148 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I174fe1b894e5da0fefed81f95546c24776233421 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue Oct 25 01:55:57 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 25 Oct 2016 01:55:57 +0000 Subject: [PATCH] osmo-gsm-manuals[master]: OsmoBTS: generate osmobts-abis.pdf again Message-ID: Review at https://gerrit.osmocom.org/1151 OsmoBTS: generate osmobts-abis.pdf again broken by 05f5adbe837f2cbfb9301cdb8c9b454ca0bfc825 Change-Id: I7ca18e3d7fa3a5a6eac0590b919b4c664f73671c --- M OsmoBTS/Makefile 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/51/1151/1 diff --git a/OsmoBTS/Makefile b/OsmoBTS/Makefile index 73430fc..1e70eac 100644 --- a/OsmoBTS/Makefile +++ b/OsmoBTS/Makefile @@ -14,7 +14,7 @@ # htmlcss = TOPDIR := .. -ASCIIDOCS := osmobts-usermanual +ASCIIDOCS := osmobts-usermanual osmobts-abis include $(TOPDIR)/build/Makefile.asciidoc.inc include $(TOPDIR)/build/Makefile.inc -- To view, visit https://gerrit.osmocom.org/1151 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7ca18e3d7fa3a5a6eac0590b919b4c664f73671c Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue Oct 25 07:19:25 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Tue, 25 Oct 2016 07:19:25 +0000 Subject: [PATCH] osmo-pcu[master]: EGPRS: add test case to show EPDAN BSN out of window bug 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/861 to look at the new patch set (#9). EGPRS: add test case to show EPDAN BSN out of window bug This patch adds a test case test_tbf_epdan_out_of_rx_window, which expects a current bug with EPDAN for interpretation of the bitmap explained in section 9.1.8.2.4 in 44.060 version 7.27.0 Release 7. The specification explains that a bit within the uncompressed bitmap whose corresponding BSN is not within the transmit window shall be ignored. But current PCU implementation drops the EPDAN and does not update status of the BSN which are inside the window. The test's expectation is corrected along with the bug fix in a subsequent commit. Related: OS#1789 Change-Id: If32b67f5c05707155281128b776a90a1e3d587b2 --- M tests/tbf/TbfTest.cpp M tests/tbf/TbfTest.err M tests/tbf/TbfTest.ok 3 files changed, 140 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/61/861/9 diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index c716a55..8fb8bfe 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -26,6 +26,7 @@ #include "pcu_utils.h" #include "gprs_bssgp_pcu.h" #include "pcu_l1_if.h" +#include "decoding.h" extern "C" { #include "pcu_vty.h" @@ -2017,6 +2018,106 @@ printf("=== end %s ===\n", __func__); } +/* + * Test that a bit within the uncompressed bitmap whose BSN is not within + * the transmit window shall be ignored. See section 9.1.8.2.4 of 44.060 + * version 7.27.0 Release 7. + */ +static void test_tbf_epdan_out_of_rx_window(void) +{ + BTS the_bts; + gprs_rlcmac_bts *bts; + uint8_t ms_class = 11; + uint8_t egprs_ms_class = 11; + uint8_t trx_no; + uint32_t tlli = 0xffeeddcc; + gprs_rlcmac_dl_tbf *dl_tbf; + int ts_no = 4; + bitvec *block; + uint8_t bits_data[RLC_EGPRS_MAX_WS/8]; + bitvec bits; + int bsn_begin, bsn_end; + EGPRS_PD_AckNack_t *ack_nack; + RlcMacUplink_t ul_control_block; + gprs_rlc_v_b *prlcmvb; + gprs_rlc_dl_window *prlcdlwindow; + + printf("=== start %s ===\n", __func__); + + bts = the_bts.bts_data(); + + setup_bts(&the_bts, ts_no); + bts->dl_tbf_idle_msec = 200; + bts->egprs_enabled = 1; + /* ARQ II */ + bts->dl_arq_type = EGPRS_ARQ2; + + /* + * Simulate a message captured during over-the-air testing, + * where the following values were observed: + * v_a = 1176, vs = 1288, max sns = 2048, window size = 480. + */ + uint8_t data_msg[23] = {0x40, 0x20, 0x0b, 0xff, 0xd1, + 0x61, 0x00, 0x3e, 0x0e, 0x51, 0x9f, + 0xff, 0xff, 0xfb, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + + dl_tbf = create_dl_tbf(&the_bts, ms_class, egprs_ms_class, &trx_no); + dl_tbf->update_ms(tlli, GPRS_RLCMAC_DL_TBF); + prlcdlwindow = &dl_tbf->m_window; + prlcmvb = &prlcdlwindow->m_v_b; + prlcdlwindow->m_v_s = 1288; + prlcdlwindow->m_v_a = 1176; + prlcdlwindow->set_sns(2048); + prlcdlwindow->set_ws(480); + prlcmvb->mark_unacked(1176); + prlcmvb->mark_unacked(1177); + prlcmvb->mark_unacked(1286); + prlcmvb->mark_unacked(1287); + + OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_FLOW)); + + block = bitvec_alloc(23); + + bitvec_unpack(block, data_msg); + + bits.data = bits_data; + bits.data_len = sizeof(bits_data); + bits.cur_bit = 0; + + decode_gsm_rlcmac_uplink(block, &ul_control_block); + + ack_nack = &ul_control_block.u.Egprs_Packet_Downlink_Ack_Nack; + + OSMO_ASSERT(prlcmvb->is_unacked(1176)); + OSMO_ASSERT(prlcmvb->is_unacked(1177)); + OSMO_ASSERT(prlcmvb->is_unacked(1286)); + OSMO_ASSERT(prlcmvb->is_unacked(1287)); + + Decoding::decode_egprs_acknack_bits( + &ack_nack->EGPRS_AckNack.Desc, &bits, + &bsn_begin, &bsn_end, &dl_tbf->m_window); + + dl_tbf->rcvd_dl_ack( + ack_nack->EGPRS_AckNack.Desc.FINAL_ACK_INDICATION, + bsn_begin, &bits); + /* + * TODO:status of BSN:1176,1177 shall be invalid + * status of BSN:1286,1287 shall be acked. + * both condition fails because of existing bug. Which shall be + * fixed in subsequent commit + */ + + OSMO_ASSERT(prlcmvb->is_unacked(1176)); + OSMO_ASSERT(prlcmvb->is_unacked(1177)); + OSMO_ASSERT(prlcmvb->is_unacked(1286)); + OSMO_ASSERT(prlcmvb->is_unacked(1287)); + + bitvec_free(block); + tbf_free(dl_tbf); + printf("=== end %s ===\n", __func__); +} + static void test_tbf_egprs_two_phase_spb(void) { BTS the_bts; @@ -2695,6 +2796,7 @@ test_tbf_puan_urbb_len(); test_tbf_update_ws(); test_tbf_li_decoding(); + test_tbf_epdan_out_of_rx_window(); 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 8c6b78c..f8e6503 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -6478,3 +6478,39 @@ 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 +Searching for first unallocated TFI: TRX=0 + Found TFI=0. +********** TBF starts here ********** +Allocating DL 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 +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 5, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Assign downlink TS=4 TFI=0 +PDCH(TS 4, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS), 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 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 +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 +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge +- ack: (BSN=1176)"RRRRRRRRRRIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIRRRIRRRRRRRRRRRRRRRRRRRRRRRRRRI"(BSN=1288) R=ACK I=NACK +- ack range is out of V(A)..V(S) range TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Free TBF! +DL packet loss of IMSI= / TLLI=0xffeeddcc: 100% +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! +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 +********** TBF ends here ********** diff --git a/tests/tbf/TbfTest.ok b/tests/tbf/TbfTest.ok index eb870ea..2978d6d 100644 --- a/tests/tbf/TbfTest.ok +++ b/tests/tbf/TbfTest.ok @@ -66,3 +66,5 @@ === end test_tbf_update_ws === === start test_tbf_li_decoding === === end test_tbf_li_decoding === +=== start test_tbf_epdan_out_of_rx_window === +=== end test_tbf_epdan_out_of_rx_window === -- To view, visit https://gerrit.osmocom.org/861 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If32b67f5c05707155281128b776a90a1e3d587b2 Gerrit-PatchSet: 9 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar From gerrit-no-reply at lists.osmocom.org Tue Oct 25 07:19:25 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Tue, 25 Oct 2016 07:19:25 +0000 Subject: [PATCH] osmo-pcu[master]: EGPRS: fix for EPDAN out of window 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/862 to look at the new patch set (#7). EGPRS: fix for EPDAN out of window Fix alignment of EPDAN outside the RLC transmit window, according to section 9.1.8.2.4 in 44.060 version 7.27.0 Release 7. The specification explains that a bit within the uncompressed bitmap whose corresponding BSN is not within the transmit window shall be ignored. Without this fix PCU was dropping the EPDAN message and not updating the status of BSNs which are inside the RLC window. This patch updates the status of the BSNs which are inside the window and ignores the remaining bits. Related: OS#1789 Change-Id: Id07d178970f168f5389016c1eea31eb6b82057b6 --- M src/rlc.cpp M src/tbf_dl.cpp M tests/tbf/TbfTest.cpp M tests/tbf/TbfTest.err 4 files changed, 136 insertions(+), 36 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/62/862/7 diff --git a/src/rlc.cpp b/src/rlc.cpp index ee2635a..320c3d0 100644 --- a/src/rlc.cpp +++ b/src/rlc.cpp @@ -105,7 +105,10 @@ uint16_t first_bsn, uint16_t *lost, uint16_t *received) { - unsigned num_blocks = rbb->cur_bit; + /* distance() is guaranteed to be positive because it does &mod_sns() */ + uint16_t dist = distance(); + unsigned num_blocks = rbb->cur_bit > (unsigned)dist + ? dist : rbb->cur_bit; unsigned bsn; /* first_bsn is in range V(A)..V(S) */ diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index c89cd03..f3ab0f4 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -847,6 +847,12 @@ unsigned received_packets = 0, lost_packets = 0; unsigned num_blocks = strlen(show_rbb); + /* distance() is guaranteed to be positive because it does &mod_sns() */ + uint16_t distance = m_window.distance(); + + num_blocks = num_blocks > (unsigned)distance + ? distance : num_blocks; + /* SSN - 1 is in range V(A)..V(S)-1 */ for (unsigned int bitpos = 0; bitpos < num_blocks; bitpos++) { bool is_received; @@ -925,7 +931,10 @@ char show_rbb[RLC_MAX_SNS + 1]; int error_rate; struct ana_result ana_res; - unsigned num_blocks = rbb->cur_bit; + /* distance() is guaranteed to be positive because it does &mod_sns() */ + dist = m_window.distance(); + unsigned num_blocks = rbb->cur_bit > (unsigned)dist + ? dist : rbb->cur_bit; unsigned behind_last_bsn = m_window.mod_sns(first_bsn + num_blocks); Decoding::extract_rbb(rbb, show_rbb); @@ -933,25 +942,6 @@ LOGP(DRLCMACDL, LOGL_DEBUG, "- ack: (BSN=%d)\"%s\"" "(BSN=%d) R=ACK I=NACK\n", first_bsn, show_rbb, m_window.mod_sns(behind_last_bsn - 1)); - - /* apply received array to receive state (first_bsn..behind_last_bsn-1) */ - if (num_blocks > 0) { - /* calculate distance of ssn from V(S) */ - dist = m_window.mod_sns(m_window.v_s() - behind_last_bsn); - /* check if distance is less than distance V(A)..V(S) */ - if (dist >= m_window.distance()) { - /* this might happpen, if the downlink assignment - * was not received by ms and the ack refers - * to previous TBF - * FIXME: we should implement polling for - * control ack! - * TODO: check whether this FIXME still makes sense - */ - LOGP(DRLCMACDL, LOGL_NOTICE, "- ack range is out of " - "V(A)..V(S) range %s Free TBF!\n", tbf_name(this)); - return 1; /* indicate to free TBF */ - } - } error_rate = analyse_errors(show_rbb, behind_last_bsn, &ana_res); diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 8fb8bfe..cc48392 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -2101,17 +2101,11 @@ dl_tbf->rcvd_dl_ack( ack_nack->EGPRS_AckNack.Desc.FINAL_ACK_INDICATION, bsn_begin, &bits); - /* - * TODO:status of BSN:1176,1177 shall be invalid - * status of BSN:1286,1287 shall be acked. - * both condition fails because of existing bug. Which shall be - * fixed in subsequent commit - */ - OSMO_ASSERT(prlcmvb->is_unacked(1176)); - OSMO_ASSERT(prlcmvb->is_unacked(1177)); - OSMO_ASSERT(prlcmvb->is_unacked(1286)); - OSMO_ASSERT(prlcmvb->is_unacked(1287)); + OSMO_ASSERT(prlcmvb->is_invalid(1176)); + OSMO_ASSERT(prlcmvb->is_invalid(1177)); + OSMO_ASSERT(prlcmvb->is_acked(1286)); + OSMO_ASSERT(prlcmvb->is_acked(1287)); bitvec_free(block); tbf_free(dl_tbf); diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index f8e6503..fc3a113 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -446,7 +446,7 @@ Sending data request: trx=0 ts=4 sapi=5 arfcn=0 fn=91 block=9 data=07 00 28 0a 41 c6 c7 43 c0 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) downlink acknowledge - ack: (BSN=85)"RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR"(BSN=20) R=ACK I=NACK -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) DL analysis, range=0:21, lost=0, recv=21, skipped=0, bsn=127, info='RRRRRRRRRRRRRRRRRRRRR$..........................................' +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) DL analysis, range=0:21, lost=0, recv=21, skipped=0, bsn=0, info='RRRRRRRRRRRRRRRRRRRRR...........................................' - got ack for BSN=20 - got ack for BSN=19 - got ack for BSN=18 @@ -485,7 +485,7 @@ Sending data request: trx=0 ts=4 sapi=5 arfcn=0 fn=95 block=10 data=07 00 2a 4d 43 c0 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) downlink acknowledge - ack: (BSN=86)"RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR"(BSN=21) R=ACK I=NACK -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) DL analysis, range=21:22, lost=0, recv=1, skipped=0, bsn=20, info='R$..............................................................' +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) DL analysis, range=21:22, lost=0, recv=1, skipped=0, bsn=21, info='R...............................................................' - got ack for BSN=21 - V(B): (V(A)=22)""(V(S)-1=21) A=Acked N=Nacked U=Unacked X=Resend-Unacked I=Invalid Scheduling data message at RTS for DL TFI=0 (TRX=0, TS=4) prio=4 @@ -6504,9 +6504,122 @@ 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 TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge -- ack: (BSN=1176)"RRRRRRRRRRIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIRRRIRRRRRRRRRRRRRRRRRRRRRRRRRRI"(BSN=1288) R=ACK I=NACK -- ack range is out of V(A)..V(S) range TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Free TBF! -DL packet loss of IMSI= / TLLI=0xffeeddcc: 100% +- 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................................................................................................................................................................................................................................................................................................................................................................................' +- got ack for BSN=1176 +- got ack for BSN=1177 +- got ack for BSN=1178 +- got ack for BSN=1179 +- got ack for BSN=1180 +- got ack for BSN=1181 +- got ack for BSN=1182 +- got ack for BSN=1183 +- got ack for BSN=1184 +- got ack for BSN=1185 +- got NACK for BSN=1186 +- got NACK for BSN=1187 +- got NACK for BSN=1188 +- got NACK for BSN=1189 +- got NACK for BSN=1190 +- got NACK for BSN=1191 +- got NACK for BSN=1192 +- got NACK for BSN=1193 +- got NACK for BSN=1194 +- got NACK for BSN=1195 +- got NACK for BSN=1196 +- got NACK for BSN=1197 +- got NACK for BSN=1198 +- got NACK for BSN=1199 +- got NACK for BSN=1200 +- got NACK for BSN=1201 +- got NACK for BSN=1202 +- got NACK for BSN=1203 +- got NACK for BSN=1204 +- got NACK for BSN=1205 +- got NACK for BSN=1206 +- got NACK for BSN=1207 +- got NACK for BSN=1208 +- got NACK for BSN=1209 +- got NACK for BSN=1210 +- got NACK for BSN=1211 +- got NACK for BSN=1212 +- got NACK for BSN=1213 +- got NACK for BSN=1214 +- got NACK for BSN=1215 +- got NACK for BSN=1216 +- got NACK for BSN=1217 +- got NACK for BSN=1218 +- got NACK for BSN=1219 +- got NACK for BSN=1220 +- got NACK for BSN=1221 +- got NACK for BSN=1222 +- got NACK for BSN=1223 +- got NACK for BSN=1224 +- got NACK for BSN=1225 +- got NACK for BSN=1226 +- got NACK for BSN=1227 +- got NACK for BSN=1228 +- got NACK for BSN=1229 +- got NACK for BSN=1230 +- got NACK for BSN=1231 +- got NACK for BSN=1232 +- got NACK for BSN=1233 +- got NACK for BSN=1234 +- got NACK for BSN=1235 +- got NACK for BSN=1236 +- got NACK for BSN=1237 +- got NACK for BSN=1238 +- got NACK for BSN=1239 +- got NACK for BSN=1240 +- got NACK for BSN=1241 +- got NACK for BSN=1242 +- got NACK for BSN=1243 +- got NACK for BSN=1244 +- got NACK for BSN=1245 +- got NACK for BSN=1246 +- got NACK for BSN=1247 +- got NACK for BSN=1248 +- got NACK for BSN=1249 +- got NACK for BSN=1250 +- got NACK for BSN=1251 +- got NACK for BSN=1252 +- got NACK for BSN=1253 +- got NACK for BSN=1254 +- got NACK for BSN=1255 +- got NACK for BSN=1256 +- got NACK for BSN=1257 +- got ack for BSN=1258 +- got ack for BSN=1259 +- got ack for BSN=1260 +- got NACK for BSN=1261 +- got ack for BSN=1262 +- got ack for BSN=1263 +- got ack for BSN=1264 +- got ack for BSN=1265 +- got ack for BSN=1266 +- got ack for BSN=1267 +- got ack for BSN=1268 +- got ack for BSN=1269 +- got ack for BSN=1270 +- got ack for BSN=1271 +- got ack for BSN=1272 +- got ack for BSN=1273 +- got ack for BSN=1274 +- got ack for BSN=1275 +- got ack for BSN=1276 +- got ack for BSN=1277 +- got ack for BSN=1278 +- got ack for BSN=1279 +- got ack for BSN=1280 +- got ack for BSN=1281 +- got ack for BSN=1282 +- got ack for BSN=1283 +- got ack for BSN=1284 +- got ack for BSN=1285 +- got ack for BSN=1286 +- got ack for BSN=1287 +- V(B): (V(A)=1186)"NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNAAANAAAAAAAAAAAAAAAAAAAAAAAAAA"(V(S)-1=1287) A=Acked N=Nacked U=Unacked X=Resend-Unacked I=Invalid +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! -- To view, visit https://gerrit.osmocom.org/862 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id07d178970f168f5389016c1eea31eb6b82057b6 Gerrit-PatchSet: 7 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar From gerrit-no-reply at lists.osmocom.org Tue Oct 25 14:35:27 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 25 Oct 2016 14:35:27 +0000 Subject: osmo-gsm-manuals[master]: OsmoBTS: generate osmobts-abis.pdf again In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 thanks :) -- To view, visit https://gerrit.osmocom.org/1151 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7ca18e3d7fa3a5a6eac0590b919b4c664f73671c Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals 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 Tue Oct 25 14:35:31 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 25 Oct 2016 14:35:31 +0000 Subject: [MERGED] osmo-gsm-manuals[master]: OsmoBTS: generate osmobts-abis.pdf again In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: OsmoBTS: generate osmobts-abis.pdf again ...................................................................... OsmoBTS: generate osmobts-abis.pdf again broken by 05f5adbe837f2cbfb9301cdb8c9b454ca0bfc825 Change-Id: I7ca18e3d7fa3a5a6eac0590b919b4c664f73671c --- M OsmoBTS/Makefile 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/OsmoBTS/Makefile b/OsmoBTS/Makefile index 73430fc..1e70eac 100644 --- a/OsmoBTS/Makefile +++ b/OsmoBTS/Makefile @@ -14,7 +14,7 @@ # htmlcss = TOPDIR := .. -ASCIIDOCS := osmobts-usermanual +ASCIIDOCS := osmobts-usermanual osmobts-abis include $(TOPDIR)/build/Makefile.asciidoc.inc include $(TOPDIR)/build/Makefile.inc -- To view, visit https://gerrit.osmocom.org/1151 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7ca18e3d7fa3a5a6eac0590b919b4c664f73671c Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue Oct 25 16:13:27 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 25 Oct 2016 16:13:27 +0000 Subject: osmo-bts[master]: Add tools to check DTX operation In-Reply-To: References: Message-ID: Patch Set 5: Code-Review-1 Need extension for facch -- To view, visit https://gerrit.osmocom.org/1143 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib1c70c4543b24c2a05a7df8eec5ce3f4eda2c02e 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-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Oct 25 17:34:19 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 25 Oct 2016 17:34:19 +0000 Subject: [PATCH] osmo-bts[master]: Add tools to check DTX operation 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/1143 to look at the new patch set (#6). Add tools to check DTX operation * superfemto.sh can parse superfemto-compatible DSP log output to properly sort records into MT/MO and DL/UL parts * dtx_check.gawk can process output of superfemto.sh and check for common scheduling errors This allows to check lc15 and sysmo for errors in DTX DL scheduling. As dtx_check.gawk is generic it can be used with any other BTS hw (or virtula BTS) as long as raw logs from this hw can be converted to simple input format 'FN EVENT' per-line. Change-Id: Ib1c70c4543b24c2a05a7df8eec5ce3f4eda2c02e Related: OS#1801 --- A contrib/dtx_check.gawk A contrib/superfemto.sh 2 files changed, 173 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/43/1143/6 diff --git a/contrib/dtx_check.gawk b/contrib/dtx_check.gawk new file mode 100755 index 0000000..ff9fca5 --- /dev/null +++ b/contrib/dtx_check.gawk @@ -0,0 +1,74 @@ +#!/usr/bin/gawk -f + +# Expected input format: FN TYPE + +BEGIN { + DELTA = 0 + ERR = 0 + FORCE = 0 + FN = 0 + SILENCE = 0 + TYPE = "" + CHK = "" + U_MAX = 8 * 20 + 120 / 26 + U_MIN = 8 * 20 - 120 / 26 + F_MAX = 3 * 20 + 120 / 26 + F_MIN = 3 * 20 - 120 / 26 +} + +{ + if (NR > 1) { # we have data from previous record to compare to + DELTA = ($1 - FN) * 120 / 26 + CHK = "OK" + if (("UPDATE" == TYPE || "FIRST" == TYPE) && ("FACCH" == $2 || "SPEECH" == $2)) { # check for missing ONSET: + CHK = "FAIL: missing ONSET (" $2 ") after " TYPE "." + ERR++ + } + if ("FORCED_FIRST" == $2 || "FORCED_NODATA" == $2) { + CHK = "FAIL: event " $2 " inserted by DSP." + FORCE++ + ERR++ + } + if ("OK" == CHK) { # check inter-SID distances: + if ("UPDATE" == TYPE) { + if (DELTA > U_MAX) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too big " DELTA "ms > " U_MAX "ms." + ERR++ + } + if ("UPDATE" == $2 && DELTA < U_MIN) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too small " DELTA "ms < " U_MIN "ms." + ERR++ + } + } + if ("FIRST" == TYPE) { + if (DELTA > F_MAX) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID FIRST (@" FN ") too big " DELTA "ms > " F_MAX "ms." + ERR++ + } + if ("UPDATE" == $2 && DELTA < F_MIN) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too small " DELTA "ms < " F_MIN "ms." + ERR++ + } + } + } + if ("FACCH" == TYPE && "UPDATE" == 2 && 1 == SILENCE) { # check FACCH handling + CHK = "FAIL: incorrect silence resume after FACCH." + ERR++ + } + } + if ("SPEECH" == $2 || "ONSET" == $2) { # talkspurt + SILENCE = 0 + } + if ("UPDATE" == $2 || "FIRST" == $2) { # silence + SILENCE = 1 + } + print $1, $2, CHK, TYPE, DELTA, SILENCE + if ($2 != "EMPTY") { # skip over EMPTY records + TYPE = $2 + FN = $1 + } +} + +END { + print "Check completed: found " ERR " errors (" FORCE " events inserted by DSP) in " NR " records." +} diff --git a/contrib/superfemto.sh b/contrib/superfemto.sh new file mode 100755 index 0000000..cb871c0 --- /dev/null +++ b/contrib/superfemto.sh @@ -0,0 +1,99 @@ +#!/bin/sh + +# Split common DSP call log file (produced by superfemto-compatible firmware) into 4 separate call leg files (MO/MT & DL/UL) with events in format "FN EVENT_TYPE": +# MO Mobile Originated +# MT Mobile Terminated +# DL DownLink (BTS -> L1) +# UL UpLink (L1 -> BTS) + +if [ -z $1 ]; then + echo "expecting DSP log file name as parameter" + exit 1 +fi + +# MO handle appear 1st in the logs +MO=$(grep 'h=' $1 | head -n 1 | cut -f2 -d',' | cut -f2 -d= | cut -f1 -d']') + +# direction markers: +DLST="_CodeBurst" +ULST="_DecodeAndIdentify" + +# DL sed filters: +D_EMP='s/ Empty frame request!/EMPTY/' +D_FAC='s/ Coding a FACCH\/F frame !!/FACCH/' +D_FST='s/ Coding a RTP SID First frame !!/FIRST/' +D_UPD='s/ Coding a RTP SID Update frame !!/UPDATE/' +D_SPE='s/ Coding a RTP Speech frame !!/SPEECH/' +D_ONS='s/ Coding a Onset frame !!/ONSET/' +D_FO1='s/ A speech frame is following a NoData or SID First without an Onset./FORCED_FIRST/' +D_FO2='s/ A speech frame is following a NoData without an Onset./FORCED_NODATA/' + +# UL sed filters: +U_NOD='s/ It is a No Data frame !!/NODATA/' +U_ONS='s/ It is an ONSET frame !!/ONSET/' +U_UPD='s/ It is a SID UPDATE frame !!/UPDATE/' +U_FST='s/ It is a SID FIRST frame !!/FIRST/' +U_SPE='s/ It is a SPEECH frame !!/SPEECH/' + +DL () { # filter downlink-related entries + grep $DLST $1 > $1.DL.tmp +} + +UL () { # uplink does not require special fix + grep $ULST $1 > $1.UL.tmp.fix +} + +DL $1 +UL $1 + +FIX() { # add MO/MT marker from preceding line to inserted ONSETs so filtering works as expected + cat $1.DL.tmp | awk 'BEGIN{ FS="h="; H="" } { if (NF > 1) { H = $2; print $1 "h=" $2 } else { print $1 ", h=" H } }' > $1.DL.tmp.fix +} + +FIX $1 + +MO() { # filter MO call DL or UL logs + grep "h=$MO" $1.tmp.fix > $1.MO.raw +} + +MT() { # filter MT call DL or UL logs + grep -v "h=$MO" $1.tmp.fix > $1.MT.raw +} + +MO $1.DL +MT $1.DL +MO $1.UL +MT $1.UL + +PREP() { # prepare logs for reformatting + cat $1.raw | cut -f2 -d')' | cut -f1 -d',' | cut -f2 -d'>' | sed 's/\[u32Fn/fn/' | sed 's/fn = /fn=/' | sed 's/fn=//' | sed 's/\[Fn=//' | sed 's/ An Onset will be inserted.//' > $1.tmp1 +} + +PREP "$1.DL.MT" +PREP "$1.DL.MO" +PREP "$1.UL.MT" +PREP "$1.UL.MO" + +RD() { # reformat DL logs for consistency checks + cat $1.tmp1 | sed "$D_FST" | sed "$D_SPE" | sed "$D_UPD" | sed "$D_ONS" | sed "$D_EMP" | sed "$D_FAC" | sed "$D_FO1" | sed "$D_FO2" > $1.tmp2 +} + +RU() { # reformat UL logs for consistency checks + cat $1.tmp1 | sed "$U_FST" | sed "$U_SPE" | sed "$U_UPD" | sed "$U_ONS" | sed "$U_NOD" > $1.tmp2 +} + +RD "$1.DL.MT" +RD "$1.DL.MO" +RU "$1.UL.MT" +RU "$1.UL.MO" + +SW() { # swap fields + cat $1.tmp2 | awk '{ print $2, $1 }' > $1 +} + +SW "$1.DL.MT" +SW "$1.DL.MO" +SW "$1.UL.MT" +SW "$1.UL.MO" + +rm $1.*.tmp* -- To view, visit https://gerrit.osmocom.org/1143 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib1c70c4543b24c2a05a7df8eec5ce3f4eda2c02e Gerrit-PatchSet: 6 Gerrit-Project: osmo-bts 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 Tue Oct 25 17:34:19 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 25 Oct 2016 17:34:19 +0000 Subject: [PATCH] osmo-bts[master]: DTX DL: split ONSET state handling 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/1145 to look at the new patch set (#4). DTX DL: split ONSET state handling Handle ONSET cause by Voice and FACCH separately. In case of Voice we have RTP payload which we have to cache and send later on in next response to L1 RTS. FACCH have higher priority so it preempts both voice and silence alike - hence we can send ONSET immediately but still have to track previous state in order to get back to it gracefully. This affects lc15 and sysmo hw as there's no FSM-based DTX implementation for other models yet. Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Related: OS#1801 --- M include/osmo-bts/dtx_dl_amr_fsm.h M src/common/dtx_dl_amr_fsm.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 6 files changed, 84 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/45/1145/4 diff --git a/include/osmo-bts/dtx_dl_amr_fsm.h b/include/osmo-bts/dtx_dl_amr_fsm.h index 8b19595..5c13c19 100644 --- a/include/osmo-bts/dtx_dl_amr_fsm.h +++ b/include/osmo-bts/dtx_dl_amr_fsm.h @@ -16,7 +16,6 @@ ST_U_INH, ST_SID_U, ST_ONSET_V, - ST_ONSET_F, ST_FACCH_V, ST_FACCH, }; diff --git a/src/common/dtx_dl_amr_fsm.c b/src/common/dtx_dl_amr_fsm.c index b110cf2..a75fd00 100644 --- a/src/common/dtx_dl_amr_fsm.c +++ b/src/common/dtx_dl_amr_fsm.c @@ -53,7 +53,7 @@ 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_FACCH, 0, 0); break; case E_COMPL: osmo_fsm_inst_state_chg(fi, ST_SID_F2, 0, 0); @@ -81,7 +81,7 @@ 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_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -97,7 +97,7 @@ osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -113,7 +113,7 @@ osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -126,7 +126,7 @@ { switch (event) { case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; case E_VOICE: osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); @@ -234,7 +234,7 @@ 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), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_FACCH) | X(ST_SID_F2) | X(ST_F1_INH) | X(ST_ONSET_V), .name = "SID-FIRST (P1)", .action = dtx_fsm_sid_f1, }, @@ -242,7 +242,7 @@ 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), - .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_ONSET_F), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_FACCH), .name = "SID-FIRST (P2)", .action = dtx_fsm_sid_f2, }, @@ -265,7 +265,7 @@ /* 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), + .out_state_mask = X(ST_FACCH) | X(ST_VOICE) | X(ST_U_INH) | X(ST_SID_U) | X(ST_ONSET_V), .name = "SID-UPDATE", .action = dtx_fsm_sid_upd, }, @@ -275,13 +275,6 @@ .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), .name = "ONSET (SPEECH)", .action = dtx_fsm_onset_v, - }, - /* ONSET - end of silent period due to incoming FACCH frame */ - [ST_ONSET_F]= { - .in_event_mask = X(E_VOICE) | X(E_FACCH) | X(E_SID_U), - .out_state_mask = X(ST_VOICE) | X(ST_FACCH), - .name = "ONSET (FACCH)", - .action = dtx_fsm_onset_f, }, /* FACCH sending state: SPEECH was observed before so once we're done FSM should get back to VOICE state */ diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index f47634e..b98e95a 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -53,6 +53,7 @@ #include #include #include +#include #include #include @@ -330,13 +331,15 @@ } static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache) { struct lc15l1_hdl *fl1 = trx_lc15l1_hdl(trx); struct msgb *l1msg = l1p_msgb_alloc(); + struct gsm_lchan *lchan; uint32_t u32Fn; uint8_t u8Tn, subCh, u8BlockNbr = 0, sapi = 0; uint8_t chan_nr, link_id; + bool rec = false; int len; if (!msg) { @@ -401,14 +404,41 @@ if (len) { /* data request */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); + lchan = get_lchan_by_chan_nr(trx, chan_nr); + + if (use_cache) + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, + lchan->tch.dtx.facch, msgb_l2len(msg)); + else if (trx->bts->dtxd && // FIXME: separate FACCH/H? + (sapi == GsmL1_Sapi_FacchF || + sapi == GsmL1_Sapi_FacchH)) { + if (lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + /* FACCH interruption of DTX silence */ + /* cache FACCH data */ + memcpy(lchan->tch.dtx.facch, msg->l2h, + msgb_l2len(msg)); + /* prepare ONSET message */ + len = 3; + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_Onset; + /* ignored CMR/CMI pair */ + l1p->u.phDataReq.msgUnitParam.u8Buffer[1] = 0; + l1p->u.phDataReq.msgUnitParam.u8Buffer[2] = 0; + /* ONSET is ready, recursive call is necessary */ + rec = true; + } + } data_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr, len); - OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); - memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, msgb_l2len(msg)); + if (!rec && !use_cache) { + OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, + msgb_l2len(msg)); + } LOGP(DL1P, LOGL_DEBUG, "PH-DATA.req(%s)\n", - osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, - l1p->u.phDataReq.msgUnitParam.u8Size)); + osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, + l1p->u.phDataReq.msgUnitParam.u8Size)); } else { /* empty frame */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); @@ -422,6 +452,8 @@ msgb_free(l1msg); } + if (rec) + ph_data_req(trx, msg, l1sap, true); return 0; } @@ -566,7 +598,7 @@ * free()d below */ switch (OSMO_PRIM_HDR(&l1sap->oph)) { case OSMO_PRIM(PRIM_PH_DATA, PRIM_OP_REQUEST): - rc = ph_data_req(trx, msg, l1sap); + rc = ph_data_req(trx, msg, l1sap, false); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index b251388..2565e23 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -285,10 +285,9 @@ /* DTX DL-specific logic below: */ switch (lchan->tch.dtx.dl_amr_fsm->state) { case ST_ONSET_V: - case ST_ONSET_F: *payload_type = GsmL1_TchPlType_Amr_Onset; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); - *len = 1; + *len = 3; return 1; case ST_VOICE: *payload_type = GsmL1_TchPlType_Amr; diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index bef2d30..eefcdaf 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -325,13 +325,15 @@ } static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache) { struct femtol1_hdl *fl1 = trx_femtol1_hdl(trx); struct msgb *l1msg = l1p_msgb_alloc(); + struct gsm_lchan *lchan; uint32_t u32Fn; uint8_t u8Tn, subCh, u8BlockNbr = 0, sapi = 0; uint8_t chan_nr, link_id; + bool rec = false; int len; if (!msg) { @@ -396,14 +398,41 @@ if (len) { /* data request */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); + lchan = get_lchan_by_chan_nr(trx, chan_nr); + + if (use_cache) + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, + lchan->tch.dtx.facch, msgb_l2len(msg)); + else if (trx->bts->dtxd && // FIXME: separate FACCH/H? + (sapi == GsmL1_Sapi_FacchF || + sapi == GsmL1_Sapi_FacchH)) { + if (lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + /* FACCH interruption of DTX silence */ + /* cache FACCH data */ + memcpy(lchan->tch.dtx.facch, msg->l2h, + msgb_l2len(msg)); + /* prepare ONSET message */ + len = 3; + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_Onset; + /* ignored CMR/CMI pair */ + l1p->u.phDataReq.msgUnitParam.u8Buffer[1] = 0; + l1p->u.phDataReq.msgUnitParam.u8Buffer[2] = 0; + /* ONSET is ready, recursive call is necessary */ + rec = true; + } + } data_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr, len); - OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); - memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, msgb_l2len(msg)); + if (!rec && !use_cache) { + OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, + msgb_l2len(msg)); + } LOGP(DL1P, LOGL_DEBUG, "PH-DATA.req(%s)\n", - osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, - l1p->u.phDataReq.msgUnitParam.u8Size)); + osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, + l1p->u.phDataReq.msgUnitParam.u8Size)); } else { /* empty frame */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); @@ -417,6 +446,8 @@ msgb_free(l1msg); } + if (rec) + ph_data_req(trx, msg, l1sap, true); return 0; } diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index b08ba7e..5e517e9 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -383,10 +383,9 @@ /* DTX DL-specific logic below: */ switch (lchan->tch.dtx.dl_amr_fsm->state) { case ST_ONSET_V: - case ST_ONSET_F: *payload_type = GsmL1_TchPlType_Amr_Onset; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); - *len = 1; + *len = 3; return 1; case ST_VOICE: *payload_type = GsmL1_TchPlType_Amr; -- To view, visit https://gerrit.osmocom.org/1145 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Gerrit-PatchSet: 4 Gerrit-Project: osmo-bts 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 Tue Oct 25 17:35:58 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 25 Oct 2016 17:35:58 +0000 Subject: osmo-bts[master]: DTX DL: split ONSET state handling In-Reply-To: References: Message-ID: Patch Set 4: Code-Review-1 -- To view, visit https://gerrit.osmocom.org/1145 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 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-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Oct 25 18:16:31 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 25 Oct 2016 18:16:31 +0000 Subject: [PATCH] osmo-bts[master]: DTX DL: split ONSET state handling 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/1145 to look at the new patch set (#5). DTX DL: split ONSET state handling Handle ONSET cause by Voice and FACCH separately. In case of Voice we have RTP payload which we have to cache and send later on in next response to L1 RTS. FACCH have higher priority so it preempts both voice and silence alike - hence we can send ONSET immediately but still have to track previous state in order to get back to it gracefully. This affects lc15 and sysmo hw as there's no FSM-based DTX implementation for other models yet. Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Related: OS#1801 --- M include/osmo-bts/dtx_dl_amr_fsm.h M src/common/dtx_dl_amr_fsm.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 6 files changed, 95 insertions(+), 32 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/45/1145/5 diff --git a/include/osmo-bts/dtx_dl_amr_fsm.h b/include/osmo-bts/dtx_dl_amr_fsm.h index 8b19595..5c13c19 100644 --- a/include/osmo-bts/dtx_dl_amr_fsm.h +++ b/include/osmo-bts/dtx_dl_amr_fsm.h @@ -16,7 +16,6 @@ ST_U_INH, ST_SID_U, ST_ONSET_V, - ST_ONSET_F, ST_FACCH_V, ST_FACCH, }; diff --git a/src/common/dtx_dl_amr_fsm.c b/src/common/dtx_dl_amr_fsm.c index b110cf2..a75fd00 100644 --- a/src/common/dtx_dl_amr_fsm.c +++ b/src/common/dtx_dl_amr_fsm.c @@ -53,7 +53,7 @@ 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_FACCH, 0, 0); break; case E_COMPL: osmo_fsm_inst_state_chg(fi, ST_SID_F2, 0, 0); @@ -81,7 +81,7 @@ 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_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -97,7 +97,7 @@ osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -113,7 +113,7 @@ osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -126,7 +126,7 @@ { switch (event) { case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; case E_VOICE: osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); @@ -234,7 +234,7 @@ 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), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_FACCH) | X(ST_SID_F2) | X(ST_F1_INH) | X(ST_ONSET_V), .name = "SID-FIRST (P1)", .action = dtx_fsm_sid_f1, }, @@ -242,7 +242,7 @@ 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), - .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_ONSET_F), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_FACCH), .name = "SID-FIRST (P2)", .action = dtx_fsm_sid_f2, }, @@ -265,7 +265,7 @@ /* 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), + .out_state_mask = X(ST_FACCH) | X(ST_VOICE) | X(ST_U_INH) | X(ST_SID_U) | X(ST_ONSET_V), .name = "SID-UPDATE", .action = dtx_fsm_sid_upd, }, @@ -275,13 +275,6 @@ .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), .name = "ONSET (SPEECH)", .action = dtx_fsm_onset_v, - }, - /* ONSET - end of silent period due to incoming FACCH frame */ - [ST_ONSET_F]= { - .in_event_mask = X(E_VOICE) | X(E_FACCH) | X(E_SID_U), - .out_state_mask = X(ST_VOICE) | X(ST_FACCH), - .name = "ONSET (FACCH)", - .action = dtx_fsm_onset_f, }, /* FACCH sending state: SPEECH was observed before so once we're done FSM should get back to VOICE state */ diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index f47634e..b6f35b7 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -53,6 +53,7 @@ #include #include #include +#include #include #include @@ -330,13 +331,15 @@ } static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache) { struct lc15l1_hdl *fl1 = trx_lc15l1_hdl(trx); struct msgb *l1msg = l1p_msgb_alloc(); + struct gsm_lchan *lchan; uint32_t u32Fn; uint8_t u8Tn, subCh, u8BlockNbr = 0, sapi = 0; uint8_t chan_nr, link_id; + bool rec = false; int len; if (!msg) { @@ -401,14 +404,46 @@ if (len) { /* data request */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); + lchan = get_lchan_by_chan_nr(trx, chan_nr); + + if (use_cache) + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, + lchan->tch.dtx.facch, msgb_l2len(msg)); + else if (trx->bts->dtxd && lchan->tch.dtx.dl_amr_fsm && + lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + if (sapi == GsmL1_Sapi_FacchF) { + sapi = GsmL1_Sapi_TchF; + } + if (sapi == GsmL1_Sapi_FacchH) { + sapi = GsmL1_Sapi_TchH; + } + if (sapi == GsmL1_Sapi_TchH || sapi == GsmL1_Sapi_TchF) { + /* FACCH interruption of DTX silence */ + /* cache FACCH data */ + memcpy(lchan->tch.dtx.facch, msg->l2h, + msgb_l2len(msg)); + /* prepare ONSET message */ + len = 3; + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_Onset; + /* ignored CMR/CMI pair */ + l1p->u.phDataReq.msgUnitParam.u8Buffer[1] = 0; + l1p->u.phDataReq.msgUnitParam.u8Buffer[2] = 0; + /* ONSET is ready, recursive call is necessary */ + rec = true; + } + } data_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr, len); - OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); - memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, msgb_l2len(msg)); + if (!rec && !use_cache) { + OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, + msgb_l2len(msg)); + } LOGP(DL1P, LOGL_DEBUG, "PH-DATA.req(%s)\n", - osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, - l1p->u.phDataReq.msgUnitParam.u8Size)); + osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, + l1p->u.phDataReq.msgUnitParam.u8Size)); } else { /* empty frame */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); @@ -422,6 +457,8 @@ msgb_free(l1msg); } + if (rec) + ph_data_req(trx, msg, l1sap, true); return 0; } @@ -566,7 +603,7 @@ * free()d below */ switch (OSMO_PRIM_HDR(&l1sap->oph)) { case OSMO_PRIM(PRIM_PH_DATA, PRIM_OP_REQUEST): - rc = ph_data_req(trx, msg, l1sap); + rc = ph_data_req(trx, msg, l1sap, false); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index b251388..2565e23 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -285,10 +285,9 @@ /* DTX DL-specific logic below: */ switch (lchan->tch.dtx.dl_amr_fsm->state) { case ST_ONSET_V: - case ST_ONSET_F: *payload_type = GsmL1_TchPlType_Amr_Onset; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); - *len = 1; + *len = 3; return 1; case ST_VOICE: *payload_type = GsmL1_TchPlType_Amr; diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index bef2d30..8729c89 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -325,13 +325,15 @@ } static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache) { struct femtol1_hdl *fl1 = trx_femtol1_hdl(trx); struct msgb *l1msg = l1p_msgb_alloc(); + struct gsm_lchan *lchan; uint32_t u32Fn; uint8_t u8Tn, subCh, u8BlockNbr = 0, sapi = 0; uint8_t chan_nr, link_id; + bool rec = false; int len; if (!msg) { @@ -396,14 +398,46 @@ if (len) { /* data request */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); + lchan = get_lchan_by_chan_nr(trx, chan_nr); + + if (use_cache) + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, + lchan->tch.dtx.facch, msgb_l2len(msg)); + else if (trx->bts->dtxd && lchan->tch.dtx.dl_amr_fsm && + lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + if (sapi == GsmL1_Sapi_FacchF) { + sapi = GsmL1_Sapi_TchF; + } + if (sapi == GsmL1_Sapi_FacchH) { + sapi = GsmL1_Sapi_TchH; + } + if (sapi == GsmL1_Sapi_TchH || sapi == GsmL1_Sapi_TchF) { + /* FACCH interruption of DTX silence */ + /* cache FACCH data */ + memcpy(lchan->tch.dtx.facch, msg->l2h, + msgb_l2len(msg)); + /* prepare ONSET message */ + len = 3; + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_Onset; + /* ignored CMR/CMI pair */ + l1p->u.phDataReq.msgUnitParam.u8Buffer[1] = 0; + l1p->u.phDataReq.msgUnitParam.u8Buffer[2] = 0; + /* ONSET is ready, recursive call is necessary */ + rec = true; + } + } data_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr, len); - OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); - memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, msgb_l2len(msg)); + if (!rec && !use_cache) { + OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, + msgb_l2len(msg)); + } LOGP(DL1P, LOGL_DEBUG, "PH-DATA.req(%s)\n", - osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, - l1p->u.phDataReq.msgUnitParam.u8Size)); + osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, + l1p->u.phDataReq.msgUnitParam.u8Size)); } else { /* empty frame */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); @@ -417,6 +451,8 @@ msgb_free(l1msg); } + if (rec) + ph_data_req(trx, msg, l1sap, true); return 0; } @@ -561,7 +597,7 @@ * free()d below */ switch (OSMO_PRIM_HDR(&l1sap->oph)) { case OSMO_PRIM(PRIM_PH_DATA, PRIM_OP_REQUEST): - rc = ph_data_req(trx, msg, l1sap); + rc = ph_data_req(trx, msg, l1sap, false); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index b08ba7e..5e517e9 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -383,10 +383,9 @@ /* DTX DL-specific logic below: */ switch (lchan->tch.dtx.dl_amr_fsm->state) { case ST_ONSET_V: - case ST_ONSET_F: *payload_type = GsmL1_TchPlType_Amr_Onset; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); - *len = 1; + *len = 3; return 1; case ST_VOICE: *payload_type = GsmL1_TchPlType_Amr; -- To view, visit https://gerrit.osmocom.org/1145 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Gerrit-PatchSet: 5 Gerrit-Project: osmo-bts 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 Tue Oct 25 18:26:35 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 25 Oct 2016 18:26:35 +0000 Subject: [PATCH] openbsc[master]: DTX DL: Add FACCH cache Message-ID: Review at https://gerrit.osmocom.org/1152 DTX DL: Add FACCH cache When DL DTX is active and silent period is in progress dtx.cache is populated by SID UPDATE message which about to be scheduled next. If at that moment FACCH message arrives (which have higher priority) we have to send ONSET message to L1 but we can't invalidate cache with SID UPDATE as it will be used for SID FIRST message to resume silent period after FACCH transmission is over (provided there were no incoming voice in between). Hence the necessity for separate buffer to store content of FACCH message while we're sending ONSET to L1 while keeping SID UPDATE cached. Change-Id: I316e81af893b24766bf259baaed7a0be75a11694 Related: OS#1801 --- M openbsc/include/openbsc/gsm_data_shared.h 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/52/1152/1 diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index 487a3f3..32feae3 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -300,7 +300,10 @@ struct amr_multirate_conf amr_mr; struct { struct osmo_fsm_inst *dl_amr_fsm; + /* TCH/* cache */ uint8_t cache[20]; + /* FACCH/* cache */ + uint8_t facch[24]; uint8_t len; uint32_t fn; bool is_update; -- To view, visit https://gerrit.osmocom.org/1152 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I316e81af893b24766bf259baaed7a0be75a11694 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue Oct 25 18:48:23 2016 From: gerrit-no-reply at lists.osmocom.org (Tom Tsou) Date: Tue, 25 Oct 2016 18:48:23 +0000 Subject: osmo-trx[master]: transceiver: Fix command build warning In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1118 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I74032b49785bd68835a0a68cb0f14cdaab4fcd26 Gerrit-PatchSet: 2 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Tom Tsou Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Tom Tsou Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Oct 25 18:48:25 2016 From: gerrit-no-reply at lists.osmocom.org (Tom Tsou) Date: Tue, 25 Oct 2016 18:48:25 +0000 Subject: [MERGED] osmo-trx[master]: transceiver: Fix command build warning In-Reply-To: References: Message-ID: Tom Tsou has submitted this change and it was merged. Change subject: transceiver: Fix command build warning ...................................................................... transceiver: Fix command build warning Place conditional brackets on handover table reset. Reset table only on successful start or restart. Change-Id: I74032b49785bd68835a0a68cb0f14cdaab4fcd26 --- M Transceiver52M/Transceiver.cpp 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Tom Tsou: Looks good to me, approved Max: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp index 4db0aaa..f156ad4 100644 --- a/Transceiver52M/Transceiver.cpp +++ b/Transceiver52M/Transceiver.cpp @@ -744,14 +744,15 @@ sprintf(response,"RSP POWEROFF 0"); } else if (strcmp(command,"POWERON")==0) { - if (!start()) + if (!start()) { sprintf(response,"RSP POWERON 1"); - else + } else { sprintf(response,"RSP POWERON 0"); for (int i = 0; i < 8; i++) { for (int j = 0; j < 8; j++) mHandover[i][j] = false; } + } } else if (strcmp(command,"HANDOVER")==0){ int ts=0,ss=0; -- To view, visit https://gerrit.osmocom.org/1118 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I74032b49785bd68835a0a68cb0f14cdaab4fcd26 Gerrit-PatchSet: 3 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Tom Tsou Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Tom Tsou From gerrit-no-reply at lists.osmocom.org Tue Oct 25 18:48:51 2016 From: gerrit-no-reply at lists.osmocom.org (Tom Tsou) Date: Tue, 25 Oct 2016 18:48:51 +0000 Subject: osmo-trx[master]: 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/1117 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id7d15b52cd4e45f1d856a6ef3a84832a28f2dd04 Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Tom Tsou Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Tom Tsou Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue Oct 25 18:48:52 2016 From: gerrit-no-reply at lists.osmocom.org (Tom Tsou) Date: Tue, 25 Oct 2016 18:48:52 +0000 Subject: [MERGED] osmo-trx[master]: uhd: Set minimum supported version to 3.9.0 In-Reply-To: References: Message-ID: Tom Tsou has submitted this change and it was merged. Change subject: uhd: Set minimum supported version to 3.9.0 ...................................................................... uhd: Set minimum supported version to 3.9.0 Versions of UHD prior to 3.9.0 are no longer supported. Rather then backport and ifdef UHD version specific API and behavioral changes, set minimum support to the current LTS release, which is 3.9.0. Change-Id: Id7d15b52cd4e45f1d856a6ef3a84832a28f2dd04 Signed-off-by: Tom Tsou --- M Transceiver52M/UHDDevice.cpp M configure.ac 2 files changed, 2 insertions(+), 11 deletions(-) Approvals: Tom Tsou: Looks good to me, approved Max: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/Transceiver52M/UHDDevice.cpp b/Transceiver52M/UHDDevice.cpp index 47fa0bf..a84fe4b 100644 --- a/Transceiver52M/UHDDevice.cpp +++ b/Transceiver52M/UHDDevice.cpp @@ -84,15 +84,9 @@ /* * 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 7e394c2..b41382f 100644 --- a/configure.ac +++ b/configure.ac @@ -97,12 +97,9 @@ ]) AS_IF([test "x$with_usrp1" != "xyes"],[ - 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(UHD, uhd >= 003.009) 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/1117 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id7d15b52cd4e45f1d856a6ef3a84832a28f2dd04 Gerrit-PatchSet: 2 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Tom Tsou Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Tom Tsou From gerrit-no-reply at lists.osmocom.org Tue Oct 25 23:24:32 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 25 Oct 2016 23:24:32 +0000 Subject: openbsc[master]: DTX DL: Add FACCH cache In-Reply-To: References: Message-ID: Patch Set 1: (2 comments) https://gerrit.osmocom.org/#/c/1152/1/openbsc/include/openbsc/gsm_data_shared.h File openbsc/include/openbsc/gsm_data_shared.h: Line 303: /* TCH/* cache */ It's the correct notation, but having '/*' within a comment triggers at least vim's syntax highlighting to indicate an error in the comment. Maybe avoid that by dropping the '/'? Line 305: /* FACCH/* cache */ (same) -- To view, visit https://gerrit.osmocom.org/1152 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I316e81af893b24766bf259baaed7a0be75a11694 Gerrit-PatchSet: 1 Gerrit-Project: openbsc 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 Tue Oct 25 23:28:18 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 25 Oct 2016 23:28:18 +0000 Subject: libosmocore[master]: libosmocoding: migrate transcoding routines from OsmoBTS In-Reply-To: References: Message-ID: Patch Set 9: the coding_test added by this patch fails... -- 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: 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 Oct 26 06:39:23 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Wed, 26 Oct 2016 06:39:23 +0000 Subject: osmo-pcu[master]: EGPRS: add test case to show EPDAN BSN out of window bug In-Reply-To: References: Message-ID: Patch Set 9: Code-Review+1 Verified+1 -- To view, visit https://gerrit.osmocom.org/861 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If32b67f5c05707155281128b776a90a1e3d587b2 Gerrit-PatchSet: 9 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Oct 26 06:39:32 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Wed, 26 Oct 2016 06:39:32 +0000 Subject: osmo-pcu[master]: EGPRS: fix for EPDAN out of window In-Reply-To: References: Message-ID: Patch Set 7: Code-Review+1 Verified+1 -- To view, visit https://gerrit.osmocom.org/862 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id07d178970f168f5389016c1eea31eb6b82057b6 Gerrit-PatchSet: 7 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Oct 26 06:39:50 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Wed, 26 Oct 2016 06:39:50 +0000 Subject: osmo-pcu[master]: EGPRS: add test case to show EPDAN BSN out of window bug In-Reply-To: References: Message-ID: Patch Set 9: -Code-Review -Verified -- To view, visit https://gerrit.osmocom.org/861 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If32b67f5c05707155281128b776a90a1e3d587b2 Gerrit-PatchSet: 9 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Oct 26 06:39:56 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Wed, 26 Oct 2016 06:39:56 +0000 Subject: osmo-pcu[master]: EGPRS: fix for EPDAN out of window In-Reply-To: References: Message-ID: Patch Set 7: -Code-Review -Verified -- To view, visit https://gerrit.osmocom.org/862 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id07d178970f168f5389016c1eea31eb6b82057b6 Gerrit-PatchSet: 7 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed Oct 26 06:55:17 2016 From: gerrit-no-reply at lists.osmocom.org (pierre.baudry) Date: Wed, 26 Oct 2016 06:55:17 +0000 Subject: [PATCH] osmo-trx[master]: transceiver: Fix mismatched allocations and deallocations Message-ID: Review at https://gerrit.osmocom.org/1153 transceiver: Fix mismatched allocations and deallocations The behaviour of a mismatched pair of allocation and deallocation is undefined Also fixes a memory leak if malloc fails (which stops the application anyway) Change-Id: I9c8bbade8531e8c9c02dcd43bac38cb954b3c89f --- M Transceiver52M/ChannelizerBase.cpp M Transceiver52M/Resampler.cpp M Transceiver52M/radioBuffer.cpp 3 files changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/53/1153/1 diff --git a/Transceiver52M/ChannelizerBase.cpp b/Transceiver52M/ChannelizerBase.cpp index 1576821..9989940 100644 --- a/Transceiver52M/ChannelizerBase.cpp +++ b/Transceiver52M/ChannelizerBase.cpp @@ -80,8 +80,10 @@ return false; subFilters = (float **) malloc(sizeof(float *) * m); - if (!subFilters) + if (!subFilters) { + delete[] proto; return false; + } for (size_t i = 0; i < m; i++) { subFilters[i] = (float *) @@ -122,7 +124,7 @@ for (size_t i = 0; i < m; i++) reverse(subFilters[i], hLen); - delete proto; + delete[] proto; return true; } diff --git a/Transceiver52M/Resampler.cpp b/Transceiver52M/Resampler.cpp index 070adda..8a73b79 100644 --- a/Transceiver52M/Resampler.cpp +++ b/Transceiver52M/Resampler.cpp @@ -61,7 +61,7 @@ partitions = (float **) malloc(sizeof(float *) * p); if (!partitions) { - free(proto); + delete[] proto; return false; } diff --git a/Transceiver52M/radioBuffer.cpp b/Transceiver52M/radioBuffer.cpp index 9e6f079..a2b42c4 100644 --- a/Transceiver52M/radioBuffer.cpp +++ b/Transceiver52M/radioBuffer.cpp @@ -47,7 +47,7 @@ RadioBuffer::~RadioBuffer() { - delete buffer; + delete[] buffer; } void RadioBuffer::reset() -- To view, visit https://gerrit.osmocom.org/1153 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9c8bbade8531e8c9c02dcd43bac38cb954b3c89f Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: pierre.baudry From gerrit-no-reply at lists.osmocom.org Wed Oct 26 10:13:26 2016 From: gerrit-no-reply at lists.osmocom.org (mrinal) Date: Wed, 26 Oct 2016 10:13:26 +0000 Subject: [PATCH] osmo-pcu[master]: Add logging support Message-ID: Review at https://gerrit.osmocom.org/1154 Add logging support This commit adds the TRX_ID in the output of VTY command "show tbf all". Change-Id: Ia5412dddb899e20963f884e02bdf796b6ea7ee6c --- M src/pcu_vty_functions.cpp 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/54/1154/1 diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp index 8009535..ca7f7ad 100644 --- a/src/pcu_vty_functions.cpp +++ b/src/pcu_vty_functions.cpp @@ -61,6 +61,8 @@ if (tbf->pdch[i]) vty_out(vty, "%d%s ", i, is_ctrl ? "!" : ""); } + if (tbf->trx != NULL) + vty_out(vty, " TRX_ID=%d", tbf->trx->trx_no); vty_out(vty, " CS=%s WS=%d", tbf->current_cs().name(), tbf->window()->ws()); -- To view, visit https://gerrit.osmocom.org/1154 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia5412dddb899e20963f884e02bdf796b6ea7ee6c Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: mrinal From gerrit-no-reply at lists.osmocom.org Wed Oct 26 12:10:06 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 26 Oct 2016 12:10:06 +0000 Subject: [PATCH] openbsc[master]: Attempt at extending dynamic PDCH support to Ericcson RBS2000 Message-ID: Review at https://gerrit.osmocom.org/1155 Attempt at extending dynamic PDCH support to Ericcson RBS2000 In Ericsson RBS2000, all PDCH's are dynamic, i.e. there is only one shared PCHAN type for TCH/F, TCH/H and PDCH. The PDCH needs to be activated with a RSL CHAN ACT with some proprietary coding of the Channel Number IE. Change-Id: I48089fcf8328d52f57e97b003790ffdeed766367 --- M openbsc/include/openbsc/abis_rsl.h M openbsc/src/libbsc/abis_rsl.c M openbsc/src/libbsc/bsc_dyn_ts.c M openbsc/src/libbsc/bsc_vty.c 4 files changed, 61 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/55/1155/1 diff --git a/openbsc/include/openbsc/abis_rsl.h b/openbsc/include/openbsc/abis_rsl.h index 758c555..b2c43f0 100644 --- a/openbsc/include/openbsc/abis_rsl.h +++ b/openbsc/include/openbsc/abis_rsl.h @@ -64,7 +64,7 @@ int rsl_ipacc_mdcx(struct gsm_lchan *lchan, uint32_t ip, uint16_t port, uint8_t rtp_payload2); int rsl_ipacc_mdcx_to_rtpsock(struct gsm_lchan *lchan); -int rsl_ipacc_pdch_activate(struct gsm_bts_trx_ts *ts, int act); +int rsl_dyn_pdch_activate(struct gsm_bts_trx_ts *ts, int is_activation); int abis_rsl_rcvmsg(struct msgb *msg); diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c index 316fc3f..95a18cf 100644 --- a/openbsc/src/libbsc/abis_rsl.c +++ b/openbsc/src/libbsc/abis_rsl.c @@ -53,6 +53,7 @@ SACCH_DEACTIVATE, }; +static int rsl_ipacc_pdch_activate(struct gsm_bts_trx_ts *ts, int act); static int rsl_send_imm_assignment(struct gsm_lchan *lchan); static void error_timeout_cb(void *data); static int dyn_ts_switchover_continue(struct gsm_bts_trx_ts *ts); @@ -472,6 +473,37 @@ return abis_rsl_sendmsg(msg); } +static int rsl_rbs2k_pdch_activate(struct gsm_bts_trx_ts *ts, int is_activation) +{ + struct gsm_bts_trx *trx = ts->trx; + struct gsm_lchan *lchan = &ts->lchan[0]; + struct abis_rsl_dchan_hdr *dh; + struct msgb *msg; + uint8_t chan_nr; + + OSMO_ASSERT(trx->bts->type == GSM_BTS_TYPE_RBS2000); + + /* Ericsson proprietary encoding of PDCH channel number */ + chan_nr = (0x18 << 3) | (ts->nr & 0x7); + + msg = rsl_msgb_alloc(); + dh = (struct abis_rsl_dchan_hdr *) msgb_put(msg, sizeof(*dh)); + + if (is_activation) { + rsl_lchan_set_state(lchan, LCHAN_S_ACT_REQ); + init_dchan_hdr(dh, RSL_MT_CHAN_ACTIV); + dh->chan_nr = chan_nr; + } else { + rsl_lchan_set_state(lchan, LCHAN_S_REL_REQ); + init_dchan_hdr(dh, RSL_MT_RF_CHAN_REL); + dh->chan_nr = chan_nr; + } + + msg->dst = trx->rsl_link; + + return abis_rsl_sendmsg(msg); +} + /* Chapter 8.4.1 */ int rsl_chan_activate_lchan(struct gsm_lchan *lchan, uint8_t act_type, uint8_t ho_ref) @@ -491,7 +523,7 @@ /* store activation type and handover reference */ lchan->dyn.act_type = act_type; lchan->dyn.ho_ref = ho_ref; - return rsl_ipacc_pdch_activate(lchan->ts, 0); + return rsl_dyn_pdch_activate(lchan->ts, 0); } /* @@ -722,6 +754,7 @@ return abis_rsl_sendmsg(msg); } + static bool dyn_ts_should_switch_to_pdch(struct gsm_bts_trx_ts *ts) { int ss; @@ -756,6 +789,19 @@ return true; } +int rsl_dyn_pdch_activate(struct gsm_bts_trx_ts *ts, int is_activation) +{ + switch (ts->trx->bts->type) { + case GSM_BTS_TYPE_NANOBTS: + case GSM_BTS_TYPE_OSMO_SYSMO: + return rsl_ipacc_pdch_activate(ts, is_activation); + case GSM_BTS_TYPE_RBS2000: + return rsl_rbs2k_pdch_activate(ts, is_activation); + default: + return -1; + } +} + static void error_timeout_cb(void *data) { struct gsm_lchan *lchan = data; @@ -772,7 +818,7 @@ /* Put PDCH channel back into PDCH mode, if GPRS is enabled */ if (lchan->ts->pchan == GSM_PCHAN_TCH_F_PDCH && lchan->ts->trx->bts->gprs.mode != BTS_GPRS_NONE) - rsl_ipacc_pdch_activate(lchan->ts, 1); + rsl_dyn_pdch_activate(lchan->ts, 1); if (dyn_ts_should_switch_to_pdch(lchan->ts)) dyn_ts_switchover_start(lchan->ts, GSM_PCHAN_PDCH); @@ -941,7 +987,8 @@ return 0; if (ts->pchan == GSM_PCHAN_TCH_F_PDCH && lchan->state == LCHAN_S_NONE) - return rsl_ipacc_pdch_activate(ts, 1); + return rsl_dyn_pdch_activate(lchan->ts, 1); + return 0; } @@ -2210,7 +2257,7 @@ return rc; } -int rsl_ipacc_pdch_activate(struct gsm_bts_trx_ts *ts, int act) +static int rsl_ipacc_pdch_activate(struct gsm_bts_trx_ts *ts, int act) { struct msgb *msg = rsl_msgb_alloc(); struct abis_rsl_dchan_hdr *dh; diff --git a/openbsc/src/libbsc/bsc_dyn_ts.c b/openbsc/src/libbsc/bsc_dyn_ts.c index e5422fc..4bff883 100644 --- a/openbsc/src/libbsc/bsc_dyn_ts.c +++ b/openbsc/src/libbsc/bsc_dyn_ts.c @@ -37,7 +37,7 @@ LOGP(DRSL, LOGL_DEBUG, "%s: trying to PDCH ACT\n", gsm_ts_and_pchan_name(ts)); - rc = rsl_ipacc_pdch_activate(ts, 1); + rc = rsl_dyn_pdch_activate(ts, 1); if (rc != 0) LOGP(DRSL, LOGL_ERROR, "%s %s: PDCH ACT failed\n", gsm_ts_name(ts), gsm_pchan_name(ts->pchan)); diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index cb0b1d8..a58c064 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -3996,8 +3996,13 @@ return CMD_WARNING; } - if (!is_ipaccess_bts(bts)) { - vty_out(vty, "%% This command only works for ipaccess BTS%s", + switch (bts->type) { + case GSM_BTS_TYPE_RBS2000: + case GSM_BTS_TYPE_NANOBTS: + case GSM_BTS_TYPE_OSMO_SYSMO: + break; + default: + vty_out(vty, "%% This command only works for IPA and RBS2000 BTS%s", VTY_NEWLINE); return CMD_WARNING; } @@ -4020,7 +4025,7 @@ else activate = 0; - rsl_ipacc_pdch_activate(ts, activate); + rsl_dyn_pdch_activate(ts, activate); return CMD_SUCCESS; -- To view, visit https://gerrit.osmocom.org/1155 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I48089fcf8328d52f57e97b003790ffdeed766367 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Oct 26 12:10:06 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 26 Oct 2016 12:10:06 +0000 Subject: [PATCH] openbsc[master]: WIP: OM2000: Full state machine implementation using osmo_fsm Message-ID: Review at https://gerrit.osmocom.org/1156 WIP: OM2000: Full state machine implementation using osmo_fsm Our existing OM2000 code for initializing all Managed Objects of a BTS at startup was never complete. Rather than trying to fix the old-style code, introudce a hierarchy of osmo_fsm's reflecting the full protocol hand-shake and sequence of bringing up the individual MO's. If this works out well, it mihgt make sense to convert the TS 12.21 OML code for other BTS models, too. Change-Id: I3e11b28ba22b8c227e0401e6207fdda5381dda8c --- M openbsc/include/openbsc/abis_om2000.h M openbsc/include/openbsc/gsm_data_shared.h M openbsc/src/libbsc/abis_om2000.c M openbsc/src/libbsc/bts_ericsson_rbs2000.c 4 files changed, 1,132 insertions(+), 286 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/56/1156/1 diff --git a/openbsc/include/openbsc/abis_om2000.h b/openbsc/include/openbsc/abis_om2000.h index 2ff7270..5a7344f 100644 --- a/openbsc/include/openbsc/abis_om2000.h +++ b/openbsc/include/openbsc/abis_om2000.h @@ -41,13 +41,6 @@ OM2K_MO_S_DISABLED, }; -struct abis_om2k_mo { - uint8_t class; - uint8_t bts; - uint8_t assoc_so; - uint8_t inst; -} __attribute__ ((packed)); - /* on-wire format for IS conn group */ struct om2k_is_conn_grp { uint16_t icp1; @@ -90,6 +83,10 @@ int abis_om2k_tx_tx_conf_req(struct gsm_bts_trx *trx); int abis_om2k_tx_ts_conf_req(struct gsm_bts_trx_ts *ts); +struct osmo_fsm_inst *om2k_bts_fsm_start(struct gsm_bts *bts); +void abis_om2k_bts_init(struct gsm_bts *bts); +void abis_om2k_trx_init(struct gsm_bts_trx *trx); + int abis_om2k_vty_init(void); struct vty; diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index 487a3f3..65e8234 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -104,6 +104,19 @@ struct gsm_bts *bts; }; +/* Ericsson OM2000 Managed Object */ +struct abis_om2k_mo { + uint8_t class; + uint8_t bts; + uint8_t assoc_so; + uint8_t inst; +} __attribute__ ((packed)); + +struct om2k_mo { + struct abis_om2k_mo addr; + struct osmo_fsm_inst *fsm; +}; + #define MAX_A5_KEY_LEN (128/8) #define A38_XOR_MIN_KEY_LEN 12 #define A38_XOR_MAX_KEY_LEN 16 @@ -384,6 +397,12 @@ /* To which E1 subslot are we connected */ struct gsm_e1_subslot e1_link; + union { + struct { + struct om2k_mo om2k_mo; + } rbs2000; + }; + struct gsm_lchan lchan[TS_MAX_LCHAN]; }; @@ -438,6 +457,17 @@ uint8_t test_nr; struct rxlev_stats rxlev_stat; } ipaccess; + struct { + struct { + struct om2k_mo om2k_mo; + } trxc; + struct { + struct om2k_mo om2k_mo; + } rx; + struct { + struct om2k_mo om2k_mo; + } tx; + } rbs2000; }; struct gsm_bts_trx_ts ts[TRX_NR_TS]; }; @@ -676,17 +706,26 @@ } bs11; struct { struct { + struct om2k_mo om2k_mo; + struct gsm_abis_mo mo; + struct llist_head conn_groups; + } cf; + struct { + struct om2k_mo om2k_mo; struct gsm_abis_mo mo; struct llist_head conn_groups; } is; struct { + struct om2k_mo om2k_mo; struct gsm_abis_mo mo; struct llist_head conn_groups; } con; struct { + struct om2k_mo om2k_mo; struct gsm_abis_mo mo; } dp; struct { + struct om2k_mo om2k_mo; struct gsm_abis_mo mo; } tf; } rbs2000; diff --git a/openbsc/src/libbsc/abis_om2000.c b/openbsc/src/libbsc/abis_om2000.c index 1745a72..58d86c6 100644 --- a/openbsc/src/libbsc/abis_om2000.c +++ b/openbsc/src/libbsc/abis_om2000.c @@ -1,7 +1,7 @@ /* Ericsson RBS 2xxx GSM O&M (OM2000) messages on the A-bis interface * implemented based on protocol trace analysis, no formal documentation */ -/* (C) 2010-2011 by Harald Welte +/* (C) 2010-2011,2016 by Harald Welte * * All Rights Reserved * @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -42,8 +43,38 @@ #include #include +/* FIXME: move to libosmocore */ +struct osmo_fsm_inst *osmo_fsm_inst_alloc_child_id(struct osmo_fsm *fsm, + struct osmo_fsm_inst *parent, + uint32_t parent_term_event, + const char *id) +{ + struct osmo_fsm_inst *fi; + + fi = osmo_fsm_inst_alloc(fsm, parent, NULL, parent->log_level, + id ? id : parent->id); + if (!fi) { + /* indicate immediate termination to caller */ + osmo_fsm_inst_dispatch(parent, parent_term_event, NULL); + return NULL; + } + + LOGPFSM(fi, "is child of %s\n", osmo_fsm_inst_name(parent)); + + fi->proc.parent = parent; + fi->proc.parent_term_event = parent_term_event; + llist_add(&fi->proc.child, &parent->proc.children); + + return fi; +} + + #define OM_ALLOC_SIZE 1024 #define OM_HEADROOM_SIZE 128 + +#define OM2K_TIMEOUT 10 +#define TRX_FSM_TIMEOUT 60 +#define BTS_FSM_TIMEOUT 60 /* use following functions from abis_nm.c: * om2k_msgb_alloc() @@ -625,6 +656,96 @@ { 0, NULL } }; +const struct value_string om2k_result_strings[] = { + { 0x02, "Wrong state or out of sequence" }, + { 0x03, "File error" }, + { 0x04, "Fault, unspecified" }, + { 0x05, "Tuning fault" }, + { 0x06, "Protocol error" }, + { 0x07, "MO not connected" }, + { 0x08, "Parameter error" }, + { 0x09, "Optional function not supported" }, + { 0x0a, "Local access state LOCALLY DISCONNECTED" }, + { 0, NULL } +}; + +const struct value_string om2k_accordance_strings[] = { + { 0x00, "Data according to request" }, + { 0x01, "Data not according to request" }, + { 0x02, "Inconsistent MO data" }, + { 0x03, "Capability constraint violation" }, + { 0, NULL } +}; + +const struct value_string om2k_mostate_vals[] = { + { 0x00, "RESET" }, + { 0x01, "STARTED" }, + { 0x02, "ENABLED" }, + { 0x03, "DISABLED" }, + { 0, NULL } +}; + +/* entire decoded OM2K message (header + parsed TLV) */ +struct om2k_decoded_msg { + struct abis_om2k_hdr o2h; + uint16_t msg_type; + struct tlv_parsed tp; +}; + +/* resolve the OM2000 Managed Object by BTS + MO Address */ +static struct om2k_mo * +get_om2k_mo(struct gsm_bts *bts, const struct abis_om2k_mo *abis_mo) +{ + struct om2k_mo *mo = NULL; + struct gsm_bts_trx *trx; + + switch (abis_mo->class) { + case OM2K_MO_CLS_CF: + mo = &bts->rbs2000.cf.om2k_mo; + break; + case OM2K_MO_CLS_CON: + mo = &bts->rbs2000.con.om2k_mo; + break; + case OM2K_MO_CLS_IS: + mo = &bts->rbs2000.is.om2k_mo; + break; + case OM2K_MO_CLS_TF: + mo = &bts->rbs2000.tf.om2k_mo; + break; + + case OM2K_MO_CLS_TRXC: + trx = gsm_bts_trx_num(bts, abis_mo->inst); + if (!trx) + return NULL; + mo = &trx->rbs2000.trxc.om2k_mo; + break; + case OM2K_MO_CLS_TX: + trx = gsm_bts_trx_num(bts, abis_mo->inst); + if (!trx) + return NULL; + mo = &trx->rbs2000.tx.om2k_mo; + break; + case OM2K_MO_CLS_RX: + trx = gsm_bts_trx_num(bts, abis_mo->inst); + if (!trx) + return NULL; + mo = &trx->rbs2000.rx.om2k_mo; + break; + case OM2K_MO_CLS_TS: + trx = gsm_bts_trx_num(bts, abis_mo->assoc_so); + if (!trx) + return NULL; + if (abis_mo->inst >= ARRAY_SIZE(trx->ts)) + return NULL; + mo = &trx->ts[abis_mo->inst].rbs2000.om2k_mo; + break; + default: + return NULL; + }; + + return mo; +} + static struct msgb *om2k_msgb_alloc(void) { return msgb_alloc_headroom(OM_ALLOC_SIZE, OM_HEADROOM_SIZE, @@ -639,6 +760,15 @@ static int abis_om2k_msg_tlv_parse(struct tlv_parsed *tp, struct abis_om2k_hdr *oh) { return abis_om2k_tlv_parse(tp, oh->data, oh->om.length - 6); +} + +/* decode/parse the message */ +static int om2k_decode_msg(struct om2k_decoded_msg *odm, struct msgb *msg) +{ + struct abis_om2k_hdr *o2h = msgb_l2(msg); + odm->msg_type = ntohs(o2h->msg_type); + odm->o2h = *o2h; + return abis_om2k_msg_tlv_parse(&odm->tp, o2h); } static char *om2k_mo_name(const struct abis_om2k_mo *mo) @@ -783,23 +913,6 @@ nm_state->operational = new_state.operational; } -static void signal_op_state(struct gsm_bts *bts, struct abis_om2k_mo *mo) -{ - struct gsm_nm_state *nm_state = mo2nm_state(bts, mo); - struct nm_statechg_signal_data nsd; - - if (!nm_state) - return; - - nsd.bts = bts; - nsd.obj = mo2obj(bts, mo); - nsd.old_state = nm_state; - nsd.new_state = nm_state; - nsd.om2k_mo = mo; - - osmo_signal_dispatch(SS_NM, S_NM_STATECHG_OPER, &nsd); -} - static int abis_om2k_sendmsg(struct gsm_bts *bts, struct msgb *msg) { struct abis_om2k_hdr *o2h; @@ -854,11 +967,6 @@ memcpy(&o2h->mo, mo, sizeof(o2h->mo)); } -const struct abis_om2k_mo om2k_mo_cf = { OM2K_MO_CLS_CF, 0, 0xFF, 0 }; -const struct abis_om2k_mo om2k_mo_is = { OM2K_MO_CLS_IS, 0, 0xFF, 0 }; -const struct abis_om2k_mo om2k_mo_con = { OM2K_MO_CLS_CON, 0, 0xFF, 0 }; -const struct abis_om2k_mo om2k_mo_tf = { OM2K_MO_CLS_TF, 0, 0xFF, 0 }; - static int abis_om2k_cal_time_resp(struct gsm_bts *bts) { struct msgb *msg = om2k_msgb_alloc(); @@ -867,7 +975,8 @@ struct tm *tm; o2k = (struct abis_om2k_hdr *) msgb_put(msg, sizeof(*o2k)); - fill_om2k_hdr(o2k, &om2k_mo_cf, OM2K_MSGT_CAL_TIME_RESP); + fill_om2k_hdr(o2k, &bts->rbs2000.cf.om2k_mo.addr, + OM2K_MSGT_CAL_TIME_RESP); tm_t = time(NULL); tm = localtime(&tm_t); @@ -989,7 +1098,8 @@ om2k_fill_is_conn_grp(&cg[i++], grp->icp1, grp->icp2, grp->ci); o2k = (struct abis_om2k_hdr *) msgb_put(msg, sizeof(*o2k)); - fill_om2k_hdr(o2k, &om2k_mo_is, OM2K_MSGT_IS_CONF_REQ); + fill_om2k_hdr(o2k, &bts->rbs2000.is.om2k_mo.addr, + OM2K_MSGT_IS_CONF_REQ); msgb_tv_put(msg, OM2K_DEI_LIST_NR, 1); msgb_tv_put(msg, OM2K_DEI_END_LIST_NR, 1); @@ -999,7 +1109,8 @@ talloc_free(cg); - DEBUGP(DNM, "Tx MO=%s %s\n", om2k_mo_name(&om2k_mo_is), + DEBUGP(DNM, "Tx MO=%s %s\n", + om2k_mo_name(&bts->rbs2000.is.om2k_mo.addr), get_value_string(om2k_msgcode_vals, OM2K_MSGT_IS_CONF_REQ)); return abis_om2k_sendmsg(bts, msg); @@ -1012,14 +1123,16 @@ struct abis_om2k_hdr *o2k; o2k = (struct abis_om2k_hdr *) msgb_put(msg, sizeof(*o2k)); - fill_om2k_hdr(o2k, &om2k_mo_con, OM2K_MSGT_CON_CONF_REQ); + fill_om2k_hdr(o2k, &bts->rbs2000.con.om2k_mo.addr, + OM2K_MSGT_CON_CONF_REQ); msgb_tv_put(msg, OM2K_DEI_LIST_NR, 1); msgb_tv_put(msg, OM2K_DEI_END_LIST_NR, 1); msgb_tlv_put(msg, OM2K_DEI_CON_CONN_LIST, len, data); - DEBUGP(DNM, "Tx MO=%s %s\n", om2k_mo_name(&om2k_mo_con), + DEBUGP(DNM, "Tx MO=%s %s\n", + om2k_mo_name(&bts->rbs2000.con.om2k_mo.addr), get_value_string(om2k_msgcode_vals, OM2K_MSGT_CON_CONF_REQ)); return abis_om2k_sendmsg(bts, msg); @@ -1098,14 +1211,16 @@ struct abis_om2k_hdr *o2k; o2k = (struct abis_om2k_hdr *) msgb_put(msg, sizeof(*o2k)); - fill_om2k_hdr(o2k, &om2k_mo_tf, OM2K_MSGT_TF_CONF_REQ); + fill_om2k_hdr(o2k, &bts->rbs2000.tf.om2k_mo.addr, + OM2K_MSGT_TF_CONF_REQ); msgb_tv_put(msg, OM2K_DEI_TF_MODE, OM2K_TF_MODE_STANDALONE); msgb_tv_put(msg, OM2K_DEI_TF_SYNC_SRC, 0x00); msgb_tv_fixed_put(msg, OM2K_DEI_FS_OFFSET, sizeof(fs_offset_undef), fs_offset_undef); - DEBUGP(DNM, "Tx MO=%s %s\n", om2k_mo_name(&om2k_mo_tf), + DEBUGP(DNM, "Tx MO=%s %s\n", + om2k_mo_name(&bts->rbs2000.tf.om2k_mo.addr), get_value_string(om2k_msgcode_vals, OM2K_MSGT_TF_CONF_REQ)); return abis_om2k_sendmsg(bts, msg); @@ -1256,8 +1371,859 @@ break; } + DEBUGP(DNM, "Tx MO=%s %s\n", + om2k_mo_name(&mo), + get_value_string(om2k_msgcode_vals, OM2K_MSGT_TS_CONF_REQ)); + return abis_om2k_sendmsg(ts->trx->bts, msg); } + + +/*********************************************************************** + * OM2000 Managed Object (MO) FSM + ***********************************************************************/ + +#define S(x) (1 << (x)) + +enum om2k_event_name { + OM2K_MO_EVT_START, + OM2K_MO_EVT_RX_CONN_COMPL, + OM2K_MO_EVT_RX_RESET_COMPL, + OM2K_MO_EVT_RX_START_REQ_ACCEPT, + OM2K_MO_EVT_RX_START_RES, + OM2K_MO_EVT_RX_CFG_REQ_ACCEPT, + OM2K_MO_EVT_RX_CFG_RES, + OM2K_MO_EVT_RX_ENA_REQ_ACCEPT, + OM2K_MO_EVT_RX_ENA_RES, + OM2K_MO_EVT_RX_OPINFO_ACC, +}; + +static const struct value_string om2k_event_names[] = { + { OM2K_MO_EVT_START, "START" }, + { OM2K_MO_EVT_RX_CONN_COMPL, "RX-CONN-COMPL" }, + { OM2K_MO_EVT_RX_RESET_COMPL, "RX-RESET-COMPL" }, + { OM2K_MO_EVT_RX_START_REQ_ACCEPT, "RX-RESET-REQ-ACCEPT" }, + { OM2K_MO_EVT_RX_START_RES, "RX-START-RESULT" }, + { OM2K_MO_EVT_RX_CFG_REQ_ACCEPT, "RX-CFG-REQ-ACCEPT" }, + { OM2K_MO_EVT_RX_CFG_RES, "RX-CFG-RESULT" }, + { OM2K_MO_EVT_RX_ENA_REQ_ACCEPT, "RX-ENABLE-REQ-ACCEPT" }, + { OM2K_MO_EVT_RX_ENA_RES, "RX-ENABLE-RESULT" }, + { OM2K_MO_EVT_RX_OPINFO_ACC, "RX-OPINFO-ACCEPT" }, + { 0, NULL } +}; + +enum om2k_mo_fsm_state { + OM2K_ST_INIT, + OM2K_ST_WAIT_CONN_COMPL, + OM2K_ST_WAIT_RES_COMPL, + OM2K_ST_WAIT_START_ACCEPT, + OM2K_ST_WAIT_START_RES, + OM2K_ST_WAIT_CFG_ACCEPT, + OM2K_ST_WAIT_CFG_RES, + OM2K_ST_WAIT_ENABLE_ACCEPT, + OM2K_ST_WAIT_ENABLE_RES, + OM2K_ST_WAIT_OPINFO_ACCEPT, + OM2K_ST_DONE, + OM2K_ST_ERROR, +}; + +struct om2k_mo_fsm_priv { + struct gsm_bts_trx *trx; + struct om2k_mo *mo; + uint8_t ts_nr; +}; + +static void om2k_mo_st_init(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct om2k_mo_fsm_priv *omfp = fi->priv; + + OSMO_ASSERT(event == OM2K_MO_EVT_START); + + switch (omfp->mo->addr.class) { + case OM2K_MO_CLS_CF: + /* no Connect required, is always connected */ + osmo_fsm_inst_state_chg(fi, OM2K_ST_WAIT_START_ACCEPT, + OM2K_TIMEOUT, 0); + abis_om2k_tx_start_req(omfp->trx->bts, &omfp->mo->addr); + break; + case OM2K_MO_CLS_TRXC: + /* no Connect required, start with Reset */ + osmo_fsm_inst_state_chg(fi, OM2K_ST_WAIT_RES_COMPL, + OM2K_TIMEOUT, 0); + abis_om2k_tx_reset_cmd(omfp->trx->bts, &omfp->mo->addr); + break; + default: + /* start with Connect */ + osmo_fsm_inst_state_chg(fi, OM2K_ST_WAIT_CONN_COMPL, + OM2K_TIMEOUT, 0); + abis_om2k_tx_connect_cmd(omfp->trx->bts, &omfp->mo->addr); + break; + } +} + +static void om2k_mo_st_wait_conn_compl(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct om2k_mo_fsm_priv *omfp = fi->priv; + + switch (omfp->mo->addr.class) { +#if 0 + case OM2K_MO_CLS_TF: + /* skip the reset, hope that helps */ + osmo_fsm_inst_state_chg(fi, OM2K_ST_WAIT_START_ACCEPT, + OM2K_TIMEOUT, 0); + abis_om2k_tx_start_req(omfp->trx->bts, &omfp->mo->addr); + break; +#endif + default: + osmo_fsm_inst_state_chg(fi, OM2K_ST_WAIT_RES_COMPL, + OM2K_TIMEOUT, 0); + abis_om2k_tx_reset_cmd(omfp->trx->bts, &omfp->mo->addr); + break; + } +} + +static void om2k_mo_st_wait_res_compl(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct om2k_mo_fsm_priv *omfp = fi->priv; + + osmo_fsm_inst_state_chg(fi, OM2K_ST_WAIT_START_ACCEPT, + OM2K_TIMEOUT, 0); + abis_om2k_tx_start_req(omfp->trx->bts, &omfp->mo->addr); +} + +static void om2k_mo_st_wait_start_accept(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct om2k_decoded_msg *omd = data; + + switch (omd->msg_type) { + case OM2K_MSGT_START_REQ_ACK: + osmo_fsm_inst_state_chg(fi, OM2K_ST_WAIT_START_RES, + OM2K_TIMEOUT, 0); + break; + case OM2K_MSGT_START_REQ_REJ: + osmo_fsm_inst_state_chg(fi, OM2K_ST_ERROR, 0, 0); + break; + } +} + +static void om2k_mo_st_wait_start_res(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct om2k_mo_fsm_priv *omfp = fi->priv; + struct gsm_bts_trx_ts *ts; + + switch (omfp->mo->addr.class) { + case OM2K_MO_CLS_CF: + case OM2K_MO_CLS_TRXC: + /* Transition directly to Operational Info */ + osmo_fsm_inst_state_chg(fi, OM2K_ST_WAIT_OPINFO_ACCEPT, + OM2K_TIMEOUT, 0); + abis_om2k_tx_op_info(omfp->trx->bts, &omfp->mo->addr, 1); + break; + case OM2K_MO_CLS_DP: + /* Transition directoy to WAIT_ENABLE_ACCEPT */ + osmo_fsm_inst_state_chg(fi, OM2K_ST_WAIT_ENABLE_ACCEPT, + OM2K_TIMEOUT, 0); + abis_om2k_tx_enable_req(omfp->trx->bts, &omfp->mo->addr); + return; +#if 0 + case OM2K_MO_CLS_TF: + /* skip the config, hope that helps speeding things up */ + osmo_fsm_inst_state_chg(fi, OM2K_ST_WAIT_ENABLE_ACCEPT, + OM2K_TIMEOUT, 0); + abis_om2k_tx_enable_req(omfp->trx->bts, &omfp->mo->addr); + return; +#endif + } + + osmo_fsm_inst_state_chg(fi, OM2K_ST_WAIT_CFG_ACCEPT, + OM2K_TIMEOUT, 0); + switch (omfp->mo->addr.class) { + case OM2K_MO_CLS_TF: + abis_om2k_tx_tf_conf_req(omfp->trx->bts); + break; + case OM2K_MO_CLS_IS: + abis_om2k_tx_is_conf_req(omfp->trx->bts); + break; + case OM2K_MO_CLS_CON: + /* TODO */ + //abis_om2k_tx_con_conf_req(omfp->trx->bts, data, len); + break; + case OM2K_MO_CLS_TX: + abis_om2k_tx_tx_conf_req(omfp->trx); + break; + case OM2K_MO_CLS_RX: + abis_om2k_tx_rx_conf_req(omfp->trx); + break; + case OM2K_MO_CLS_TS: + ts = mo2obj(omfp->trx->bts, &omfp->mo->addr); + abis_om2k_tx_ts_conf_req(ts); + break; + } +} + +static void om2k_mo_st_wait_cfg_accept(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct om2k_mo_fsm_priv *omfp = fi->priv; + uint32_t timeout = OM2K_TIMEOUT; + + if (omfp->mo->addr.class == OM2K_MO_CLS_TF) + timeout = 600; + + osmo_fsm_inst_state_chg(fi, OM2K_ST_WAIT_CFG_RES, timeout, 0); +} + +static void om2k_mo_st_wait_cfg_res(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct om2k_mo_fsm_priv *omfp = fi->priv; + struct om2k_decoded_msg *omd = data; + uint8_t accordance; + + if (!TLVP_PRESENT(&omd->tp, OM2K_DEI_ACCORDANCE_IND)) { + osmo_fsm_inst_state_chg(fi, OM2K_ST_ERROR, 0, 0); + return; + } + accordance = *TLVP_VAL(&omd->tp, OM2K_DEI_ACCORDANCE_IND); + + if (accordance != 0) { + /* accordance not OK */ + osmo_fsm_inst_state_chg(fi, OM2K_ST_ERROR, 0, 0); + return; + } + + osmo_fsm_inst_state_chg(fi, OM2K_ST_WAIT_ENABLE_ACCEPT, + OM2K_TIMEOUT, 0); + abis_om2k_tx_enable_req(omfp->trx->bts, &omfp->mo->addr); +} + +static void om2k_mo_st_wait_enable_accept(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct om2k_decoded_msg *omd = data; + + switch (omd->msg_type) { + case OM2K_MSGT_ENABLE_REQ_REJ: + osmo_fsm_inst_state_chg(fi, OM2K_ST_ERROR, 0, 0); + break; + case OM2K_MSGT_ENABLE_REQ_ACK: + osmo_fsm_inst_state_chg(fi, OM2K_ST_WAIT_ENABLE_RES, + OM2K_TIMEOUT, 0); + } +} + +static void om2k_mo_st_wait_enable_res(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct om2k_mo_fsm_priv *omfp = fi->priv; + //struct om2k_decoded_msg *omd = data; + /* TODO: check if state is actually enabled now? */ + + osmo_fsm_inst_state_chg(fi, OM2K_ST_WAIT_OPINFO_ACCEPT, + OM2K_TIMEOUT, 0); + abis_om2k_tx_op_info(omfp->trx->bts, &omfp->mo->addr, 1); +} + +static void om2k_mo_st_wait_opinfo_accept(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + osmo_fsm_inst_state_chg(fi, OM2K_ST_DONE, 0, 0); +} + +static void om2k_mo_s_done_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) +{ + osmo_fsm_inst_term(fi, OSMO_FSM_TERM_REGULAR, NULL); +} + +static const struct osmo_fsm_state om2k_is_states[] = { + [OM2K_ST_INIT] = { + .name = "INIT", + .in_event_mask = S(OM2K_MO_EVT_START), + .out_state_mask = S(OM2K_ST_DONE) | + S(OM2K_ST_ERROR) | + S(OM2K_ST_WAIT_CONN_COMPL) | + S(OM2K_ST_WAIT_START_ACCEPT) | + S(OM2K_ST_WAIT_RES_COMPL), + .action = om2k_mo_st_init, + }, + [OM2K_ST_WAIT_CONN_COMPL] = { + .name = "WAIT-CONN-COMPL", + .in_event_mask = S(OM2K_MO_EVT_RX_CONN_COMPL), + .out_state_mask = S(OM2K_ST_DONE) | + S(OM2K_ST_ERROR) | + S(OM2K_ST_WAIT_START_ACCEPT) | + S(OM2K_ST_WAIT_RES_COMPL), + .action = om2k_mo_st_wait_conn_compl, + }, + [OM2K_ST_WAIT_RES_COMPL] = { + .name = "WAIT-RES-COMPL", + .in_event_mask = S(OM2K_MO_EVT_RX_RESET_COMPL), + .out_state_mask = S(OM2K_ST_DONE) | + S(OM2K_ST_ERROR) | + S(OM2K_ST_WAIT_START_ACCEPT), + .action = om2k_mo_st_wait_res_compl, + }, + [OM2K_ST_WAIT_START_ACCEPT] = { + .name = "WAIT-START-ACCEPT", + .in_event_mask = S(OM2K_MO_EVT_RX_START_REQ_ACCEPT), + .out_state_mask = S(OM2K_ST_DONE) | + S(OM2K_ST_ERROR) | + S(OM2K_ST_WAIT_START_RES), + .action =om2k_mo_st_wait_start_accept, + }, + [OM2K_ST_WAIT_START_RES] = { + .name = "WAIT-START-RES", + .in_event_mask = S(OM2K_MO_EVT_RX_START_RES), + .out_state_mask = S(OM2K_ST_DONE) | + S(OM2K_ST_ERROR) | + S(OM2K_ST_WAIT_CFG_ACCEPT) | + S(OM2K_ST_WAIT_OPINFO_ACCEPT), + .action = om2k_mo_st_wait_start_res, + }, + [OM2K_ST_WAIT_CFG_ACCEPT] = { + .name = "WAIT-CFG-ACCEPT", + .in_event_mask = S(OM2K_MO_EVT_RX_CFG_REQ_ACCEPT), + .out_state_mask = S(OM2K_ST_DONE) | + S(OM2K_ST_ERROR) | + S(OM2K_ST_WAIT_CFG_RES), + .action = om2k_mo_st_wait_cfg_accept, + }, + [OM2K_ST_WAIT_CFG_RES] = { + .name = "WAIT-CFG-RES", + .in_event_mask = S(OM2K_MO_EVT_RX_CFG_RES), + .out_state_mask = S(OM2K_ST_DONE) | + S(OM2K_ST_ERROR) | + S(OM2K_ST_WAIT_ENABLE_ACCEPT), + .action = om2k_mo_st_wait_cfg_res, + }, + [OM2K_ST_WAIT_ENABLE_ACCEPT] = { + .name = "WAIT-ENABLE-ACCEPT", + .in_event_mask = S(OM2K_MO_EVT_RX_ENA_REQ_ACCEPT), + .out_state_mask = S(OM2K_ST_DONE) | + S(OM2K_ST_ERROR) | + S(OM2K_ST_WAIT_ENABLE_RES), + .action = om2k_mo_st_wait_enable_accept, + }, + [OM2K_ST_WAIT_ENABLE_RES] = { + .name = "WAIT-ENABLE-RES", + .in_event_mask = S(OM2K_MO_EVT_RX_ENA_RES), + .out_state_mask = S(OM2K_ST_DONE) | + S(OM2K_ST_ERROR) | + S(OM2K_ST_WAIT_OPINFO_ACCEPT), + .action = om2k_mo_st_wait_enable_res, + }, + [OM2K_ST_WAIT_OPINFO_ACCEPT] = { + .name = "WAIT-OPINFO-ACCEPT", + .in_event_mask = S(OM2K_MO_EVT_RX_OPINFO_ACC), + .out_state_mask = S(OM2K_ST_DONE) | + S(OM2K_ST_ERROR), + .action = om2k_mo_st_wait_opinfo_accept, + }, + [OM2K_ST_DONE] = { + .name = "DONE", + .in_event_mask = 0, + .out_state_mask = 0, + .onenter = om2k_mo_s_done_onenter, + }, + [OM2K_ST_ERROR] = { + .name = "ERROR", + .in_event_mask = 0, + .out_state_mask = 0, + .onenter = om2k_mo_s_done_onenter, + }, + +}; + +static int om2k_mo_timer_cb(struct osmo_fsm_inst *fi) +{ + osmo_fsm_inst_state_chg(fi, OM2K_ST_ERROR, 0, 0); + return 0; +} + +static struct osmo_fsm om2k_mo_fsm = { + .name = "OM2000-MO", + .states = om2k_is_states, + .num_states = ARRAY_SIZE(om2k_is_states), + .log_subsys = DNM, + .event_names = om2k_event_names, + .timer_cb = om2k_mo_timer_cb, +}; + +struct osmo_fsm_inst *om2k_mo_fsm_start(struct osmo_fsm_inst *parent, + uint32_t term_event, + struct gsm_bts_trx *trx, struct om2k_mo *mo) +{ + struct osmo_fsm_inst *fi; + struct om2k_mo_fsm_priv *omfp; + char idbuf[64]; + + snprintf(idbuf, sizeof(idbuf), "%s-%s", parent->id, + om2k_mo_name(&mo->addr)); + + fi = osmo_fsm_inst_alloc_child_id(&om2k_mo_fsm, parent, + term_event, idbuf); + if (!fi) + return NULL; + + mo->fsm = fi; + omfp = talloc_zero(fi, struct om2k_mo_fsm_priv); + omfp->mo = mo; + omfp->trx = trx; + fi->priv = omfp; + + osmo_fsm_inst_dispatch(fi, OM2K_MO_EVT_START, NULL); + + return fi; +} + +int om2k_mo_fsm_recvmsg(struct gsm_bts *bts, struct om2k_mo *mo, + struct om2k_decoded_msg *odm) +{ + switch (odm->msg_type) { + case OM2K_MSGT_CONNECT_COMPL: + case OM2K_MSGT_CONNECT_REJ: + osmo_fsm_inst_dispatch(mo->fsm, + OM2K_MO_EVT_RX_CONN_COMPL, odm); + break; + + case OM2K_MSGT_RESET_COMPL: + case OM2K_MSGT_RESET_REJ: + osmo_fsm_inst_dispatch(mo->fsm, + OM2K_MO_EVT_RX_RESET_COMPL, odm); + break; + + case OM2K_MSGT_START_REQ_ACK: + case OM2K_MSGT_START_REQ_REJ: + osmo_fsm_inst_dispatch(mo->fsm, + OM2K_MO_EVT_RX_START_REQ_ACCEPT, odm); + break; + + case OM2K_MSGT_START_RES: + osmo_fsm_inst_dispatch(mo->fsm, + OM2K_MO_EVT_RX_START_RES, odm); + break; + + case OM2K_MSGT_CON_CONF_REQ_ACK: + case OM2K_MSGT_IS_CONF_REQ_ACK: + case OM2K_MSGT_RX_CONF_REQ_ACK: + case OM2K_MSGT_TF_CONF_REQ_ACK: + case OM2K_MSGT_TS_CONF_REQ_ACK: + case OM2K_MSGT_TX_CONF_REQ_ACK: + osmo_fsm_inst_dispatch(mo->fsm, + OM2K_MO_EVT_RX_CFG_REQ_ACCEPT, odm); + break; + + case OM2K_MSGT_CON_CONF_RES: + case OM2K_MSGT_IS_CONF_RES: + case OM2K_MSGT_RX_CONF_RES: + case OM2K_MSGT_TF_CONF_RES: + case OM2K_MSGT_TS_CONF_RES: + case OM2K_MSGT_TX_CONF_RES: + osmo_fsm_inst_dispatch(mo->fsm, + OM2K_MO_EVT_RX_CFG_RES, odm); + break; + + case OM2K_MSGT_ENABLE_REQ_ACK: + case OM2K_MSGT_ENABLE_REQ_REJ: + osmo_fsm_inst_dispatch(mo->fsm, + OM2K_MO_EVT_RX_ENA_REQ_ACCEPT, odm); + break; + case OM2K_MSGT_ENABLE_RES: + osmo_fsm_inst_dispatch(mo->fsm, + OM2K_MO_EVT_RX_ENA_RES, odm); + break; + + case OM2K_MSGT_OP_INFO_ACK: + case OM2K_MSGT_OP_INFO_REJ: + osmo_fsm_inst_dispatch(mo->fsm, + OM2K_MO_EVT_RX_OPINFO_ACC, odm); + break; + default: + return -1; + } + + return 0; +} + +/*********************************************************************** + * OM2000 TRX Finite State Machine, initializes TRXC and all siblings + ***********************************************************************/ + +enum om2k_trx_event { + OM2K_TRX_EVT_START, + OM2K_TRX_EVT_TRXC_DONE, + OM2K_TRX_EVT_TX_DONE, + OM2K_TRX_EVT_RX_DONE, + OM2K_TRX_EVT_TS_DONE, + OM2K_TRX_EVT_STOP, +}; + +static struct value_string om2k_trx_events[] = { + { OM2K_TRX_EVT_START, "START" }, + { OM2K_TRX_EVT_TRXC_DONE, "TRXC-DONE" }, + { OM2K_TRX_EVT_TX_DONE, "TX-DONE" }, + { OM2K_TRX_EVT_RX_DONE, "RX-DONE" }, + { OM2K_TRX_EVT_TS_DONE, "TS-DONE" }, + { OM2K_TRX_EVT_STOP, "STOP" }, + { 0, NULL } +}; + +enum om2k_trx_state { + OM2K_TRX_S_INIT, + OM2K_TRX_S_WAIT_TRXC, + OM2K_TRX_S_WAIT_TX, + OM2K_TRX_S_WAIT_RX, + OM2K_TRX_S_WAIT_TS, + OM2K_TRX_S_DONE, + OM2K_TRX_S_ERROR +}; + +struct om2k_trx_fsm_priv { + struct gsm_bts_trx *trx; + uint8_t next_ts_nr; +}; + +static void om2k_trx_s_init(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct om2k_trx_fsm_priv *otfp = fi->priv; + + /* First initialize TRXC */ + osmo_fsm_inst_state_chg(fi, OM2K_TRX_S_WAIT_TRXC, + TRX_FSM_TIMEOUT, 0); + om2k_mo_fsm_start(fi, OM2K_TRX_EVT_TRXC_DONE, otfp->trx, + &otfp->trx->rbs2000.trxc.om2k_mo); +} + +static void om2k_trx_s_wait_trxc(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct om2k_trx_fsm_priv *otfp = fi->priv; + + /* Initialize TX after TRXC */ + osmo_fsm_inst_state_chg(fi, OM2K_TRX_S_WAIT_TX, + TRX_FSM_TIMEOUT, 0); + om2k_mo_fsm_start(fi, OM2K_TRX_EVT_TX_DONE, otfp->trx, + &otfp->trx->rbs2000.tx.om2k_mo); +} + +static void om2k_trx_s_wait_tx(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct om2k_trx_fsm_priv *otfp = fi->priv; + + /* Initialize RX after TX */ + osmo_fsm_inst_state_chg(fi, OM2K_TRX_S_WAIT_RX, + TRX_FSM_TIMEOUT, 0); + om2k_mo_fsm_start(fi, OM2K_TRX_EVT_RX_DONE, otfp->trx, + &otfp->trx->rbs2000.rx.om2k_mo); +} + +static void om2k_trx_s_wait_rx(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct om2k_trx_fsm_priv *otfp = fi->priv; + struct gsm_bts_trx_ts *ts; + + /* Initialize Timeslots after TX */ + osmo_fsm_inst_state_chg(fi, OM2K_TRX_S_WAIT_TS, + TRX_FSM_TIMEOUT, 0); + otfp->next_ts_nr = 0; + ts = &otfp->trx->ts[otfp->next_ts_nr++]; + om2k_mo_fsm_start(fi, OM2K_TRX_EVT_TS_DONE, otfp->trx, + &ts->rbs2000.om2k_mo); +} + +static void om2k_trx_s_wait_ts(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct om2k_trx_fsm_priv *otfp = fi->priv; + struct gsm_bts_trx_ts *ts; + + if (otfp->next_ts_nr < 8) { + /* iterate to the next timeslot */ + ts = &otfp->trx->ts[otfp->next_ts_nr++]; + om2k_mo_fsm_start(fi, OM2K_TRX_EVT_TS_DONE, otfp->trx, + &ts->rbs2000.om2k_mo); + } else { + /* only after all 8 TS */ + osmo_fsm_inst_state_chg(fi, OM2K_TRX_S_DONE, 0, 0); + } +} + +static void om2k_trx_s_done_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) +{ + struct om2k_trx_fsm_priv *otfp = fi->priv; + gsm_bts_trx_set_system_infos(otfp->trx); + osmo_fsm_inst_term(fi, OSMO_FSM_TERM_REGULAR, NULL); +} + +static const struct osmo_fsm_state om2k_trx_states[] = { + [OM2K_TRX_S_INIT] = { + .in_event_mask = S(OM2K_TRX_EVT_START), + .out_state_mask = S(OM2K_TRX_S_WAIT_TRXC), + .name = "INIT", + .action = om2k_trx_s_init, + }, + [OM2K_TRX_S_WAIT_TRXC] = { + .in_event_mask = S(OM2K_TRX_EVT_TRXC_DONE), + .out_state_mask = S(OM2K_TRX_S_ERROR) | + S(OM2K_TRX_S_WAIT_TX), + .name = "WAIT-TRXC", + .action = om2k_trx_s_wait_trxc, + }, + [OM2K_TRX_S_WAIT_TX] = { + .in_event_mask = S(OM2K_TRX_EVT_TX_DONE), + .out_state_mask = S(OM2K_TRX_S_ERROR) | + S(OM2K_TRX_S_WAIT_RX), + .name = "WAIT-TX", + .action = om2k_trx_s_wait_tx, + }, + [OM2K_TRX_S_WAIT_RX] = { + .in_event_mask = S(OM2K_TRX_EVT_RX_DONE), + .out_state_mask = S(OM2K_TRX_S_ERROR) | + S(OM2K_TRX_S_WAIT_TS), + .name = "WAIT-RX", + .action = om2k_trx_s_wait_rx, + }, + [OM2K_TRX_S_WAIT_TS] = { + .in_event_mask = S(OM2K_TRX_EVT_TS_DONE), + .out_state_mask = S(OM2K_TRX_S_ERROR) | + S(OM2K_TRX_S_DONE), + .name = "WAIT-TS", + .action = om2k_trx_s_wait_ts, + }, + [OM2K_TRX_S_DONE] = { + .name = "DONE", + .onenter = om2k_trx_s_done_onenter, + }, + [OM2K_TRX_S_ERROR] = { + .name = "ERROR", + }, +}; + +static int om2k_trx_timer_cb(struct osmo_fsm_inst *fi) +{ + osmo_fsm_inst_state_chg(fi, OM2K_TRX_S_ERROR, 0, 0); + return 0; +} + +static struct osmo_fsm om2k_trx_fsm = { + .name = "OM2000-TRX", + .states = om2k_trx_states, + .num_states = ARRAY_SIZE(om2k_trx_states), + .log_subsys = DNM, + .event_names = om2k_trx_events, + .timer_cb = om2k_trx_timer_cb, +}; + +struct osmo_fsm_inst *om2k_trx_fsm_start(struct osmo_fsm_inst *parent, + struct gsm_bts_trx *trx, + uint32_t term_event) +{ + struct osmo_fsm_inst *fi; + struct om2k_trx_fsm_priv *otfp; + char idbuf[32]; + + snprintf(idbuf, sizeof(idbuf), "%u/%u", trx->bts->nr, trx->nr); + + fi = osmo_fsm_inst_alloc_child_id(&om2k_trx_fsm, parent, term_event, + idbuf); + if (!fi) + return NULL; + + otfp = talloc_zero(fi, struct om2k_trx_fsm_priv); + otfp->trx = trx; + fi->priv = otfp; + + osmo_fsm_inst_dispatch(fi, OM2K_TRX_EVT_START, NULL); + + return fi; +} + + +/*********************************************************************** + * OM2000 BTS Finite State Machine, initializes CF and all siblings + ***********************************************************************/ + +enum om2k_bts_event { + OM2K_BTS_EVT_START, + OM2K_BTS_EVT_CF_DONE, + OM2K_BTS_EVT_IS_DONE, + OM2K_BTS_EVT_TF_DONE, + OM2K_BTS_EVT_TRX_DONE, + OM2K_BTS_EVT_STOP, +}; + +static const struct value_string om2k_bts_events[] = { + { OM2K_BTS_EVT_START, "START" }, + { OM2K_BTS_EVT_CF_DONE, "CF-DONE" }, + { OM2K_BTS_EVT_IS_DONE, "IS-DONE" }, + { OM2K_BTS_EVT_TF_DONE, "TF-DONE" }, + { OM2K_BTS_EVT_TRX_DONE, "TRX-DONE" }, + { OM2K_BTS_EVT_STOP, "STOP" }, + { 0, NULL } +}; + +enum om2k_bts_state { + OM2K_BTS_S_INIT, + OM2K_BTS_S_WAIT_CF, + OM2K_BTS_S_WAIT_IS, + OM2K_BTS_S_WAIT_TF, + OM2K_BTS_S_WAIT_TRX, + OM2K_BTS_S_DONE, + OM2K_BTS_S_ERROR, +}; + +struct om2k_bts_fsm_priv { + struct gsm_bts *bts; + uint8_t next_trx_nr; +}; + +static void om2k_bts_s_init(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct om2k_bts_fsm_priv *obfp = fi->priv; + struct gsm_bts *bts = obfp->bts; + + OSMO_ASSERT(event == OM2K_BTS_EVT_START); + osmo_fsm_inst_state_chg(fi, OM2K_BTS_S_WAIT_CF, + BTS_FSM_TIMEOUT, 0); + om2k_mo_fsm_start(fi, OM2K_BTS_EVT_CF_DONE, bts->c0, + &bts->rbs2000.cf.om2k_mo); +} + +static void om2k_bts_s_wait_cf(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct om2k_bts_fsm_priv *obfp = fi->priv; + struct gsm_bts *bts = obfp->bts; + + OSMO_ASSERT(event == OM2K_BTS_EVT_CF_DONE); + osmo_fsm_inst_state_chg(fi, OM2K_BTS_S_WAIT_IS, + BTS_FSM_TIMEOUT, 0); + om2k_mo_fsm_start(fi, OM2K_BTS_EVT_IS_DONE, bts->c0, + &bts->rbs2000.is.om2k_mo); +} + +static void om2k_bts_s_wait_is(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct om2k_bts_fsm_priv *obfp = fi->priv; + struct gsm_bts *bts = obfp->bts; + + OSMO_ASSERT(event == OM2K_BTS_EVT_IS_DONE); + /* TF can take a long time to initialize, wait for 10min */ + osmo_fsm_inst_state_chg(fi, OM2K_BTS_S_WAIT_TF, 600, 0); + om2k_mo_fsm_start(fi, OM2K_BTS_EVT_TF_DONE, bts->c0, + &bts->rbs2000.tf.om2k_mo); +} + +static void om2k_bts_s_wait_tf(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct om2k_bts_fsm_priv *obfp = fi->priv; + struct gsm_bts_trx *trx; + + OSMO_ASSERT(event == OM2K_BTS_EVT_TF_DONE); + + osmo_fsm_inst_state_chg(fi, OM2K_BTS_S_WAIT_TRX, + BTS_FSM_TIMEOUT, 0); + obfp->next_trx_nr = 0; + trx = gsm_bts_trx_num(obfp->bts, obfp->next_trx_nr++); + om2k_trx_fsm_start(fi, trx, OM2K_BTS_EVT_TRX_DONE); +} + +static void om2k_bts_s_wait_trx(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct om2k_bts_fsm_priv *obfp = fi->priv; + + OSMO_ASSERT(event == OM2K_BTS_EVT_TRX_DONE); + + if (obfp->next_trx_nr < obfp->bts->num_trx) { + struct gsm_bts_trx *trx; + trx = gsm_bts_trx_num(obfp->bts, obfp->next_trx_nr++); + om2k_trx_fsm_start(fi, trx, OM2K_BTS_EVT_TRX_DONE); + } else { + osmo_fsm_inst_state_chg(fi, OM2K_BTS_S_DONE, 0, 0); + } +} + +static void om2k_bts_s_done_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) +{ + osmo_fsm_inst_term(fi, OSMO_FSM_TERM_REGULAR, NULL); +} + +static const struct osmo_fsm_state om2k_bts_states[] = { + [OM2K_BTS_S_INIT] = { + .in_event_mask = S(OM2K_BTS_EVT_START), + .out_state_mask = S(OM2K_BTS_S_WAIT_CF), + .name = "INIT", + .action = om2k_bts_s_init, + }, + [OM2K_BTS_S_WAIT_CF] = { + .in_event_mask = S(OM2K_BTS_EVT_CF_DONE), + .out_state_mask = S(OM2K_BTS_S_ERROR) | + S(OM2K_BTS_S_WAIT_IS), + .name = "WAIT-CF", + .action = om2k_bts_s_wait_cf, + }, + [OM2K_BTS_S_WAIT_IS] = { + .in_event_mask = S(OM2K_BTS_EVT_IS_DONE), + .out_state_mask = S(OM2K_BTS_S_ERROR) | + S(OM2K_BTS_S_WAIT_TF), + .name = "WAIT-IS", + .action = om2k_bts_s_wait_is, + }, + [OM2K_BTS_S_WAIT_TF] = { + .in_event_mask = S(OM2K_BTS_EVT_TF_DONE), + .out_state_mask = S(OM2K_BTS_S_ERROR) | + S(OM2K_BTS_S_WAIT_TRX), + .name = "WAIT-TF", + .action = om2k_bts_s_wait_tf, + }, + [OM2K_BTS_S_WAIT_TRX] = { + .in_event_mask = S(OM2K_BTS_EVT_TRX_DONE), + .out_state_mask = S(OM2K_BTS_S_ERROR) | + S(OM2K_BTS_S_DONE), + .name = "WAIT-TRX", + .action = om2k_bts_s_wait_trx, + }, + [OM2K_BTS_S_DONE] = { + .name = "DONE", + .onenter = om2k_bts_s_done_onenter, + }, + [OM2K_BTS_S_ERROR] = { + .name = "ERROR", + }, +}; + +static int om2k_bts_timer_cb(struct osmo_fsm_inst *fi) +{ + osmo_fsm_inst_state_chg(fi, OM2K_BTS_S_ERROR, 0, 0); + return 0; +} + +static struct osmo_fsm om2k_bts_fsm = { + .name = "OM2000-BTS", + .states = om2k_bts_states, + .num_states = ARRAY_SIZE(om2k_bts_states), + .log_subsys = DNM, + .event_names = om2k_bts_events, + .timer_cb = om2k_bts_timer_cb, +}; + +struct osmo_fsm_inst * +om2k_bts_fsm_start(struct gsm_bts *bts) +{ + struct osmo_fsm_inst *fi; + struct om2k_bts_fsm_priv *obfp; + char idbuf[16]; + + snprintf(idbuf, sizeof(idbuf), "%u", bts->nr); + + fi = osmo_fsm_inst_alloc(&om2k_bts_fsm, bts, NULL, + LOGL_DEBUG, idbuf); + if (!fi) + return NULL; + fi->priv = obfp = talloc_zero(fi, struct om2k_bts_fsm_priv); + obfp->bts = bts; + + osmo_fsm_inst_dispatch(fi, OM2K_BTS_EVT_START, NULL); + + return fi; +} + + +/*********************************************************************** + * OM2000 Negotiation + ***********************************************************************/ static int abis_om2k_tx_negot_req_ack(struct gsm_bts *bts, const struct abis_om2k_mo *mo, uint8_t *data, unsigned int len) @@ -1345,60 +2311,10 @@ return abis_om2k_tx_negot_req_ack(sign_link->trx->bts, &o2h->mo, out_buf, out_cur - out_buf); } -static int om2k_rx_start_res(struct msgb *msg) -{ - struct e1inp_sign_link *sign_link = (struct e1inp_sign_link *)msg->dst; - struct abis_om2k_hdr *o2h = msgb_l2(msg); - int rc; - rc = abis_om2k_tx_simple(sign_link->trx->bts, &o2h->mo, OM2K_MSGT_START_RES_ACK); - rc = abis_om2k_tx_op_info(sign_link->trx->bts, &o2h->mo, 1); - - return rc; -} - -static int om2k_rx_op_info_ack(struct msgb *msg) -{ - struct e1inp_sign_link *sign_link = (struct e1inp_sign_link *)msg->dst; - struct abis_om2k_hdr *o2h = msgb_l2(msg); - - /* This Acknowledgement does not contain the actual operational state, - * so we signal whatever state we saved when we sent the Op Info - * request */ - - signal_op_state(sign_link->trx->bts, &o2h->mo); - - return 0; -} - -const struct value_string om2k_result_strings[] = { - { 0x02, "Wrong state or out of sequence" }, - { 0x03, "File error" }, - { 0x04, "Fault, unspecified" }, - { 0x05, "Tuning fault" }, - { 0x06, "Protocol error" }, - { 0x07, "MO not connected" }, - { 0x08, "Parameter error" }, - { 0x09, "Optional function not supported" }, - { 0x0a, "Local access state LOCALLY DISCONNECTED" }, - { 0, NULL } -}; - -const struct value_string om2k_accordance_strings[] = { - { 0x00, "Data according to request" }, - { 0x01, "Data not according to request" }, - { 0x02, "Inconsistent MO data" }, - { 0x03, "Capability constraint violation" }, - { 0, NULL } -}; - -const struct value_string om2k_mostate_vals[] = { - { 0x00, "RESET" }, - { 0x01, "STARTED" }, - { 0x02, "ENABLED" }, - { 0x03, "DISABLED" }, - { 0, NULL } -}; +/*********************************************************************** + * OM2000 Receive Message Handler + ***********************************************************************/ static int om2k_rx_nack(struct msgb *msg) { @@ -1423,68 +2339,20 @@ return 0; } -/* Process a Configuration Result message */ -static int process_conf_res(struct gsm_bts *bts, struct msgb *msg) +static int process_mo_state(struct gsm_bts *bts, struct om2k_decoded_msg *odm) { - struct abis_om2k_hdr *o2h = msgb_l2(msg); - uint16_t msg_type = ntohs(o2h->msg_type); - struct nm_om2k_signal_data nsd; - struct tlv_parsed tp; - uint8_t acc; - unsigned int log_level; - int ret; - - memset(&nsd, 0, sizeof(nsd)); - - abis_om2k_msg_tlv_parse(&tp, o2h); - if (!TLVP_PRESENT(&tp, OM2K_DEI_ACCORDANCE_IND)) - return -EIO; - - acc = *TLVP_VAL(&tp, OM2K_DEI_ACCORDANCE_IND); - - switch (acc) { - case 0: - log_level = LOGL_DEBUG; - ret = 0; - break; - default: - log_level = LOGL_ERROR; - ret = -EINVAL; - break; - } - - LOGP(DNM, log_level, "Rx MO=%s %s, Accordance: %s\n", - om2k_mo_name(&o2h->mo), - get_value_string(om2k_msgcode_vals, msg_type), - get_value_string(om2k_accordance_strings, acc)); - - nsd.bts = bts; - nsd.obj = mo2obj(bts, &o2h->mo); - nsd.om2k_mo = &o2h->mo; - nsd.accordance_ind = acc; - osmo_signal_dispatch(SS_NM, S_NM_OM2K_CONF_RES, &nsd); - - return ret; -} - -static int process_mo_state(struct gsm_bts *bts, struct msgb *msg) -{ - struct abis_om2k_hdr *o2h = msgb_l2(msg); - uint16_t msg_type = ntohs(o2h->msg_type); - struct tlv_parsed tp; uint8_t mo_state; - abis_om2k_msg_tlv_parse(&tp, o2h); - if (!TLVP_PRESENT(&tp, OM2K_DEI_MO_STATE)) + if (!TLVP_PRESENT(&odm->tp, OM2K_DEI_MO_STATE)) return -EIO; - mo_state = *TLVP_VAL(&tp, OM2K_DEI_MO_STATE); + mo_state = *TLVP_VAL(&odm->tp, OM2K_DEI_MO_STATE); LOGP(DNM, LOGL_DEBUG, "Rx MO=%s %s, MO State: %s\n", - om2k_mo_name(&o2h->mo), - get_value_string(om2k_msgcode_vals, msg_type), + om2k_mo_name(&odm->o2h.mo), + get_value_string(om2k_msgcode_vals, odm->msg_type), get_value_string(om2k_mostate_vals, mo_state)); - update_mo_state(bts, &o2h->mo, mo_state); + update_mo_state(bts, &odm->o2h.mo, mo_state); return 0; } @@ -1496,6 +2364,8 @@ struct abis_om2k_hdr *o2h = msgb_l2(msg); struct abis_om_hdr *oh = &o2h->om; uint16_t msg_type = ntohs(o2h->msg_type); + struct om2k_decoded_msg odm; + struct om2k_mo *mo; int rc = 0; /* Various consistency checks */ @@ -1523,80 +2393,53 @@ get_value_string(om2k_msgcode_vals, msg_type), osmo_hexdump(msg->l2h, msgb_l2len(msg))); + om2k_decode_msg(&odm, msg); + + process_mo_state(bts, &odm); + switch (msg_type) { case OM2K_MSGT_CAL_TIME_REQ: rc = abis_om2k_cal_time_resp(bts); break; case OM2K_MSGT_FAULT_REP: rc = abis_om2k_tx_simple(bts, &o2h->mo, OM2K_MSGT_FAULT_REP_ACK); - process_mo_state(bts, msg); break; case OM2K_MSGT_NEGOT_REQ: rc = om2k_rx_negot_req(msg); break; case OM2K_MSGT_START_RES: - rc = om2k_rx_start_res(msg); - process_mo_state(bts, msg); - break; - case OM2K_MSGT_OP_INFO_ACK: - rc = om2k_rx_op_info_ack(msg); + /* common processing here */ + rc = abis_om2k_tx_simple(bts, &o2h->mo, OM2K_MSGT_START_RES_ACK); + /* below we dispatch into MO */ break; case OM2K_MSGT_IS_CONF_RES: rc = abis_om2k_tx_simple(bts, &o2h->mo, OM2K_MSGT_IS_CONF_RES_ACK); - process_conf_res(bts, msg); break; case OM2K_MSGT_CON_CONF_RES: rc = abis_om2k_tx_simple(bts, &o2h->mo, OM2K_MSGT_CON_CONF_RES_ACK); - process_conf_res(bts, msg); break; case OM2K_MSGT_TX_CONF_RES: rc = abis_om2k_tx_simple(bts, &o2h->mo, OM2K_MSGT_TX_CONF_RES_ACK); - process_conf_res(bts, msg); break; case OM2K_MSGT_RX_CONF_RES: rc = abis_om2k_tx_simple(bts, &o2h->mo, OM2K_MSGT_RX_CONF_RES_ACK); - process_conf_res(bts, msg); break; case OM2K_MSGT_TS_CONF_RES: rc = abis_om2k_tx_simple(bts, &o2h->mo, OM2K_MSGT_TS_CONF_RES_ACK); - process_conf_res(bts, msg); break; case OM2K_MSGT_TF_CONF_RES: rc = abis_om2k_tx_simple(bts, &o2h->mo, OM2K_MSGT_TF_CONF_RES_ACK); - process_conf_res(bts, msg); - break; - case OM2K_MSGT_CONNECT_COMPL: - rc = abis_om2k_tx_simple(bts, &o2h->mo, OM2K_MSGT_RESET_CMD); - break; - case OM2K_MSGT_RESET_COMPL: - rc = abis_om2k_tx_simple(bts, &o2h->mo, OM2K_MSGT_START_REQ); break; case OM2K_MSGT_ENABLE_RES: rc = abis_om2k_tx_simple(bts, &o2h->mo, OM2K_MSGT_ENABLE_RES_ACK); - process_mo_state(bts, msg); break; case OM2K_MSGT_DISABLE_RES: rc = abis_om2k_tx_simple(bts, &o2h->mo, OM2K_MSGT_DISABLE_RES_ACK); - process_mo_state(bts, msg); break; case OM2K_MSGT_TEST_RES: rc = abis_om2k_tx_simple(bts, &o2h->mo, OM2K_MSGT_TEST_RES_ACK); - process_mo_state(bts, msg); break; - case OM2K_MSGT_STATUS_RESP: - process_mo_state(bts, msg); - break; - case OM2K_MSGT_START_REQ_ACK: - case OM2K_MSGT_CON_CONF_REQ_ACK: - case OM2K_MSGT_IS_CONF_REQ_ACK: - case OM2K_MSGT_TX_CONF_REQ_ACK: - case OM2K_MSGT_RX_CONF_REQ_ACK: - case OM2K_MSGT_TS_CONF_REQ_ACK: - case OM2K_MSGT_TF_CONF_REQ_ACK: - case OM2K_MSGT_ENABLE_REQ_ACK: - case OM2K_MSGT_ALARM_STATUS_REQ_ACK: - case OM2K_MSGT_DISABLE_REQ_ACK: - break; + /* ERrors */ case OM2K_MSGT_START_REQ_REJ: case OM2K_MSGT_CONNECT_REJ: case OM2K_MSGT_OP_INFO_REJ: @@ -1613,11 +2456,74 @@ case OM2K_MSGT_DISABLE_REQ_REJ: rc = om2k_rx_nack(msg); break; - default: - LOGP(DNM, LOGL_NOTICE, "Rx unhandled OM2000 msg %s\n", - get_value_string(om2k_msgcode_vals, msg_type)); } + + /* Resolve the MO for this message */ + mo = get_om2k_mo(bts, &o2h->mo); + if (!mo) { + LOGP(DNM, LOGL_ERROR, "Couldn't resolve MO for OM2K msg " + "%s: %s\n", get_value_string(om2k_msgcode_vals, msg_type), + msgb_hexdump(msg)); + return 0; + } + + /* Dispatch message to that MO */ + om2k_mo_fsm_recvmsg(bts, mo, &odm); msgb_free(msg); return rc; } + +static void om2k_mo_init(struct om2k_mo *mo, uint8_t class, + uint8_t bts_nr, uint8_t assoc_so, uint8_t inst) +{ + mo->addr.class = class; + mo->addr.bts = bts_nr; + mo->addr.assoc_so = assoc_so; + mo->addr.inst = inst; +} + +/* initialize the OM2K_MO members of gsm_bts_trx and its timeslots */ +void abis_om2k_trx_init(struct gsm_bts_trx *trx) +{ + struct gsm_bts *bts = trx->bts; + unsigned int i; + + OSMO_ASSERT(bts->type == GSM_BTS_TYPE_RBS2000); + + om2k_mo_init(&trx->rbs2000.trxc.om2k_mo, OM2K_MO_CLS_TRXC, + bts->nr, 255, trx->nr); + om2k_mo_init(&trx->rbs2000.tx.om2k_mo, OM2K_MO_CLS_TX, + bts->nr, 255, trx->nr); + om2k_mo_init(&trx->rbs2000.rx.om2k_mo, OM2K_MO_CLS_RX, + bts->nr, 255, trx->nr); + + for (i = 0; i < ARRAY_SIZE(trx->ts); i++) { + om2k_mo_init(&trx->ts[i].rbs2000.om2k_mo, OM2K_MO_CLS_TS, + bts->nr, trx->nr, i); + } +} + +/* initialize the OM2K_MO members of gsm_bts */ +void abis_om2k_bts_init(struct gsm_bts *bts) +{ + OSMO_ASSERT(bts->type == GSM_BTS_TYPE_RBS2000); + + om2k_mo_init(&bts->rbs2000.cf.om2k_mo, OM2K_MO_CLS_CF, + bts->nr, 0xFF, 0); + om2k_mo_init(&bts->rbs2000.is.om2k_mo, OM2K_MO_CLS_IS, + bts->nr, 0xFF, 0); + om2k_mo_init(&bts->rbs2000.con.om2k_mo, OM2K_MO_CLS_CON, + bts->nr, 0xFF, 0); + om2k_mo_init(&bts->rbs2000.dp.om2k_mo, OM2K_MO_CLS_DP, + bts->nr, 0xFF, 0); + om2k_mo_init(&bts->rbs2000.tf.om2k_mo, OM2K_MO_CLS_TF, + bts->nr, 0xFF, 0); +} + +static __attribute__((constructor)) void abis_om2k_init(void) +{ + osmo_fsm_register(&om2k_mo_fsm); + osmo_fsm_register(&om2k_bts_fsm); + osmo_fsm_register(&om2k_trx_fsm); +} diff --git a/openbsc/src/libbsc/bts_ericsson_rbs2000.c b/openbsc/src/libbsc/bts_ericsson_rbs2000.c index 7f056f1..a828937 100644 --- a/openbsc/src/libbsc/bts_ericsson_rbs2000.c +++ b/openbsc/src/libbsc/bts_ericsson_rbs2000.c @@ -34,18 +34,20 @@ static void bootstrap_om_bts(struct gsm_bts *bts) { LOGP(DNM, LOGL_NOTICE, "bootstrapping OML for BTS %u\n", bts->nr); - abis_om2k_tx_start_req(bts, &om2k_mo_cf); - /* FIXME */ + + /* FIXME: this is global init, not bootstrapping */ + abis_om2k_bts_init(bts); + abis_om2k_trx_init(bts->c0); + + /* TODO: Should we wait for a Failure report? */ + om2k_bts_fsm_start(bts); } static void bootstrap_om_trx(struct gsm_bts_trx *trx) { - struct abis_om2k_mo trx_mo = { OM2K_MO_CLS_TRXC, 0, 255, trx->nr }; - LOGP(DNM, LOGL_NOTICE, "bootstrapping OML for TRX %u/%u\n", trx->bts->nr, trx->nr); - - abis_om2k_tx_reset_cmd(trx->bts, &trx_mo); + /* FIXME */ } static int shutdown_om(struct gsm_bts *bts) @@ -137,103 +139,6 @@ return 0; } -static void nm_statechg_evt(unsigned int signal, - struct nm_statechg_signal_data *nsd) -{ - struct abis_om2k_mo mo; - - if (nsd->bts->type != GSM_BTS_TYPE_RBS2000) - return; - - switch (nsd->om2k_mo->class) { - case OM2K_MO_CLS_CF: - if (nsd->new_state->operational != NM_OPSTATE_ENABLED || - nsd->new_state->availability != OM2K_MO_S_STARTED) - break; - /* CF has started, we can trigger IS and TF start */ - abis_om2k_tx_connect_cmd(nsd->bts, &om2k_mo_is); - abis_om2k_tx_connect_cmd(nsd->bts, &om2k_mo_tf); - break; - case OM2K_MO_CLS_IS: - if (nsd->new_state->availability == OM2K_MO_S_ENABLED) { - /* IS is enabled, we can proceed with TRXC/RX/TX/TS */ - break; - } - if (nsd->new_state->operational != NM_OPSTATE_ENABLED) - break; - /* IS has started, we can configure + enable it */ - abis_om2k_tx_is_conf_req(nsd->bts); - break; - case OM2K_MO_CLS_TF: - if (nsd->new_state->operational != NM_OPSTATE_ENABLED || - nsd->new_state->availability == OM2K_MO_S_DISABLED) - break; - if (nsd->new_state->availability == OM2K_MO_S_STARTED) { - /* TF has started, configure + enable it */ - abis_om2k_tx_tf_conf_req(nsd->bts); - } - break; - case OM2K_MO_CLS_TRXC: - if (nsd->new_state->availability != OM2K_MO_S_STARTED) - break; - /* TRXC is started, connect the TX and RX objects */ - memcpy(&mo, nsd->om2k_mo, sizeof(mo)); - mo.class = OM2K_MO_CLS_TX; - abis_om2k_tx_connect_cmd(nsd->bts, &mo); - mo.class = OM2K_MO_CLS_RX; - abis_om2k_tx_connect_cmd(nsd->bts, &mo); - break; - case OM2K_MO_CLS_RX: - if (nsd->new_state->operational != NM_OPSTATE_ENABLED || - nsd->new_state->availability != OM2K_MO_S_STARTED) - break; - /* RX is started, configure + enable it */ - abis_om2k_tx_rx_conf_req(nsd->obj); - break; - case OM2K_MO_CLS_TX: - if (nsd->new_state->operational != NM_OPSTATE_ENABLED || - nsd->new_state->availability != OM2K_MO_S_STARTED) - break; - /* RX is started, configure + enable it */ - abis_om2k_tx_tx_conf_req(nsd->obj); - break; - } -} - -static void nm_conf_res(struct nm_om2k_signal_data *nsd) -{ - switch (nsd->om2k_mo->class) { - case OM2K_MO_CLS_IS: - case OM2K_MO_CLS_TF: - case OM2K_MO_CLS_RX: - case OM2K_MO_CLS_TX: - /* If configuration was a success, enable it */ - abis_om2k_tx_enable_req(nsd->bts, nsd->om2k_mo); - break; - } -} - -static int nm_sig_cb(unsigned int subsys, unsigned int signal, - void *handler_data, void *signal_data) -{ - if (subsys != SS_NM) - return 0; - - switch (signal) { - case S_NM_STATECHG_OPER: - case S_NM_STATECHG_ADM: - nm_statechg_evt(signal, signal_data); - break; - case S_NM_OM2K_CONF_RES: - nm_conf_res(signal_data); - break; - default: - break; - } - - return 0; -} - static void config_write_bts(struct vty *vty, struct gsm_bts *bts) { abis_om2k_config_write_bts(vty, bts); @@ -266,7 +171,6 @@ osmo_signal_register_handler(SS_L_INPUT, inp_sig_cb, NULL); osmo_signal_register_handler(SS_L_GLOBAL, gbl_sig_cb, NULL); - osmo_signal_register_handler(SS_NM, nm_sig_cb, NULL); return 0; } -- To view, visit https://gerrit.osmocom.org/1156 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3e11b28ba22b8c227e0401e6207fdda5381dda8c Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Oct 26 12:10:07 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 26 Oct 2016 12:10:07 +0000 Subject: [PATCH] openbsc[master]: abis_rsl: Add mandatory IE for Ericsson RBS2000 PDCH activation Message-ID: Review at https://gerrit.osmocom.org/1157 abis_rsl: Add mandatory IE for Ericsson RBS2000 PDCH activation We need to include the RSL_IE_ACT_TYPE Information Element with the proprietary coding 0x0F for "packet channel related activation" in order for the RBS2xxx to accept this message Change-Id: I53bad674d3bb02f5210e71ca5b4280be9c956a57 --- M openbsc/src/libbsc/abis_rsl.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/57/1157/1 diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c index 95a18cf..2661695 100644 --- a/openbsc/src/libbsc/abis_rsl.c +++ b/openbsc/src/libbsc/abis_rsl.c @@ -499,6 +499,9 @@ dh->chan_nr = chan_nr; } + /* Activation Type: Related to packet channel */ + msgb_tv_put(msg, RSL_IE_ACT_TYPE, 0x0F); + msg->dst = trx->rsl_link; return abis_rsl_sendmsg(msg); -- To view, visit https://gerrit.osmocom.org/1157 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I53bad674d3bb02f5210e71ca5b4280be9c956a57 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Oct 26 12:10:07 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 26 Oct 2016 12:10:07 +0000 Subject: [PATCH] openbsc[master]: OM2000: Fix state machien for CF/TRXC on START Result Message-ID: Review at https://gerrit.osmocom.org/1158 OM2000: Fix state machien for CF/TRXC on START Result When receiving the 'Start Result' message, for CF and TRXC MO we directly transition to performing the Operational Info. In that case, we need to return after sending the Operational Info and skip the usual processing for the default case below. Change-Id: I99860d198b337ffe461b240bda20dc10e1b5b2cb --- M openbsc/src/libbsc/abis_om2000.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/58/1158/1 diff --git a/openbsc/src/libbsc/abis_om2000.c b/openbsc/src/libbsc/abis_om2000.c index 58d86c6..aeac876 100644 --- a/openbsc/src/libbsc/abis_om2000.c +++ b/openbsc/src/libbsc/abis_om2000.c @@ -1518,7 +1518,7 @@ osmo_fsm_inst_state_chg(fi, OM2K_ST_WAIT_OPINFO_ACCEPT, OM2K_TIMEOUT, 0); abis_om2k_tx_op_info(omfp->trx->bts, &omfp->mo->addr, 1); - break; + return; case OM2K_MO_CLS_DP: /* Transition directoy to WAIT_ENABLE_ACCEPT */ osmo_fsm_inst_state_chg(fi, OM2K_ST_WAIT_ENABLE_ACCEPT, -- To view, visit https://gerrit.osmocom.org/1158 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I99860d198b337ffe461b240bda20dc10e1b5b2cb Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Oct 26 12:10:07 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 26 Oct 2016 12:10:07 +0000 Subject: [PATCH] openbsc[master]: om2000: Add support for querying RBS capabilities Message-ID: Review at https://gerrit.osmocom.org/1159 om2000: Add support for querying RBS capabilities Change-Id: Id1fbaf41286f3651ce8f210eb8da05fb51179c96 --- M openbsc/include/openbsc/abis_om2000.h M openbsc/src/libbsc/abis_om2000.c M openbsc/src/libbsc/abis_om2000_vty.c 3 files changed, 28 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/59/1159/1 diff --git a/openbsc/include/openbsc/abis_om2000.h b/openbsc/include/openbsc/abis_om2000.h index 5a7344f..c745112 100644 --- a/openbsc/include/openbsc/abis_om2000.h +++ b/openbsc/include/openbsc/abis_om2000.h @@ -77,6 +77,7 @@ int abis_om2k_tx_test_req(struct gsm_bts *bts, const struct abis_om2k_mo *mo); int abis_om2k_tx_op_info(struct gsm_bts *bts, const struct abis_om2k_mo *mo, uint8_t operational); +int abis_om2k_tx_cap_req(struct gsm_bts *bts, const struct abis_om2k_mo *mo); int abis_om2k_tx_is_conf_req(struct gsm_bts *bts); int abis_om2k_tx_tf_conf_req(struct gsm_bts *bts); int abis_om2k_tx_rx_conf_req(struct gsm_bts_trx *trx); diff --git a/openbsc/src/libbsc/abis_om2000.c b/openbsc/src/libbsc/abis_om2000.c index aeac876..3337412 100644 --- a/openbsc/src/libbsc/abis_om2000.c +++ b/openbsc/src/libbsc/abis_om2000.c @@ -190,6 +190,13 @@ OM2K_MSGT_TX_CONF_RES_NACK = 0x00b5, OM2K_MSGT_TX_CONF_RES = 0x00b6, + OM2K_MSGT_CAPA_REQ = 0x00e8, + OM2K_MSGT_CAPA_REQ_ACK = 0x00ea, + OM2K_MSGT_CAPA_REQ_REJ = 0x00eb, + OM2K_MSGT_CAPA_RES = 0x00ee, + OM2K_MSGT_CAPA_RES_ACK = 0x00ec, + OM2K_MSGT_CAPA_RES_NACK = 0x00ed, + OM2K_MSGT_NEGOT_REQ_ACK = 0x0104, OM2K_MSGT_NEGOT_REQ_NACK = 0x0105, OM2K_MSGT_NEGOT_REQ = 0x0106, @@ -1065,6 +1072,11 @@ update_op_state(bts, mo, operational); return abis_om2k_sendmsg(bts, msg); +} + +int abis_om2k_tx_cap_req(struct gsm_bts *bts, const struct abis_om2k_mo *mo) +{ + return abis_om2k_tx_simple(bts, mo, OM2K_MSGT_CAPA_REQ); } static void om2k_fill_is_conn_grp(struct om2k_is_conn_grp *grp, uint16_t icp1, @@ -2439,6 +2451,9 @@ case OM2K_MSGT_TEST_RES: rc = abis_om2k_tx_simple(bts, &o2h->mo, OM2K_MSGT_TEST_RES_ACK); break; + case OM2K_MSGT_CAPA_RES: + rc = abis_om2k_tx_simple(bts, &o2h->mo, OM2K_MSGT_CAPA_RES_ACK); + break; /* ERrors */ case OM2K_MSGT_START_REQ_REJ: case OM2K_MSGT_CONNECT_REJ: diff --git a/openbsc/src/libbsc/abis_om2000_vty.c b/openbsc/src/libbsc/abis_om2000_vty.c index 72422a1..d48ff95 100644 --- a/openbsc/src/libbsc/abis_om2000_vty.c +++ b/openbsc/src/libbsc/abis_om2000_vty.c @@ -236,6 +236,17 @@ return CMD_SUCCESS; } +DEFUN(om2k_cap_req, om2k_cap_req_cmd, + "capabilities-request", + "Request MO capabilities\n") +{ + struct oml_node_state *oms = vty->index; + + abis_om2k_tx_cap_req(oms->bts, &oms->mo); + return CMD_SUCCESS; +} + + struct con_conn_group { struct llist_head list; @@ -455,6 +466,7 @@ install_element(OM2K_NODE, &om2k_disable_cmd); install_element(OM2K_NODE, &om2k_op_info_cmd); install_element(OM2K_NODE, &om2k_test_cmd); + install_element(OM2K_NODE, &om2k_cap_req_cmd); install_element(OM2K_NODE, &om2k_conf_req_cmd); install_element(OM2K_NODE, &om2k_con_list_dec_cmd); install_element(OM2K_NODE, &om2k_con_list_tei_cmd); -- To view, visit https://gerrit.osmocom.org/1159 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id1fbaf41286f3651ce8f210eb8da05fb51179c96 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Oct 26 12:10:07 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 26 Oct 2016 12:10:07 +0000 Subject: [PATCH] openbsc[master]: RBS2000: re-establish any lost signalling links Message-ID: Review at https://gerrit.osmocom.org/1160 RBS2000: re-establish any lost signalling links Contrary to standard A-bis, in the RBS2000 case the BSC connects the signalling data links (LAPD) to the BTS. In case one of them drop, we need to attempt to re-establish them. This requires libosmo-abis with Change-Id I07f0f79e0cda09766f357032ffb4e7ad643d448a Change-Id: I710b5af5d0acbdd3febd314849340f2adb7abd80 --- M openbsc/src/libbsc/bts_ericsson_rbs2000.c 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/60/1160/1 diff --git a/openbsc/src/libbsc/bts_ericsson_rbs2000.c b/openbsc/src/libbsc/bts_ericsson_rbs2000.c index a828937..1d122ec 100644 --- a/openbsc/src/libbsc/bts_ericsson_rbs2000.c +++ b/openbsc/src/libbsc/bts_ericsson_rbs2000.c @@ -104,6 +104,7 @@ void *handler_data, void *signal_data) { struct input_signal_data *isd = signal_data; + struct e1inp_ts *e1i_ts; if (subsys != SS_L_INPUT) return 0; @@ -121,6 +122,17 @@ break; } break; + case S_L_INP_TEI_DN: + if (isd->trx->bts->type != GSM_BTS_TYPE_RBS2000) + break; + LOGP(DNM, LOGL_NOTICE, "Line-%u TS-%u TEI-%u SAPI-%u: Link " + "Lost for Ericsson RBS2000. Re-starting DL Establishment\n", + isd->line->num, isd->ts_nr, isd->tei, isd->sapi); + /* Some datalink for a given TEI/SAPI went down, try to re-start it */ + e1i_ts = &isd->line->ts[isd->ts_nr-1]; + OSMO_ASSERT(e1i_ts->type == E1INP_TS_TYPE_SIGN); + lapd_sap_start(e1i_ts->lapd, isd->tei, isd->sapi); + break; case S_L_INP_LINE_INIT: case S_L_INP_LINE_NOALARM: if (strcasecmp(isd->line->driver->name, "DAHDI") -- To view, visit https://gerrit.osmocom.org/1160 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I710b5af5d0acbdd3febd314849340f2adb7abd80 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Oct 26 12:10:07 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 26 Oct 2016 12:10:07 +0000 Subject: [PATCH] openbsc[master]: OM2000: Add fault report parsing Message-ID: Review at https://gerrit.osmocom.org/1161 OM2000: Add fault report parsing This patch adds parsing for OM2000 MO fault report map parsing, the bits in the fault maps are counted out and displayed. Change-Id: I6e2928f39b09bc08e9ab78bc10bc81e07f7eb55d --- M openbsc/src/libbsc/abis_om2000.c 1 file changed, 129 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/61/1161/1 diff --git a/openbsc/src/libbsc/abis_om2000.c b/openbsc/src/libbsc/abis_om2000.c index 3337412..357e2e5 100644 --- a/openbsc/src/libbsc/abis_om2000.c +++ b/openbsc/src/libbsc/abis_om2000.c @@ -238,6 +238,7 @@ OM2K_DEI_POWER = 0x2f, OM2K_DEI_REASON_CODE = 0x32, OM2K_DEI_RX_DIVERSITY = 0x33, + OM2K_DEI_REPL_UNIT_MAP = 0x34, OM2K_DEI_RESULT_CODE = 0x35, OM2K_DEI_T3105 = 0x38, OM2K_DEI_TF_MODE = 0x3a, @@ -252,7 +253,7 @@ OM2K_DEI_RSL_FUNC_MAP_2 = 0x46, OM2K_DEI_EXT_RANGE = 0x47, OM2K_DEI_REQ_IND = 0x48, - OM2K_DEI_REPL_UNIT_MAP = 0x50, + OM2K_DEI_REPL_UNIT_MAP_EXT = 0x50, OM2K_DEI_ICM_BOUND_PARAMS = 0x74, OM2K_DEI_LSC = 0x79, OM2K_DEI_LSC_FILT_TIME = 0x7a, @@ -268,6 +269,7 @@ OM2K_DEI_INTERF_REJ_COMB = 0x94, OM2K_DEI_FS_OFFSET = 0x98, OM2K_DEI_EXT_COND_MAP_2_EXT = 0x9c, + OM2K_DEI_TSS_MO_STATE = 0x9d, }; const struct tlv_definition om2k_att_tlvdef = { @@ -322,6 +324,7 @@ [OM2K_DEI_EXT_RANGE] = { TLV_TYPE_TV }, [OM2K_DEI_REQ_IND] = { TLV_TYPE_TV }, [OM2K_DEI_REPL_UNIT_MAP] = { TLV_TYPE_FIXED, 6 }, + [OM2K_DEI_REPL_UNIT_MAP_EXT] = {TLV_TYPE_FIXED, 6}, [OM2K_DEI_ICM_BOUND_PARAMS] = { TLV_TYPE_FIXED, 5 }, [OM2K_DEI_LSC] = { TLV_TYPE_TV }, [OM2K_DEI_LSC_FILT_TIME] = { TLV_TYPE_TV }, @@ -337,6 +340,7 @@ [OM2K_DEI_INTERF_REJ_COMB] = { TLV_TYPE_TV }, [OM2K_DEI_FS_OFFSET] = { TLV_TYPE_FIXED, 5 }, [OM2K_DEI_EXT_COND_MAP_2_EXT] = { TLV_TYPE_FIXED, 4 }, + [OM2K_DEI_TSS_MO_STATE] = { TLV_TYPE_FIXED, 4 }, }, }; @@ -2369,6 +2373,129 @@ return 0; } +/* Display fault report bits (helper function of display_fault_maps()) */ +static bool display_fault_bits(const uint8_t *vect, unsigned int len, + uint8_t dei, const struct abis_om2k_mo *mo) +{ + int i; + int k; + bool faults_present = false; + int first = 1; + char string[255]; + + /* Check if errors are present at all */ + for (i = 0; i < len; i++) + if (vect[i]) + faults_present = true; + if (!faults_present) + return false; + + sprintf(string, "Fault Report: %s (", + get_value_string(om2k_attr_vals, dei)); + + for (i = 0; i < len; i++) { + for (k = 0; k < 8; k++) { + if ((vect[i] >> k) & 1) { + if (!first) + sprintf(string + strlen(string), ","); + sprintf(string + strlen(string), "%d", k + i*8); + first = 0; + } + } + } + + sprintf(string + strlen(string), ")\n"); + DEBUGP(DNM, "Rx MO=%s %s", om2k_mo_name(mo), string); + + return true; +} + +/* Display fault report maps */ +static void display_fault_maps(const uint8_t *src, unsigned int src_len, + const struct abis_om2k_mo *mo) +{ + uint8_t tag; + uint16_t tag_len; + const uint8_t *val; + int src_pos = 0; + int rc; + int tlv_count = 0; + uint16_t msg_code; + bool faults_present = false; + + /* Chop off header */ + src+=4; + src_len-=4; + + /* Check message type */ + msg_code = (*src & 0xff) << 8; + src++; + src_len--; + msg_code |= (*src & 0xff); + src++; + src_len--; + if (msg_code != OM2K_MSGT_FAULT_REP) { + LOGP(DNM, LOGL_ERROR, "Rx MO=%s Fault report: invalid message code!\n", + om2k_mo_name(mo)); + return; + } + + /* Chop off mo-interface */ + src += 4; + src_len -= 4; + + /* Iterate over each TLV element */ + while (1) { + + /* Bail if an the maximum number of TLV fields + * have been parsed */ + if (tlv_count >= 11) { + LOGP(DNM, LOGL_ERROR, + "Rx MO=%s Fault Report: too many tlv elements!\n", + om2k_mo_name(mo)); + return; + } + + /* Parse TLV field */ + rc = tlv_parse_one(&tag, &tag_len, &val, &om2k_att_tlvdef, + src + src_pos, src_len - src_pos); + if (rc > 0) + src_pos += rc; + else { + LOGP(DNM, LOGL_ERROR, + "Rx MO=%s Fault Report: invalid tlv element!\n", + om2k_mo_name(mo)); + return; + } + + switch (tag) { + case OM2K_DEI_INT_FAULT_MAP_1A: + case OM2K_DEI_INT_FAULT_MAP_1B: + case OM2K_DEI_INT_FAULT_MAP_2A: + case OM2K_DEI_EXT_COND_MAP_1: + case OM2K_DEI_EXT_COND_MAP_2: + case OM2K_DEI_REPL_UNIT_MAP: + case OM2K_DEI_INT_FAULT_MAP_2A_EXT: + case OM2K_DEI_EXT_COND_MAP_2_EXT: + case OM2K_DEI_REPL_UNIT_MAP_EXT: + faults_present |= display_fault_bits(val, tag_len, + tag, mo); + break; + } + + /* Stop when no further TLV elements can be expected */ + if (src_len - src_pos < 2) + break; + + tlv_count++; + } + + if (!faults_present) { + DEBUGP(DNM, "Rx MO=%s Fault Report: All faults ceased!\n", + om2k_mo_name(mo)); + } +} + int abis_om2k_rcvmsg(struct msgb *msg) { struct e1inp_sign_link *sign_link = (struct e1inp_sign_link *)msg->dst; @@ -2414,6 +2541,7 @@ rc = abis_om2k_cal_time_resp(bts); break; case OM2K_MSGT_FAULT_REP: + display_fault_maps(msg->l2h, msgb_l2len(msg), &o2h->mo); rc = abis_om2k_tx_simple(bts, &o2h->mo, OM2K_MSGT_FAULT_REP_ACK); break; case OM2K_MSGT_NEGOT_REQ: -- To view, visit https://gerrit.osmocom.org/1161 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6e2928f39b09bc08e9ab78bc10bc81e07f7eb55d Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Oct 26 12:10:07 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 26 Oct 2016 12:10:07 +0000 Subject: [PATCH] openbsc[master]: om2000: added support for ericssons sabm negotiation Message-ID: Review at https://gerrit.osmocom.org/1162 om2000: added support for ericssons sabm negotiation This patch adds support for ericssons sambm negotiation. This patch depends on libosmo-abis commit: 2788c7eacab91cd39d68e316fc8ee87763bbfeb4 Change-Id: I56b1c1cef07a61143fc0e8058480805cddfeff96 --- M openbsc/src/libbsc/bts_ericsson_rbs2000.c A openbsc/src/osmo-nitb/openbsc.cfg 2 files changed, 109 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/62/1162/1 diff --git a/openbsc/src/libbsc/bts_ericsson_rbs2000.c b/openbsc/src/libbsc/bts_ericsson_rbs2000.c index 1d122ec..1300b4a 100644 --- a/openbsc/src/libbsc/bts_ericsson_rbs2000.c +++ b/openbsc/src/libbsc/bts_ericsson_rbs2000.c @@ -71,6 +71,9 @@ continue; llist_for_each_entry(link, &ts->sign.sign_links, list) { + lapd_instance_set_profile(ts->lapd, + &lapd_profile_abis_ericsson); + if (start) lapd_sap_start(ts->lapd, link->tei, link->sapi); else diff --git a/openbsc/src/osmo-nitb/openbsc.cfg b/openbsc/src/osmo-nitb/openbsc.cfg new file mode 100644 index 0000000..8dbe704 --- /dev/null +++ b/openbsc/src/osmo-nitb/openbsc.cfg @@ -0,0 +1,106 @@ +! +! OpenBSC (0.9.11.308-62d46) configuration saved from vty +!! +password foo +! +line vty + no login +! +log stderr + logging level lmi debug + logging level linp debug + logging level nm debug +network + network country code 262 + mobile network code 42 + short name OpenBSC + long name OpenBSC + auth policy closed + location updating reject cause 13 + encryption a5 0 + neci 0 + paging any use tch 0 + rrlp mode none + mm info 0 + handover 0 + handover window rxlev averaging 10 + handover window rxqual averaging 1 + handover window rxlev neighbor averaging 10 + handover power budget interval 6 + handover power budget hysteresis 3 + handover maximum distance 9999 + timer t3101 10 + timer t3103 0 + timer t3105 40 + timer t3107 0 + timer t3109 4 + timer t3111 0 + timer t3113 60 + timer t3115 0 + timer t3117 0 + timer t3119 0 + timer t3122 0 + timer t3141 0 + subscriber-keep-in-ram 0 + bts 0 + type rbs2000 + band GSM900 + cell_identity 0 + location_area_code 1 + training_sequence_code 7 + base_station_id_code 63 + ms max power 33 + cell reselection hysteresis 4 + rxlev access min 0 + channel allocator descending + rach tx integer 9 + rach max transmission 7 + oml e1 line 0 timeslot 1 sub-slot full + oml e1 tei 62 + neighbor-list mode automatic + gprs mode none + is-connection-list add 4 512 12 + is-connection-list add 16 524 12 + is-connection-list add 28 536 12 + is-connection-list add 40 548 12 + trx 0 + rf_locked 0 + arfcn 55 + nominal power 43 + max_power_red 13 + rsl e1 line 0 timeslot 1 sub-slot full + rsl e1 tei 0 + timeslot 0 + phys_chan_config CCCH+SDCCH4 + hopping enabled 0 + e1 line 0 timeslot 1 sub-slot full + timeslot 1 + phys_chan_config TCH/F + hopping enabled 0 + e1 line 0 timeslot 2 sub-slot 1 + timeslot 2 + phys_chan_config TCH/F + hopping enabled 0 + e1 line 0 timeslot 2 sub-slot 2 + timeslot 3 + phys_chan_config TCH/F + hopping enabled 0 + e1 line 0 timeslot 2 sub-slot 3 + timeslot 4 + phys_chan_config TCH/F + hopping enabled 0 + e1 line 0 timeslot 3 sub-slot 0 + timeslot 5 + phys_chan_config TCH/F + hopping enabled 0 + e1 line 0 timeslot 3 sub-slot 1 + timeslot 6 + phys_chan_config TCH/F + hopping enabled 0 + e1 line 0 timeslot 3 sub-slot 2 + timeslot 7 + phys_chan_config TCH/F_PDCH + hopping enabled 0 + e1 line 0 timeslot 3 sub-slot 3 +e1_input + e1_line 0 driver dahdi -- To view, visit https://gerrit.osmocom.org/1162 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I56b1c1cef07a61143fc0e8058480805cddfeff96 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Oct 26 12:10:07 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 26 Oct 2016 12:10:07 +0000 Subject: [PATCH] openbsc[master]: OM2000: Throw error when MO can not be enabled Message-ID: Review at https://gerrit.osmocom.org/1163 OM2000: Throw error when MO can not be enabled Throw warning message in case the MO state does not change to enabled after sendeing an Enable-Request message. Change-Id: Idfde8d6f71526e8acfea51835732515a4bee858e --- M openbsc/src/libbsc/abis_om2000.c 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/63/1163/1 diff --git a/openbsc/src/libbsc/abis_om2000.c b/openbsc/src/libbsc/abis_om2000.c index 357e2e5..1ab77b1 100644 --- a/openbsc/src/libbsc/abis_om2000.c +++ b/openbsc/src/libbsc/abis_om2000.c @@ -2368,6 +2368,16 @@ get_value_string(om2k_msgcode_vals, odm->msg_type), get_value_string(om2k_mostate_vals, mo_state)); + /* Throw error message in case we see an enable rsponse that does + * not yield an enabled mo-state */ + if (odm->msg_type == OM2K_MSGT_ENABLE_RES + && mo_state != OM2K_MO_S_ENABLED) { + LOGP(DNM, LOGL_ERROR, + "Rx MO=%s %s Failed to enable MO State!\n", + om2k_mo_name(&odm->o2h.mo), + get_value_string(om2k_msgcode_vals, odm->msg_type)); + } + update_mo_state(bts, &odm->o2h.mo, mo_state); return 0; -- To view, visit https://gerrit.osmocom.org/1163 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idfde8d6f71526e8acfea51835732515a4bee858e Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Wed Oct 26 12:21:22 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 26 Oct 2016 12:21:22 +0000 Subject: [PATCH] openbsc[master]: om2000: added support for ericssons sabm negotiation In-Reply-To: References: Message-ID: om2000: added support for ericssons sabm negotiation This patch adds support for ericssons sambm negotiation. This patch depends on libosmo-abis commit: 2788c7eacab91cd39d68e316fc8ee87763bbfeb4 Change-Id: I56b1c1cef07a61143fc0e8058480805cddfeff96 --- M openbsc/src/libbsc/bts_ericsson_rbs2000.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/62/1162/2 diff --git a/openbsc/src/libbsc/bts_ericsson_rbs2000.c b/openbsc/src/libbsc/bts_ericsson_rbs2000.c index 1d122ec..1300b4a 100644 --- a/openbsc/src/libbsc/bts_ericsson_rbs2000.c +++ b/openbsc/src/libbsc/bts_ericsson_rbs2000.c @@ -71,6 +71,9 @@ continue; llist_for_each_entry(link, &ts->sign.sign_links, list) { + lapd_instance_set_profile(ts->lapd, + &lapd_profile_abis_ericsson); + if (start) lapd_sap_start(ts->lapd, link->tei, link->sapi); else -- To view, visit https://gerrit.osmocom.org/1162 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I56b1c1cef07a61143fc0e8058480805cddfeff96 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed Oct 26 15:13:50 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 26 Oct 2016 15:13:50 +0000 Subject: [PATCH] osmo-bts[master]: Add tools to check DTX operation 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/1143 to look at the new patch set (#7). Add tools to check DTX operation * superfemto.sh can parse superfemto-compatible DSP log output to properly sort records into MT/MO and DL/UL parts * dtx_check.gawk can process output of superfemto.sh and check for common scheduling errors This allows to check lc15 and sysmo for errors in DTX DL scheduling. As dtx_check.gawk is generic it can be used with any other BTS hw (or virtula BTS) as long as raw logs from this hw can be converted to simple input format 'FN EVENT' per-line. Change-Id: Ib1c70c4543b24c2a05a7df8eec5ce3f4eda2c02e Related: OS#1801 --- A contrib/dtx_check.gawk A contrib/superfemto.sh 2 files changed, 176 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/43/1143/7 diff --git a/contrib/dtx_check.gawk b/contrib/dtx_check.gawk new file mode 100755 index 0000000..9e753e4 --- /dev/null +++ b/contrib/dtx_check.gawk @@ -0,0 +1,77 @@ +#!/usr/bin/gawk -f + +# Expected input format: FN TYPE + +BEGIN { + DELTA = 0 + ERR = 0 + FORCE = 0 + FN = 0 + SILENCE = 0 + TYPE = "" + CHK = "" + U_MAX = 8 * 20 + 120 / 26 + U_MIN = 8 * 20 - 120 / 26 + F_MAX = 3 * 20 + 120 / 26 + F_MIN = 3 * 20 - 120 / 26 +} + +{ + if (NR > 2) { # we have data from previous record to compare to + DELTA = ($1 - FN) * 120 / 26 + CHK = "OK" + if ("FACCH" == $2 && "ONSET" == TYPE) { # ONSET due to FACCH is NOT a talkspurt + SILENCE = 1 + } + if (("UPDATE" == TYPE || "FIRST" == TYPE) && ("FACCH" == $2 || "SPEECH" == $2)) { # check for missing ONSET: + CHK = "FAIL: missing ONSET (" $2 ") after " TYPE "." + ERR++ + } + if ("FORCED_FIRST" == $2 || "FORCED_NODATA" == $2) { + CHK = "FAIL: event " $2 " inserted by DSP." + FORCE++ + ERR++ + } + if ("OK" == CHK) { # check inter-SID distances: + if ("UPDATE" == TYPE) { + if (DELTA > U_MAX) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too big " DELTA "ms > " U_MAX "ms." + ERR++ + } + if ("UPDATE" == $2 && DELTA < U_MIN) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too small " DELTA "ms < " U_MIN "ms." + ERR++ + } + } + if ("FIRST" == TYPE) { + if (DELTA > F_MAX) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID FIRST (@" FN ") too big " DELTA "ms > " F_MAX "ms." + ERR++ + } + if ("UPDATE" == $2 && DELTA < F_MIN) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too small " DELTA "ms < " F_MIN "ms." + ERR++ + } + } + } + if ("FACCH" == TYPE && "FIRST" != $2 && 1 == SILENCE) { # check FACCH handling + CHK = "FAIL: incorrect silence resume after FACCH." + ERR++ + } + } + if ("SPEECH" == $2 || "ONSET" == $2) { # talkspurt + SILENCE = 0 + } + if ("UPDATE" == $2 || "FIRST" == $2) { # silence + SILENCE = 1 + } + print $1, $2, CHK, TYPE, DELTA, SILENCE + if ($2 != "EMPTY") { # skip over EMPTY records + TYPE = $2 + FN = $1 + } +} + +END { + print "Check completed: found " ERR " errors (" FORCE " events inserted by DSP) in " NR " records." +} diff --git a/contrib/superfemto.sh b/contrib/superfemto.sh new file mode 100755 index 0000000..cb871c0 --- /dev/null +++ b/contrib/superfemto.sh @@ -0,0 +1,99 @@ +#!/bin/sh + +# Split common DSP call log file (produced by superfemto-compatible firmware) into 4 separate call leg files (MO/MT & DL/UL) with events in format "FN EVENT_TYPE": +# MO Mobile Originated +# MT Mobile Terminated +# DL DownLink (BTS -> L1) +# UL UpLink (L1 -> BTS) + +if [ -z $1 ]; then + echo "expecting DSP log file name as parameter" + exit 1 +fi + +# MO handle appear 1st in the logs +MO=$(grep 'h=' $1 | head -n 1 | cut -f2 -d',' | cut -f2 -d= | cut -f1 -d']') + +# direction markers: +DLST="_CodeBurst" +ULST="_DecodeAndIdentify" + +# DL sed filters: +D_EMP='s/ Empty frame request!/EMPTY/' +D_FAC='s/ Coding a FACCH\/F frame !!/FACCH/' +D_FST='s/ Coding a RTP SID First frame !!/FIRST/' +D_UPD='s/ Coding a RTP SID Update frame !!/UPDATE/' +D_SPE='s/ Coding a RTP Speech frame !!/SPEECH/' +D_ONS='s/ Coding a Onset frame !!/ONSET/' +D_FO1='s/ A speech frame is following a NoData or SID First without an Onset./FORCED_FIRST/' +D_FO2='s/ A speech frame is following a NoData without an Onset./FORCED_NODATA/' + +# UL sed filters: +U_NOD='s/ It is a No Data frame !!/NODATA/' +U_ONS='s/ It is an ONSET frame !!/ONSET/' +U_UPD='s/ It is a SID UPDATE frame !!/UPDATE/' +U_FST='s/ It is a SID FIRST frame !!/FIRST/' +U_SPE='s/ It is a SPEECH frame !!/SPEECH/' + +DL () { # filter downlink-related entries + grep $DLST $1 > $1.DL.tmp +} + +UL () { # uplink does not require special fix + grep $ULST $1 > $1.UL.tmp.fix +} + +DL $1 +UL $1 + +FIX() { # add MO/MT marker from preceding line to inserted ONSETs so filtering works as expected + cat $1.DL.tmp | awk 'BEGIN{ FS="h="; H="" } { if (NF > 1) { H = $2; print $1 "h=" $2 } else { print $1 ", h=" H } }' > $1.DL.tmp.fix +} + +FIX $1 + +MO() { # filter MO call DL or UL logs + grep "h=$MO" $1.tmp.fix > $1.MO.raw +} + +MT() { # filter MT call DL or UL logs + grep -v "h=$MO" $1.tmp.fix > $1.MT.raw +} + +MO $1.DL +MT $1.DL +MO $1.UL +MT $1.UL + +PREP() { # prepare logs for reformatting + cat $1.raw | cut -f2 -d')' | cut -f1 -d',' | cut -f2 -d'>' | sed 's/\[u32Fn/fn/' | sed 's/fn = /fn=/' | sed 's/fn=//' | sed 's/\[Fn=//' | sed 's/ An Onset will be inserted.//' > $1.tmp1 +} + +PREP "$1.DL.MT" +PREP "$1.DL.MO" +PREP "$1.UL.MT" +PREP "$1.UL.MO" + +RD() { # reformat DL logs for consistency checks + cat $1.tmp1 | sed "$D_FST" | sed "$D_SPE" | sed "$D_UPD" | sed "$D_ONS" | sed "$D_EMP" | sed "$D_FAC" | sed "$D_FO1" | sed "$D_FO2" > $1.tmp2 +} + +RU() { # reformat UL logs for consistency checks + cat $1.tmp1 | sed "$U_FST" | sed "$U_SPE" | sed "$U_UPD" | sed "$U_ONS" | sed "$U_NOD" > $1.tmp2 +} + +RD "$1.DL.MT" +RD "$1.DL.MO" +RU "$1.UL.MT" +RU "$1.UL.MO" + +SW() { # swap fields + cat $1.tmp2 | awk '{ print $2, $1 }' > $1 +} + +SW "$1.DL.MT" +SW "$1.DL.MO" +SW "$1.UL.MT" +SW "$1.UL.MO" + +rm $1.*.tmp* -- To view, visit https://gerrit.osmocom.org/1143 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib1c70c4543b24c2a05a7df8eec5ce3f4eda2c02e Gerrit-PatchSet: 7 Gerrit-Project: osmo-bts 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 Wed Oct 26 15:29:28 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 26 Oct 2016 15:29:28 +0000 Subject: [PATCH] osmo-bts[master]: DTX DL: split ONSET state handling 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/1145 to look at the new patch set (#7). DTX DL: split ONSET state handling Handle ONSET cause by Voice and FACCH separately. In case of Voice we have RTP payload which we have to cache and send later on in next response to L1 RTS. FACCH have higher priority so it preempts both voice and silence alike - hence we can send ONSET immediately but still have to track previous state in order to get back to it gracefully. This affects lc15 and sysmo hw as there's no FSM-based DTX implementation for other models yet. Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Related: OS#1801 --- M include/osmo-bts/dtx_dl_amr_fsm.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 7 files changed, 99 insertions(+), 32 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/45/1145/7 diff --git a/include/osmo-bts/dtx_dl_amr_fsm.h b/include/osmo-bts/dtx_dl_amr_fsm.h index 8b19595..5c13c19 100644 --- a/include/osmo-bts/dtx_dl_amr_fsm.h +++ b/include/osmo-bts/dtx_dl_amr_fsm.h @@ -16,7 +16,6 @@ ST_U_INH, ST_SID_U, ST_ONSET_V, - ST_ONSET_F, ST_FACCH_V, ST_FACCH, }; diff --git a/src/common/dtx_dl_amr_fsm.c b/src/common/dtx_dl_amr_fsm.c index b110cf2..a75fd00 100644 --- a/src/common/dtx_dl_amr_fsm.c +++ b/src/common/dtx_dl_amr_fsm.c @@ -53,7 +53,7 @@ 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_FACCH, 0, 0); break; case E_COMPL: osmo_fsm_inst_state_chg(fi, ST_SID_F2, 0, 0); @@ -81,7 +81,7 @@ 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_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -97,7 +97,7 @@ osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -113,7 +113,7 @@ osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -126,7 +126,7 @@ { switch (event) { case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; case E_VOICE: osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); @@ -234,7 +234,7 @@ 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), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_FACCH) | X(ST_SID_F2) | X(ST_F1_INH) | X(ST_ONSET_V), .name = "SID-FIRST (P1)", .action = dtx_fsm_sid_f1, }, @@ -242,7 +242,7 @@ 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), - .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_ONSET_F), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_FACCH), .name = "SID-FIRST (P2)", .action = dtx_fsm_sid_f2, }, @@ -265,7 +265,7 @@ /* 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), + .out_state_mask = X(ST_FACCH) | X(ST_VOICE) | X(ST_U_INH) | X(ST_SID_U) | X(ST_ONSET_V), .name = "SID-UPDATE", .action = dtx_fsm_sid_upd, }, @@ -275,13 +275,6 @@ .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), .name = "ONSET (SPEECH)", .action = dtx_fsm_onset_v, - }, - /* ONSET - end of silent period due to incoming FACCH frame */ - [ST_ONSET_F]= { - .in_event_mask = X(E_VOICE) | X(E_FACCH) | X(E_SID_U), - .out_state_mask = X(ST_VOICE) | X(ST_FACCH), - .name = "ONSET (FACCH)", - .action = dtx_fsm_onset_f, }, /* FACCH sending state: SPEECH was observed before so once we're done FSM should get back to VOICE state */ diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 9c6f20f..b21bfac 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -226,6 +226,10 @@ /* Compute approx. time delta x26 based on Fn duration */ uint32_t dx26 = 120 * (fn - lchan->tch.dtx.fn); + /* We're resuming after FACCH interruption */ + if (lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) + return false; + /* according to 3GPP TS 26.093 A.5.1.1: (*26) to avoid float math, add 1 FN tolerance (-120) */ if (lchan->tch.dtx.is_update) { /* SID UPDATE: every 8th RTP frame */ diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index f47634e..b6f35b7 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -53,6 +53,7 @@ #include #include #include +#include #include #include @@ -330,13 +331,15 @@ } static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache) { struct lc15l1_hdl *fl1 = trx_lc15l1_hdl(trx); struct msgb *l1msg = l1p_msgb_alloc(); + struct gsm_lchan *lchan; uint32_t u32Fn; uint8_t u8Tn, subCh, u8BlockNbr = 0, sapi = 0; uint8_t chan_nr, link_id; + bool rec = false; int len; if (!msg) { @@ -401,14 +404,46 @@ if (len) { /* data request */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); + lchan = get_lchan_by_chan_nr(trx, chan_nr); + + if (use_cache) + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, + lchan->tch.dtx.facch, msgb_l2len(msg)); + else if (trx->bts->dtxd && lchan->tch.dtx.dl_amr_fsm && + lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + if (sapi == GsmL1_Sapi_FacchF) { + sapi = GsmL1_Sapi_TchF; + } + if (sapi == GsmL1_Sapi_FacchH) { + sapi = GsmL1_Sapi_TchH; + } + if (sapi == GsmL1_Sapi_TchH || sapi == GsmL1_Sapi_TchF) { + /* FACCH interruption of DTX silence */ + /* cache FACCH data */ + memcpy(lchan->tch.dtx.facch, msg->l2h, + msgb_l2len(msg)); + /* prepare ONSET message */ + len = 3; + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_Onset; + /* ignored CMR/CMI pair */ + l1p->u.phDataReq.msgUnitParam.u8Buffer[1] = 0; + l1p->u.phDataReq.msgUnitParam.u8Buffer[2] = 0; + /* ONSET is ready, recursive call is necessary */ + rec = true; + } + } data_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr, len); - OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); - memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, msgb_l2len(msg)); + if (!rec && !use_cache) { + OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, + msgb_l2len(msg)); + } LOGP(DL1P, LOGL_DEBUG, "PH-DATA.req(%s)\n", - osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, - l1p->u.phDataReq.msgUnitParam.u8Size)); + osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, + l1p->u.phDataReq.msgUnitParam.u8Size)); } else { /* empty frame */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); @@ -422,6 +457,8 @@ msgb_free(l1msg); } + if (rec) + ph_data_req(trx, msg, l1sap, true); return 0; } @@ -566,7 +603,7 @@ * free()d below */ switch (OSMO_PRIM_HDR(&l1sap->oph)) { case OSMO_PRIM(PRIM_PH_DATA, PRIM_OP_REQUEST): - rc = ph_data_req(trx, msg, l1sap); + rc = ph_data_req(trx, msg, l1sap, false); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index b251388..2565e23 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -285,10 +285,9 @@ /* DTX DL-specific logic below: */ switch (lchan->tch.dtx.dl_amr_fsm->state) { case ST_ONSET_V: - case ST_ONSET_F: *payload_type = GsmL1_TchPlType_Amr_Onset; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); - *len = 1; + *len = 3; return 1; case ST_VOICE: *payload_type = GsmL1_TchPlType_Amr; diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index bef2d30..8729c89 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -325,13 +325,15 @@ } static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache) { struct femtol1_hdl *fl1 = trx_femtol1_hdl(trx); struct msgb *l1msg = l1p_msgb_alloc(); + struct gsm_lchan *lchan; uint32_t u32Fn; uint8_t u8Tn, subCh, u8BlockNbr = 0, sapi = 0; uint8_t chan_nr, link_id; + bool rec = false; int len; if (!msg) { @@ -396,14 +398,46 @@ if (len) { /* data request */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); + lchan = get_lchan_by_chan_nr(trx, chan_nr); + + if (use_cache) + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, + lchan->tch.dtx.facch, msgb_l2len(msg)); + else if (trx->bts->dtxd && lchan->tch.dtx.dl_amr_fsm && + lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + if (sapi == GsmL1_Sapi_FacchF) { + sapi = GsmL1_Sapi_TchF; + } + if (sapi == GsmL1_Sapi_FacchH) { + sapi = GsmL1_Sapi_TchH; + } + if (sapi == GsmL1_Sapi_TchH || sapi == GsmL1_Sapi_TchF) { + /* FACCH interruption of DTX silence */ + /* cache FACCH data */ + memcpy(lchan->tch.dtx.facch, msg->l2h, + msgb_l2len(msg)); + /* prepare ONSET message */ + len = 3; + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_Onset; + /* ignored CMR/CMI pair */ + l1p->u.phDataReq.msgUnitParam.u8Buffer[1] = 0; + l1p->u.phDataReq.msgUnitParam.u8Buffer[2] = 0; + /* ONSET is ready, recursive call is necessary */ + rec = true; + } + } data_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr, len); - OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); - memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, msgb_l2len(msg)); + if (!rec && !use_cache) { + OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, + msgb_l2len(msg)); + } LOGP(DL1P, LOGL_DEBUG, "PH-DATA.req(%s)\n", - osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, - l1p->u.phDataReq.msgUnitParam.u8Size)); + osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, + l1p->u.phDataReq.msgUnitParam.u8Size)); } else { /* empty frame */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); @@ -417,6 +451,8 @@ msgb_free(l1msg); } + if (rec) + ph_data_req(trx, msg, l1sap, true); return 0; } @@ -561,7 +597,7 @@ * free()d below */ switch (OSMO_PRIM_HDR(&l1sap->oph)) { case OSMO_PRIM(PRIM_PH_DATA, PRIM_OP_REQUEST): - rc = ph_data_req(trx, msg, l1sap); + rc = ph_data_req(trx, msg, l1sap, false); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index b08ba7e..5e517e9 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -383,10 +383,9 @@ /* DTX DL-specific logic below: */ switch (lchan->tch.dtx.dl_amr_fsm->state) { case ST_ONSET_V: - case ST_ONSET_F: *payload_type = GsmL1_TchPlType_Amr_Onset; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); - *len = 1; + *len = 3; return 1; case ST_VOICE: *payload_type = GsmL1_TchPlType_Amr; -- To view, visit https://gerrit.osmocom.org/1145 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Gerrit-PatchSet: 7 Gerrit-Project: osmo-bts 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 Wed Oct 26 15:34:24 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 26 Oct 2016 15:34:24 +0000 Subject: [PATCH] osmo-bts[master]: Add tools to check DTX operation 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/1143 to look at the new patch set (#9). Add tools to check DTX operation * superfemto.sh can parse superfemto-compatible DSP log output to properly sort records into MT/MO and DL/UL parts * dtx_check.gawk can process output of superfemto.sh and check for common scheduling errors This allows to check lc15 and sysmo for errors in DTX DL scheduling. As dtx_check.gawk is generic it can be used with any other BTS hw (or virtual BTS) as long as raw logs from this hw can be converted to simple input format 'FN EVENT' per-line. Change-Id: Ib1c70c4543b24c2a05a7df8eec5ce3f4eda2c02e Related: OS#1801 --- A contrib/dtx_check.gawk A contrib/superfemto.sh 2 files changed, 176 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/43/1143/9 diff --git a/contrib/dtx_check.gawk b/contrib/dtx_check.gawk new file mode 100755 index 0000000..9e753e4 --- /dev/null +++ b/contrib/dtx_check.gawk @@ -0,0 +1,77 @@ +#!/usr/bin/gawk -f + +# Expected input format: FN TYPE + +BEGIN { + DELTA = 0 + ERR = 0 + FORCE = 0 + FN = 0 + SILENCE = 0 + TYPE = "" + CHK = "" + U_MAX = 8 * 20 + 120 / 26 + U_MIN = 8 * 20 - 120 / 26 + F_MAX = 3 * 20 + 120 / 26 + F_MIN = 3 * 20 - 120 / 26 +} + +{ + if (NR > 2) { # we have data from previous record to compare to + DELTA = ($1 - FN) * 120 / 26 + CHK = "OK" + if ("FACCH" == $2 && "ONSET" == TYPE) { # ONSET due to FACCH is NOT a talkspurt + SILENCE = 1 + } + if (("UPDATE" == TYPE || "FIRST" == TYPE) && ("FACCH" == $2 || "SPEECH" == $2)) { # check for missing ONSET: + CHK = "FAIL: missing ONSET (" $2 ") after " TYPE "." + ERR++ + } + if ("FORCED_FIRST" == $2 || "FORCED_NODATA" == $2) { + CHK = "FAIL: event " $2 " inserted by DSP." + FORCE++ + ERR++ + } + if ("OK" == CHK) { # check inter-SID distances: + if ("UPDATE" == TYPE) { + if (DELTA > U_MAX) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too big " DELTA "ms > " U_MAX "ms." + ERR++ + } + if ("UPDATE" == $2 && DELTA < U_MIN) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too small " DELTA "ms < " U_MIN "ms." + ERR++ + } + } + if ("FIRST" == TYPE) { + if (DELTA > F_MAX) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID FIRST (@" FN ") too big " DELTA "ms > " F_MAX "ms." + ERR++ + } + if ("UPDATE" == $2 && DELTA < F_MIN) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too small " DELTA "ms < " F_MIN "ms." + ERR++ + } + } + } + if ("FACCH" == TYPE && "FIRST" != $2 && 1 == SILENCE) { # check FACCH handling + CHK = "FAIL: incorrect silence resume after FACCH." + ERR++ + } + } + if ("SPEECH" == $2 || "ONSET" == $2) { # talkspurt + SILENCE = 0 + } + if ("UPDATE" == $2 || "FIRST" == $2) { # silence + SILENCE = 1 + } + print $1, $2, CHK, TYPE, DELTA, SILENCE + if ($2 != "EMPTY") { # skip over EMPTY records + TYPE = $2 + FN = $1 + } +} + +END { + print "Check completed: found " ERR " errors (" FORCE " events inserted by DSP) in " NR " records." +} diff --git a/contrib/superfemto.sh b/contrib/superfemto.sh new file mode 100755 index 0000000..cb871c0 --- /dev/null +++ b/contrib/superfemto.sh @@ -0,0 +1,99 @@ +#!/bin/sh + +# Split common DSP call log file (produced by superfemto-compatible firmware) into 4 separate call leg files (MO/MT & DL/UL) with events in format "FN EVENT_TYPE": +# MO Mobile Originated +# MT Mobile Terminated +# DL DownLink (BTS -> L1) +# UL UpLink (L1 -> BTS) + +if [ -z $1 ]; then + echo "expecting DSP log file name as parameter" + exit 1 +fi + +# MO handle appear 1st in the logs +MO=$(grep 'h=' $1 | head -n 1 | cut -f2 -d',' | cut -f2 -d= | cut -f1 -d']') + +# direction markers: +DLST="_CodeBurst" +ULST="_DecodeAndIdentify" + +# DL sed filters: +D_EMP='s/ Empty frame request!/EMPTY/' +D_FAC='s/ Coding a FACCH\/F frame !!/FACCH/' +D_FST='s/ Coding a RTP SID First frame !!/FIRST/' +D_UPD='s/ Coding a RTP SID Update frame !!/UPDATE/' +D_SPE='s/ Coding a RTP Speech frame !!/SPEECH/' +D_ONS='s/ Coding a Onset frame !!/ONSET/' +D_FO1='s/ A speech frame is following a NoData or SID First without an Onset./FORCED_FIRST/' +D_FO2='s/ A speech frame is following a NoData without an Onset./FORCED_NODATA/' + +# UL sed filters: +U_NOD='s/ It is a No Data frame !!/NODATA/' +U_ONS='s/ It is an ONSET frame !!/ONSET/' +U_UPD='s/ It is a SID UPDATE frame !!/UPDATE/' +U_FST='s/ It is a SID FIRST frame !!/FIRST/' +U_SPE='s/ It is a SPEECH frame !!/SPEECH/' + +DL () { # filter downlink-related entries + grep $DLST $1 > $1.DL.tmp +} + +UL () { # uplink does not require special fix + grep $ULST $1 > $1.UL.tmp.fix +} + +DL $1 +UL $1 + +FIX() { # add MO/MT marker from preceding line to inserted ONSETs so filtering works as expected + cat $1.DL.tmp | awk 'BEGIN{ FS="h="; H="" } { if (NF > 1) { H = $2; print $1 "h=" $2 } else { print $1 ", h=" H } }' > $1.DL.tmp.fix +} + +FIX $1 + +MO() { # filter MO call DL or UL logs + grep "h=$MO" $1.tmp.fix > $1.MO.raw +} + +MT() { # filter MT call DL or UL logs + grep -v "h=$MO" $1.tmp.fix > $1.MT.raw +} + +MO $1.DL +MT $1.DL +MO $1.UL +MT $1.UL + +PREP() { # prepare logs for reformatting + cat $1.raw | cut -f2 -d')' | cut -f1 -d',' | cut -f2 -d'>' | sed 's/\[u32Fn/fn/' | sed 's/fn = /fn=/' | sed 's/fn=//' | sed 's/\[Fn=//' | sed 's/ An Onset will be inserted.//' > $1.tmp1 +} + +PREP "$1.DL.MT" +PREP "$1.DL.MO" +PREP "$1.UL.MT" +PREP "$1.UL.MO" + +RD() { # reformat DL logs for consistency checks + cat $1.tmp1 | sed "$D_FST" | sed "$D_SPE" | sed "$D_UPD" | sed "$D_ONS" | sed "$D_EMP" | sed "$D_FAC" | sed "$D_FO1" | sed "$D_FO2" > $1.tmp2 +} + +RU() { # reformat UL logs for consistency checks + cat $1.tmp1 | sed "$U_FST" | sed "$U_SPE" | sed "$U_UPD" | sed "$U_ONS" | sed "$U_NOD" > $1.tmp2 +} + +RD "$1.DL.MT" +RD "$1.DL.MO" +RU "$1.UL.MT" +RU "$1.UL.MO" + +SW() { # swap fields + cat $1.tmp2 | awk '{ print $2, $1 }' > $1 +} + +SW "$1.DL.MT" +SW "$1.DL.MO" +SW "$1.UL.MT" +SW "$1.UL.MO" + +rm $1.*.tmp* -- To view, visit https://gerrit.osmocom.org/1143 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib1c70c4543b24c2a05a7df8eec5ce3f4eda2c02e Gerrit-PatchSet: 9 Gerrit-Project: osmo-bts 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 Wed Oct 26 15:34:24 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 26 Oct 2016 15:34:24 +0000 Subject: [PATCH] osmo-bts[master]: DTX DL: split ONSET state handling 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/1145 to look at the new patch set (#8). DTX DL: split ONSET state handling Handle ONSET cause by Voice and FACCH separately. In case of Voice we have RTP payload which we have to cache and send later on in next response to L1 RTS. FACCH have higher priority so it preempts both voice and silence alike - hence we can send ONSET immediately but still have to track previous state in order to get back to it gracefully. This affects lc15 and sysmo hw as there's no FSM-based DTX implementation for other models yet. Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Related: OS#1802 --- M include/osmo-bts/dtx_dl_amr_fsm.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 7 files changed, 99 insertions(+), 32 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/45/1145/8 diff --git a/include/osmo-bts/dtx_dl_amr_fsm.h b/include/osmo-bts/dtx_dl_amr_fsm.h index 8b19595..5c13c19 100644 --- a/include/osmo-bts/dtx_dl_amr_fsm.h +++ b/include/osmo-bts/dtx_dl_amr_fsm.h @@ -16,7 +16,6 @@ ST_U_INH, ST_SID_U, ST_ONSET_V, - ST_ONSET_F, ST_FACCH_V, ST_FACCH, }; diff --git a/src/common/dtx_dl_amr_fsm.c b/src/common/dtx_dl_amr_fsm.c index b110cf2..a75fd00 100644 --- a/src/common/dtx_dl_amr_fsm.c +++ b/src/common/dtx_dl_amr_fsm.c @@ -53,7 +53,7 @@ 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_FACCH, 0, 0); break; case E_COMPL: osmo_fsm_inst_state_chg(fi, ST_SID_F2, 0, 0); @@ -81,7 +81,7 @@ 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_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -97,7 +97,7 @@ osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -113,7 +113,7 @@ osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -126,7 +126,7 @@ { switch (event) { case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; case E_VOICE: osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); @@ -234,7 +234,7 @@ 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), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_FACCH) | X(ST_SID_F2) | X(ST_F1_INH) | X(ST_ONSET_V), .name = "SID-FIRST (P1)", .action = dtx_fsm_sid_f1, }, @@ -242,7 +242,7 @@ 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), - .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_ONSET_F), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_FACCH), .name = "SID-FIRST (P2)", .action = dtx_fsm_sid_f2, }, @@ -265,7 +265,7 @@ /* 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), + .out_state_mask = X(ST_FACCH) | X(ST_VOICE) | X(ST_U_INH) | X(ST_SID_U) | X(ST_ONSET_V), .name = "SID-UPDATE", .action = dtx_fsm_sid_upd, }, @@ -275,13 +275,6 @@ .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), .name = "ONSET (SPEECH)", .action = dtx_fsm_onset_v, - }, - /* ONSET - end of silent period due to incoming FACCH frame */ - [ST_ONSET_F]= { - .in_event_mask = X(E_VOICE) | X(E_FACCH) | X(E_SID_U), - .out_state_mask = X(ST_VOICE) | X(ST_FACCH), - .name = "ONSET (FACCH)", - .action = dtx_fsm_onset_f, }, /* FACCH sending state: SPEECH was observed before so once we're done FSM should get back to VOICE state */ diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 9c6f20f..b21bfac 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -226,6 +226,10 @@ /* Compute approx. time delta x26 based on Fn duration */ uint32_t dx26 = 120 * (fn - lchan->tch.dtx.fn); + /* We're resuming after FACCH interruption */ + if (lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) + return false; + /* according to 3GPP TS 26.093 A.5.1.1: (*26) to avoid float math, add 1 FN tolerance (-120) */ if (lchan->tch.dtx.is_update) { /* SID UPDATE: every 8th RTP frame */ diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index f47634e..b6f35b7 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -53,6 +53,7 @@ #include #include #include +#include #include #include @@ -330,13 +331,15 @@ } static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache) { struct lc15l1_hdl *fl1 = trx_lc15l1_hdl(trx); struct msgb *l1msg = l1p_msgb_alloc(); + struct gsm_lchan *lchan; uint32_t u32Fn; uint8_t u8Tn, subCh, u8BlockNbr = 0, sapi = 0; uint8_t chan_nr, link_id; + bool rec = false; int len; if (!msg) { @@ -401,14 +404,46 @@ if (len) { /* data request */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); + lchan = get_lchan_by_chan_nr(trx, chan_nr); + + if (use_cache) + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, + lchan->tch.dtx.facch, msgb_l2len(msg)); + else if (trx->bts->dtxd && lchan->tch.dtx.dl_amr_fsm && + lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + if (sapi == GsmL1_Sapi_FacchF) { + sapi = GsmL1_Sapi_TchF; + } + if (sapi == GsmL1_Sapi_FacchH) { + sapi = GsmL1_Sapi_TchH; + } + if (sapi == GsmL1_Sapi_TchH || sapi == GsmL1_Sapi_TchF) { + /* FACCH interruption of DTX silence */ + /* cache FACCH data */ + memcpy(lchan->tch.dtx.facch, msg->l2h, + msgb_l2len(msg)); + /* prepare ONSET message */ + len = 3; + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_Onset; + /* ignored CMR/CMI pair */ + l1p->u.phDataReq.msgUnitParam.u8Buffer[1] = 0; + l1p->u.phDataReq.msgUnitParam.u8Buffer[2] = 0; + /* ONSET is ready, recursive call is necessary */ + rec = true; + } + } data_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr, len); - OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); - memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, msgb_l2len(msg)); + if (!rec && !use_cache) { + OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, + msgb_l2len(msg)); + } LOGP(DL1P, LOGL_DEBUG, "PH-DATA.req(%s)\n", - osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, - l1p->u.phDataReq.msgUnitParam.u8Size)); + osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, + l1p->u.phDataReq.msgUnitParam.u8Size)); } else { /* empty frame */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); @@ -422,6 +457,8 @@ msgb_free(l1msg); } + if (rec) + ph_data_req(trx, msg, l1sap, true); return 0; } @@ -566,7 +603,7 @@ * free()d below */ switch (OSMO_PRIM_HDR(&l1sap->oph)) { case OSMO_PRIM(PRIM_PH_DATA, PRIM_OP_REQUEST): - rc = ph_data_req(trx, msg, l1sap); + rc = ph_data_req(trx, msg, l1sap, false); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index b251388..2565e23 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -285,10 +285,9 @@ /* DTX DL-specific logic below: */ switch (lchan->tch.dtx.dl_amr_fsm->state) { case ST_ONSET_V: - case ST_ONSET_F: *payload_type = GsmL1_TchPlType_Amr_Onset; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); - *len = 1; + *len = 3; return 1; case ST_VOICE: *payload_type = GsmL1_TchPlType_Amr; diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index bef2d30..8729c89 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -325,13 +325,15 @@ } static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache) { struct femtol1_hdl *fl1 = trx_femtol1_hdl(trx); struct msgb *l1msg = l1p_msgb_alloc(); + struct gsm_lchan *lchan; uint32_t u32Fn; uint8_t u8Tn, subCh, u8BlockNbr = 0, sapi = 0; uint8_t chan_nr, link_id; + bool rec = false; int len; if (!msg) { @@ -396,14 +398,46 @@ if (len) { /* data request */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); + lchan = get_lchan_by_chan_nr(trx, chan_nr); + + if (use_cache) + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, + lchan->tch.dtx.facch, msgb_l2len(msg)); + else if (trx->bts->dtxd && lchan->tch.dtx.dl_amr_fsm && + lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + if (sapi == GsmL1_Sapi_FacchF) { + sapi = GsmL1_Sapi_TchF; + } + if (sapi == GsmL1_Sapi_FacchH) { + sapi = GsmL1_Sapi_TchH; + } + if (sapi == GsmL1_Sapi_TchH || sapi == GsmL1_Sapi_TchF) { + /* FACCH interruption of DTX silence */ + /* cache FACCH data */ + memcpy(lchan->tch.dtx.facch, msg->l2h, + msgb_l2len(msg)); + /* prepare ONSET message */ + len = 3; + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_Onset; + /* ignored CMR/CMI pair */ + l1p->u.phDataReq.msgUnitParam.u8Buffer[1] = 0; + l1p->u.phDataReq.msgUnitParam.u8Buffer[2] = 0; + /* ONSET is ready, recursive call is necessary */ + rec = true; + } + } data_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr, len); - OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); - memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, msgb_l2len(msg)); + if (!rec && !use_cache) { + OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, + msgb_l2len(msg)); + } LOGP(DL1P, LOGL_DEBUG, "PH-DATA.req(%s)\n", - osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, - l1p->u.phDataReq.msgUnitParam.u8Size)); + osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, + l1p->u.phDataReq.msgUnitParam.u8Size)); } else { /* empty frame */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); @@ -417,6 +451,8 @@ msgb_free(l1msg); } + if (rec) + ph_data_req(trx, msg, l1sap, true); return 0; } @@ -561,7 +597,7 @@ * free()d below */ switch (OSMO_PRIM_HDR(&l1sap->oph)) { case OSMO_PRIM(PRIM_PH_DATA, PRIM_OP_REQUEST): - rc = ph_data_req(trx, msg, l1sap); + rc = ph_data_req(trx, msg, l1sap, false); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index b08ba7e..5e517e9 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -383,10 +383,9 @@ /* DTX DL-specific logic below: */ switch (lchan->tch.dtx.dl_amr_fsm->state) { case ST_ONSET_V: - case ST_ONSET_F: *payload_type = GsmL1_TchPlType_Amr_Onset; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); - *len = 1; + *len = 3; return 1; case ST_VOICE: *payload_type = GsmL1_TchPlType_Amr; -- To view, visit https://gerrit.osmocom.org/1145 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Gerrit-PatchSet: 8 Gerrit-Project: osmo-bts 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 Wed Oct 26 16:12:13 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 26 Oct 2016 16:12:13 +0000 Subject: [PATCH] osmo-bts[master]: DTX DL: split ONSET state handling 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/1145 to look at the new patch set (#9). DTX DL: split ONSET state handling Handle ONSET cause by Voice and FACCH separately. In case of Voice we have RTP payload which we have to cache and send later on in next response to L1 RTS. FACCH have higher priority so it preempts both voice and silence alike - hence we can send ONSET immediately but still have to track previous state in order to get back to it gracefully. This affects lc15 and sysmo hw as there's no FSM-based DTX implementation for other models yet. Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Related: OS#1802 --- M include/osmo-bts/dtx_dl_amr_fsm.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 7 files changed, 106 insertions(+), 34 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/45/1145/9 diff --git a/include/osmo-bts/dtx_dl_amr_fsm.h b/include/osmo-bts/dtx_dl_amr_fsm.h index 8b19595..5c13c19 100644 --- a/include/osmo-bts/dtx_dl_amr_fsm.h +++ b/include/osmo-bts/dtx_dl_amr_fsm.h @@ -16,7 +16,6 @@ ST_U_INH, ST_SID_U, ST_ONSET_V, - ST_ONSET_F, ST_FACCH_V, ST_FACCH, }; diff --git a/src/common/dtx_dl_amr_fsm.c b/src/common/dtx_dl_amr_fsm.c index b110cf2..a75fd00 100644 --- a/src/common/dtx_dl_amr_fsm.c +++ b/src/common/dtx_dl_amr_fsm.c @@ -53,7 +53,7 @@ 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_FACCH, 0, 0); break; case E_COMPL: osmo_fsm_inst_state_chg(fi, ST_SID_F2, 0, 0); @@ -81,7 +81,7 @@ 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_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -97,7 +97,7 @@ osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -113,7 +113,7 @@ osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -126,7 +126,7 @@ { switch (event) { case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; case E_VOICE: osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); @@ -234,7 +234,7 @@ 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), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_FACCH) | X(ST_SID_F2) | X(ST_F1_INH) | X(ST_ONSET_V), .name = "SID-FIRST (P1)", .action = dtx_fsm_sid_f1, }, @@ -242,7 +242,7 @@ 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), - .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_ONSET_F), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_FACCH), .name = "SID-FIRST (P2)", .action = dtx_fsm_sid_f2, }, @@ -265,7 +265,7 @@ /* 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), + .out_state_mask = X(ST_FACCH) | X(ST_VOICE) | X(ST_U_INH) | X(ST_SID_U) | X(ST_ONSET_V), .name = "SID-UPDATE", .action = dtx_fsm_sid_upd, }, @@ -275,13 +275,6 @@ .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), .name = "ONSET (SPEECH)", .action = dtx_fsm_onset_v, - }, - /* ONSET - end of silent period due to incoming FACCH frame */ - [ST_ONSET_F]= { - .in_event_mask = X(E_VOICE) | X(E_FACCH) | X(E_SID_U), - .out_state_mask = X(ST_VOICE) | X(ST_FACCH), - .name = "ONSET (FACCH)", - .action = dtx_fsm_onset_f, }, /* FACCH sending state: SPEECH was observed before so once we're done FSM should get back to VOICE state */ diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 9c6f20f..6816855 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -220,12 +220,21 @@ * \param[in] fn Frame Number for which we check scheduling * \returns true if transmission can be omitted, false otherwise */ -static inline bool dtx_amr_sid_optional(const struct gsm_lchan *lchan, - uint32_t fn) +static inline bool dtx_amr_sid_optional(struct gsm_lchan *lchan, uint32_t fn) { /* Compute approx. time delta x26 based on Fn duration */ uint32_t dx26 = 120 * (fn - lchan->tch.dtx.fn); + /* We're resuming after FACCH interruption */ + if (lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + /* force STI bit to 1 so cache is treated as SID FIRST */ + lchan->tch.dtx.cache[6 + 2] |= 1 << 4; + lchan->tch.dtx.is_update = false; + osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, E_SID_F, + (void *)lchan); + return false; + } + /* according to 3GPP TS 26.093 A.5.1.1: (*26) to avoid float math, add 1 FN tolerance (-120) */ if (lchan->tch.dtx.is_update) { /* SID UPDATE: every 8th RTP frame */ diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index f47634e..b6f35b7 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -53,6 +53,7 @@ #include #include #include +#include #include #include @@ -330,13 +331,15 @@ } static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache) { struct lc15l1_hdl *fl1 = trx_lc15l1_hdl(trx); struct msgb *l1msg = l1p_msgb_alloc(); + struct gsm_lchan *lchan; uint32_t u32Fn; uint8_t u8Tn, subCh, u8BlockNbr = 0, sapi = 0; uint8_t chan_nr, link_id; + bool rec = false; int len; if (!msg) { @@ -401,14 +404,46 @@ if (len) { /* data request */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); + lchan = get_lchan_by_chan_nr(trx, chan_nr); + + if (use_cache) + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, + lchan->tch.dtx.facch, msgb_l2len(msg)); + else if (trx->bts->dtxd && lchan->tch.dtx.dl_amr_fsm && + lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + if (sapi == GsmL1_Sapi_FacchF) { + sapi = GsmL1_Sapi_TchF; + } + if (sapi == GsmL1_Sapi_FacchH) { + sapi = GsmL1_Sapi_TchH; + } + if (sapi == GsmL1_Sapi_TchH || sapi == GsmL1_Sapi_TchF) { + /* FACCH interruption of DTX silence */ + /* cache FACCH data */ + memcpy(lchan->tch.dtx.facch, msg->l2h, + msgb_l2len(msg)); + /* prepare ONSET message */ + len = 3; + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_Onset; + /* ignored CMR/CMI pair */ + l1p->u.phDataReq.msgUnitParam.u8Buffer[1] = 0; + l1p->u.phDataReq.msgUnitParam.u8Buffer[2] = 0; + /* ONSET is ready, recursive call is necessary */ + rec = true; + } + } data_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr, len); - OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); - memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, msgb_l2len(msg)); + if (!rec && !use_cache) { + OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, + msgb_l2len(msg)); + } LOGP(DL1P, LOGL_DEBUG, "PH-DATA.req(%s)\n", - osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, - l1p->u.phDataReq.msgUnitParam.u8Size)); + osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, + l1p->u.phDataReq.msgUnitParam.u8Size)); } else { /* empty frame */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); @@ -422,6 +457,8 @@ msgb_free(l1msg); } + if (rec) + ph_data_req(trx, msg, l1sap, true); return 0; } @@ -566,7 +603,7 @@ * free()d below */ switch (OSMO_PRIM_HDR(&l1sap->oph)) { case OSMO_PRIM(PRIM_PH_DATA, PRIM_OP_REQUEST): - rc = ph_data_req(trx, msg, l1sap); + rc = ph_data_req(trx, msg, l1sap, false); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index b251388..2565e23 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -285,10 +285,9 @@ /* DTX DL-specific logic below: */ switch (lchan->tch.dtx.dl_amr_fsm->state) { case ST_ONSET_V: - case ST_ONSET_F: *payload_type = GsmL1_TchPlType_Amr_Onset; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); - *len = 1; + *len = 3; return 1; case ST_VOICE: *payload_type = GsmL1_TchPlType_Amr; diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index bef2d30..8729c89 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -325,13 +325,15 @@ } static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache) { struct femtol1_hdl *fl1 = trx_femtol1_hdl(trx); struct msgb *l1msg = l1p_msgb_alloc(); + struct gsm_lchan *lchan; uint32_t u32Fn; uint8_t u8Tn, subCh, u8BlockNbr = 0, sapi = 0; uint8_t chan_nr, link_id; + bool rec = false; int len; if (!msg) { @@ -396,14 +398,46 @@ if (len) { /* data request */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); + lchan = get_lchan_by_chan_nr(trx, chan_nr); + + if (use_cache) + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, + lchan->tch.dtx.facch, msgb_l2len(msg)); + else if (trx->bts->dtxd && lchan->tch.dtx.dl_amr_fsm && + lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + if (sapi == GsmL1_Sapi_FacchF) { + sapi = GsmL1_Sapi_TchF; + } + if (sapi == GsmL1_Sapi_FacchH) { + sapi = GsmL1_Sapi_TchH; + } + if (sapi == GsmL1_Sapi_TchH || sapi == GsmL1_Sapi_TchF) { + /* FACCH interruption of DTX silence */ + /* cache FACCH data */ + memcpy(lchan->tch.dtx.facch, msg->l2h, + msgb_l2len(msg)); + /* prepare ONSET message */ + len = 3; + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_Onset; + /* ignored CMR/CMI pair */ + l1p->u.phDataReq.msgUnitParam.u8Buffer[1] = 0; + l1p->u.phDataReq.msgUnitParam.u8Buffer[2] = 0; + /* ONSET is ready, recursive call is necessary */ + rec = true; + } + } data_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr, len); - OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); - memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, msgb_l2len(msg)); + if (!rec && !use_cache) { + OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, + msgb_l2len(msg)); + } LOGP(DL1P, LOGL_DEBUG, "PH-DATA.req(%s)\n", - osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, - l1p->u.phDataReq.msgUnitParam.u8Size)); + osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, + l1p->u.phDataReq.msgUnitParam.u8Size)); } else { /* empty frame */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); @@ -417,6 +451,8 @@ msgb_free(l1msg); } + if (rec) + ph_data_req(trx, msg, l1sap, true); return 0; } @@ -561,7 +597,7 @@ * free()d below */ switch (OSMO_PRIM_HDR(&l1sap->oph)) { case OSMO_PRIM(PRIM_PH_DATA, PRIM_OP_REQUEST): - rc = ph_data_req(trx, msg, l1sap); + rc = ph_data_req(trx, msg, l1sap, false); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index b08ba7e..5e517e9 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -383,10 +383,9 @@ /* DTX DL-specific logic below: */ switch (lchan->tch.dtx.dl_amr_fsm->state) { case ST_ONSET_V: - case ST_ONSET_F: *payload_type = GsmL1_TchPlType_Amr_Onset; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); - *len = 1; + *len = 3; return 1; case ST_VOICE: *payload_type = GsmL1_TchPlType_Amr; -- To view, visit https://gerrit.osmocom.org/1145 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Gerrit-PatchSet: 9 Gerrit-Project: osmo-bts 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 Wed Oct 26 20:30:42 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 26 Oct 2016 20:30:42 +0000 Subject: [PATCH] libosmocore[master]: utils/conv_gen.py: don't mix print and write() Message-ID: Review at https://gerrit.osmocom.org/1164 utils/conv_gen.py: don't mix print and write() Change-Id: I5c8271d973f766aeb9cbcab30c4eddfdab54fcbb --- M utils/conv_gen.py 1 file changed, 34 insertions(+), 32 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/64/1164/1 diff --git a/utils/conv_gen.py b/utils/conv_gen.py index 5eb7ac1..78b2335 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -168,51 +168,53 @@ sum([x << (self.rate_inv - i - 1) for i, x in enumerate(n)]) num_states = 1 << (self.k - 1) - print >>fi, \ - "\nstatic const uint8_t %s_state[][2] = {" % self.name + fi.write("static const uint8_t %s_state[][2] = {\n" % self.name) self._print_x(fi, num_states) - print >>fi, \ - "};\n\nstatic const uint8_t %s_output[][2] = {" % self.name + fi.write("};\n\n") + + fi.write("static const uint8_t %s_output[][2] = {\n" % self.name) self._print_x(fi, num_states, pack) - print >>fi, "};" + fi.write("};\n\n") if self.recursive: - print >>fi, \ - "\nstatic const uint8_t %s_term_state[] = {" % self.name + fi.write("static const uint8_t %s_term_state[] = {\n" % self.name) self._print_term(fi, num_states) + fi.write("};\n\n") - print >>fi, \ - "};\n\nstatic const uint8_t %s_term_output[] = {" % self.name + fi.write("static const uint8_t %s_term_output[] = {\n" % self.name) self._print_term(fi, num_states, pack) - print >>fi, "};" + fi.write("};\n\n") if len(self.puncture): - print >>fi, "\nstatic const int %s_puncture[] = {" % self.name + fi.write("static const int %s_puncture[] = {\n" % self.name) self._print_puncture(fi) - print >>fi, "};" + fi.write("};\n\n") # Write description as a multi-line comment if self.description is not None: - print >>fi, "\n/**" + fi.write("/**\n") for line in self.description: - print >>fi, " * %s" % line - print >>fi, " */" + fi.write(" * %s\n" % line) + fi.write(" */\n") # Print a final convolutional code definition - print >>fi, "const struct osmo_conv_code %s_%s = {" % (pref, self.name) - print >>fi, "\t.N = %d," % self.rate_inv - print >>fi, "\t.K = %d," % self.k - print >>fi, "\t.len = %d," % self.block_len + fi.write("const struct osmo_conv_code %s_%s = {\n" % (pref, self.name)) + fi.write("\t.N = %d,\n" % self.rate_inv) + fi.write("\t.K = %d,\n" % self.k) + fi.write("\t.len = %d,\n" % self.block_len) + fi.write("\t.next_output = %s_output,\n" % self.name) + fi.write("\t.next_state = %s_state,\n" % self.name) + if self.term_type is not None: - print >>fi, "\t.term = %s," % self.term_type - print >>fi, "\t.next_output = %s_output," % self.name - print >>fi, "\t.next_state = %s_state," % self.name + fi.write("\t.term = %s,\n" % self.term_type) + if self.recursive: - print >>fi, "\t.next_term_output = %s_term_output," % self.name - print >>fi, "\t.next_term_state = %s_term_state," % self.name + fi.write("\t.next_term_output = %s_term_output,\n" % self.name) + fi.write("\t.next_term_state = %s_term_state,\n" % self.name) + if len(self.puncture): - print >>fi, "\t.puncture = %s_puncture," % self.name - print >>fi, "};" + fi.write("\t.puncture = %s_puncture,\n" % self.name) + fi.write("};\n\n") poly = lambda *args: sum([(1 << x) for x in args]) @@ -939,17 +941,17 @@ path = sys.argv[1] if len(sys.argv) > 1 else os.getcwd() prefix = "gsm0503" - print >>sys.stderr, "Generating convolutional codes..." + sys.stderr.write("Generating convolutional codes...\n") # Open a new file for writing f = open(os.path.join(path, "gsm0503_conv.c"), 'w') - print >>f, mod_license - print >>f, "#include " - print >>f, "#include " + f.write(mod_license + "\n") + f.write("#include \n") + f.write("#include \n\n") # Generate the tables one by one for code in conv_codes: - print >>sys.stderr, "Generate '%s' definition" % code.name + sys.stderr.write("Generate '%s' definition\n" % code.name) code.gen_tables(prefix, f) - print >>sys.stderr, "Generation complete." + sys.stderr.write("Generation complete.\n") -- To view, visit https://gerrit.osmocom.org/1164 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5c8271d973f766aeb9cbcab30c4eddfdab54fcbb Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Thu Oct 27 09:00:00 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 27 Oct 2016 09:00:00 +0000 Subject: libosmocore[master]: utils/conv_gen.py: don't mix print and write() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1164 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5c8271d973f766aeb9cbcab30c4eddfdab54fcbb 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 Thu Oct 27 09:00:12 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 27 Oct 2016 09:00:12 +0000 Subject: osmo-bts[master]: Add tools to check DTX operation In-Reply-To: References: Message-ID: Patch Set 9: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1143 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib1c70c4543b24c2a05a7df8eec5ce3f4eda2c02e Gerrit-PatchSet: 9 Gerrit-Project: osmo-bts 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 Thu Oct 27 09:00:53 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 27 Oct 2016 09:00:53 +0000 Subject: openbsc[master]: OM2000: Fix state machien for CF/TRXC on START Result In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1158 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I99860d198b337ffe461b240bda20dc10e1b5b2cb Gerrit-PatchSet: 1 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 Thu Oct 27 09:01:35 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 27 Oct 2016 09:01:35 +0000 Subject: openbsc[master]: Attempt at extending dynamic PDCH support to Ericcson RBS2000 In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 this definitely needs review from neels! -- To view, visit https://gerrit.osmocom.org/1155 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I48089fcf8328d52f57e97b003790ffdeed766367 Gerrit-PatchSet: 1 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 Thu Oct 27 09:02:21 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 27 Oct 2016 09:02:21 +0000 Subject: openbsc[master]: WIP: OM2000: Full state machine implementation using osmo_fsm In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1156 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3e11b28ba22b8c227e0401e6207fdda5381dda8c Gerrit-PatchSet: 1 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 Thu Oct 27 09:02:38 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 27 Oct 2016 09:02:38 +0000 Subject: openbsc[master]: om2000: Add support for querying RBS capabilities In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1159 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id1fbaf41286f3651ce8f210eb8da05fb51179c96 Gerrit-PatchSet: 1 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 Thu Oct 27 09:02:48 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 27 Oct 2016 09:02:48 +0000 Subject: openbsc[master]: RBS2000: re-establish any lost signalling links In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1160 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I710b5af5d0acbdd3febd314849340f2adb7abd80 Gerrit-PatchSet: 1 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 Thu Oct 27 09:03:03 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 27 Oct 2016 09:03:03 +0000 Subject: openbsc[master]: OM2000: Add fault report parsing In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1161 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6e2928f39b09bc08e9ab78bc10bc81e07f7eb55d Gerrit-PatchSet: 1 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 Thu Oct 27 09:03:28 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 27 Oct 2016 09:03:28 +0000 Subject: openbsc[master]: om2000: added support for ericssons sabm negotiation In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1162 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I56b1c1cef07a61143fc0e8058480805cddfeff96 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 Thu Oct 27 09:03:37 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 27 Oct 2016 09:03:37 +0000 Subject: openbsc[master]: OM2000: Throw error when MO can not be enabled In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1163 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idfde8d6f71526e8acfea51835732515a4bee858e 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 Thu Oct 27 09:04:13 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 27 Oct 2016 09:04:13 +0000 Subject: openbsc[master]: abis_rsl: Add mandatory IE for Ericsson RBS2000 PDCH activation In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1157 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I53bad674d3bb02f5210e71ca5b4280be9c956a57 Gerrit-PatchSet: 1 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 Thu Oct 27 09:04:28 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 27 Oct 2016 09:04:28 +0000 Subject: [MERGED] osmo-bts[master]: Add tools to check DTX operation In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add tools to check DTX operation ...................................................................... Add tools to check DTX operation * superfemto.sh can parse superfemto-compatible DSP log output to properly sort records into MT/MO and DL/UL parts * dtx_check.gawk can process output of superfemto.sh and check for common scheduling errors This allows to check lc15 and sysmo for errors in DTX DL scheduling. As dtx_check.gawk is generic it can be used with any other BTS hw (or virtual BTS) as long as raw logs from this hw can be converted to simple input format 'FN EVENT' per-line. Change-Id: Ib1c70c4543b24c2a05a7df8eec5ce3f4eda2c02e Related: OS#1801 --- A contrib/dtx_check.gawk A contrib/superfemto.sh 2 files changed, 176 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/dtx_check.gawk b/contrib/dtx_check.gawk new file mode 100755 index 0000000..9e753e4 --- /dev/null +++ b/contrib/dtx_check.gawk @@ -0,0 +1,77 @@ +#!/usr/bin/gawk -f + +# Expected input format: FN TYPE + +BEGIN { + DELTA = 0 + ERR = 0 + FORCE = 0 + FN = 0 + SILENCE = 0 + TYPE = "" + CHK = "" + U_MAX = 8 * 20 + 120 / 26 + U_MIN = 8 * 20 - 120 / 26 + F_MAX = 3 * 20 + 120 / 26 + F_MIN = 3 * 20 - 120 / 26 +} + +{ + if (NR > 2) { # we have data from previous record to compare to + DELTA = ($1 - FN) * 120 / 26 + CHK = "OK" + if ("FACCH" == $2 && "ONSET" == TYPE) { # ONSET due to FACCH is NOT a talkspurt + SILENCE = 1 + } + if (("UPDATE" == TYPE || "FIRST" == TYPE) && ("FACCH" == $2 || "SPEECH" == $2)) { # check for missing ONSET: + CHK = "FAIL: missing ONSET (" $2 ") after " TYPE "." + ERR++ + } + if ("FORCED_FIRST" == $2 || "FORCED_NODATA" == $2) { + CHK = "FAIL: event " $2 " inserted by DSP." + FORCE++ + ERR++ + } + if ("OK" == CHK) { # check inter-SID distances: + if ("UPDATE" == TYPE) { + if (DELTA > U_MAX) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too big " DELTA "ms > " U_MAX "ms." + ERR++ + } + if ("UPDATE" == $2 && DELTA < U_MIN) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too small " DELTA "ms < " U_MIN "ms." + ERR++ + } + } + if ("FIRST" == TYPE) { + if (DELTA > F_MAX) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID FIRST (@" FN ") too big " DELTA "ms > " F_MAX "ms." + ERR++ + } + if ("UPDATE" == $2 && DELTA < F_MIN) { + CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too small " DELTA "ms < " F_MIN "ms." + ERR++ + } + } + } + if ("FACCH" == TYPE && "FIRST" != $2 && 1 == SILENCE) { # check FACCH handling + CHK = "FAIL: incorrect silence resume after FACCH." + ERR++ + } + } + if ("SPEECH" == $2 || "ONSET" == $2) { # talkspurt + SILENCE = 0 + } + if ("UPDATE" == $2 || "FIRST" == $2) { # silence + SILENCE = 1 + } + print $1, $2, CHK, TYPE, DELTA, SILENCE + if ($2 != "EMPTY") { # skip over EMPTY records + TYPE = $2 + FN = $1 + } +} + +END { + print "Check completed: found " ERR " errors (" FORCE " events inserted by DSP) in " NR " records." +} diff --git a/contrib/superfemto.sh b/contrib/superfemto.sh new file mode 100755 index 0000000..cb871c0 --- /dev/null +++ b/contrib/superfemto.sh @@ -0,0 +1,99 @@ +#!/bin/sh + +# Split common DSP call log file (produced by superfemto-compatible firmware) into 4 separate call leg files (MO/MT & DL/UL) with events in format "FN EVENT_TYPE": +# MO Mobile Originated +# MT Mobile Terminated +# DL DownLink (BTS -> L1) +# UL UpLink (L1 -> BTS) + +if [ -z $1 ]; then + echo "expecting DSP log file name as parameter" + exit 1 +fi + +# MO handle appear 1st in the logs +MO=$(grep 'h=' $1 | head -n 1 | cut -f2 -d',' | cut -f2 -d= | cut -f1 -d']') + +# direction markers: +DLST="_CodeBurst" +ULST="_DecodeAndIdentify" + +# DL sed filters: +D_EMP='s/ Empty frame request!/EMPTY/' +D_FAC='s/ Coding a FACCH\/F frame !!/FACCH/' +D_FST='s/ Coding a RTP SID First frame !!/FIRST/' +D_UPD='s/ Coding a RTP SID Update frame !!/UPDATE/' +D_SPE='s/ Coding a RTP Speech frame !!/SPEECH/' +D_ONS='s/ Coding a Onset frame !!/ONSET/' +D_FO1='s/ A speech frame is following a NoData or SID First without an Onset./FORCED_FIRST/' +D_FO2='s/ A speech frame is following a NoData without an Onset./FORCED_NODATA/' + +# UL sed filters: +U_NOD='s/ It is a No Data frame !!/NODATA/' +U_ONS='s/ It is an ONSET frame !!/ONSET/' +U_UPD='s/ It is a SID UPDATE frame !!/UPDATE/' +U_FST='s/ It is a SID FIRST frame !!/FIRST/' +U_SPE='s/ It is a SPEECH frame !!/SPEECH/' + +DL () { # filter downlink-related entries + grep $DLST $1 > $1.DL.tmp +} + +UL () { # uplink does not require special fix + grep $ULST $1 > $1.UL.tmp.fix +} + +DL $1 +UL $1 + +FIX() { # add MO/MT marker from preceding line to inserted ONSETs so filtering works as expected + cat $1.DL.tmp | awk 'BEGIN{ FS="h="; H="" } { if (NF > 1) { H = $2; print $1 "h=" $2 } else { print $1 ", h=" H } }' > $1.DL.tmp.fix +} + +FIX $1 + +MO() { # filter MO call DL or UL logs + grep "h=$MO" $1.tmp.fix > $1.MO.raw +} + +MT() { # filter MT call DL or UL logs + grep -v "h=$MO" $1.tmp.fix > $1.MT.raw +} + +MO $1.DL +MT $1.DL +MO $1.UL +MT $1.UL + +PREP() { # prepare logs for reformatting + cat $1.raw | cut -f2 -d')' | cut -f1 -d',' | cut -f2 -d'>' | sed 's/\[u32Fn/fn/' | sed 's/fn = /fn=/' | sed 's/fn=//' | sed 's/\[Fn=//' | sed 's/ An Onset will be inserted.//' > $1.tmp1 +} + +PREP "$1.DL.MT" +PREP "$1.DL.MO" +PREP "$1.UL.MT" +PREP "$1.UL.MO" + +RD() { # reformat DL logs for consistency checks + cat $1.tmp1 | sed "$D_FST" | sed "$D_SPE" | sed "$D_UPD" | sed "$D_ONS" | sed "$D_EMP" | sed "$D_FAC" | sed "$D_FO1" | sed "$D_FO2" > $1.tmp2 +} + +RU() { # reformat UL logs for consistency checks + cat $1.tmp1 | sed "$U_FST" | sed "$U_SPE" | sed "$U_UPD" | sed "$U_ONS" | sed "$U_NOD" > $1.tmp2 +} + +RD "$1.DL.MT" +RD "$1.DL.MO" +RU "$1.UL.MT" +RU "$1.UL.MO" + +SW() { # swap fields + cat $1.tmp2 | awk '{ print $2, $1 }' > $1 +} + +SW "$1.DL.MT" +SW "$1.DL.MO" +SW "$1.UL.MT" +SW "$1.UL.MO" + +rm $1.*.tmp* -- To view, visit https://gerrit.osmocom.org/1143 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib1c70c4543b24c2a05a7df8eec5ce3f4eda2c02e Gerrit-PatchSet: 9 Gerrit-Project: osmo-bts 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 Thu Oct 27 09:05:12 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 27 Oct 2016 09:05:12 +0000 Subject: osmo-pcu[master]: Add logging support In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1154 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia5412dddb899e20963f884e02bdf796b6ea7ee6c Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: mrinal Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Oct 27 09:05:23 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 27 Oct 2016 09:05:23 +0000 Subject: osmo-pcu[master]: Add logging support In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1154 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia5412dddb899e20963f884e02bdf796b6ea7ee6c Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: mrinal Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Oct 27 09:05:28 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 27 Oct 2016 09:05:28 +0000 Subject: [MERGED] osmo-pcu[master]: Add logging support In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Add logging support ...................................................................... Add logging support This commit adds the TRX_ID in the output of VTY command "show tbf all". Change-Id: Ia5412dddb899e20963f884e02bdf796b6ea7ee6c --- M src/pcu_vty_functions.cpp 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp index 8009535..ca7f7ad 100644 --- a/src/pcu_vty_functions.cpp +++ b/src/pcu_vty_functions.cpp @@ -61,6 +61,8 @@ if (tbf->pdch[i]) vty_out(vty, "%d%s ", i, is_ctrl ? "!" : ""); } + if (tbf->trx != NULL) + vty_out(vty, " TRX_ID=%d", tbf->trx->trx_no); vty_out(vty, " CS=%s WS=%d", tbf->current_cs().name(), tbf->window()->ws()); -- To view, visit https://gerrit.osmocom.org/1154 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia5412dddb899e20963f884e02bdf796b6ea7ee6c Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: mrinal Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Oct 27 09:25:14 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 27 Oct 2016 09:25:14 +0000 Subject: libosmocore[master]: libosmocoding: migrate transcoding routines from OsmoBTS In-Reply-To: References: Message-ID: Patch Set 9: > the coding_test added by this patch fails... Yes. Some questions regarding this change are still open. -- 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: Neels Hofmeyr Gerrit-Reviewer: Tom Tsou Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Oct 27 09:53:46 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 27 Oct 2016 09:53:46 +0000 Subject: [PATCH] osmo-bts[master]: DTX DL: split ONSET state handling 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/1145 to look at the new patch set (#10). DTX DL: split ONSET state handling Handle ONSET cause by Voice and FACCH separately. In case of Voice we have RTP payload which we have to cache and send later on in next response to L1 RTS. FACCH have higher priority so it preempts both voice and silence alike - hence we can send ONSET immediately but still have to track previous state in order to get back to it gracefully. This affects lc15 and sysmo hw as there's no FSM-based DTX implementation for other models yet. Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Related: OS#1802 --- M include/osmo-bts/dtx_dl_amr_fsm.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 7 files changed, 108 insertions(+), 34 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/45/1145/10 diff --git a/include/osmo-bts/dtx_dl_amr_fsm.h b/include/osmo-bts/dtx_dl_amr_fsm.h index 8b19595..5c13c19 100644 --- a/include/osmo-bts/dtx_dl_amr_fsm.h +++ b/include/osmo-bts/dtx_dl_amr_fsm.h @@ -16,7 +16,6 @@ ST_U_INH, ST_SID_U, ST_ONSET_V, - ST_ONSET_F, ST_FACCH_V, ST_FACCH, }; diff --git a/src/common/dtx_dl_amr_fsm.c b/src/common/dtx_dl_amr_fsm.c index b110cf2..a75fd00 100644 --- a/src/common/dtx_dl_amr_fsm.c +++ b/src/common/dtx_dl_amr_fsm.c @@ -53,7 +53,7 @@ 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_FACCH, 0, 0); break; case E_COMPL: osmo_fsm_inst_state_chg(fi, ST_SID_F2, 0, 0); @@ -81,7 +81,7 @@ 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_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -97,7 +97,7 @@ osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -113,7 +113,7 @@ osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -126,7 +126,7 @@ { switch (event) { case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; case E_VOICE: osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); @@ -234,7 +234,7 @@ 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), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_FACCH) | X(ST_SID_F2) | X(ST_F1_INH) | X(ST_ONSET_V), .name = "SID-FIRST (P1)", .action = dtx_fsm_sid_f1, }, @@ -242,7 +242,7 @@ 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), - .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_ONSET_F), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_FACCH), .name = "SID-FIRST (P2)", .action = dtx_fsm_sid_f2, }, @@ -265,7 +265,7 @@ /* 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), + .out_state_mask = X(ST_FACCH) | X(ST_VOICE) | X(ST_U_INH) | X(ST_SID_U) | X(ST_ONSET_V), .name = "SID-UPDATE", .action = dtx_fsm_sid_upd, }, @@ -275,13 +275,6 @@ .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), .name = "ONSET (SPEECH)", .action = dtx_fsm_onset_v, - }, - /* ONSET - end of silent period due to incoming FACCH frame */ - [ST_ONSET_F]= { - .in_event_mask = X(E_VOICE) | X(E_FACCH) | X(E_SID_U), - .out_state_mask = X(ST_VOICE) | X(ST_FACCH), - .name = "ONSET (FACCH)", - .action = dtx_fsm_onset_f, }, /* FACCH sending state: SPEECH was observed before so once we're done FSM should get back to VOICE state */ diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 9c6f20f..b5f6605 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -220,12 +220,23 @@ * \param[in] fn Frame Number for which we check scheduling * \returns true if transmission can be omitted, false otherwise */ -static inline bool dtx_amr_sid_optional(const struct gsm_lchan *lchan, - uint32_t fn) +static inline bool dtx_amr_sid_optional(struct gsm_lchan *lchan, uint32_t fn) { /* Compute approx. time delta x26 based on Fn duration */ uint32_t dx26 = 120 * (fn - lchan->tch.dtx.fn); + /* We're resuming after FACCH interruption */ + if (lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + /* force STI bit to 1 so cache is treated as SID FIRST */ + lchan->tch.dtx.cache[6 + 2] |= 16; + lchan->tch.dtx.is_update = false; + osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, E_SID_F, + (void *)lchan); + /* this FN was already used for ONSET message so we just prepare + things for next one */ + return true; + } + /* according to 3GPP TS 26.093 A.5.1.1: (*26) to avoid float math, add 1 FN tolerance (-120) */ if (lchan->tch.dtx.is_update) { /* SID UPDATE: every 8th RTP frame */ diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index f47634e..b6f35b7 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -53,6 +53,7 @@ #include #include #include +#include #include #include @@ -330,13 +331,15 @@ } static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache) { struct lc15l1_hdl *fl1 = trx_lc15l1_hdl(trx); struct msgb *l1msg = l1p_msgb_alloc(); + struct gsm_lchan *lchan; uint32_t u32Fn; uint8_t u8Tn, subCh, u8BlockNbr = 0, sapi = 0; uint8_t chan_nr, link_id; + bool rec = false; int len; if (!msg) { @@ -401,14 +404,46 @@ if (len) { /* data request */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); + lchan = get_lchan_by_chan_nr(trx, chan_nr); + + if (use_cache) + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, + lchan->tch.dtx.facch, msgb_l2len(msg)); + else if (trx->bts->dtxd && lchan->tch.dtx.dl_amr_fsm && + lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + if (sapi == GsmL1_Sapi_FacchF) { + sapi = GsmL1_Sapi_TchF; + } + if (sapi == GsmL1_Sapi_FacchH) { + sapi = GsmL1_Sapi_TchH; + } + if (sapi == GsmL1_Sapi_TchH || sapi == GsmL1_Sapi_TchF) { + /* FACCH interruption of DTX silence */ + /* cache FACCH data */ + memcpy(lchan->tch.dtx.facch, msg->l2h, + msgb_l2len(msg)); + /* prepare ONSET message */ + len = 3; + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_Onset; + /* ignored CMR/CMI pair */ + l1p->u.phDataReq.msgUnitParam.u8Buffer[1] = 0; + l1p->u.phDataReq.msgUnitParam.u8Buffer[2] = 0; + /* ONSET is ready, recursive call is necessary */ + rec = true; + } + } data_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr, len); - OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); - memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, msgb_l2len(msg)); + if (!rec && !use_cache) { + OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, + msgb_l2len(msg)); + } LOGP(DL1P, LOGL_DEBUG, "PH-DATA.req(%s)\n", - osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, - l1p->u.phDataReq.msgUnitParam.u8Size)); + osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, + l1p->u.phDataReq.msgUnitParam.u8Size)); } else { /* empty frame */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); @@ -422,6 +457,8 @@ msgb_free(l1msg); } + if (rec) + ph_data_req(trx, msg, l1sap, true); return 0; } @@ -566,7 +603,7 @@ * free()d below */ switch (OSMO_PRIM_HDR(&l1sap->oph)) { case OSMO_PRIM(PRIM_PH_DATA, PRIM_OP_REQUEST): - rc = ph_data_req(trx, msg, l1sap); + rc = ph_data_req(trx, msg, l1sap, false); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index b251388..2565e23 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -285,10 +285,9 @@ /* DTX DL-specific logic below: */ switch (lchan->tch.dtx.dl_amr_fsm->state) { case ST_ONSET_V: - case ST_ONSET_F: *payload_type = GsmL1_TchPlType_Amr_Onset; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); - *len = 1; + *len = 3; return 1; case ST_VOICE: *payload_type = GsmL1_TchPlType_Amr; diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index bef2d30..8729c89 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -325,13 +325,15 @@ } static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache) { struct femtol1_hdl *fl1 = trx_femtol1_hdl(trx); struct msgb *l1msg = l1p_msgb_alloc(); + struct gsm_lchan *lchan; uint32_t u32Fn; uint8_t u8Tn, subCh, u8BlockNbr = 0, sapi = 0; uint8_t chan_nr, link_id; + bool rec = false; int len; if (!msg) { @@ -396,14 +398,46 @@ if (len) { /* data request */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); + lchan = get_lchan_by_chan_nr(trx, chan_nr); + + if (use_cache) + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, + lchan->tch.dtx.facch, msgb_l2len(msg)); + else if (trx->bts->dtxd && lchan->tch.dtx.dl_amr_fsm && + lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + if (sapi == GsmL1_Sapi_FacchF) { + sapi = GsmL1_Sapi_TchF; + } + if (sapi == GsmL1_Sapi_FacchH) { + sapi = GsmL1_Sapi_TchH; + } + if (sapi == GsmL1_Sapi_TchH || sapi == GsmL1_Sapi_TchF) { + /* FACCH interruption of DTX silence */ + /* cache FACCH data */ + memcpy(lchan->tch.dtx.facch, msg->l2h, + msgb_l2len(msg)); + /* prepare ONSET message */ + len = 3; + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_Onset; + /* ignored CMR/CMI pair */ + l1p->u.phDataReq.msgUnitParam.u8Buffer[1] = 0; + l1p->u.phDataReq.msgUnitParam.u8Buffer[2] = 0; + /* ONSET is ready, recursive call is necessary */ + rec = true; + } + } data_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr, len); - OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); - memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, msgb_l2len(msg)); + if (!rec && !use_cache) { + OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, + msgb_l2len(msg)); + } LOGP(DL1P, LOGL_DEBUG, "PH-DATA.req(%s)\n", - osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, - l1p->u.phDataReq.msgUnitParam.u8Size)); + osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, + l1p->u.phDataReq.msgUnitParam.u8Size)); } else { /* empty frame */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); @@ -417,6 +451,8 @@ msgb_free(l1msg); } + if (rec) + ph_data_req(trx, msg, l1sap, true); return 0; } @@ -561,7 +597,7 @@ * free()d below */ switch (OSMO_PRIM_HDR(&l1sap->oph)) { case OSMO_PRIM(PRIM_PH_DATA, PRIM_OP_REQUEST): - rc = ph_data_req(trx, msg, l1sap); + rc = ph_data_req(trx, msg, l1sap, false); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index b08ba7e..5e517e9 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -383,10 +383,9 @@ /* DTX DL-specific logic below: */ switch (lchan->tch.dtx.dl_amr_fsm->state) { case ST_ONSET_V: - case ST_ONSET_F: *payload_type = GsmL1_TchPlType_Amr_Onset; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); - *len = 1; + *len = 3; return 1; case ST_VOICE: *payload_type = GsmL1_TchPlType_Amr; -- To view, visit https://gerrit.osmocom.org/1145 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Gerrit-PatchSet: 10 Gerrit-Project: osmo-bts 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 Thu Oct 27 10:11:22 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 27 Oct 2016 10:11:22 +0000 Subject: openbsc[master]: gsm_subscriber_connection: mark BSC specific items In-Reply-To: References: Message-ID: Patch Set 4: wouldn't it make sense to introduce a sub-structure like 'struct { ...} bsc' to clearly mark those parts as bsc-specific? -- To view, visit https://gerrit.osmocom.org/1142 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib9666225fb9bfec2cf1e364343560571869fe6a7 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 Thu Oct 27 10:12:00 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 27 Oct 2016 10:12:00 +0000 Subject: openbsc[master]: osmo-nitb: exit when MNCC socket init failed In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1141 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icef97bb5da9840b810fe6f4b4da6abd4baa66915 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 Thu Oct 27 10:13:57 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 27 Oct 2016 10:13:57 +0000 Subject: openbsc[master]: Move timezone settings up to network level In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1137 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I69848887d92990f3d6f969be80f6ef91f6bdbbe8 Gerrit-PatchSet: 4 Gerrit-Project: openbsc 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 Oct 27 10:16:03 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 27 Oct 2016 10:16:03 +0000 Subject: openbsc[master]: info log: iu: add line break to and tweak rx RAB Ass Resp log In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1122 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I50e701493f3951a43506cc37753a30d47f8d601f Gerrit-PatchSet: 1 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 Thu Oct 27 10:17:56 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 27 Oct 2016 10:17:56 +0000 Subject: openbsc[master]: bsc: count the usage of codec by setting the lchan active In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1066 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib49c7c337980a7d6f189d7a0551ca2e4c3822f45 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Oct 27 10:18:00 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 27 Oct 2016 10:18:00 +0000 Subject: [MERGED] openbsc[master]: bsc: count the usage of codec by setting the lchan active In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: bsc: count the usage of codec by setting the lchan active ...................................................................... bsc: count the usage of codec by setting the lchan active We count the codec when the channel was successful setted up Using sign_link->trx->bts instead of msg->trx to get the bts. Add OSMO_ASSERT for bts within count_codecs() Change-Id: Ib49c7c337980a7d6f189d7a0551ca2e4c3822f45 --- M openbsc/include/openbsc/gsm_data.h M openbsc/src/libbsc/abis_rsl.c 2 files changed, 47 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index c7e2347..70c08c3 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -168,6 +168,11 @@ BSC_CTR_CHAN_RLL_ERR, BSC_CTR_BTS_OML_FAIL, BSC_CTR_BTS_RSL_FAIL, + BSC_CTR_CODEC_AMR_F, + BSC_CTR_CODEC_AMR_H, + BSC_CTR_CODEC_EFR, + BSC_CTR_CODEC_V1_FR, + BSC_CTR_CODEC_V1_HR, }; static const struct rate_ctr_desc bsc_ctr_description[] = { @@ -186,6 +191,11 @@ [BSC_CTR_CHAN_RLL_ERR] = {"chan.rll_err", "Received a RLL failure with T200 cause from BTS."}, [BSC_CTR_BTS_OML_FAIL] = {"bts.oml_fail", "Received a TEI down on a OML link."}, [BSC_CTR_BTS_RSL_FAIL] = {"bts.rsl_fail", "Received a TEI down on a OML link."}, + [BSC_CTR_CODEC_AMR_F] = {"bts.codec_amr_f", "Count the usage of AMR/F codec by channel mode requested."}, + [BSC_CTR_CODEC_AMR_H] = {"bts.codec_amr_h", "Count the usage of AMR/H codec by channel mode requested."}, + [BSC_CTR_CODEC_EFR] = {"bts.codec_efr", "Count the usage of EFR codec by channel mode requested."}, + [BSC_CTR_CODEC_V1_FR] = {"bts.codec_fr", "Count the usage of FR codec by channel mode requested."}, + [BSC_CTR_CODEC_V1_HR] = {"bts.codec_hr", "Count the usage of HR codec by channel mode requested."}, }; enum { diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c index 316fc3f..9656961 100644 --- a/openbsc/src/libbsc/abis_rsl.c +++ b/openbsc/src/libbsc/abis_rsl.c @@ -82,6 +82,41 @@ lchan_free(lchan); } +static void count_codecs(struct gsm_bts *bts, struct gsm_lchan *lchan) +{ + OSMO_ASSERT(bts); + + if (lchan->type == GSM_LCHAN_TCH_H) { + switch (lchan->tch_mode) { + case GSM48_CMODE_SPEECH_AMR: + rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_AMR_H]); + break; + case GSM48_CMODE_SPEECH_V1: + rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_V1_HR]); + break; + default: + break; + } + } else if (lchan->type == GSM_LCHAN_TCH_F) { + switch (lchan->tch_mode) { + case GSM48_CMODE_SPEECH_AMR: + rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_AMR_F]); + break; + case GSM48_CMODE_SPEECH_V1: + rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_V1_FR]); + break; + case GSM48_CMODE_SPEECH_EFR: + rate_ctr_inc(&bts->network->bsc_ctrs->ctr[BSC_CTR_CODEC_EFR]); + break; + default: + break; + } + } else { + LOGP(DRSL, LOGL_ERROR, "count_codecs unknown lchan->type %x on channel %s\n", + lchan->type, gsm_ts_and_pchan_name(lchan->ts)); + } +} + static uint8_t mdisc_by_msgtype(uint8_t msg_type) { /* mask off the transparent bit ? */ @@ -1464,6 +1499,7 @@ case RSL_MT_CHAN_ACTIV_ACK: DEBUGP(DRSL, "%s CHANNEL ACTIVATE ACK\n", ts_name); rc = rsl_rx_chan_act_ack(msg); + count_codecs(sign_link->trx->bts, msg->lchan); break; case RSL_MT_CHAN_ACTIV_NACK: rc = rsl_rx_chan_act_nack(msg); @@ -1481,6 +1517,7 @@ rc = rsl_rx_rf_chan_rel_ack(msg->lchan); break; case RSL_MT_MODE_MODIFY_ACK: + count_codecs(sign_link->trx->bts, msg->lchan); DEBUGP(DRSL, "%s CHANNEL MODE MODIFY ACK\n", ts_name); break; case RSL_MT_MODE_MODIFY_NACK: -- To view, visit https://gerrit.osmocom.org/1066 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib49c7c337980a7d6f189d7a0551ca2e4c3822f45 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Thu Oct 27 10:19:45 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 27 Oct 2016 10:19:45 +0000 Subject: openbsc[master]: OML: Improve OML attribute handling In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/973 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibeb34a84912d6cf695f553a34c69320fca7d08fa Gerrit-PatchSet: 5 Gerrit-Project: openbsc 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 Oct 27 10:20:03 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 27 Oct 2016 10:20:03 +0000 Subject: openbsc[master]: gsm0408: Adding log output for 3g specific RR messages In-Reply-To: References: Message-ID: Patch Set 7: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1037 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I41f2242fdf59c3eb4b3f8f7f003c17f7e0df01aa Gerrit-PatchSet: 7 Gerrit-Project: openbsc 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 Oct 27 10:20:23 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 27 Oct 2016 10:20:23 +0000 Subject: openbsc[master]: Cosmetic: Add missing switch to usage help In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1076 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3e763c30ca13bc51c8b72af8a94558c92439f109 Gerrit-PatchSet: 2 Gerrit-Project: openbsc 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 Oct 27 10:26:23 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 27 Oct 2016 10:26:23 +0000 Subject: [PATCH] osmo-bts[master]: DTX DL: split ONSET state handling 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/1145 to look at the new patch set (#11). DTX DL: split ONSET state handling Handle ONSET cause by Voice and FACCH separately. In case of Voice we have RTP payload which we have to cache and send later on in next response to L1 RTS. FACCH have higher priority so it preempts both voice and silence alike - hence we can send ONSET immediately but still have to track previous state in order to get back to it gracefully. This affects lc15 and sysmo hw as there's no FSM-based DTX implementation for other models yet. Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Related: OS#1802 --- M include/osmo-bts/dtx_dl_amr_fsm.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 7 files changed, 114 insertions(+), 34 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/45/1145/11 diff --git a/include/osmo-bts/dtx_dl_amr_fsm.h b/include/osmo-bts/dtx_dl_amr_fsm.h index 8b19595..5c13c19 100644 --- a/include/osmo-bts/dtx_dl_amr_fsm.h +++ b/include/osmo-bts/dtx_dl_amr_fsm.h @@ -16,7 +16,6 @@ ST_U_INH, ST_SID_U, ST_ONSET_V, - ST_ONSET_F, ST_FACCH_V, ST_FACCH, }; diff --git a/src/common/dtx_dl_amr_fsm.c b/src/common/dtx_dl_amr_fsm.c index b110cf2..a75fd00 100644 --- a/src/common/dtx_dl_amr_fsm.c +++ b/src/common/dtx_dl_amr_fsm.c @@ -53,7 +53,7 @@ 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_FACCH, 0, 0); break; case E_COMPL: osmo_fsm_inst_state_chg(fi, ST_SID_F2, 0, 0); @@ -81,7 +81,7 @@ 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_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -97,7 +97,7 @@ osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -113,7 +113,7 @@ osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -126,7 +126,7 @@ { switch (event) { case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; case E_VOICE: osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); @@ -234,7 +234,7 @@ 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), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_FACCH) | X(ST_SID_F2) | X(ST_F1_INH) | X(ST_ONSET_V), .name = "SID-FIRST (P1)", .action = dtx_fsm_sid_f1, }, @@ -242,7 +242,7 @@ 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), - .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_ONSET_F), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_FACCH), .name = "SID-FIRST (P2)", .action = dtx_fsm_sid_f2, }, @@ -265,7 +265,7 @@ /* 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), + .out_state_mask = X(ST_FACCH) | X(ST_VOICE) | X(ST_U_INH) | X(ST_SID_U) | X(ST_ONSET_V), .name = "SID-UPDATE", .action = dtx_fsm_sid_upd, }, @@ -275,13 +275,6 @@ .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), .name = "ONSET (SPEECH)", .action = dtx_fsm_onset_v, - }, - /* ONSET - end of silent period due to incoming FACCH frame */ - [ST_ONSET_F]= { - .in_event_mask = X(E_VOICE) | X(E_FACCH) | X(E_SID_U), - .out_state_mask = X(ST_VOICE) | X(ST_FACCH), - .name = "ONSET (FACCH)", - .action = dtx_fsm_onset_f, }, /* FACCH sending state: SPEECH was observed before so once we're done FSM should get back to VOICE state */ diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 9c6f20f..fcc317c 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -220,12 +220,23 @@ * \param[in] fn Frame Number for which we check scheduling * \returns true if transmission can be omitted, false otherwise */ -static inline bool dtx_amr_sid_optional(const struct gsm_lchan *lchan, - uint32_t fn) +static inline bool dtx_amr_sid_optional(struct gsm_lchan *lchan, uint32_t fn) { /* Compute approx. time delta x26 based on Fn duration */ uint32_t dx26 = 120 * (fn - lchan->tch.dtx.fn); + /* We're resuming after FACCH interruption */ + if (lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + /* force STI bit to 0 so cache is treated as SID FIRST */ + lchan->tch.dtx.cache[6 + 2] &= ~16; + lchan->tch.dtx.is_update = false; + osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, E_SID_F, + (void *)lchan); + /* this FN was already used for ONSET message so we just prepare + things for next one */ + return true; + } + /* according to 3GPP TS 26.093 A.5.1.1: (*26) to avoid float math, add 1 FN tolerance (-120) */ if (lchan->tch.dtx.is_update) { /* SID UPDATE: every 8th RTP frame */ diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index f47634e..b6f35b7 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -53,6 +53,7 @@ #include #include #include +#include #include #include @@ -330,13 +331,15 @@ } static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache) { struct lc15l1_hdl *fl1 = trx_lc15l1_hdl(trx); struct msgb *l1msg = l1p_msgb_alloc(); + struct gsm_lchan *lchan; uint32_t u32Fn; uint8_t u8Tn, subCh, u8BlockNbr = 0, sapi = 0; uint8_t chan_nr, link_id; + bool rec = false; int len; if (!msg) { @@ -401,14 +404,46 @@ if (len) { /* data request */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); + lchan = get_lchan_by_chan_nr(trx, chan_nr); + + if (use_cache) + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, + lchan->tch.dtx.facch, msgb_l2len(msg)); + else if (trx->bts->dtxd && lchan->tch.dtx.dl_amr_fsm && + lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + if (sapi == GsmL1_Sapi_FacchF) { + sapi = GsmL1_Sapi_TchF; + } + if (sapi == GsmL1_Sapi_FacchH) { + sapi = GsmL1_Sapi_TchH; + } + if (sapi == GsmL1_Sapi_TchH || sapi == GsmL1_Sapi_TchF) { + /* FACCH interruption of DTX silence */ + /* cache FACCH data */ + memcpy(lchan->tch.dtx.facch, msg->l2h, + msgb_l2len(msg)); + /* prepare ONSET message */ + len = 3; + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_Onset; + /* ignored CMR/CMI pair */ + l1p->u.phDataReq.msgUnitParam.u8Buffer[1] = 0; + l1p->u.phDataReq.msgUnitParam.u8Buffer[2] = 0; + /* ONSET is ready, recursive call is necessary */ + rec = true; + } + } data_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr, len); - OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); - memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, msgb_l2len(msg)); + if (!rec && !use_cache) { + OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, + msgb_l2len(msg)); + } LOGP(DL1P, LOGL_DEBUG, "PH-DATA.req(%s)\n", - osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, - l1p->u.phDataReq.msgUnitParam.u8Size)); + osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, + l1p->u.phDataReq.msgUnitParam.u8Size)); } else { /* empty frame */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); @@ -422,6 +457,8 @@ msgb_free(l1msg); } + if (rec) + ph_data_req(trx, msg, l1sap, true); return 0; } @@ -566,7 +603,7 @@ * free()d below */ switch (OSMO_PRIM_HDR(&l1sap->oph)) { case OSMO_PRIM(PRIM_PH_DATA, PRIM_OP_REQUEST): - rc = ph_data_req(trx, msg, l1sap); + rc = ph_data_req(trx, msg, l1sap, false); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index b251388..70764f5 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -285,10 +285,9 @@ /* DTX DL-specific logic below: */ switch (lchan->tch.dtx.dl_amr_fsm->state) { case ST_ONSET_V: - case ST_ONSET_F: *payload_type = GsmL1_TchPlType_Amr_Onset; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); - *len = 1; + *len = 3; return 1; case ST_VOICE: *payload_type = GsmL1_TchPlType_Amr; @@ -306,6 +305,9 @@ *payload_type = GsmL1_TchPlType_Amr; rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, ft); + /* force STI bit to 0 to make sure resume after FACCH + works properly */ + l1_payload[6 + 2] &= ~16; return 0; case ST_SID_F2: *payload_type = GsmL1_TchPlType_Amr; diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index bef2d30..8729c89 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -325,13 +325,15 @@ } static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache) { struct femtol1_hdl *fl1 = trx_femtol1_hdl(trx); struct msgb *l1msg = l1p_msgb_alloc(); + struct gsm_lchan *lchan; uint32_t u32Fn; uint8_t u8Tn, subCh, u8BlockNbr = 0, sapi = 0; uint8_t chan_nr, link_id; + bool rec = false; int len; if (!msg) { @@ -396,14 +398,46 @@ if (len) { /* data request */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); + lchan = get_lchan_by_chan_nr(trx, chan_nr); + + if (use_cache) + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, + lchan->tch.dtx.facch, msgb_l2len(msg)); + else if (trx->bts->dtxd && lchan->tch.dtx.dl_amr_fsm && + lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + if (sapi == GsmL1_Sapi_FacchF) { + sapi = GsmL1_Sapi_TchF; + } + if (sapi == GsmL1_Sapi_FacchH) { + sapi = GsmL1_Sapi_TchH; + } + if (sapi == GsmL1_Sapi_TchH || sapi == GsmL1_Sapi_TchF) { + /* FACCH interruption of DTX silence */ + /* cache FACCH data */ + memcpy(lchan->tch.dtx.facch, msg->l2h, + msgb_l2len(msg)); + /* prepare ONSET message */ + len = 3; + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_Onset; + /* ignored CMR/CMI pair */ + l1p->u.phDataReq.msgUnitParam.u8Buffer[1] = 0; + l1p->u.phDataReq.msgUnitParam.u8Buffer[2] = 0; + /* ONSET is ready, recursive call is necessary */ + rec = true; + } + } data_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr, len); - OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); - memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, msgb_l2len(msg)); + if (!rec && !use_cache) { + OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, + msgb_l2len(msg)); + } LOGP(DL1P, LOGL_DEBUG, "PH-DATA.req(%s)\n", - osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, - l1p->u.phDataReq.msgUnitParam.u8Size)); + osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, + l1p->u.phDataReq.msgUnitParam.u8Size)); } else { /* empty frame */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); @@ -417,6 +451,8 @@ msgb_free(l1msg); } + if (rec) + ph_data_req(trx, msg, l1sap, true); return 0; } @@ -561,7 +597,7 @@ * free()d below */ switch (OSMO_PRIM_HDR(&l1sap->oph)) { case OSMO_PRIM(PRIM_PH_DATA, PRIM_OP_REQUEST): - rc = ph_data_req(trx, msg, l1sap); + rc = ph_data_req(trx, msg, l1sap, false); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index b08ba7e..fbb42b2 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -383,10 +383,9 @@ /* DTX DL-specific logic below: */ switch (lchan->tch.dtx.dl_amr_fsm->state) { case ST_ONSET_V: - case ST_ONSET_F: *payload_type = GsmL1_TchPlType_Amr_Onset; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); - *len = 1; + *len = 3; return 1; case ST_VOICE: *payload_type = GsmL1_TchPlType_Amr; @@ -404,6 +403,9 @@ *payload_type = GsmL1_TchPlType_Amr; rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, ft); + /* force STI bit to 0 to make sure resume after FACCH + works properly */ + l1_payload[6 + 2] &= ~16; return 0; case ST_SID_F2: *payload_type = GsmL1_TchPlType_Amr; -- To view, visit https://gerrit.osmocom.org/1145 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Gerrit-PatchSet: 11 Gerrit-Project: osmo-bts 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 Thu Oct 27 10:26:28 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Thu, 27 Oct 2016 10:26:28 +0000 Subject: osmo-iuh[master]: hnbgw: parameterize IuCS and IuPS ips and ports: add vty cmds In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/1062/1/include/osmocom/iuh/hnbgw.h File include/osmocom/iuh/hnbgw.h: Line 161: const char *hnbgw_get_iucs_remote_ip(struct hnb_gw *gw); > I agree that it is bloaty. The idea why they came up is that the default is I'm not sure we ever had a requirement that 'config write' should write an identical file than we read. It should not change the behavior of the program, but whether or not a default is explicit or implicit shouldn't make the difference. the policy so far was to write paramters only if they differ from the compile-time default. Whether or not that is a good policy might be debatable, but I don't think we should start to differ from that behavior in some of the code while keeping the other code-as is. So yes, I would prefer if all of those get/set functions go away. Thanks. btw: My long-term wish is to move all of the VTY code out into a separate 'configuration management + cli daemon' which then has a MIB API which is used by the programs like the NITB to get the parameters asneeded. So let's not spend more time adding more complexity to what we have so far. -- To view, visit https://gerrit.osmocom.org/1062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2c28977011009df4e1fa472290bbbc359e406971 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Oct 27 11:29:16 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Thu, 27 Oct 2016 11:29:16 +0000 Subject: osmo-pcu[master]: EGPRS: add test case to show EPDAN BSN out of window bug In-Reply-To: References: Message-ID: Patch Set 9: Neels, Any update on this patch series? -- To view, visit https://gerrit.osmocom.org/861 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If32b67f5c05707155281128b776a90a1e3d587b2 Gerrit-PatchSet: 9 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Oct 27 11:36:28 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 27 Oct 2016 11:36:28 +0000 Subject: [PATCH] libosmocore[master]: gsm0408: Completing GSM 04.08 RR message types 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/1056 to look at the new patch set (#3). gsm0408: Completing GSM 04.08 RR message types - Add missing message types to be up to date with the latest specification release (3GPP TS 04.18) - Add value strings to translate RR message type identifiers into human readable strings. (see gsm48_rr_msg_name() in gsm48.h Change-Id: I3ceb070bf4dc8f5a071a5d43c6aa2d4e84c2dec6 --- M include/osmocom/gsm/gsm48.h M include/osmocom/gsm/protocol/gsm_04_08.h M src/gsm/gsm48.c M src/gsm/libosmogsm.map 4 files changed, 123 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/56/1056/3 diff --git a/include/osmocom/gsm/gsm48.h b/include/osmocom/gsm/gsm48.h index d6e58c2..6a52c2d 100644 --- a/include/osmocom/gsm/gsm48.h +++ b/include/osmocom/gsm/gsm48.h @@ -20,6 +20,7 @@ extern const struct tlv_definition gsm48_mm_att_tlvdef; const char *gsm48_cc_state_name(uint8_t state); const char *gsm48_cc_msg_name(uint8_t msgtype); +const char *gsm48_rr_msg_name(uint8_t msgtype); const char *rr_cause_name(uint8_t cause); int gsm48_decode_lai(struct gsm48_loc_area_id *lai, uint16_t *mcc, diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index fa2bb06..767aa3d 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -1021,6 +1021,10 @@ #define GSM48_MT_RR_IMM_ASS 0x3f #define GSM48_MT_RR_IMM_ASS_EXT 0x39 #define GSM48_MT_RR_IMM_ASS_REJ 0x3a +#define GSM48_MT_RR_DTM_ASS_FAIL 0x48 +#define GSM48_MT_RR_DTM_REJECT 0x49 +#define GSM48_MT_RR_DTM_REQUEST 0x4A +#define GSM48_MT_RR_PACKET_ASS 0x4B #define GSM48_MT_RR_CIPH_M_CMD 0x35 #define GSM48_MT_RR_CIPH_M_COMPL 0x32 @@ -1036,6 +1040,8 @@ #define GSM48_MT_RR_HANDO_COMPL 0x2c #define GSM48_MT_RR_HANDO_FAIL 0x28 #define GSM48_MT_RR_HANDO_INFO 0x2d +#define GSM48_MT_RR_HANDO_INFO 0x2d +#define GSM48_MT_RR_DTM_ASS_CMD 0x4c #define GSM48_MT_RR_CELL_CHG_ORDER 0x08 #define GSM48_MT_RR_PDCH_ASS_CMD 0x23 @@ -1049,9 +1055,9 @@ #define GSM48_MT_RR_PAG_REQ_3 0x24 #define GSM48_MT_RR_PAG_RESP 0x27 #define GSM48_MT_RR_NOTIF_NCH 0x20 -#define GSM48_MT_RR_NOTIF_FACCH 0x25 +#define GSM48_MT_RR_NOTIF_FACCH 0x25 /* (Reserved) */ #define GSM48_MT_RR_NOTIF_RESP 0x26 - +#define GSM48_MT_RR_PACKET_NOTIF 0x4e #define GSM48_MT_RR_UTRAN_CLSM_CHG 0x60 #define GSM48_MT_RR_CDMA2K_CLSM_CHG 0x62 #define GSM48_MT_RR_IS_TO_UTRAN_HANDO 0x63 @@ -1077,6 +1083,10 @@ #define GSM48_MT_RR_SYSINFO_16 0x3d #define GSM48_MT_RR_SYSINFO_17 0x3e +#define GSM48_MT_RR_SYSINFO_18 0x40 +#define GSM48_MT_RR_SYSINFO_19 0x41 +#define GSM48_MT_RR_SYSINFO_20 0x42 + #define GSM48_MT_RR_CHAN_MODE_MODIF 0x10 #define GSM48_MT_RR_STATUS 0x12 #define GSM48_MT_RR_CHAN_MODE_MODIF_ACK 0x17 @@ -1087,6 +1097,7 @@ #define GSM48_MT_RR_EXT_MEAS_REP 0x36 #define GSM48_MT_RR_EXT_MEAS_REP_ORD 0x37 #define GSM48_MT_RR_GPRS_SUSP_REQ 0x34 +#define GSM48_MT_RR_DTM_INFO 0x4d #define GSM48_MT_RR_VGCS_UPL_GRANT 0x09 #define GSM48_MT_RR_UPLINK_RELEASE 0x0e diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c index 46f0b2f..b626f82 100644 --- a/src/gsm/gsm48.c +++ b/src/gsm/gsm48.c @@ -255,6 +255,114 @@ return get_value_string(cc_msg_names, msgtype); } + +static const struct value_string rr_msg_names[] = { + /* Channel establishment messages */ + { GSM48_MT_RR_INIT_REQ, "RR INITIALISATION REQUEST" }, + { GSM48_MT_RR_ADD_ASS, "ADDITIONAL ASSIGNMENT" }, + { GSM48_MT_RR_IMM_ASS, "IMMEDIATE ASSIGNMENT" }, + { GSM48_MT_RR_IMM_ASS_EXT, "MMEDIATE ASSIGNMENT EXTENDED" }, + { GSM48_MT_RR_IMM_ASS_REJ, "IMMEDIATE ASSIGNMENT REJECT" }, + { GSM48_MT_RR_DTM_ASS_FAIL, "DTM ASSIGNMENT FAILURE" }, + { GSM48_MT_RR_DTM_REJECT, "DTM REJECT" }, + { GSM48_MT_RR_DTM_REQUEST, "DTM REQUEST" }, + { GSM48_MT_RR_PACKET_ASS, "PACKET ASSIGNMENT" }, + + /* Ciphering messages */ + { GSM48_MT_RR_CIPH_M_CMD, "CIPHERING MODE COMMAND" }, + { GSM48_MT_RR_CIPH_M_COMPL, "CIPHERING MODE COMPLETE" }, + + /* Configuration change messages */ + { GSM48_MT_RR_CFG_CHG_CMD, "CONFIGURATION CHANGE COMMAND" }, + { GSM48_MT_RR_CFG_CHG_ACK, "CONFIGURATION CHANGE ACK" }, + { GSM48_MT_RR_CFG_CHG_REJ, "CONFIGURATION CHANGE REJECT" }, + + /* Handover messages */ + { GSM48_MT_RR_ASS_CMD, "ASSIGNMENT COMMAND" }, + { GSM48_MT_RR_ASS_COMPL, "ASSIGNMENT COMPLETE" }, + { GSM48_MT_RR_ASS_FAIL, "ASSIGNMENT FAILURE" }, + { GSM48_MT_RR_HANDO_CMD, "HANDOVER COMMAND" }, + { GSM48_MT_RR_HANDO_COMPL, "HANDOVER COMPLETE" }, + { GSM48_MT_RR_HANDO_FAIL, "HANDOVER FAILURE" }, + { GSM48_MT_RR_HANDO_INFO, "PHYSICAL INFORMATION" }, + { GSM48_MT_RR_DTM_ASS_CMD, "DTM ASSIGNMENT COMMAND" }, + + { GSM48_MT_RR_CELL_CHG_ORDER, "RR-CELL CHANGE ORDER" }, + { GSM48_MT_RR_PDCH_ASS_CMD, "PDCH ASSIGNMENT COMMAND" }, + + /* Channel release messages */ + { GSM48_MT_RR_CHAN_REL, "CHANNEL RELEASE" }, + { GSM48_MT_RR_PART_REL, "PARTIAL RELEASE" }, + { GSM48_MT_RR_PART_REL_COMP, "PARTIAL RELEASE COMPLETE" }, + + /* Paging and Notification messages */ + { GSM48_MT_RR_PAG_REQ_1, "PAGING REQUEST TYPE 1" }, + { GSM48_MT_RR_PAG_REQ_2, "PAGING REQUEST TYPE 2" }, + { GSM48_MT_RR_PAG_REQ_3, "PAGING REQUEST TYPE 3" }, + { GSM48_MT_RR_PAG_RESP, "PAGING RESPONSE" }, + { GSM48_MT_RR_NOTIF_NCH, "NOTIFICATION/NCH" }, + { GSM48_MT_RR_NOTIF_FACCH, "(Reserved)" }, + { GSM48_MT_RR_NOTIF_RESP, "NOTIFICATION/RESPONSE" }, + { GSM48_MT_RR_PACKET_NOTIF, "PACKET NOTIFICATION" }, + /* 3G Specific messages */ + { GSM48_MT_RR_UTRAN_CLSM_CHG, "UTRAN Classmark Change" }, + { GSM48_MT_RR_CDMA2K_CLSM_CHG, "cdma 2000 Classmark Change" }, + { GSM48_MT_RR_IS_TO_UTRAN_HANDO, "Inter System to UTRAN Handover Command" }, + { GSM48_MT_RR_IS_TO_CDMA2K_HANDO, "Inter System to cdma2000 Handover Command" }, + + /* System information messages */ + { GSM48_MT_RR_SYSINFO_8, "SYSTEM INFORMATION TYPE 8" }, + { GSM48_MT_RR_SYSINFO_1, "SYSTEM INFORMATION TYPE 1" }, + { GSM48_MT_RR_SYSINFO_2, "SYSTEM INFORMATION TYPE 2" }, + { GSM48_MT_RR_SYSINFO_3, "SYSTEM INFORMATION TYPE 3" }, + { GSM48_MT_RR_SYSINFO_4, "SYSTEM INFORMATION TYPE 4" }, + { GSM48_MT_RR_SYSINFO_5, "SYSTEM INFORMATION TYPE 5" }, + { GSM48_MT_RR_SYSINFO_6, "SYSTEM INFORMATION TYPE 6" }, + { GSM48_MT_RR_SYSINFO_7, "SYSTEM INFORMATION TYPE 7" }, + { GSM48_MT_RR_SYSINFO_2bis, "SYSTEM INFORMATION TYPE 2bis" }, + { GSM48_MT_RR_SYSINFO_2ter, "SYSTEM INFORMATION TYPE 2ter" }, + { GSM48_MT_RR_SYSINFO_2quater, "SYSTEM INFORMATION TYPE 2quater" }, + { GSM48_MT_RR_SYSINFO_5bis, "SYSTEM INFORMATION TYPE 5bis" }, + { GSM48_MT_RR_SYSINFO_5ter, "SYSTEM INFORMATION TYPE 5ter" }, + { GSM48_MT_RR_SYSINFO_9, "SYSTEM INFORMATION TYPE 9" }, + { GSM48_MT_RR_SYSINFO_13, "SYSTEM INFORMATION TYPE 13" }, + { GSM48_MT_RR_SYSINFO_16, "SYSTEM INFORMATION TYPE 16" }, + { GSM48_MT_RR_SYSINFO_17, "SYSTEM INFORMATION TYPE 17" }, + { GSM48_MT_RR_SYSINFO_18, "SYSTEM INFORMATION TYPE 18" }, + { GSM48_MT_RR_SYSINFO_19, "SYSTEM INFORMATION TYPE 19" }, + { GSM48_MT_RR_SYSINFO_20, "SYSTEM INFORMATION TYPE 20" }, + + /* Miscellaneous messages */ + { GSM48_MT_RR_CHAN_MODE_MODIF, "CHANNEL MODE MODIFY" }, + { GSM48_MT_RR_STATUS, "RR STATUS" }, + { GSM48_MT_RR_CHAN_MODE_MODIF_ACK, "CHANNEL MODE MODIFY ACKNOWLEDGE" }, + { GSM48_MT_RR_FREQ_REDEF, "FREQUENCY REDEFINITION" }, + { GSM48_MT_RR_MEAS_REP, "MEASUREMENT REPORT" }, + { GSM48_MT_RR_CLSM_CHG, "CLASSMARK CHANGE" }, + { GSM48_MT_RR_CLSM_ENQ, "CLASSMARK ENQUIRY" }, + { GSM48_MT_RR_EXT_MEAS_REP, "EXTENDED MEASUREMENT REPORT" }, + { GSM48_MT_RR_EXT_MEAS_REP_ORD, "EXTENDED MEASUREMENT ORDER" }, + { GSM48_MT_RR_GPRS_SUSP_REQ, "GPRS SUSPENSION REQUEST" }, + { GSM48_MT_RR_DTM_INFO, "DTM INFORMATION" }, + + /* VGCS uplink control messages */ + { GSM48_MT_RR_VGCS_UPL_GRANT, "VGCS UPLINK GRANT" }, + { GSM48_MT_RR_UPLINK_RELEASE, "UPLINK RELEASE" }, + { GSM48_MT_RR_UPLINK_FREE, "0c" }, + { GSM48_MT_RR_UPLINK_BUSY, "UPLINK BUSY" }, + { GSM48_MT_RR_TALKER_IND, "TALKER INDICATION" }, + + /* Application messages */ + { GSM48_MT_RR_APP_INFO, "Application Information" }, + { 0, NULL } +}; + +const char *gsm48_rr_msg_name(uint8_t msgtype) +{ + return get_value_string(rr_msg_names, msgtype); +} + + const struct value_string gsm48_chan_mode_names[] = { { GSM48_CMODE_SIGN, "SIGNALLING" }, { GSM48_CMODE_SPEECH_V1, "SPEECH_V1" }, diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index dc8559f..9ea3377 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -126,6 +126,7 @@ gsm48_att_tlvdef; gsm48_cc_msg_name; +gsm48_rr_msg_name; gsm48_cc_state_name; gsm48_construct_ra; gsm48_hdr_gmm_cipherable; -- To view, visit https://gerrit.osmocom.org/1056 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3ceb070bf4dc8f5a071a5d43c6aa2d4e84c2dec6 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore 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 Oct 27 11:36:29 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 27 Oct 2016 11:36:29 +0000 Subject: [PATCH] libosmocore[master]: COSMETIC: moving rr_cause_name() in gsm48.c Message-ID: Review at https://gerrit.osmocom.org/1165 COSMETIC: moving rr_cause_name() in gsm48.c rr_cause_name() is located a far of from value_string rr_cause_names[] while other value string functions are located right below their related value string definitions. This commit moves rr_cause_name() below rr_cause_names[] as it should be Change-Id: Ie6c03a6ea02c370d8733db5ba2a709610cd70ce7 --- M src/gsm/gsm48.c 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/65/1165/1 diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c index b4740cf..46f0b2f 100644 --- a/src/gsm/gsm48.c +++ b/src/gsm/gsm48.c @@ -162,6 +162,11 @@ { 0, NULL }, }; +const char *rr_cause_name(uint8_t cause) +{ + return get_value_string(rr_cause_names, cause); +} + /* FIXME: convert to value_string */ static const char *cc_state_names[32] = { "NULL", @@ -248,11 +253,6 @@ const char *gsm48_cc_msg_name(uint8_t msgtype) { return get_value_string(cc_msg_names, msgtype); -} - -const char *rr_cause_name(uint8_t cause) -{ - return get_value_string(rr_cause_names, cause); } const struct value_string gsm48_chan_mode_names[] = { -- To view, visit https://gerrit.osmocom.org/1165 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie6c03a6ea02c370d8733db5ba2a709610cd70ce7 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Thu Oct 27 12:05:07 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 27 Oct 2016 12:05:07 +0000 Subject: [PATCH] osmo-iuh[master]: hnbgw: parameterize iuh local port: add vty cmd 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/1060 to look at the new patch set (#2). hnbgw: parameterize iuh local port: add vty cmd For completeness' sake, add VTY command to set the local Iuh port, to go with the command that sets the local IP. Change-Id: I4b5e9fe9fcfa489069a0728d47899ef4a61f7ce5 --- M src/hnbgw_vty.c 1 file changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/60/1060/2 diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index 93c1f9a..ff75aea 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -114,6 +114,14 @@ return CMD_SUCCESS; } +DEFUN(cfg_hnbgw_iuh_local_port, cfg_hnbgw_iuh_local_port_cmd, "local-port <1-65535>", + "Accept Iuh connections on local port\n" + "Local interface port (default: 29169)") +{ + g_hnb_gw->config.iuh_local_port = atoi(argv[0]); + return CMD_SUCCESS; +} + DEFUN(cfg_hnbgw_iuh_hnbap_allow_tmsi, cfg_hnbgw_iuh_hnbap_allow_tmsi_cmd, "hnbap-allow-tmsi (0|1)", "Allow HNBAP UE Register messages with TMSI or PTMSI identity\n" @@ -133,12 +141,17 @@ static int config_write_hnbgw_iuh(struct vty *vty) { const char *addr; + uint16_t port; vty_out(vty, " iuh%s", VTY_NEWLINE); addr = g_hnb_gw->config.iuh_local_ip; if (addr && (strcmp(addr, HNBGW_LOCAL_IP_DEFAULT) != 0)) vty_out(vty, " local-ip %s%s", addr, VTY_NEWLINE); + + port = g_hnb_gw->config.iuh_local_port; + if (port && port != IUH_DEFAULT_SCTP_PORT) + vty_out(vty, " local-port %u%s", port, VTY_NEWLINE); if (g_hnb_gw->config.hnbap_allow_tmsi) vty_out(vty, " hnbap-allow-tmsi 1%s", VTY_NEWLINE); @@ -160,6 +173,7 @@ vty_install_default(IUH_NODE); install_element(IUH_NODE, &cfg_hnbgw_iuh_local_ip_cmd); + install_element(IUH_NODE, &cfg_hnbgw_iuh_local_port_cmd); install_element(IUH_NODE, &cfg_hnbgw_iuh_hnbap_allow_tmsi_cmd); install_element_ve(&show_hnb_cmd); -- To view, visit https://gerrit.osmocom.org/1060 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4b5e9fe9fcfa489069a0728d47899ef4a61f7ce5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh 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 Oct 27 12:05:07 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 27 Oct 2016 12:05:07 +0000 Subject: [PATCH] osmo-iuh[master]: hnbgw: vty: set explicit go_parent_cb 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/1061 to look at the new patch set (#2). hnbgw: vty: set explicit go_parent_cb A second level of depth will be added to the hnbgw node soon, which will need explicit go-parent logic. Change-Id: I8d1c18a396c215e8425ae49872b5c73316087d7d --- M include/osmocom/iuh/hnbgw.h M src/hnbgw.c M src/hnbgw_vty.c 3 files changed, 23 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/61/1061/2 diff --git a/include/osmocom/iuh/hnbgw.h b/include/osmocom/iuh/hnbgw.h index 92d7674..850c4d9 100644 --- a/include/osmocom/iuh/hnbgw.h +++ b/include/osmocom/iuh/hnbgw.h @@ -148,3 +148,4 @@ void hnb_context_release(struct hnb_context *ctx); void hnbgw_vty_init(struct hnb_gw *gw, void *tall_ctx); +int hnbgw_vty_go_parent(struct vty *vty); diff --git a/src/hnbgw.c b/src/hnbgw.c index 2eecbea..16a2e43 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -346,6 +346,7 @@ static struct vty_app_info vty_info = { .name = "OsmoHNBGW", .version = "0", + .go_parent_cb = hnbgw_vty_go_parent, }; static struct { diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index ff75aea..a458c76 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -54,6 +54,27 @@ return CMD_SUCCESS; } +int hnbgw_vty_go_parent(struct vty *vty) +{ + switch (vty->node) { + case IUH_NODE: + vty->node = HNBGW_NODE; + vty->index = NULL; + break; + default: + case HNBGW_NODE: + vty->node = CONFIG_NODE; + vty->index = NULL; + break; + case CONFIG_NODE: + vty->node = ENABLE_NODE; + vty->index = NULL; + break; + } + + return vty->node; +} + static void vty_dump_hnb_info(struct vty *vty, struct hnb_context *hnb) { struct hnbgw_context_map *map; -- To view, visit https://gerrit.osmocom.org/1061 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8d1c18a396c215e8425ae49872b5c73316087d7d Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Oct 27 12:05:07 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 27 Oct 2016 12:05:07 +0000 Subject: [PATCH] osmo-iuh[master]: hnbgw: parameterize IuCS and IuPS ips and ports: add vty cmds 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/1062 to look at the new patch set (#2). hnbgw: parameterize IuCS and IuPS ips and ports: add vty cmds Basically copy-paste the Iuh local-ip and local-port code to provide parameterization of the IuCS and IuPS remote addresses. Add IUCS and IUPS nodes, enhance go_parent_cb and config writing accordingly. Change-Id: I2c28977011009df4e1fa472290bbbc359e406971 --- M include/osmocom/iuh/hnbgw.h M include/osmocom/iuh/vty.h M src/hnbgw.c M src/hnbgw_vty.c 4 files changed, 139 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/62/1062/2 diff --git a/include/osmocom/iuh/hnbgw.h b/include/osmocom/iuh/hnbgw.h index 850c4d9..4880d48 100644 --- a/include/osmocom/iuh/hnbgw.h +++ b/include/osmocom/iuh/hnbgw.h @@ -20,6 +20,8 @@ #define HNBGW_LOCAL_IP_DEFAULT "0.0.0.0" +#define HNBGW_IUCS_REMOTE_IP_DEFAULT "127.0.0.1" +#define HNBGW_IUPS_REMOTE_IP_DEFAULT "127.0.0.2" /* 25.467 Section 7.1 */ #define IUH_DEFAULT_SCTP_PORT 29169 @@ -116,6 +118,10 @@ /*! The UDP port where we receive multiplexed CS user * plane traffic from HNBs */ uint16_t iuh_cs_mux_port; + const char *iucs_remote_ip; + uint16_t iucs_remote_port; + const char *iups_remote_ip; + uint16_t iups_remote_port; uint16_t rnc_id; bool hnbap_allow_tmsi; } config; diff --git a/include/osmocom/iuh/vty.h b/include/osmocom/iuh/vty.h index 905a949..3d05da5 100644 --- a/include/osmocom/iuh/vty.h +++ b/include/osmocom/iuh/vty.h @@ -5,5 +5,7 @@ enum osmo_iuh_vty_node { HNBGW_NODE = _LAST_OSMOVTY_NODE + 1, IUH_NODE, + IUCS_NODE, + IUPS_NODE, }; diff --git a/src/hnbgw.c b/src/hnbgw.c index 16a2e43..acca643 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -80,6 +80,14 @@ gw->config.iuh_local_ip = talloc_strdup(gw, HNBGW_LOCAL_IP_DEFAULT); gw->config.iuh_local_port = IUH_DEFAULT_SCTP_PORT; + gw->config.iucs_remote_ip = talloc_strdup(gw, + HNBGW_IUCS_REMOTE_IP_DEFAULT); + gw->config.iucs_remote_port = SUA_PORT; + + gw->config.iups_remote_ip = talloc_strdup(gw, + HNBGW_IUPS_REMOTE_IP_DEFAULT); + gw->config.iups_remote_port = SUA_PORT; + gw->next_ue_ctx_id = 23; INIT_LLIST_HEAD(&gw->hnb_list); INIT_LLIST_HEAD(&gw->ue_list); @@ -498,8 +506,16 @@ osmo_sua_set_log_area(DSUA); ranap_set_log_area(DRANAP); - g_hnb_gw->cnlink_cs = hnbgw_cnlink_init(g_hnb_gw, "127.0.0.1", SUA_PORT, 0); - g_hnb_gw->cnlink_ps = hnbgw_cnlink_init(g_hnb_gw, "127.0.0.2", SUA_PORT, 1); + OSMO_ASSERT(g_hnb_gw->config.iucs_remote_ip); + g_hnb_gw->cnlink_cs = hnbgw_cnlink_init(g_hnb_gw, + g_hnb_gw->config.iucs_remote_ip, + g_hnb_gw->config.iucs_remote_port, + 0); + OSMO_ASSERT(g_hnb_gw->config.iups_remote_ip); + g_hnb_gw->cnlink_ps = hnbgw_cnlink_init(g_hnb_gw, + g_hnb_gw->config.iups_remote_ip, + g_hnb_gw->config.iups_remote_port, + 1); OSMO_ASSERT(g_hnb_gw->config.iuh_local_ip); LOGP(DMAIN, LOGL_NOTICE, "Listening for Iuh at %s %d\n", diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index a458c76..59871da 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -24,6 +24,7 @@ #include #include +#include static void *tall_hnb_ctx = NULL; static struct hnb_gw *g_hnb_gw = NULL; @@ -54,10 +55,38 @@ return CMD_SUCCESS; } +static struct cmd_node iucs_node = { + IUCS_NODE, + "%s(config-hnbgw-iucs)# ", + 1, +}; + +DEFUN(cfg_hnbgw_iucs, cfg_hnbgw_iucs_cmd, + "iucs", "Configure IuCS options") +{ + vty->node = IUCS_NODE; + return CMD_SUCCESS; +} + +static struct cmd_node iups_node = { + IUPS_NODE, + "%s(config-hnbgw-iups)# ", + 1, +}; + +DEFUN(cfg_hnbgw_iups, cfg_hnbgw_iups_cmd, + "iups", "Configure IuPS options") +{ + vty->node = IUPS_NODE; + return CMD_SUCCESS; +} + int hnbgw_vty_go_parent(struct vty *vty) { switch (vty->node) { case IUH_NODE: + case IUCS_NODE: + case IUPS_NODE: vty->node = HNBGW_NODE; vty->index = NULL; break; @@ -153,6 +182,40 @@ return CMD_SUCCESS; } +DEFUN(cfg_hnbgw_iucs_remote_ip, cfg_hnbgw_iucs_remote_ip_cmd, "remote-ip A.B.C.D", + "Address to establish IuCS core network link to\n" + "Remote IuCS IP address (default: " HNBGW_IUCS_REMOTE_IP_DEFAULT ")") +{ + talloc_free((void*)g_hnb_gw->config.iucs_remote_ip); + g_hnb_gw->config.iucs_remote_ip = talloc_strdup(tall_hnb_ctx, argv[0]); + return CMD_SUCCESS; +} + +DEFUN(cfg_hnbgw_iucs_remote_port, cfg_hnbgw_iucs_remote_port_cmd, "remote-port <1-65535>", + "Remote port to establish IuCS core network link to\n" + "Remote IuCS port (default: 14001)") +{ + g_hnb_gw->config.iucs_remote_port = atoi(argv[0]); + return CMD_SUCCESS; +} + +DEFUN(cfg_hnbgw_iups_remote_ip, cfg_hnbgw_iups_remote_ip_cmd, "remote-ip A.B.C.D", + "Address to establish IuPS core network link to\n" + "Remote IuPS IP address (default: " HNBGW_IUPS_REMOTE_IP_DEFAULT ")") +{ + talloc_free((void*)g_hnb_gw->config.iups_remote_ip); + g_hnb_gw->config.iups_remote_ip = talloc_strdup(tall_hnb_ctx, argv[0]); + return CMD_SUCCESS; +} + +DEFUN(cfg_hnbgw_iups_remote_port, cfg_hnbgw_iups_remote_port_cmd, "remote-port <1-65535>", + "Remote port to establish IuPS core network link to\n" + "Remote IuPS port (default: 14001)") +{ + g_hnb_gw->config.iups_remote_port = atoi(argv[0]); + return CMD_SUCCESS; +} + static int config_write_hnbgw(struct vty *vty) { vty_out(vty, "hnbgw%s", VTY_NEWLINE); @@ -180,6 +243,42 @@ return CMD_SUCCESS; } +static int config_write_hnbgw_iucs(struct vty *vty) +{ + const char *addr; + uint16_t port; + + vty_out(vty, " iucs%s", VTY_NEWLINE); + + addr = g_hnb_gw->config.iucs_remote_ip; + if (addr && (strcmp(addr, HNBGW_IUCS_REMOTE_IP_DEFAULT) != 0)) + vty_out(vty, " remote-ip %s%s", addr, VTY_NEWLINE); + + port = g_hnb_gw->config.iucs_remote_port; + if (port && port != SUA_PORT) + vty_out(vty, " remote-port %u%s", port, VTY_NEWLINE); + + return CMD_SUCCESS; +} + +static int config_write_hnbgw_iups(struct vty *vty) +{ + const char *addr; + uint16_t port; + + vty_out(vty, " iups%s", VTY_NEWLINE); + + addr = g_hnb_gw->config.iups_remote_ip; + if (addr && (strcmp(addr, HNBGW_IUPS_REMOTE_IP_DEFAULT) != 0)) + vty_out(vty, " remote-ip %s%s", addr, VTY_NEWLINE); + + port = g_hnb_gw->config.iups_remote_port; + if (port && port != SUA_PORT) + vty_out(vty, " remote-port %u%s", port, VTY_NEWLINE); + + return CMD_SUCCESS; +} + void hnbgw_vty_init(struct hnb_gw *gw, void *tall_ctx) { g_hnb_gw = gw; @@ -197,6 +296,20 @@ install_element(IUH_NODE, &cfg_hnbgw_iuh_local_port_cmd); install_element(IUH_NODE, &cfg_hnbgw_iuh_hnbap_allow_tmsi_cmd); + install_element(HNBGW_NODE, &cfg_hnbgw_iucs_cmd); + install_node(&iucs_node, config_write_hnbgw_iucs); + vty_install_default(IUCS_NODE); + + install_element(IUCS_NODE, &cfg_hnbgw_iucs_remote_ip_cmd); + install_element(IUCS_NODE, &cfg_hnbgw_iucs_remote_port_cmd); + + install_element(HNBGW_NODE, &cfg_hnbgw_iups_cmd); + install_node(&iups_node, config_write_hnbgw_iups); + vty_install_default(IUPS_NODE); + + install_element(IUPS_NODE, &cfg_hnbgw_iups_remote_ip_cmd); + install_element(IUPS_NODE, &cfg_hnbgw_iups_remote_port_cmd); + install_element_ve(&show_hnb_cmd); install_element_ve(&show_ue_cmd); install_element_ve(&show_talloc_cmd); -- To view, visit https://gerrit.osmocom.org/1062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2c28977011009df4e1fa472290bbbc359e406971 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh 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 Oct 27 12:05:08 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Thu, 27 Oct 2016 12:05:08 +0000 Subject: [PATCH] osmo-iuh[master]: hnbgw: cosmetic: local-ip config: drop getter function Message-ID: Review at https://gerrit.osmocom.org/1166 hnbgw: cosmetic: local-ip config: drop getter function Use the g_hnb_gw->config.iuh_local_ip directly, drop hnbgw_get_iuh_local_ip(). Change-Id: Ie91aea82ae5d128ad735a0857ea814b440c3232c Suggested-by: hwelte --- M include/osmocom/iuh/hnbgw.h M src/hnbgw.c 2 files changed, 5 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/66/1166/1 diff --git a/include/osmocom/iuh/hnbgw.h b/include/osmocom/iuh/hnbgw.h index 6b5a855..92d7674 100644 --- a/include/osmocom/iuh/hnbgw.h +++ b/include/osmocom/iuh/hnbgw.h @@ -148,5 +148,3 @@ void hnb_context_release(struct hnb_context *ctx); void hnbgw_vty_init(struct hnb_gw *gw, void *tall_ctx); - -const char *hnbgw_get_iuh_local_ip(struct hnb_gw *gw); diff --git a/src/hnbgw.c b/src/hnbgw.c index eb36367..2eecbea 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -76,6 +76,8 @@ { struct hnb_gw *gw = talloc_zero(ctx, struct hnb_gw); + /* strdup so we can easily talloc_free in the VTY code */ + gw->config.iuh_local_ip = talloc_strdup(gw, HNBGW_LOCAL_IP_DEFAULT); gw->config.iuh_local_port = IUH_DEFAULT_SCTP_PORT; gw->next_ue_ctx_id = 23; @@ -308,18 +310,6 @@ return 0; } -/* - * Return IP address passed to the hnbgw/iuh/local-ip command, or - * HNBGW_LOCAL_IP_DEFAULT. - */ -const char *hnbgw_get_iuh_local_ip(struct hnb_gw *gw) -{ - const char *addr = gw->config.iuh_local_ip; - if (!addr) - addr = HNBGW_LOCAL_IP_DEFAULT; - return addr; -} - static const struct log_info_cat log_cat[] = { [DMAIN] = { .name = "DMAIN", .loglevel = LOGL_DEBUG, .enabled = 1, @@ -510,8 +500,9 @@ g_hnb_gw->cnlink_cs = hnbgw_cnlink_init(g_hnb_gw, "127.0.0.1", SUA_PORT, 0); g_hnb_gw->cnlink_ps = hnbgw_cnlink_init(g_hnb_gw, "127.0.0.2", SUA_PORT, 1); + OSMO_ASSERT(g_hnb_gw->config.iuh_local_ip); LOGP(DMAIN, LOGL_NOTICE, "Listening for Iuh at %s %d\n", - hnbgw_get_iuh_local_ip(g_hnb_gw), + g_hnb_gw->config.iuh_local_ip, g_hnb_gw->config.iuh_local_port); srv = osmo_stream_srv_link_create(tall_hnb_ctx); if (!srv) { @@ -520,7 +511,7 @@ } osmo_stream_srv_link_set_data(srv, g_hnb_gw); osmo_stream_srv_link_set_proto(srv, IPPROTO_SCTP); - osmo_stream_srv_link_set_addr(srv, hnbgw_get_iuh_local_ip(g_hnb_gw)); + osmo_stream_srv_link_set_addr(srv, g_hnb_gw->config.iuh_local_ip); osmo_stream_srv_link_set_port(srv, g_hnb_gw->config.iuh_local_port); osmo_stream_srv_link_set_accept_cb(srv, accept_cb); -- To view, visit https://gerrit.osmocom.org/1166 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie91aea82ae5d128ad735a0857ea814b440c3232c Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu Oct 27 12:44:48 2016 From: gerrit-no-reply at lists.osmocom.org (mrinal) Date: Thu, 27 Oct 2016 12:44:48 +0000 Subject: [PATCH] osmo-pcu[master]: Add BTS level counters Message-ID: Review at https://gerrit.osmocom.org/1167 Add BTS level counters Adds counters for MCS blocks, 11 bit Rach counters and others. Change-Id: I605b0d66eb217decd35cbb8f87abfa577760245a --- M src/bts.cpp M src/bts.h M src/tbf.cpp M src/tbf_dl.cpp M src/tbf_ul.cpp 5 files changed, 288 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/67/1167/1 diff --git a/src/bts.cpp b/src/bts.cpp index 4aa5c2c..febc45c 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -88,6 +88,46 @@ { "llc.dl_bytes", "RLC encapsulated PDUs"}, { "llc.ul_bytes", "full PDUs received "}, { "rach.requests", "RACH requests "}, + { "11bit_rach.requests", "11BIT_RACH requests "}, + { "immediate.assignment_UL", "Immediate Assign UL "}, + { "immediate.assignment_DL", "Immediate Assign DL "}, + { "pkt.ul_assignment", "Packet UL Assignment "}, + { "pkt.dl_assignment", "Packet DL Assignment "}, + { "ul.control", "UL control Block "}, + { "ul.assignment_poll_timeout", "UL Assign Timeout "}, + { "ul.assignment_failed", "UL Assign Failed "}, + { "dl.assignment_timeout", "DL Assign Timeout "}, + { "dl.assignment_failed", "DL Assign Failed "}, + { "pkt.ul_ack_nack_timeout", "PUAN Poll Timeout "}, + { "pkt.ul_ack_nack_failed", "PUAN poll Failed "}, + { "pkt.dl_ack_nack_timeout", "PDAN poll Timeout "}, + { "pkt.dl_ack_nack_failed", "PDAN poll Failed "}, + { "gprs.downlink_cs1", "CS1 downlink "}, + { "gprs.downlink_cs2", "CS2 downlink "}, + { "gprs.downlink_cs3", "CS3 downlink "}, + { "gprs.downlink_cs4", "CS4 downlink "}, + { "egprs.downlink_mcs1", "MCS1 downlink "}, + { "egprs.downlink_mcs2", "MCS2 downlink "}, + { "egprs.downlink_mcs3", "MCS3 downlink "}, + { "egprs.downlink_mcs4", "MCS4 downlink "}, + { "egprs.downlink_mcs5", "MCS5 downlink "}, + { "egprs.downlink_mcs6", "MCS6 downlink "}, + { "egprs.downlink_mcs7", "MCS7 downlink "}, + { "egprs.downlink_mcs8", "MCS8 downlink "}, + { "egprs.downlink_mcs9", "MCS9 downlink "}, + { "gprs.uplink_cs1", "CS1 Uplink "}, + { "gprs.uplink_cs2", "CS2 Uplink "}, + { "gprs.uplink_cs3", "CS3 Uplink "}, + { "gprs.uplink_cs4", "CS4 Uplink "}, + { "egprs.uplink_mcs1", "MCS1 Uplink "}, + { "egprs.uplink_mcs2", "MCS2 Uplink "}, + { "egprs.uplink_mcs3", "MCS3 Uplink "}, + { "egprs.uplink_mcs4", "MCS4 Uplink "}, + { "egprs.uplink_mcs5", "MCS5 Uplink "}, + { "egprs.uplink_mcs6", "MCS6 Uplink "}, + { "egprs.uplink_mcs7", "MCS7 Uplink "}, + { "egprs.uplink_mcs8", "MCS8 Uplink "}, + { "egprs.uplink_mcs9", "MCS9 Uplink "}, }; static const struct rate_ctr_group_desc bts_ctrg_desc = { @@ -484,6 +524,9 @@ rach_frame(); + if (is_11bit) + rach_frame_11bit(); + LOGP(DRLCMAC, LOGL_DEBUG, "MS requests UL TBF on RACH, so we provide " "one:\n"); @@ -550,8 +593,10 @@ m_bts.trx[trx_no].arfcn, ts_no, tsc, usf, 0, sb_fn, m_bts.alpha, m_bts.gamma, -1, burst_type, sb); - if (plen >= 0) + if (plen >= 0) { + immediate_assignment_ul_tbf(); pcu_l1if_tx_agch(immediate_assignment, plen); + } bitvec_free(immediate_assignment); @@ -676,8 +721,11 @@ (tbf->pdch[ts]->last_rts_fn + 21216) % 2715648, tbf->ta(), tbf->trx->arfcn, ts, tbf->tsc(), 7, poll, tbf->poll_fn, m_bts.alpha, m_bts.gamma, -1); - if (plen >= 0) + if (plen >= 0) { + immediate_assignment_dl_tbf(); pcu_l1if_tx_pch(immediate_assignment, plen, imsi); + } + bitvec_free(immediate_assignment); } @@ -1326,6 +1374,7 @@ decode_gsm_rlcmac_uplink(rlc_block, ul_control_block); LOGPC(DCSN1, LOGL_NOTICE, "\n"); LOGP(DRLCMAC, LOGL_DEBUG, "------------------------- RX : Uplink Control Block -------------------------\n"); + bts()->rlc_rcvd_control(); switch (ul_control_block->u.MESSAGE_TYPE) { case MT_PACKET_CONTROL_ACK: rcv_control_ack(&ul_control_block->u.Packet_Control_Acknowledgement, fn); diff --git a/src/bts.h b/src/bts.h index 8bea371..6c6f916 100644 --- a/src/bts.h +++ b/src/bts.h @@ -48,6 +48,7 @@ struct BTS; struct GprsMs; + /* * PDCH instance */ @@ -265,6 +266,46 @@ CTR_LLC_DL_BYTES, CTR_LLC_UL_BYTES, CTR_RACH_REQUESTS, + CTR_11BIT_RACH_REQUESTS, + CTR_IMMEDIATE_ASSIGN_UL_TBF, + CTR_IMMEDIATE_ASSIGN_DL_TBF, + CTR_PKT_UL_ASSIGNMENT, + CTR_PKT_DL_ASSIGNMENT, + CTR_RLC_RECV_CONTROL, + CTR_PUA_POLL_TIMEDOUT, + CTR_PUA_POLL_FAILED, + CTR_PDA_POLL_TIMEDOUT, + CTR_PDA_POLL_FAILED, + CTR_PUAN_POLL_TIMEDOUT, + CTR_PUAN_POLL_FAILED, + CTR_PDAN_POLL_TIMEDOUT, + CTR_PDAN_POLL_FAILED, + CTR_GPRS_DL_CS1, + CTR_GPRS_DL_CS2, + CTR_GPRS_DL_CS3, + CTR_GPRS_DL_CS4, + CTR_EGPRS_DL_MCS1, + CTR_EGPRS_DL_MCS2, + CTR_EGPRS_DL_MCS3, + CTR_EGPRS_DL_MCS4, + CTR_EGPRS_DL_MCS5, + CTR_EGPRS_DL_MCS6, + CTR_EGPRS_DL_MCS7, + CTR_EGPRS_DL_MCS8, + CTR_EGPRS_DL_MCS9, + CTR_GPRS_UL_CS1, + CTR_GPRS_UL_CS2, + CTR_GPRS_UL_CS3, + CTR_GPRS_UL_CS4, + CTR_EGPRS_UL_MCS1, + CTR_EGPRS_UL_MCS2, + CTR_EGPRS_UL_MCS3, + CTR_EGPRS_UL_MCS4, + CTR_EGPRS_UL_MCS5, + CTR_EGPRS_UL_MCS6, + CTR_EGPRS_UL_MCS7, + CTR_EGPRS_UL_MCS8, + CTR_EGPRS_UL_MCS9, }; enum { @@ -352,6 +393,46 @@ void llc_dl_bytes(int bytes); void llc_ul_bytes(int bytes); void rach_frame(); + void rach_frame_11bit(); + void immediate_assignment_ul_tbf(); + void immediate_assignment_dl_tbf(); + void pkt_ul_assignment(); + void pkt_dl_assignemnt(); + void rlc_rcvd_control(); + void pua_poll_timedout(); + void pua_poll_failed(); + void pda_poll_timedout(); + void pda_poll_failed(); + void pkt_ul_ack_nack_poll_timedout(); + void pkt_ul_ack_nack_poll_failed(); + void pkt_dl_ack_nack_poll_timedout(); + void pkt_dl_ack_nack_poll_failed(); + void gprs_dl_cs1(); + void gprs_dl_cs2(); + void gprs_dl_cs3(); + void gprs_dl_cs4(); + void egprs_dl_mcs1(); + void egprs_dl_mcs2(); + void egprs_dl_mcs3(); + void egprs_dl_mcs4(); + void egprs_dl_mcs5(); + void egprs_dl_mcs6(); + void egprs_dl_mcs7(); + void egprs_dl_mcs8(); + void egprs_dl_mcs9(); + void gprs_ul_cs1(); + void gprs_ul_cs2(); + void gprs_ul_cs3(); + void gprs_ul_cs4(); + void egprs_ul_mcs1(); + void egprs_ul_mcs2(); + void egprs_ul_mcs3(); + void egprs_ul_mcs4(); + void egprs_ul_mcs5(); + void egprs_ul_mcs6(); + void egprs_ul_mcs7(); + void egprs_ul_mcs8(); + void egprs_ul_mcs9(); void ms_present(int32_t n); int32_t ms_present_get(); @@ -505,6 +586,46 @@ 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(immediate_assignment_ul_tbf, CTR_IMMEDIATE_ASSIGN_UL_TBF); +CREATE_COUNT_INLINE(immediate_assignment_dl_tbf, CTR_IMMEDIATE_ASSIGN_DL_TBF); +CREATE_COUNT_INLINE(pkt_ul_assignment, CTR_PKT_UL_ASSIGNMENT); +CREATE_COUNT_INLINE(pkt_dl_assignemnt, CTR_PKT_DL_ASSIGNMENT); +CREATE_COUNT_INLINE(rlc_rcvd_control, CTR_RLC_RECV_CONTROL); +CREATE_COUNT_INLINE(pua_poll_timedout, CTR_PUA_POLL_TIMEDOUT); +CREATE_COUNT_INLINE(pua_poll_failed, CTR_PUA_POLL_FAILED); +CREATE_COUNT_INLINE(pda_poll_timedout, CTR_PDA_POLL_TIMEDOUT); +CREATE_COUNT_INLINE(pda_poll_failed, CTR_PDA_POLL_FAILED); +CREATE_COUNT_INLINE(pkt_ul_ack_nack_poll_timedout, CTR_PUAN_POLL_TIMEDOUT); +CREATE_COUNT_INLINE(pkt_ul_ack_nack_poll_failed, CTR_PUAN_POLL_FAILED); +CREATE_COUNT_INLINE(pkt_dl_ack_nack_poll_timedout, CTR_PDAN_POLL_TIMEDOUT); +CREATE_COUNT_INLINE(pkt_dl_ack_nack_poll_failed, CTR_PDAN_POLL_FAILED); +CREATE_COUNT_INLINE(gprs_dl_cs1, CTR_GPRS_DL_CS1); +CREATE_COUNT_INLINE(gprs_dl_cs2, CTR_GPRS_DL_CS2); +CREATE_COUNT_INLINE(gprs_dl_cs3, CTR_GPRS_DL_CS3); +CREATE_COUNT_INLINE(gprs_dl_cs4, CTR_GPRS_DL_CS4); +CREATE_COUNT_INLINE(egprs_dl_mcs1, CTR_EGPRS_DL_MCS1); +CREATE_COUNT_INLINE(egprs_dl_mcs2, CTR_EGPRS_DL_MCS2); +CREATE_COUNT_INLINE(egprs_dl_mcs3, CTR_EGPRS_DL_MCS3); +CREATE_COUNT_INLINE(egprs_dl_mcs4, CTR_EGPRS_DL_MCS4); +CREATE_COUNT_INLINE(egprs_dl_mcs5, CTR_EGPRS_DL_MCS5); +CREATE_COUNT_INLINE(egprs_dl_mcs6, CTR_EGPRS_DL_MCS6); +CREATE_COUNT_INLINE(egprs_dl_mcs7, CTR_EGPRS_DL_MCS7); +CREATE_COUNT_INLINE(egprs_dl_mcs8, CTR_EGPRS_DL_MCS8); +CREATE_COUNT_INLINE(egprs_dl_mcs9, CTR_EGPRS_DL_MCS9); +CREATE_COUNT_INLINE(gprs_ul_cs1, CTR_GPRS_UL_CS1); +CREATE_COUNT_INLINE(gprs_ul_cs2, CTR_GPRS_UL_CS2); +CREATE_COUNT_INLINE(gprs_ul_cs3, CTR_GPRS_UL_CS3); +CREATE_COUNT_INLINE(gprs_ul_cs4, CTR_GPRS_UL_CS4); +CREATE_COUNT_INLINE(egprs_ul_mcs1, CTR_EGPRS_UL_MCS1); +CREATE_COUNT_INLINE(egprs_ul_mcs2, CTR_EGPRS_UL_MCS2); +CREATE_COUNT_INLINE(egprs_ul_mcs3, CTR_EGPRS_UL_MCS3); +CREATE_COUNT_INLINE(egprs_ul_mcs4, CTR_EGPRS_UL_MCS4); +CREATE_COUNT_INLINE(egprs_ul_mcs5, CTR_EGPRS_UL_MCS5); +CREATE_COUNT_INLINE(egprs_ul_mcs6, CTR_EGPRS_UL_MCS6); +CREATE_COUNT_INLINE(egprs_ul_mcs7, CTR_EGPRS_UL_MCS7); +CREATE_COUNT_INLINE(egprs_ul_mcs8, CTR_EGPRS_UL_MCS8); +CREATE_COUNT_INLINE(egprs_ul_mcs9, CTR_EGPRS_UL_MCS9); #undef CREATE_COUNT_INLINE diff --git a/src/tbf.cpp b/src/tbf.cpp index 0ac8ace..42526b7 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -508,12 +508,14 @@ } ul_ack_state = GPRS_RLCMAC_UL_ACK_NONE; bts->rlc_ack_timedout(); + bts->pkt_ul_ack_nack_poll_timedout(); if (state_is(GPRS_RLCMAC_FINISHED)) { gprs_rlcmac_ul_tbf *ul_tbf = as_ul_tbf(this); ul_tbf->m_n3103++; if (ul_tbf->m_n3103 == ul_tbf->bts->bts_data()->n3103) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3103 exceeded\n"); + bts->pkt_ul_ack_nack_poll_failed(); ul_tbf->set_state(GPRS_RLCMAC_RELEASING); tbf_timer_start(ul_tbf, 3169, ul_tbf->bts->bts_data()->t3169, 0); return; @@ -533,11 +535,13 @@ ul_ass_state = GPRS_RLCMAC_UL_ASS_NONE; n3105++; bts->rlc_ass_timedout(); + bts->pua_poll_timedout(); if (n3105 == bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); tbf_timer_start(this, 3195, bts_data()->t3195, 0); bts->rlc_ass_failed(); + bts->pua_poll_failed(); return; } /* reschedule UL assignment */ @@ -553,11 +557,13 @@ dl_ass_state = GPRS_RLCMAC_DL_ASS_NONE; n3105++; bts->rlc_ass_timedout(); + bts->pda_poll_timedout(); if (n3105 == bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); set_state(GPRS_RLCMAC_RELEASING); tbf_timer_start(this, 3195, bts_data()->t3195, 0); bts->rlc_ass_failed(); + bts->pda_poll_failed(); return; } /* reschedule DL assignment */ @@ -574,12 +580,15 @@ dl_tbf->n3105++; if (dl_tbf->state_is(GPRS_RLCMAC_RELEASING)) bts->rlc_rel_timedout(); - else + else { bts->rlc_ack_timedout(); + bts->pkt_dl_ack_nack_poll_timedout(); + } if (dl_tbf->n3105 == dl_tbf->bts->bts_data()->n3105) { LOGP(DRLCMAC, LOGL_NOTICE, "- N3105 exceeded\n"); dl_tbf->set_state(GPRS_RLCMAC_RELEASING); tbf_timer_start(dl_tbf, 3195, dl_tbf->bts_data()->t3195, 0); + bts->pkt_dl_ack_nack_poll_failed(); bts->rlc_ack_failed(); return; } @@ -991,6 +1000,8 @@ encode_gsm_rlcmac_downlink(ass_vec, mac_control_block); LOGPC(DCSN1, LOGL_NOTICE, "\n"); LOGP(DRLCMAC, LOGL_DEBUG, "------------------------- TX : Packet Downlink Assignment -------------------------\n"); + if (bts) + bts->pkt_dl_assignemnt(); bitvec_pack(ass_vec, msgb_put(msg, 23)); bitvec_free(ass_vec); talloc_free(mac_control_block); @@ -1064,6 +1075,8 @@ decode_gsm_rlcmac_downlink(ass_vec, mac_control_block); LOGPC(DCSN1, LOGL_NOTICE, "\n"); LOGP(DRLCMAC, LOGL_DEBUG, "------------------------- TX : Packet Uplink Assignment -------------------------\n"); + if (bts) + bts->pkt_ul_assignment(); bitvec_free(ass_vec); talloc_free(mac_control_block); diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index c89cd03..0df1aa8 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -630,6 +630,7 @@ 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); + uint8_t coding_scheme = 0; /* * 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 @@ -648,6 +649,56 @@ num_bsns += 1; } + coding_scheme = GprsCodingScheme::Scheme(cs); + if (cs.isGprs()) { + + switch (coding_scheme) { + case GprsCodingScheme::CS1 : + bts->gprs_dl_cs1(); + break; + case GprsCodingScheme::CS2 : + bts->gprs_dl_cs2(); + break; + case GprsCodingScheme::CS3 : + bts->gprs_dl_cs3(); + break; + case GprsCodingScheme::CS4 : + bts->gprs_dl_cs4(); + break; + } + + } else { + switch (coding_scheme) { + case GprsCodingScheme::MCS1 : + bts->egprs_dl_mcs1(); + break; + case GprsCodingScheme::MCS2 : + bts->egprs_dl_mcs2(); + break; + case GprsCodingScheme::MCS3 : + bts->egprs_dl_mcs3(); + break; + case GprsCodingScheme::MCS4 : + bts->egprs_dl_mcs4(); + break; + case GprsCodingScheme::MCS5 : + bts->egprs_dl_mcs5(); + break; + case GprsCodingScheme::MCS6 : + bts->egprs_dl_mcs6(); + break; + case GprsCodingScheme::MCS7 : + bts->egprs_dl_mcs7(); + break; + case GprsCodingScheme::MCS8 : + bts->egprs_dl_mcs8(); + break; + case GprsCodingScheme::MCS9 : + bts->egprs_dl_mcs9(); + break; + } + } + /* * if the intial mcs is 8 and retransmission mcs is either 6 or 3 * we have to include the padding of 6 octets in first segment diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index f67ffd7..3aeef3f 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -153,7 +153,7 @@ int8_t rssi = meas->have_rssi ? meas->rssi : 0; const uint16_t ws = m_window.ws(); - + uint8_t coding_scheme = 0; this->state_flags |= (1 << GPRS_RLCMAC_FLAG_UL_DATA); LOGP(DRLCMACUL, LOGL_DEBUG, "UL DATA TFI=%d received (V(Q)=%d .. " @@ -176,6 +176,56 @@ /* Increment RX-counter */ this->m_rx_counter++; + coding_scheme = GprsCodingScheme::Scheme(rlc->cs); + if (rlc->cs.isGprs()) { + switch (coding_scheme) { + case GprsCodingScheme::CS1 : + bts->gprs_ul_cs1(); + break; + case GprsCodingScheme::CS2 : + bts->gprs_ul_cs2(); + break; + case GprsCodingScheme::CS3 : + bts->gprs_ul_cs3(); + break; + case GprsCodingScheme::CS4 : + bts->gprs_ul_cs4(); + break; + } + + } else { + switch (coding_scheme) { + case GprsCodingScheme::MCS1 : + bts->egprs_ul_mcs1(); + break; + case GprsCodingScheme::MCS2 : + bts->egprs_ul_mcs2(); + break; + case GprsCodingScheme::MCS3 : + bts->egprs_ul_mcs3(); + break; + case GprsCodingScheme::MCS4 : + bts->egprs_ul_mcs4(); + break; + case GprsCodingScheme::MCS5 : + bts->egprs_ul_mcs5(); + break; + case GprsCodingScheme::MCS6 : + bts->egprs_ul_mcs6(); + break; + case GprsCodingScheme::MCS7 : + bts->egprs_ul_mcs7(); + break; + case GprsCodingScheme::MCS8 : + bts->egprs_ul_mcs8(); + break; + case GprsCodingScheme::MCS9 : + bts->egprs_ul_mcs9(); + break; + } + } + + /* Loop over num_blocks */ for (block_idx = 0; block_idx < rlc->num_data_blocks; block_idx++) { int num_chunks; -- To view, visit https://gerrit.osmocom.org/1167 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I605b0d66eb217decd35cbb8f87abfa577760245a Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: mrinal From gerrit-no-reply at lists.osmocom.org Thu Oct 27 13:16:08 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Thu, 27 Oct 2016 13:16:08 +0000 Subject: osmo-pcu[master]: Add BTS level counters In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/1167/1/src/bts.h File src/bts.h: Line 51: unrelated change -- To view, visit https://gerrit.osmocom.org/1167 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I605b0d66eb217decd35cbb8f87abfa577760245a Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: mrinal Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Oct 27 13:19:40 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Thu, 27 Oct 2016 13:19:40 +0000 Subject: osmo-pcu[master]: Add BTS level counters In-Reply-To: References: Message-ID: Patch Set 1: (2 comments) https://gerrit.osmocom.org/#/c/1167/1/src/tbf_dl.cpp File src/tbf_dl.cpp: Line 652: coding_scheme = GprsCodingScheme::Scheme(cs); separate function is preferred. https://gerrit.osmocom.org/#/c/1167/1/src/tbf_ul.cpp File src/tbf_ul.cpp: Line 179: coding_scheme = GprsCodingScheme::Scheme(rlc->cs); separate function is prefered -- To view, visit https://gerrit.osmocom.org/1167 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I605b0d66eb217decd35cbb8f87abfa577760245a Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: mrinal Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu Oct 27 14:27:01 2016 From: gerrit-no-reply at lists.osmocom.org (bhargava_abhyankar) Date: Thu, 27 Oct 2016 14:27:01 +0000 Subject: [PATCH] osmo-bts[master]: 11bit RACH support for osmo-bts-litecell15 Message-ID: Review at https://gerrit.osmocom.org/1168 11bit RACH support for osmo-bts-litecell15 Based on the indication from L1, number of bits in RACH and burst type is determined. Appropriate parameters are filled in osmo-bts-litecell15. These parameters are sent to osmo-pcu for processing of the RACH. Change-Id: Ie5207a15424fb287febf74e830297531232accde --- M src/osmo-bts-litecell15/l1_if.c 1 file changed, 40 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/68/1168/1 diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index f47634e..edc5f5b 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -945,7 +945,8 @@ struct gsm_lchan *lchan; struct osmo_phsap_prim *l1sap; uint32_t fn; - uint8_t ra, acc_delay = 0; + uint8_t acc_delay = 0; + uint16_t ra = 0, is_11bit = 0, burst_type = 0, temp = 0; int rc; /* increment number of busy RACH slots, if required */ @@ -967,16 +968,29 @@ btsb->load.rach.access++; dump_meas_res(LOGL_DEBUG, &ra_ind->measParam); + burst_type = ra_ind->burstType; - if (ra_ind->msgUnitParam.u8Size != 1) { + if ((ra_ind->msgUnitParam.u8Size != 1) && + (ra_ind->msgUnitParam.u8Size != 2)) { LOGP(DL1C, LOGL_ERROR, "PH-RACH-INDICATION has %d bits\n", ra_ind->sapi); msgb_free(l1p_msg); return 0; } + + if (ra_ind->msgUnitParam.u8Size == 2) { + is_11bit = 1; + ra = ra_ind->msgUnitParam.u8Buffer[0]; + ra = ra << 3; + temp = (ra_ind->msgUnitParam.u8Buffer[1] & 0x7); + ra = ra | temp; + } else { + is_11bit = 0; + ra = ra_ind->msgUnitParam.u8Buffer[0]; + } + fn = ra_ind->u32Fn; - ra = ra_ind->msgUnitParam.u8Buffer[0]; rc = msgb_trim(l1p_msg, sizeof(*l1sap)); if (rc < 0) MSGB_ABORT(l1p_msg, "No room for primitive data\n"); @@ -986,6 +1000,29 @@ l1sap->u.rach_ind.ra = ra; l1sap->u.rach_ind.acc_delay = acc_delay; l1sap->u.rach_ind.fn = fn; + l1sap->u.rach_ind.is_11bit = is_11bit; /* no of bits in 11 bit RACH */ + + /* mapping of the burst type, the values are specific to + * osmo-bts-litecell15 */ + switch (burst_type) { + case GsmL1_BurstType_Access_0: + l1sap->u.rach_ind.burst_type = + GSM_L1_BURST_TYPE_ACCESS_0; + break; + case GsmL1_BurstType_Access_1: + l1sap->u.rach_ind.burst_type = + GSM_L1_BURST_TYPE_ACCESS_1; + break; + case GsmL1_BurstType_Access_2: + l1sap->u.rach_ind.burst_type = + GSM_L1_BURST_TYPE_ACCESS_2; + break; + default: + l1sap->u.rach_ind.burst_type = + GSM_L1_BURST_TYPE_NONE; + break; + } + if (!lchan || lchan->ts->pchan == GSM_PCHAN_CCCH || lchan->ts->pchan == GSM_PCHAN_CCCH_SDCCH4) l1sap->u.rach_ind.chan_nr = 0x88; -- To view, visit https://gerrit.osmocom.org/1168 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie5207a15424fb287febf74e830297531232accde Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: bhargava_abhyankar From gerrit-no-reply at lists.osmocom.org Thu Oct 27 15:58:32 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 27 Oct 2016 15:58:32 +0000 Subject: [PATCH] openbsc[master]: original_pcu_sock Message-ID: Review at https://gerrit.osmocom.org/1169 original_pcu_sock Change-Id: I46b0a65f1633c40053d43b57b786b042f20f12bd --- A openbsc/include/openbsc/pcu_if.h A openbsc/include/openbsc/pcuif_proto.h A openbsc/src/libbsc/pcu_sock.c 3 files changed, 1,101 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/69/1169/1 diff --git a/openbsc/include/openbsc/pcu_if.h b/openbsc/include/openbsc/pcu_if.h new file mode 100644 index 0000000..a020c05 --- /dev/null +++ b/openbsc/include/openbsc/pcu_if.h @@ -0,0 +1,25 @@ +#ifndef _PCU_IF_H +#define _PCU_IF_H + +#define PCU_SOCK_DEFAULT "/tmp/pcu_bts" + +extern int pcu_direct; + +int pcu_tx_info_ind(void); +int pcu_tx_rts_req(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn, + uint16_t arfcn, uint8_t block_nr); +int pcu_tx_data_ind(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn, + uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len, + int8_t rssi, uint16_t ber10k, int16_t bto, int16_t lqual); +int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint16_t ra, uint32_t fn, + uint8_t is_11bit, enum ph_burst_type burst_type); +int pcu_tx_time_ind(uint32_t fn); +int pcu_tx_pag_req(const uint8_t *identity_lv, uint8_t chan_needed); +int pcu_tx_pch_data_cnf(uint32_t fn, uint8_t *data, uint8_t len); + +int pcu_sock_init(const char *path); +void pcu_sock_exit(void); + +bool pcu_connected(void); + +#endif /* _PCU_IF_H */ diff --git a/openbsc/include/openbsc/pcuif_proto.h b/openbsc/include/openbsc/pcuif_proto.h new file mode 100644 index 0000000..5527238 --- /dev/null +++ b/openbsc/include/openbsc/pcuif_proto.h @@ -0,0 +1,158 @@ +#ifndef _PCUIF_PROTO_H +#define _PCUIF_PROTO_H + +#define PCU_IF_VERSION 0x07 + +/* msg_type */ +#define PCU_IF_MSG_DATA_REQ 0x00 /* send data to given channel */ +#define PCU_IF_MSG_DATA_CNF 0x01 /* confirm (e.g. transmission on PCH) */ +#define PCU_IF_MSG_DATA_IND 0x02 /* receive data from given channel */ +#define PCU_IF_MSG_RTS_REQ 0x10 /* ready to send request */ +#define PCU_IF_MSG_RACH_IND 0x22 /* receive RACH */ +#define PCU_IF_MSG_INFO_IND 0x32 /* retrieve BTS info */ +#define PCU_IF_MSG_ACT_REQ 0x40 /* activate/deactivate PDCH */ +#define PCU_IF_MSG_TIME_IND 0x52 /* GSM time indication */ +#define PCU_IF_MSG_PAG_REQ 0x60 /* paging request */ + +/* sapi */ +#define PCU_IF_SAPI_RACH 0x01 /* channel request on CCCH */ +#define PCU_IF_SAPI_AGCH 0x02 /* assignment on AGCH */ +#define PCU_IF_SAPI_PCH 0x03 /* paging/assignment on PCH */ +#define PCU_IF_SAPI_BCCH 0x04 /* SI on BCCH */ +#define PCU_IF_SAPI_PDTCH 0x05 /* packet data/control/ccch block */ +#define PCU_IF_SAPI_PRACH 0x06 /* packet random access channel */ +#define PCU_IF_SAPI_PTCCH 0x07 /* packet TA control channel */ + +/* flags */ +#define PCU_IF_FLAG_ACTIVE (1 << 0)/* BTS is active */ +#define PCU_IF_FLAG_SYSMO (1 << 1)/* access PDCH of sysmoBTS directly */ +#define PCU_IF_FLAG_CS1 (1 << 16) +#define PCU_IF_FLAG_CS2 (1 << 17) +#define PCU_IF_FLAG_CS3 (1 << 18) +#define PCU_IF_FLAG_CS4 (1 << 19) +#define PCU_IF_FLAG_MCS1 (1 << 20) +#define PCU_IF_FLAG_MCS2 (1 << 21) +#define PCU_IF_FLAG_MCS3 (1 << 22) +#define PCU_IF_FLAG_MCS4 (1 << 23) +#define PCU_IF_FLAG_MCS5 (1 << 24) +#define PCU_IF_FLAG_MCS6 (1 << 25) +#define PCU_IF_FLAG_MCS7 (1 << 26) +#define PCU_IF_FLAG_MCS8 (1 << 27) +#define PCU_IF_FLAG_MCS9 (1 << 28) + +struct gsm_pcu_if_data { + uint8_t sapi; + uint8_t len; + uint8_t data[162]; + uint32_t fn; + uint16_t arfcn; + uint8_t trx_nr; + uint8_t ts_nr; + uint8_t block_nr; + int8_t rssi; + uint16_t ber10k; /*!< \brief BER in units of 0.01% */ + int16_t ta_offs_qbits; /* !< \brief Burst TA Offset in quarter bits */ + int16_t lqual_cb; /* !< \brief Link quality in centiBel */ +} __attribute__ ((packed)); + +struct gsm_pcu_if_rts_req { + uint8_t sapi; + uint8_t spare[3]; + uint32_t fn; + uint16_t arfcn; + uint8_t trx_nr; + uint8_t ts_nr; + uint8_t block_nr; +} __attribute__ ((packed)); + +struct gsm_pcu_if_rach_ind { + uint8_t sapi; + uint16_t ra; + int16_t qta; + uint32_t fn; + uint16_t arfcn; + uint8_t is_11bit; + uint8_t burst_type; +} __attribute__ ((packed)); + +struct gsm_pcu_if_info_trx { + uint16_t arfcn; + uint8_t pdch_mask; /* PDCH channels per TS */ + uint8_t spare; + uint8_t tsc[8]; /* TSC per channel */ + uint32_t hlayer1; +} __attribute__ ((packed)); + +struct gsm_pcu_if_info_ind { + uint32_t version; + uint32_t flags; + struct gsm_pcu_if_info_trx trx[8]; /* TRX infos per BTS */ + uint8_t bsic; + /* RAI */ + uint16_t mcc, mnc, lac, rac; + /* NSE */ + uint16_t nsei; + uint8_t nse_timer[7]; + uint8_t cell_timer[11]; + /* cell */ + uint16_t cell_id; + uint16_t repeat_time; + uint8_t repeat_count; + uint16_t bvci; + uint8_t t3142; + uint8_t t3169; + uint8_t t3191; + uint8_t t3193_10ms; + uint8_t t3195; + uint8_t n3101; + uint8_t n3103; + uint8_t n3105; + uint8_t cv_countdown; + uint16_t dl_tbf_ext; + uint16_t ul_tbf_ext; + uint8_t initial_cs; + uint8_t initial_mcs; + /* NSVC */ + uint16_t nsvci[2]; + uint16_t local_port[2]; + uint16_t remote_port[2]; + uint32_t remote_ip[2]; +} __attribute__ ((packed)); + +struct gsm_pcu_if_act_req { + uint8_t activate; + uint8_t trx_nr; + uint8_t ts_nr; + uint8_t spare; +} __attribute__ ((packed)); + +struct gsm_pcu_if_time_ind { + uint32_t fn; +} __attribute__ ((packed)); + +struct gsm_pcu_if_pag_req { + uint8_t sapi; + uint8_t chan_needed; + uint8_t identity_lv[9]; +} __attribute__ ((packed)); + +struct gsm_pcu_if { + /* context based information */ + uint8_t msg_type; /* message type */ + uint8_t bts_nr; /* bts number */ + uint8_t spare[2]; + + union { + struct gsm_pcu_if_data data_req; + struct gsm_pcu_if_data data_cnf; + struct gsm_pcu_if_data data_ind; + struct gsm_pcu_if_rts_req rts_req; + struct gsm_pcu_if_rach_ind rach_ind; + struct gsm_pcu_if_info_ind info_ind; + struct gsm_pcu_if_act_req act_req; + struct gsm_pcu_if_time_ind time_ind; + struct gsm_pcu_if_pag_req pag_req; + } u; +} __attribute__ ((packed)); + +#endif /* _PCUIF_PROTO_H */ diff --git a/openbsc/src/libbsc/pcu_sock.c b/openbsc/src/libbsc/pcu_sock.c new file mode 100644 index 0000000..62f18a7 --- /dev/null +++ b/openbsc/src/libbsc/pcu_sock.c @@ -0,0 +1,918 @@ +/* pcu_sock.c: Connect from PCU via unix domain socket */ + +/* (C) 2008-2010 by Harald Welte + * (C) 2009-2012 by Andreas Eversberg + * (C) 2012 by Holger Hans Peter Freyther + * 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 +#include +#include +#include +#include +#include +#include +#include +#include + +uint32_t trx_get_hlayer1(struct gsm_bts_trx *trx); + +extern struct gsm_network bts_gsmnet; +int pcu_direct = 0; +static int avail_lai = 0, avail_nse = 0, avail_cell = 0, avail_nsvc[2] = {0, 0}; + +static const char *sapi_string[] = { + [PCU_IF_SAPI_RACH] = "RACH", + [PCU_IF_SAPI_AGCH] = "AGCH", + [PCU_IF_SAPI_PCH] = "PCH", + [PCU_IF_SAPI_BCCH] = "BCCH", + [PCU_IF_SAPI_PDTCH] = "PDTCH", + [PCU_IF_SAPI_PRACH] = "PRACH", + [PCU_IF_SAPI_PTCCH] = "PTCCH", +}; + +static int pcu_sock_send(struct gsm_network *net, struct msgb *msg); + + +static struct gsm_bts_trx *trx_by_nr(struct gsm_bts *bts, uint8_t trx_nr) +{ + struct gsm_bts_trx *trx; + + llist_for_each_entry(trx, &bts->trx_list, list) { + if (trx->nr == trx_nr) + return trx; + } + + return NULL; +} + + +/* + * PCU messages + */ + +struct msgb *pcu_msgb_alloc(uint8_t msg_type, uint8_t bts_nr) +{ + struct msgb *msg; + struct gsm_pcu_if *pcu_prim; + + msg = msgb_alloc(sizeof(struct gsm_pcu_if), "pcu_sock_tx"); + if (!msg) + return NULL; + msgb_put(msg, sizeof(struct gsm_pcu_if)); + pcu_prim = (struct gsm_pcu_if *) msg->data; + pcu_prim->msg_type = msg_type; + pcu_prim->bts_nr = bts_nr; + + return msg; +} + +static bool ts_should_be_pdch(struct gsm_bts_trx_ts *ts) { + if (ts->pchan == GSM_PCHAN_PDCH) + return true; + if (ts->pchan == GSM_PCHAN_TCH_F_PDCH) { + /* When we're busy deactivating the PDCH, we first set + * DEACT_PENDING, tell the PCU about it and wait for a + * response. So DEACT_PENDING means "no PDCH" to the PCU. + * Similarly, when we're activating PDCH, we set the + * ACT_PENDING and wait for an activation response from the + * PCU, so ACT_PENDING means "is PDCH". */ + if (ts->flags & TS_F_PDCH_ACTIVE) + return !(ts->flags & TS_F_PDCH_DEACT_PENDING); + else + return (ts->flags & TS_F_PDCH_ACT_PENDING); + } + if (ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH) { + /* + * When we're busy de-/activating the PDCH, we first set + * ts->dyn.pchan_want, tell the PCU about it and wait for a + * response. So only care about dyn.pchan_want here. + */ + return ts->dyn.pchan_want == GSM_PCHAN_PDCH; + } + return false; +} + +int pcu_tx_info_ind(void) +{ + struct gsm_network *net = &bts_gsmnet; + struct msgb *msg; + struct gsm_pcu_if *pcu_prim; + struct gsm_pcu_if_info_ind *info_ind; + struct gsm_bts *bts; + struct gprs_rlc_cfg *rlcc; + struct gsm_bts_gprs_nsvc *nsvc; + struct gsm_bts_trx *trx; + struct gsm_bts_trx_ts *ts; + int i, j; + + LOGP(DPCU, LOGL_INFO, "Sending info\n"); + + /* FIXME: allow multiple BTS */ + bts = llist_entry(net->bts_list.next, struct gsm_bts, list); + rlcc = &bts->gprs.cell.rlc_cfg; + + msg = pcu_msgb_alloc(PCU_IF_MSG_INFO_IND, bts->nr); + if (!msg) + return -ENOMEM; + pcu_prim = (struct gsm_pcu_if *) msg->data; + info_ind = &pcu_prim->u.info_ind; + info_ind->version = PCU_IF_VERSION; + + if (avail_lai && avail_nse && avail_cell && avail_nsvc[0]) { + info_ind->flags |= PCU_IF_FLAG_ACTIVE; + LOGP(DPCU, LOGL_INFO, "BTS is up\n"); + } else + LOGP(DPCU, LOGL_INFO, "BTS is down\n"); + + if (pcu_direct) + info_ind->flags |= PCU_IF_FLAG_SYSMO; + + /* RAI */ + info_ind->mcc = net->mcc; + info_ind->mnc = net->mnc; + info_ind->lac = bts->location_area_code; + info_ind->rac = bts->gprs.rac; + + /* NSE */ + info_ind->nsei = bts->gprs.nse.nsei; + memcpy(info_ind->nse_timer, bts->gprs.nse.timer, 7); + memcpy(info_ind->cell_timer, bts->gprs.cell.timer, 11); + + /* cell attributes */ + info_ind->cell_id = bts->cell_identity; + info_ind->repeat_time = rlcc->paging.repeat_time; + info_ind->repeat_count = rlcc->paging.repeat_count; + info_ind->bvci = bts->gprs.cell.bvci; + info_ind->t3142 = rlcc->parameter[RLC_T3142]; + info_ind->t3169 = rlcc->parameter[RLC_T3169]; + info_ind->t3191 = rlcc->parameter[RLC_T3191]; + info_ind->t3193_10ms = rlcc->parameter[RLC_T3193]; + info_ind->t3195 = rlcc->parameter[RLC_T3195]; + info_ind->n3101 = rlcc->parameter[RLC_N3101]; + info_ind->n3103 = rlcc->parameter[RLC_N3103]; + info_ind->n3105 = rlcc->parameter[RLC_N3105]; + info_ind->cv_countdown = rlcc->parameter[CV_COUNTDOWN]; + if (rlcc->cs_mask & (1 << GPRS_CS1)) + info_ind->flags |= PCU_IF_FLAG_CS1; + if (rlcc->cs_mask & (1 << GPRS_CS2)) + info_ind->flags |= PCU_IF_FLAG_CS2; + if (rlcc->cs_mask & (1 << GPRS_CS3)) + info_ind->flags |= PCU_IF_FLAG_CS3; + if (rlcc->cs_mask & (1 << GPRS_CS4)) + info_ind->flags |= PCU_IF_FLAG_CS4; + if (rlcc->cs_mask & (1 << GPRS_MCS1)) + info_ind->flags |= PCU_IF_FLAG_MCS1; + if (rlcc->cs_mask & (1 << GPRS_MCS2)) + info_ind->flags |= PCU_IF_FLAG_MCS2; + if (rlcc->cs_mask & (1 << GPRS_MCS3)) + info_ind->flags |= PCU_IF_FLAG_MCS3; + if (rlcc->cs_mask & (1 << GPRS_MCS4)) + info_ind->flags |= PCU_IF_FLAG_MCS4; + if (rlcc->cs_mask & (1 << GPRS_MCS5)) + info_ind->flags |= PCU_IF_FLAG_MCS5; + if (rlcc->cs_mask & (1 << GPRS_MCS6)) + info_ind->flags |= PCU_IF_FLAG_MCS6; + if (rlcc->cs_mask & (1 << GPRS_MCS7)) + info_ind->flags |= PCU_IF_FLAG_MCS7; + if (rlcc->cs_mask & (1 << GPRS_MCS8)) + info_ind->flags |= PCU_IF_FLAG_MCS8; + if (rlcc->cs_mask & (1 << GPRS_MCS9)) + info_ind->flags |= PCU_IF_FLAG_MCS9; +#warning "isn't dl_tbf_ext wrong?: * 10 and no ntohs" + info_ind->dl_tbf_ext = rlcc->parameter[T_DL_TBF_EXT]; +#warning "isn't ul_tbf_ext wrong?: * 10 and no ntohs" + info_ind->ul_tbf_ext = rlcc->parameter[T_UL_TBF_EXT]; + info_ind->initial_cs = rlcc->initial_cs; + info_ind->initial_mcs = rlcc->initial_mcs; + + /* NSVC */ + for (i = 0; i < 2; i++) { + nsvc = &bts->gprs.nsvc[i]; + info_ind->nsvci[i] = nsvc->nsvci; + info_ind->local_port[i] = nsvc->local_port; + info_ind->remote_port[i] = nsvc->remote_port; + info_ind->remote_ip[i] = nsvc->remote_ip; + } + + for (i = 0; i < 8; i++) { + trx = trx_by_nr(bts, i); + if (!trx) + break; + info_ind->trx[i].pdch_mask = 0; + info_ind->trx[i].arfcn = trx->arfcn; + info_ind->trx[i].hlayer1 = trx_get_hlayer1(trx); + for (j = 0; j < 8; j++) { + ts = &trx->ts[j]; + if (ts->mo.nm_state.operational == NM_OPSTATE_ENABLED + && ts_should_be_pdch(ts)) { + info_ind->trx[i].pdch_mask |= (1 << j); + info_ind->trx[i].tsc[j] = + (ts->tsc >= 0) ? ts->tsc : bts->bsic & 7; + LOGP(DPCU, LOGL_INFO, "trx=%d ts=%d: " + "available (tsc=%d arfcn=%d)\n", + trx->nr, ts->nr, + info_ind->trx[i].tsc[j], + info_ind->trx[i].arfcn); + } + } + } + + return pcu_sock_send(net, msg); +} + +static int pcu_if_signal_cb(unsigned int subsys, unsigned int signal, + void *hdlr_data, void *signal_data) +{ + struct gsm_network *net = &bts_gsmnet; + struct gsm_bts_gprs_nsvc *nsvc; + struct gsm_bts *bts; + struct gsm48_system_information_type_3 *si3; + int id; + + if (subsys != SS_GLOBAL) + return -EINVAL; + + switch(signal) { + case S_NEW_SYSINFO: + bts = signal_data; + if (!(bts->si_valid & (1 << SYSINFO_TYPE_3))) + break; + si3 = (struct gsm48_system_information_type_3 *) + bts->si_buf[SYSINFO_TYPE_3]; + net->mcc = ((si3->lai.digits[0] & 0x0f) << 8) + | (si3->lai.digits[0] & 0xf0) + | (si3->lai.digits[1] & 0x0f); + net->mnc = ((si3->lai.digits[2] & 0x0f) << 8) + | (si3->lai.digits[2] & 0xf0) + | ((si3->lai.digits[1] & 0xf0) >> 4); + if ((net->mnc & 0x00f) == 0x00f) + net->mnc >>= 4; + bts->location_area_code = ntohs(si3->lai.lac); + bts->cell_identity = si3->cell_identity; + avail_lai = 1; + break; + case S_NEW_NSE_ATTR: + bts = signal_data; + avail_nse = 1; + break; + case S_NEW_CELL_ATTR: + bts = signal_data; + avail_cell = 1; + break; + case S_NEW_NSVC_ATTR: + nsvc = signal_data; + id = nsvc->id; + if (id < 0 || id > 1) + return -EINVAL; + avail_nsvc[id] = 1; + break; + case S_NEW_OP_STATE: + break; + default: + return -EINVAL; + } + + /* If all infos have been received, of if one info is updated after + * all infos have been received, transmit info update. */ + if (avail_lai && avail_nse && avail_cell && avail_nsvc[0]) + pcu_tx_info_ind(); + return 0; +} + + +int pcu_tx_rts_req(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn, + uint16_t arfcn, uint8_t block_nr) +{ + struct msgb *msg; + struct gsm_pcu_if *pcu_prim; + struct gsm_pcu_if_rts_req *rts_req; + struct gsm_bts *bts = ts->trx->bts; + + LOGP(DPCU, LOGL_DEBUG, "Sending rts request: is_ptcch=%d arfcn=%d " + "block=%d\n", is_ptcch, arfcn, block_nr); + + msg = pcu_msgb_alloc(PCU_IF_MSG_RTS_REQ, bts->nr); + if (!msg) + return -ENOMEM; + pcu_prim = (struct gsm_pcu_if *) msg->data; + rts_req = &pcu_prim->u.rts_req; + + rts_req->sapi = (is_ptcch) ? PCU_IF_SAPI_PTCCH : PCU_IF_SAPI_PDTCH; + rts_req->fn = fn; + rts_req->arfcn = arfcn; + rts_req->trx_nr = ts->trx->nr; + rts_req->ts_nr = ts->nr; + rts_req->block_nr = block_nr; + + return pcu_sock_send(&bts_gsmnet, msg); +} + +int pcu_tx_data_ind(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn, + uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len, + int8_t rssi, uint16_t ber10k, int16_t bto, int16_t lqual) +{ + struct msgb *msg; + struct gsm_pcu_if *pcu_prim; + struct gsm_pcu_if_data *data_ind; + struct gsm_bts *bts = ts->trx->bts; + + LOGP(DPCU, LOGL_DEBUG, "Sending data indication: is_ptcch=%d arfcn=%d " + "block=%d data=%s\n", is_ptcch, arfcn, block_nr, + osmo_hexdump(data, len)); + + msg = pcu_msgb_alloc(PCU_IF_MSG_DATA_IND, bts->nr); + if (!msg) + return -ENOMEM; + pcu_prim = (struct gsm_pcu_if *) msg->data; + data_ind = &pcu_prim->u.data_ind; + + data_ind->sapi = (is_ptcch) ? PCU_IF_SAPI_PTCCH : PCU_IF_SAPI_PDTCH; + data_ind->rssi = rssi; + data_ind->fn = fn; + data_ind->arfcn = arfcn; + data_ind->trx_nr = ts->trx->nr; + data_ind->ts_nr = ts->nr; + data_ind->block_nr = block_nr; + data_ind->rssi = rssi; + data_ind->ber10k = ber10k; + data_ind->ta_offs_qbits = bto; + data_ind->lqual_cb = lqual; + memcpy(data_ind->data, data, len); + data_ind->len = len; + + return pcu_sock_send(&bts_gsmnet, msg); +} + +int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint16_t ra, uint32_t fn, + uint8_t is_11bit, enum ph_burst_type burst_type) +{ + struct msgb *msg; + struct gsm_pcu_if *pcu_prim; + struct gsm_pcu_if_rach_ind *rach_ind; + + LOGP(DPCU, LOGL_INFO, "Sending RACH indication: qta=%d, ra=%d, " + "fn=%d\n", qta, ra, fn); + + msg = pcu_msgb_alloc(PCU_IF_MSG_RACH_IND, bts->nr); + if (!msg) + return -ENOMEM; + pcu_prim = (struct gsm_pcu_if *) msg->data; + rach_ind = &pcu_prim->u.rach_ind; + + rach_ind->sapi = PCU_IF_SAPI_RACH; + rach_ind->ra = ra; + rach_ind->qta = qta; + rach_ind->fn = fn; + rach_ind->is_11bit = is_11bit; + rach_ind->burst_type = burst_type; + + return pcu_sock_send(&bts_gsmnet, msg); +} + +int pcu_tx_time_ind(uint32_t fn) +{ + struct msgb *msg; + struct gsm_pcu_if *pcu_prim; + struct gsm_pcu_if_time_ind *time_ind; + uint8_t fn13 = fn % 13; + + /* omit frame numbers not starting at a MAC block */ + if (fn13 != 0 && fn13 != 4 && fn13 != 8) + return 0; + + msg = pcu_msgb_alloc(PCU_IF_MSG_TIME_IND, 0); + if (!msg) + return -ENOMEM; + pcu_prim = (struct gsm_pcu_if *) msg->data; + time_ind = &pcu_prim->u.time_ind; + + time_ind->fn = fn; + + return pcu_sock_send(&bts_gsmnet, msg); +} + +int pcu_tx_pag_req(const uint8_t *identity_lv, uint8_t chan_needed) +{ + struct pcu_sock_state *state = bts_gsmnet.pcu_state; + struct msgb *msg; + struct gsm_pcu_if *pcu_prim; + struct gsm_pcu_if_pag_req *pag_req; + + /* check if identity does not fit: length > sizeof(lv) - 1 */ + if (identity_lv[0] >= sizeof(pag_req->identity_lv)) { + LOGP(DPCU, LOGL_ERROR, "Paging identity too large (%d)\n", + identity_lv[0]); + return -EINVAL; + } + + /* socket not created */ + if (!state) { + LOGP(DPCU, LOGL_DEBUG, "PCU socket not created, ignoring " + "paging message\n"); + return 0; + } + + msg = pcu_msgb_alloc(PCU_IF_MSG_PAG_REQ, 0); + if (!msg) + return -ENOMEM; + pcu_prim = (struct gsm_pcu_if *) msg->data; + pag_req = &pcu_prim->u.pag_req; + + pag_req->chan_needed = chan_needed; + memcpy(pag_req->identity_lv, identity_lv, identity_lv[0] + 1); + + return pcu_sock_send(&bts_gsmnet, msg); +} + +int pcu_tx_pch_data_cnf(uint32_t fn, uint8_t *data, uint8_t len) +{ + struct gsm_network *net = &bts_gsmnet; + struct gsm_bts *bts; + struct msgb *msg; + struct gsm_pcu_if *pcu_prim; + struct gsm_pcu_if_data *data_cnf; + + /* FIXME: allow multiple BTS */ + bts = llist_entry(net->bts_list.next, struct gsm_bts, list); + + LOGP(DPCU, LOGL_INFO, "Sending PCH confirm\n"); + + msg = pcu_msgb_alloc(PCU_IF_MSG_DATA_CNF, bts->nr); + if (!msg) + return -ENOMEM; + pcu_prim = (struct gsm_pcu_if *) msg->data; + data_cnf = &pcu_prim->u.data_cnf; + + data_cnf->sapi = PCU_IF_SAPI_PCH; + data_cnf->fn = fn; + memcpy(data_cnf->data, data, len); + data_cnf->len = len; + + return pcu_sock_send(&bts_gsmnet, msg); +} + +static int pcu_rx_data_req(struct gsm_bts *bts, uint8_t msg_type, + struct gsm_pcu_if_data *data_req) +{ + uint8_t is_ptcch; + struct gsm_bts_trx *trx; + struct gsm_bts_trx_ts *ts; + struct msgb *msg; + int rc = 0; + + LOGP(DPCU, LOGL_DEBUG, "Data request received: sapi=%s arfcn=%d " + "block=%d data=%s\n", sapi_string[data_req->sapi], + data_req->arfcn, data_req->block_nr, + osmo_hexdump(data_req->data, data_req->len)); + + switch (data_req->sapi) { + case PCU_IF_SAPI_BCCH: + if (data_req->len == 23) { + bts->si_valid |= (1 << SYSINFO_TYPE_13); + memcpy(bts->si_buf[SYSINFO_TYPE_13], data_req->data, + data_req->len); + } else { + bts->si_valid &= ~(1 << SYSINFO_TYPE_13); + } + osmo_signal_dispatch(SS_GLOBAL, S_NEW_SYSINFO, bts); + break; + case PCU_IF_SAPI_PCH: + if (msg_type == PCU_IF_MSG_PAG_REQ) { + /* FIXME: Add function to schedule paging request. + * This might not be required, if PCU_IF_MSG_DATA_REQ + * is used instead. */ + } else { + struct gsm_bts_role_bts *btsb = bts->role; + + paging_add_imm_ass(btsb->paging_state, data_req->data, + data_req->len); + } + break; + case PCU_IF_SAPI_AGCH: + msg = msgb_alloc(data_req->len, "pcu_agch"); + if (!msg) { + rc = -ENOMEM; + break; + } + msg->l3h = msgb_put(msg, data_req->len); + memcpy(msg->l3h, data_req->data, data_req->len); + if (bts_agch_enqueue(bts, msg) < 0) { + msgb_free(msg); + rc = -EIO; + } + break; + case PCU_IF_SAPI_PDTCH: + case PCU_IF_SAPI_PTCCH: + trx = trx_by_nr(bts, data_req->trx_nr); + if (!trx) { + LOGP(DPCU, LOGL_ERROR, "Received PCU data request with " + "not existing TRX %d\n", data_req->trx_nr); + rc = -EINVAL; + break; + } + ts = &trx->ts[data_req->ts_nr]; + is_ptcch = (data_req->sapi == PCU_IF_SAPI_PTCCH); + rc = l1sap_pdch_req(ts, is_ptcch, data_req->fn, data_req->arfcn, + data_req->block_nr, data_req->data, data_req->len); + break; + default: + LOGP(DPCU, LOGL_ERROR, "Received PCU data request with " + "unsupported sapi %d\n", data_req->sapi); + rc = -EINVAL; + } + + return rc; +} + +static int pcu_rx_act_req(struct gsm_bts *bts, + struct gsm_pcu_if_act_req *act_req) +{ + struct gsm_bts_trx *trx; + struct gsm_lchan *lchan; + + LOGP(DPCU, LOGL_INFO, "%s request received: TRX=%d TX=%d\n", + (act_req->activate) ? "Activate" : "Deactivate", + act_req->trx_nr, act_req->ts_nr); + + trx = trx_by_nr(bts, act_req->trx_nr); + if (!trx || act_req->ts_nr >= 8) + return -EINVAL; + + lchan = trx->ts[act_req->ts_nr].lchan; + lchan->rel_act_kind = LCHAN_REL_ACT_PCU; + if (lchan->type != GSM_LCHAN_PDTCH) { + LOGP(DPCU, LOGL_ERROR, + "%s request, but lchan is not of type PDTCH (is %s)\n", + (act_req->activate) ? "Activate" : "Deactivate", + gsm_lchant_name(lchan->type)); + return -EINVAL; + } + if (act_req->activate) + l1sap_chan_act(trx, gsm_lchan2chan_nr(lchan), NULL); + else + l1sap_chan_rel(trx, gsm_lchan2chan_nr(lchan)); + + return 0; +} + +static int pcu_rx(struct gsm_network *net, uint8_t msg_type, + struct gsm_pcu_if *pcu_prim) +{ + int rc = 0; + struct gsm_bts *bts; + + /* FIXME: allow multiple BTS */ + bts = llist_entry(net->bts_list.next, struct gsm_bts, list); + + switch (msg_type) { + case PCU_IF_MSG_DATA_REQ: + case PCU_IF_MSG_PAG_REQ: + rc = pcu_rx_data_req(bts, msg_type, &pcu_prim->u.data_req); + break; + case PCU_IF_MSG_ACT_REQ: + rc = pcu_rx_act_req(bts, &pcu_prim->u.act_req); + break; + default: + LOGP(DPCU, LOGL_ERROR, "Received unknwon PCU msg type %d\n", + msg_type); + rc = -EINVAL; + } + + return rc; +} + +/* + * PCU socket interface + */ + +struct pcu_sock_state { + struct gsm_network *net; + struct osmo_fd listen_bfd; /* fd for listen socket */ + struct osmo_fd conn_bfd; /* fd for connection to lcr */ + struct llist_head upqueue; /* queue for sending messages */ +}; + +static int pcu_sock_send(struct gsm_network *net, struct msgb *msg) +{ + struct pcu_sock_state *state = net->pcu_state; + struct osmo_fd *conn_bfd; + struct gsm_pcu_if *pcu_prim = (struct gsm_pcu_if *) msg->data; + + if (!state) { + if (pcu_prim->msg_type != PCU_IF_MSG_TIME_IND) + LOGP(DPCU, LOGL_INFO, "PCU socket not created, " + "dropping message\n"); + msgb_free(msg); + return -EINVAL; + } + conn_bfd = &state->conn_bfd; + if (conn_bfd->fd <= 0) { + if (pcu_prim->msg_type != PCU_IF_MSG_TIME_IND) + LOGP(DPCU, LOGL_NOTICE, "PCU socket not connected, " + "dropping message\n"); + msgb_free(msg); + return -EIO; + } + msgb_enqueue(&state->upqueue, msg); + conn_bfd->when |= BSC_FD_WRITE; + + return 0; +} + +static void pcu_sock_close(struct pcu_sock_state *state) +{ + struct osmo_fd *bfd = &state->conn_bfd; + struct gsm_bts *bts; + struct gsm_bts_trx *trx; + struct gsm_bts_trx_ts *ts; + int i, j; + + /* FIXME: allow multiple BTS */ + bts = llist_entry(state->net->bts_list.next, struct gsm_bts, list); + + LOGP(DPCU, LOGL_NOTICE, "PCU socket has LOST connection\n"); + + close(bfd->fd); + bfd->fd = -1; + osmo_fd_unregister(bfd); + + /* re-enable the generation of ACCEPT for new connections */ + state->listen_bfd.when |= BSC_FD_READ; + +#if 0 + /* remove si13, ... */ + bts->si_valid &= ~(1 << SYSINFO_TYPE_13); + osmo_signal_dispatch(SS_GLOBAL, S_NEW_SYSINFO, bts); +#endif + + /* release PDCH */ + for (i = 0; i < 8; i++) { + trx = trx_by_nr(bts, i); + if (!trx) + break; + for (j = 0; j < 8; j++) { + ts = &trx->ts[j]; + if (ts->mo.nm_state.operational == NM_OPSTATE_ENABLED + && ts->pchan == GSM_PCHAN_PDCH) { + ts->lchan->rel_act_kind = LCHAN_REL_ACT_PCU; + l1sap_chan_rel(trx, + gsm_lchan2chan_nr(ts->lchan)); + } + } + } + + /* flush the queue */ + while (!llist_empty(&state->upqueue)) { + struct msgb *msg = msgb_dequeue(&state->upqueue); + msgb_free(msg); + } +} + +static int pcu_sock_read(struct osmo_fd *bfd) +{ + struct pcu_sock_state *state = (struct pcu_sock_state *)bfd->data; + struct gsm_pcu_if *pcu_prim; + struct msgb *msg; + int rc; + + msg = msgb_alloc(sizeof(*pcu_prim), "pcu_sock_rx"); + if (!msg) + return -ENOMEM; + + pcu_prim = (struct gsm_pcu_if *) msg->tail; + + rc = recv(bfd->fd, msg->tail, msgb_tailroom(msg), 0); + if (rc == 0) + goto close; + + if (rc < 0) { + if (errno == EAGAIN) + return 0; + goto close; + } + + rc = pcu_rx(state->net, pcu_prim->msg_type, pcu_prim); + + /* as we always synchronously process the message in pcu_rx() and + * its callbacks, we can free the message here. */ + msgb_free(msg); + + return rc; + +close: + msgb_free(msg); + pcu_sock_close(state); + return -1; +} + +static int pcu_sock_write(struct osmo_fd *bfd) +{ + struct pcu_sock_state *state = bfd->data; + int rc; + + while (!llist_empty(&state->upqueue)) { + struct msgb *msg, *msg2; + struct gsm_pcu_if *pcu_prim; + + /* peek at the beginning of the queue */ + msg = llist_entry(state->upqueue.next, struct msgb, list); + pcu_prim = (struct gsm_pcu_if *)msg->data; + + bfd->when &= ~BSC_FD_WRITE; + + /* bug hunter 8-): maybe someone forgot msgb_put(...) ? */ + if (!msgb_length(msg)) { + LOGP(DPCU, LOGL_ERROR, "message type (%d) with ZERO " + "bytes!\n", pcu_prim->msg_type); + goto dontsend; + } + + /* try to send it over the socket */ + rc = write(bfd->fd, msgb_data(msg), msgb_length(msg)); + if (rc == 0) + goto close; + if (rc < 0) { + if (errno == EAGAIN) { + bfd->when |= BSC_FD_WRITE; + break; + } + goto close; + } + +dontsend: + /* _after_ we send it, we can deueue */ + msg2 = msgb_dequeue(&state->upqueue); + assert(msg == msg2); + msgb_free(msg); + } + return 0; + +close: + pcu_sock_close(state); + + return -1; +} + +static int pcu_sock_cb(struct osmo_fd *bfd, unsigned int flags) +{ + int rc = 0; + + if (flags & BSC_FD_READ) + rc = pcu_sock_read(bfd); + if (rc < 0) + return rc; + + if (flags & BSC_FD_WRITE) + rc = pcu_sock_write(bfd); + + return rc; +} + +/* accept connection comming from PCU */ +static int pcu_sock_accept(struct osmo_fd *bfd, unsigned int flags) +{ + struct pcu_sock_state *state = (struct pcu_sock_state *)bfd->data; + struct osmo_fd *conn_bfd = &state->conn_bfd; + struct sockaddr_un un_addr; + socklen_t len; + int rc; + + len = sizeof(un_addr); + rc = accept(bfd->fd, (struct sockaddr *) &un_addr, &len); + if (rc < 0) { + LOGP(DPCU, LOGL_ERROR, "Failed to accept a new connection\n"); + return -1; + } + + if (conn_bfd->fd >= 0) { + LOGP(DPCU, LOGL_NOTICE, "PCU connects but we already have " + "another active connection ?!?\n"); + /* We already have one PCU connected, this is all we support */ + state->listen_bfd.when &= ~BSC_FD_READ; + close(rc); + return 0; + } + + conn_bfd->fd = rc; + conn_bfd->when = BSC_FD_READ; + conn_bfd->cb = pcu_sock_cb; + conn_bfd->data = state; + + if (osmo_fd_register(conn_bfd) != 0) { + LOGP(DPCU, LOGL_ERROR, "Failed to register new connection " + "fd\n"); + close(conn_bfd->fd); + conn_bfd->fd = -1; + return -1; + } + + LOGP(DPCU, LOGL_NOTICE, "PCU socket connected to external PCU\n"); + + /* send current info */ + pcu_tx_info_ind(); + + return 0; +} + +int pcu_sock_init(const char *path) +{ + struct pcu_sock_state *state; + struct osmo_fd *bfd; + int rc; + + state = talloc_zero(NULL, struct pcu_sock_state); + if (!state) + return -ENOMEM; + + INIT_LLIST_HEAD(&state->upqueue); + state->net = &bts_gsmnet; + state->conn_bfd.fd = -1; + + bfd = &state->listen_bfd; + + 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)); + talloc_free(state); + return -1; + } + + bfd->when = BSC_FD_READ; + bfd->cb = pcu_sock_accept; + bfd->data = state; + + rc = osmo_fd_register(bfd); + if (rc < 0) { + LOGP(DPCU, LOGL_ERROR, "Could not register listen fd: %d\n", + rc); + close(bfd->fd); + talloc_free(state); + return rc; + } + + osmo_signal_register_handler(SS_GLOBAL, pcu_if_signal_cb, NULL); + + bts_gsmnet.pcu_state = state; + + return 0; +} + +void pcu_sock_exit(void) +{ + struct pcu_sock_state *state = bts_gsmnet.pcu_state; + struct osmo_fd *bfd, *conn_bfd; + + if (!state) + return; + + osmo_signal_unregister_handler(SS_GLOBAL, pcu_if_signal_cb, NULL); + conn_bfd = &state->conn_bfd; + if (conn_bfd->fd > 0) + pcu_sock_close(state); + bfd = &state->listen_bfd; + close(bfd->fd); + osmo_fd_unregister(bfd); + talloc_free(state); + bts_gsmnet.pcu_state = NULL; +} + +bool pcu_connected(void) { + struct gsm_network *net = &bts_gsmnet; + struct pcu_sock_state *state = net->pcu_state; + + if (!state) + return false; + if (state->conn_bfd.fd <= 0) + return false; + return true; +} -- To view, visit https://gerrit.osmocom.org/1169 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I46b0a65f1633c40053d43b57b786b042f20f12bd Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Thu Oct 27 15:58:34 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 27 Oct 2016 15:58:34 +0000 Subject: [PATCH] openbsc[master]: rbs2000: Add missing freatures Message-ID: Review at https://gerrit.osmocom.org/1170 rbs2000: Add missing freatures function bts_model_rbs2k_start() in bts_ericsson_rbs2000.c lacks the feature definition for GPRS and EGPRS. Change-Id: I777a67862084aa6cca39cfc43f5708e47608b0e6 --- M openbsc/src/libbsc/bts_ericsson_rbs2000.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/70/1170/1 diff --git a/openbsc/src/libbsc/bts_ericsson_rbs2000.c b/openbsc/src/libbsc/bts_ericsson_rbs2000.c index 1300b4a..f61776c 100644 --- a/openbsc/src/libbsc/bts_ericsson_rbs2000.c +++ b/openbsc/src/libbsc/bts_ericsson_rbs2000.c @@ -180,6 +180,8 @@ model_rbs2k.features.data = &model_rbs2k._features_data[0]; model_rbs2k.features.data_len = sizeof(model_rbs2k._features_data); + gsm_btsmodel_set_feature(&model_rbs2k, BTS_FEAT_GPRS); + gsm_btsmodel_set_feature(&model_rbs2k, BTS_FEAT_EGPRS); gsm_btsmodel_set_feature(&model_rbs2k, BTS_FEAT_HOPPING); gsm_btsmodel_set_feature(&model_rbs2k, BTS_FEAT_HSCSD); gsm_btsmodel_set_feature(&model_rbs2k, BTS_FEAT_MULTI_TSC); -- To view, visit https://gerrit.osmocom.org/1170 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I777a67862084aa6cca39cfc43f5708e47608b0e6 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter From gerrit-no-reply at lists.osmocom.org Thu Oct 27 16:06:33 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 27 Oct 2016 16:06:33 +0000 Subject: [PATCH] libosmo-abis[master]: Unify RTP receiving 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/948 to look at the new patch set (#3). Unify RTP receiving * Remove code duplication * Use return value of rtp_get_payload() instead of pointer arithmetic Change-Id: Id42e85b55eab33c5eb81ac7a2cdea7962b2e30ef --- M src/trau/osmo_ortp.c 1 file changed, 21 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/48/948/3 diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index e990487..fc63e7f 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -143,6 +143,22 @@ rtp_session_resync(rs); } +static inline bool recv_with_cb(struct osmo_rtp_socket *rs) +{ + mblk_t *mblk = rtp_session_recvm_with_ts(rs->sess, rs->rx_user_ts); + if (!mblk) + return false; + + int plen = rtp_get_payload(mblk, &mblk->b_rptr); + /* hand into receiver */ + if (rs->rx_cb && plen > 0) + rs->rx_cb(rs, mblk->b_rptr, plen, rtp_get_seqnumber(mblk), + rtp_get_timestamp(mblk), rtp_get_markbit(mblk)); + freemsg(mblk); + if (plen > 0) + return true; + return false; +} /*! \brief poll the socket for incoming data * \param[in] rs the socket to be polled @@ -150,28 +166,14 @@ */ int osmo_rtp_socket_poll(struct osmo_rtp_socket *rs) { - mblk_t *mblk; if (rs->flags & OSMO_RTP_F_DISABLED) return 0; - mblk = rtp_session_recvm_with_ts(rs->sess, rs->rx_user_ts); - if (mblk) { - rtp_get_payload(mblk, &mblk->b_rptr); - /* hand into receiver */ - if (rs->rx_cb) - rs->rx_cb(rs, mblk->b_rptr, - mblk->b_wptr - mblk->b_rptr, - rtp_get_seqnumber(mblk), - rtp_get_timestamp(mblk), - rtp_get_markbit(mblk)); - //rs->rx_user_ts += 160; - freemsg(mblk); + if (recv_with_cb(rs)) return 1; - } else { - LOGP(DLMIB, LOGL_INFO, "osmo_rtp_poll(%u): ERROR!\n", - rs->rx_user_ts); - return 0; - } + + LOGP(DLMIB, LOGL_INFO, "osmo_rtp_poll(%u): ERROR!\n", rs->rx_user_ts); + return 0; } /* Osmo FD callbacks */ @@ -179,7 +181,6 @@ static int osmo_rtp_fd_cb(struct osmo_fd *fd, unsigned int what) { struct osmo_rtp_socket *rs = fd->data; - mblk_t *mblk; if (what & BSC_FD_READ) { /* in polling mode, we don't want to be called here */ @@ -187,18 +188,7 @@ fd->when &= ~BSC_FD_READ; return 0; } - mblk = rtp_session_recvm_with_ts(rs->sess, rs->rx_user_ts); - if (mblk) { - rtp_get_payload(mblk, &mblk->b_rptr); - /* hand into receiver */ - if (rs->rx_cb) - rs->rx_cb(rs, mblk->b_rptr, - mblk->b_wptr - mblk->b_rptr, - rtp_get_seqnumber(mblk), - rtp_get_timestamp(mblk), - rtp_get_markbit(mblk)); - freemsg(mblk); - } else + if (!recv_with_cb(rs)) LOGP(DLMIB, LOGL_INFO, "recvm_with_ts(%u): ERROR!\n", rs->rx_user_ts); rs->rx_user_ts += 160; -- To view, visit https://gerrit.osmocom.org/948 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id42e85b55eab33c5eb81ac7a2cdea7962b2e30ef Gerrit-PatchSet: 3 Gerrit-Project: libosmo-abis 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 Thu Oct 27 16:12:00 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 27 Oct 2016 16:12:00 +0000 Subject: [PATCH] openbsc[master]: pcu_if: original pcu sock interface from osmo-bts In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1169 to look at the new patch set (#2). pcu_if: original pcu sock interface from osmo-bts The pcu interface required to support bsc co-located pcu uses pcu_sock.c and its related header files as a starting point. See also: osmo-bts.git: ced9a5d0e2c7e3371760f1c07df7b41cfe7ab71d Change-Id: I46b0a65f1633c40053d43b57b786b042f20f12bd --- A openbsc/include/openbsc/pcu_if.h A openbsc/include/openbsc/pcuif_proto.h A openbsc/src/libbsc/pcu_sock.c 3 files changed, 1,101 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/69/1169/2 diff --git a/openbsc/include/openbsc/pcu_if.h b/openbsc/include/openbsc/pcu_if.h new file mode 100644 index 0000000..a020c05 --- /dev/null +++ b/openbsc/include/openbsc/pcu_if.h @@ -0,0 +1,25 @@ +#ifndef _PCU_IF_H +#define _PCU_IF_H + +#define PCU_SOCK_DEFAULT "/tmp/pcu_bts" + +extern int pcu_direct; + +int pcu_tx_info_ind(void); +int pcu_tx_rts_req(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn, + uint16_t arfcn, uint8_t block_nr); +int pcu_tx_data_ind(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn, + uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len, + int8_t rssi, uint16_t ber10k, int16_t bto, int16_t lqual); +int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint16_t ra, uint32_t fn, + uint8_t is_11bit, enum ph_burst_type burst_type); +int pcu_tx_time_ind(uint32_t fn); +int pcu_tx_pag_req(const uint8_t *identity_lv, uint8_t chan_needed); +int pcu_tx_pch_data_cnf(uint32_t fn, uint8_t *data, uint8_t len); + +int pcu_sock_init(const char *path); +void pcu_sock_exit(void); + +bool pcu_connected(void); + +#endif /* _PCU_IF_H */ diff --git a/openbsc/include/openbsc/pcuif_proto.h b/openbsc/include/openbsc/pcuif_proto.h new file mode 100644 index 0000000..5527238 --- /dev/null +++ b/openbsc/include/openbsc/pcuif_proto.h @@ -0,0 +1,158 @@ +#ifndef _PCUIF_PROTO_H +#define _PCUIF_PROTO_H + +#define PCU_IF_VERSION 0x07 + +/* msg_type */ +#define PCU_IF_MSG_DATA_REQ 0x00 /* send data to given channel */ +#define PCU_IF_MSG_DATA_CNF 0x01 /* confirm (e.g. transmission on PCH) */ +#define PCU_IF_MSG_DATA_IND 0x02 /* receive data from given channel */ +#define PCU_IF_MSG_RTS_REQ 0x10 /* ready to send request */ +#define PCU_IF_MSG_RACH_IND 0x22 /* receive RACH */ +#define PCU_IF_MSG_INFO_IND 0x32 /* retrieve BTS info */ +#define PCU_IF_MSG_ACT_REQ 0x40 /* activate/deactivate PDCH */ +#define PCU_IF_MSG_TIME_IND 0x52 /* GSM time indication */ +#define PCU_IF_MSG_PAG_REQ 0x60 /* paging request */ + +/* sapi */ +#define PCU_IF_SAPI_RACH 0x01 /* channel request on CCCH */ +#define PCU_IF_SAPI_AGCH 0x02 /* assignment on AGCH */ +#define PCU_IF_SAPI_PCH 0x03 /* paging/assignment on PCH */ +#define PCU_IF_SAPI_BCCH 0x04 /* SI on BCCH */ +#define PCU_IF_SAPI_PDTCH 0x05 /* packet data/control/ccch block */ +#define PCU_IF_SAPI_PRACH 0x06 /* packet random access channel */ +#define PCU_IF_SAPI_PTCCH 0x07 /* packet TA control channel */ + +/* flags */ +#define PCU_IF_FLAG_ACTIVE (1 << 0)/* BTS is active */ +#define PCU_IF_FLAG_SYSMO (1 << 1)/* access PDCH of sysmoBTS directly */ +#define PCU_IF_FLAG_CS1 (1 << 16) +#define PCU_IF_FLAG_CS2 (1 << 17) +#define PCU_IF_FLAG_CS3 (1 << 18) +#define PCU_IF_FLAG_CS4 (1 << 19) +#define PCU_IF_FLAG_MCS1 (1 << 20) +#define PCU_IF_FLAG_MCS2 (1 << 21) +#define PCU_IF_FLAG_MCS3 (1 << 22) +#define PCU_IF_FLAG_MCS4 (1 << 23) +#define PCU_IF_FLAG_MCS5 (1 << 24) +#define PCU_IF_FLAG_MCS6 (1 << 25) +#define PCU_IF_FLAG_MCS7 (1 << 26) +#define PCU_IF_FLAG_MCS8 (1 << 27) +#define PCU_IF_FLAG_MCS9 (1 << 28) + +struct gsm_pcu_if_data { + uint8_t sapi; + uint8_t len; + uint8_t data[162]; + uint32_t fn; + uint16_t arfcn; + uint8_t trx_nr; + uint8_t ts_nr; + uint8_t block_nr; + int8_t rssi; + uint16_t ber10k; /*!< \brief BER in units of 0.01% */ + int16_t ta_offs_qbits; /* !< \brief Burst TA Offset in quarter bits */ + int16_t lqual_cb; /* !< \brief Link quality in centiBel */ +} __attribute__ ((packed)); + +struct gsm_pcu_if_rts_req { + uint8_t sapi; + uint8_t spare[3]; + uint32_t fn; + uint16_t arfcn; + uint8_t trx_nr; + uint8_t ts_nr; + uint8_t block_nr; +} __attribute__ ((packed)); + +struct gsm_pcu_if_rach_ind { + uint8_t sapi; + uint16_t ra; + int16_t qta; + uint32_t fn; + uint16_t arfcn; + uint8_t is_11bit; + uint8_t burst_type; +} __attribute__ ((packed)); + +struct gsm_pcu_if_info_trx { + uint16_t arfcn; + uint8_t pdch_mask; /* PDCH channels per TS */ + uint8_t spare; + uint8_t tsc[8]; /* TSC per channel */ + uint32_t hlayer1; +} __attribute__ ((packed)); + +struct gsm_pcu_if_info_ind { + uint32_t version; + uint32_t flags; + struct gsm_pcu_if_info_trx trx[8]; /* TRX infos per BTS */ + uint8_t bsic; + /* RAI */ + uint16_t mcc, mnc, lac, rac; + /* NSE */ + uint16_t nsei; + uint8_t nse_timer[7]; + uint8_t cell_timer[11]; + /* cell */ + uint16_t cell_id; + uint16_t repeat_time; + uint8_t repeat_count; + uint16_t bvci; + uint8_t t3142; + uint8_t t3169; + uint8_t t3191; + uint8_t t3193_10ms; + uint8_t t3195; + uint8_t n3101; + uint8_t n3103; + uint8_t n3105; + uint8_t cv_countdown; + uint16_t dl_tbf_ext; + uint16_t ul_tbf_ext; + uint8_t initial_cs; + uint8_t initial_mcs; + /* NSVC */ + uint16_t nsvci[2]; + uint16_t local_port[2]; + uint16_t remote_port[2]; + uint32_t remote_ip[2]; +} __attribute__ ((packed)); + +struct gsm_pcu_if_act_req { + uint8_t activate; + uint8_t trx_nr; + uint8_t ts_nr; + uint8_t spare; +} __attribute__ ((packed)); + +struct gsm_pcu_if_time_ind { + uint32_t fn; +} __attribute__ ((packed)); + +struct gsm_pcu_if_pag_req { + uint8_t sapi; + uint8_t chan_needed; + uint8_t identity_lv[9]; +} __attribute__ ((packed)); + +struct gsm_pcu_if { + /* context based information */ + uint8_t msg_type; /* message type */ + uint8_t bts_nr; /* bts number */ + uint8_t spare[2]; + + union { + struct gsm_pcu_if_data data_req; + struct gsm_pcu_if_data data_cnf; + struct gsm_pcu_if_data data_ind; + struct gsm_pcu_if_rts_req rts_req; + struct gsm_pcu_if_rach_ind rach_ind; + struct gsm_pcu_if_info_ind info_ind; + struct gsm_pcu_if_act_req act_req; + struct gsm_pcu_if_time_ind time_ind; + struct gsm_pcu_if_pag_req pag_req; + } u; +} __attribute__ ((packed)); + +#endif /* _PCUIF_PROTO_H */ diff --git a/openbsc/src/libbsc/pcu_sock.c b/openbsc/src/libbsc/pcu_sock.c new file mode 100644 index 0000000..62f18a7 --- /dev/null +++ b/openbsc/src/libbsc/pcu_sock.c @@ -0,0 +1,918 @@ +/* pcu_sock.c: Connect from PCU via unix domain socket */ + +/* (C) 2008-2010 by Harald Welte + * (C) 2009-2012 by Andreas Eversberg + * (C) 2012 by Holger Hans Peter Freyther + * 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 +#include +#include +#include +#include +#include +#include +#include +#include + +uint32_t trx_get_hlayer1(struct gsm_bts_trx *trx); + +extern struct gsm_network bts_gsmnet; +int pcu_direct = 0; +static int avail_lai = 0, avail_nse = 0, avail_cell = 0, avail_nsvc[2] = {0, 0}; + +static const char *sapi_string[] = { + [PCU_IF_SAPI_RACH] = "RACH", + [PCU_IF_SAPI_AGCH] = "AGCH", + [PCU_IF_SAPI_PCH] = "PCH", + [PCU_IF_SAPI_BCCH] = "BCCH", + [PCU_IF_SAPI_PDTCH] = "PDTCH", + [PCU_IF_SAPI_PRACH] = "PRACH", + [PCU_IF_SAPI_PTCCH] = "PTCCH", +}; + +static int pcu_sock_send(struct gsm_network *net, struct msgb *msg); + + +static struct gsm_bts_trx *trx_by_nr(struct gsm_bts *bts, uint8_t trx_nr) +{ + struct gsm_bts_trx *trx; + + llist_for_each_entry(trx, &bts->trx_list, list) { + if (trx->nr == trx_nr) + return trx; + } + + return NULL; +} + + +/* + * PCU messages + */ + +struct msgb *pcu_msgb_alloc(uint8_t msg_type, uint8_t bts_nr) +{ + struct msgb *msg; + struct gsm_pcu_if *pcu_prim; + + msg = msgb_alloc(sizeof(struct gsm_pcu_if), "pcu_sock_tx"); + if (!msg) + return NULL; + msgb_put(msg, sizeof(struct gsm_pcu_if)); + pcu_prim = (struct gsm_pcu_if *) msg->data; + pcu_prim->msg_type = msg_type; + pcu_prim->bts_nr = bts_nr; + + return msg; +} + +static bool ts_should_be_pdch(struct gsm_bts_trx_ts *ts) { + if (ts->pchan == GSM_PCHAN_PDCH) + return true; + if (ts->pchan == GSM_PCHAN_TCH_F_PDCH) { + /* When we're busy deactivating the PDCH, we first set + * DEACT_PENDING, tell the PCU about it and wait for a + * response. So DEACT_PENDING means "no PDCH" to the PCU. + * Similarly, when we're activating PDCH, we set the + * ACT_PENDING and wait for an activation response from the + * PCU, so ACT_PENDING means "is PDCH". */ + if (ts->flags & TS_F_PDCH_ACTIVE) + return !(ts->flags & TS_F_PDCH_DEACT_PENDING); + else + return (ts->flags & TS_F_PDCH_ACT_PENDING); + } + if (ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH) { + /* + * When we're busy de-/activating the PDCH, we first set + * ts->dyn.pchan_want, tell the PCU about it and wait for a + * response. So only care about dyn.pchan_want here. + */ + return ts->dyn.pchan_want == GSM_PCHAN_PDCH; + } + return false; +} + +int pcu_tx_info_ind(void) +{ + struct gsm_network *net = &bts_gsmnet; + struct msgb *msg; + struct gsm_pcu_if *pcu_prim; + struct gsm_pcu_if_info_ind *info_ind; + struct gsm_bts *bts; + struct gprs_rlc_cfg *rlcc; + struct gsm_bts_gprs_nsvc *nsvc; + struct gsm_bts_trx *trx; + struct gsm_bts_trx_ts *ts; + int i, j; + + LOGP(DPCU, LOGL_INFO, "Sending info\n"); + + /* FIXME: allow multiple BTS */ + bts = llist_entry(net->bts_list.next, struct gsm_bts, list); + rlcc = &bts->gprs.cell.rlc_cfg; + + msg = pcu_msgb_alloc(PCU_IF_MSG_INFO_IND, bts->nr); + if (!msg) + return -ENOMEM; + pcu_prim = (struct gsm_pcu_if *) msg->data; + info_ind = &pcu_prim->u.info_ind; + info_ind->version = PCU_IF_VERSION; + + if (avail_lai && avail_nse && avail_cell && avail_nsvc[0]) { + info_ind->flags |= PCU_IF_FLAG_ACTIVE; + LOGP(DPCU, LOGL_INFO, "BTS is up\n"); + } else + LOGP(DPCU, LOGL_INFO, "BTS is down\n"); + + if (pcu_direct) + info_ind->flags |= PCU_IF_FLAG_SYSMO; + + /* RAI */ + info_ind->mcc = net->mcc; + info_ind->mnc = net->mnc; + info_ind->lac = bts->location_area_code; + info_ind->rac = bts->gprs.rac; + + /* NSE */ + info_ind->nsei = bts->gprs.nse.nsei; + memcpy(info_ind->nse_timer, bts->gprs.nse.timer, 7); + memcpy(info_ind->cell_timer, bts->gprs.cell.timer, 11); + + /* cell attributes */ + info_ind->cell_id = bts->cell_identity; + info_ind->repeat_time = rlcc->paging.repeat_time; + info_ind->repeat_count = rlcc->paging.repeat_count; + info_ind->bvci = bts->gprs.cell.bvci; + info_ind->t3142 = rlcc->parameter[RLC_T3142]; + info_ind->t3169 = rlcc->parameter[RLC_T3169]; + info_ind->t3191 = rlcc->parameter[RLC_T3191]; + info_ind->t3193_10ms = rlcc->parameter[RLC_T3193]; + info_ind->t3195 = rlcc->parameter[RLC_T3195]; + info_ind->n3101 = rlcc->parameter[RLC_N3101]; + info_ind->n3103 = rlcc->parameter[RLC_N3103]; + info_ind->n3105 = rlcc->parameter[RLC_N3105]; + info_ind->cv_countdown = rlcc->parameter[CV_COUNTDOWN]; + if (rlcc->cs_mask & (1 << GPRS_CS1)) + info_ind->flags |= PCU_IF_FLAG_CS1; + if (rlcc->cs_mask & (1 << GPRS_CS2)) + info_ind->flags |= PCU_IF_FLAG_CS2; + if (rlcc->cs_mask & (1 << GPRS_CS3)) + info_ind->flags |= PCU_IF_FLAG_CS3; + if (rlcc->cs_mask & (1 << GPRS_CS4)) + info_ind->flags |= PCU_IF_FLAG_CS4; + if (rlcc->cs_mask & (1 << GPRS_MCS1)) + info_ind->flags |= PCU_IF_FLAG_MCS1; + if (rlcc->cs_mask & (1 << GPRS_MCS2)) + info_ind->flags |= PCU_IF_FLAG_MCS2; + if (rlcc->cs_mask & (1 << GPRS_MCS3)) + info_ind->flags |= PCU_IF_FLAG_MCS3; + if (rlcc->cs_mask & (1 << GPRS_MCS4)) + info_ind->flags |= PCU_IF_FLAG_MCS4; + if (rlcc->cs_mask & (1 << GPRS_MCS5)) + info_ind->flags |= PCU_IF_FLAG_MCS5; + if (rlcc->cs_mask & (1 << GPRS_MCS6)) + info_ind->flags |= PCU_IF_FLAG_MCS6; + if (rlcc->cs_mask & (1 << GPRS_MCS7)) + info_ind->flags |= PCU_IF_FLAG_MCS7; + if (rlcc->cs_mask & (1 << GPRS_MCS8)) + info_ind->flags |= PCU_IF_FLAG_MCS8; + if (rlcc->cs_mask & (1 << GPRS_MCS9)) + info_ind->flags |= PCU_IF_FLAG_MCS9; +#warning "isn't dl_tbf_ext wrong?: * 10 and no ntohs" + info_ind->dl_tbf_ext = rlcc->parameter[T_DL_TBF_EXT]; +#warning "isn't ul_tbf_ext wrong?: * 10 and no ntohs" + info_ind->ul_tbf_ext = rlcc->parameter[T_UL_TBF_EXT]; + info_ind->initial_cs = rlcc->initial_cs; + info_ind->initial_mcs = rlcc->initial_mcs; + + /* NSVC */ + for (i = 0; i < 2; i++) { + nsvc = &bts->gprs.nsvc[i]; + info_ind->nsvci[i] = nsvc->nsvci; + info_ind->local_port[i] = nsvc->local_port; + info_ind->remote_port[i] = nsvc->remote_port; + info_ind->remote_ip[i] = nsvc->remote_ip; + } + + for (i = 0; i < 8; i++) { + trx = trx_by_nr(bts, i); + if (!trx) + break; + info_ind->trx[i].pdch_mask = 0; + info_ind->trx[i].arfcn = trx->arfcn; + info_ind->trx[i].hlayer1 = trx_get_hlayer1(trx); + for (j = 0; j < 8; j++) { + ts = &trx->ts[j]; + if (ts->mo.nm_state.operational == NM_OPSTATE_ENABLED + && ts_should_be_pdch(ts)) { + info_ind->trx[i].pdch_mask |= (1 << j); + info_ind->trx[i].tsc[j] = + (ts->tsc >= 0) ? ts->tsc : bts->bsic & 7; + LOGP(DPCU, LOGL_INFO, "trx=%d ts=%d: " + "available (tsc=%d arfcn=%d)\n", + trx->nr, ts->nr, + info_ind->trx[i].tsc[j], + info_ind->trx[i].arfcn); + } + } + } + + return pcu_sock_send(net, msg); +} + +static int pcu_if_signal_cb(unsigned int subsys, unsigned int signal, + void *hdlr_data, void *signal_data) +{ + struct gsm_network *net = &bts_gsmnet; + struct gsm_bts_gprs_nsvc *nsvc; + struct gsm_bts *bts; + struct gsm48_system_information_type_3 *si3; + int id; + + if (subsys != SS_GLOBAL) + return -EINVAL; + + switch(signal) { + case S_NEW_SYSINFO: + bts = signal_data; + if (!(bts->si_valid & (1 << SYSINFO_TYPE_3))) + break; + si3 = (struct gsm48_system_information_type_3 *) + bts->si_buf[SYSINFO_TYPE_3]; + net->mcc = ((si3->lai.digits[0] & 0x0f) << 8) + | (si3->lai.digits[0] & 0xf0) + | (si3->lai.digits[1] & 0x0f); + net->mnc = ((si3->lai.digits[2] & 0x0f) << 8) + | (si3->lai.digits[2] & 0xf0) + | ((si3->lai.digits[1] & 0xf0) >> 4); + if ((net->mnc & 0x00f) == 0x00f) + net->mnc >>= 4; + bts->location_area_code = ntohs(si3->lai.lac); + bts->cell_identity = si3->cell_identity; + avail_lai = 1; + break; + case S_NEW_NSE_ATTR: + bts = signal_data; + avail_nse = 1; + break; + case S_NEW_CELL_ATTR: + bts = signal_data; + avail_cell = 1; + break; + case S_NEW_NSVC_ATTR: + nsvc = signal_data; + id = nsvc->id; + if (id < 0 || id > 1) + return -EINVAL; + avail_nsvc[id] = 1; + break; + case S_NEW_OP_STATE: + break; + default: + return -EINVAL; + } + + /* If all infos have been received, of if one info is updated after + * all infos have been received, transmit info update. */ + if (avail_lai && avail_nse && avail_cell && avail_nsvc[0]) + pcu_tx_info_ind(); + return 0; +} + + +int pcu_tx_rts_req(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn, + uint16_t arfcn, uint8_t block_nr) +{ + struct msgb *msg; + struct gsm_pcu_if *pcu_prim; + struct gsm_pcu_if_rts_req *rts_req; + struct gsm_bts *bts = ts->trx->bts; + + LOGP(DPCU, LOGL_DEBUG, "Sending rts request: is_ptcch=%d arfcn=%d " + "block=%d\n", is_ptcch, arfcn, block_nr); + + msg = pcu_msgb_alloc(PCU_IF_MSG_RTS_REQ, bts->nr); + if (!msg) + return -ENOMEM; + pcu_prim = (struct gsm_pcu_if *) msg->data; + rts_req = &pcu_prim->u.rts_req; + + rts_req->sapi = (is_ptcch) ? PCU_IF_SAPI_PTCCH : PCU_IF_SAPI_PDTCH; + rts_req->fn = fn; + rts_req->arfcn = arfcn; + rts_req->trx_nr = ts->trx->nr; + rts_req->ts_nr = ts->nr; + rts_req->block_nr = block_nr; + + return pcu_sock_send(&bts_gsmnet, msg); +} + +int pcu_tx_data_ind(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn, + uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len, + int8_t rssi, uint16_t ber10k, int16_t bto, int16_t lqual) +{ + struct msgb *msg; + struct gsm_pcu_if *pcu_prim; + struct gsm_pcu_if_data *data_ind; + struct gsm_bts *bts = ts->trx->bts; + + LOGP(DPCU, LOGL_DEBUG, "Sending data indication: is_ptcch=%d arfcn=%d " + "block=%d data=%s\n", is_ptcch, arfcn, block_nr, + osmo_hexdump(data, len)); + + msg = pcu_msgb_alloc(PCU_IF_MSG_DATA_IND, bts->nr); + if (!msg) + return -ENOMEM; + pcu_prim = (struct gsm_pcu_if *) msg->data; + data_ind = &pcu_prim->u.data_ind; + + data_ind->sapi = (is_ptcch) ? PCU_IF_SAPI_PTCCH : PCU_IF_SAPI_PDTCH; + data_ind->rssi = rssi; + data_ind->fn = fn; + data_ind->arfcn = arfcn; + data_ind->trx_nr = ts->trx->nr; + data_ind->ts_nr = ts->nr; + data_ind->block_nr = block_nr; + data_ind->rssi = rssi; + data_ind->ber10k = ber10k; + data_ind->ta_offs_qbits = bto; + data_ind->lqual_cb = lqual; + memcpy(data_ind->data, data, len); + data_ind->len = len; + + return pcu_sock_send(&bts_gsmnet, msg); +} + +int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint16_t ra, uint32_t fn, + uint8_t is_11bit, enum ph_burst_type burst_type) +{ + struct msgb *msg; + struct gsm_pcu_if *pcu_prim; + struct gsm_pcu_if_rach_ind *rach_ind; + + LOGP(DPCU, LOGL_INFO, "Sending RACH indication: qta=%d, ra=%d, " + "fn=%d\n", qta, ra, fn); + + msg = pcu_msgb_alloc(PCU_IF_MSG_RACH_IND, bts->nr); + if (!msg) + return -ENOMEM; + pcu_prim = (struct gsm_pcu_if *) msg->data; + rach_ind = &pcu_prim->u.rach_ind; + + rach_ind->sapi = PCU_IF_SAPI_RACH; + rach_ind->ra = ra; + rach_ind->qta = qta; + rach_ind->fn = fn; + rach_ind->is_11bit = is_11bit; + rach_ind->burst_type = burst_type; + + return pcu_sock_send(&bts_gsmnet, msg); +} + +int pcu_tx_time_ind(uint32_t fn) +{ + struct msgb *msg; + struct gsm_pcu_if *pcu_prim; + struct gsm_pcu_if_time_ind *time_ind; + uint8_t fn13 = fn % 13; + + /* omit frame numbers not starting at a MAC block */ + if (fn13 != 0 && fn13 != 4 && fn13 != 8) + return 0; + + msg = pcu_msgb_alloc(PCU_IF_MSG_TIME_IND, 0); + if (!msg) + return -ENOMEM; + pcu_prim = (struct gsm_pcu_if *) msg->data; + time_ind = &pcu_prim->u.time_ind; + + time_ind->fn = fn; + + return pcu_sock_send(&bts_gsmnet, msg); +} + +int pcu_tx_pag_req(const uint8_t *identity_lv, uint8_t chan_needed) +{ + struct pcu_sock_state *state = bts_gsmnet.pcu_state; + struct msgb *msg; + struct gsm_pcu_if *pcu_prim; + struct gsm_pcu_if_pag_req *pag_req; + + /* check if identity does not fit: length > sizeof(lv) - 1 */ + if (identity_lv[0] >= sizeof(pag_req->identity_lv)) { + LOGP(DPCU, LOGL_ERROR, "Paging identity too large (%d)\n", + identity_lv[0]); + return -EINVAL; + } + + /* socket not created */ + if (!state) { + LOGP(DPCU, LOGL_DEBUG, "PCU socket not created, ignoring " + "paging message\n"); + return 0; + } + + msg = pcu_msgb_alloc(PCU_IF_MSG_PAG_REQ, 0); + if (!msg) + return -ENOMEM; + pcu_prim = (struct gsm_pcu_if *) msg->data; + pag_req = &pcu_prim->u.pag_req; + + pag_req->chan_needed = chan_needed; + memcpy(pag_req->identity_lv, identity_lv, identity_lv[0] + 1); + + return pcu_sock_send(&bts_gsmnet, msg); +} + +int pcu_tx_pch_data_cnf(uint32_t fn, uint8_t *data, uint8_t len) +{ + struct gsm_network *net = &bts_gsmnet; + struct gsm_bts *bts; + struct msgb *msg; + struct gsm_pcu_if *pcu_prim; + struct gsm_pcu_if_data *data_cnf; + + /* FIXME: allow multiple BTS */ + bts = llist_entry(net->bts_list.next, struct gsm_bts, list); + + LOGP(DPCU, LOGL_INFO, "Sending PCH confirm\n"); + + msg = pcu_msgb_alloc(PCU_IF_MSG_DATA_CNF, bts->nr); + if (!msg) + return -ENOMEM; + pcu_prim = (struct gsm_pcu_if *) msg->data; + data_cnf = &pcu_prim->u.data_cnf; + + data_cnf->sapi = PCU_IF_SAPI_PCH; + data_cnf->fn = fn; + memcpy(data_cnf->data, data, len); + data_cnf->len = len; + + return pcu_sock_send(&bts_gsmnet, msg); +} + +static int pcu_rx_data_req(struct gsm_bts *bts, uint8_t msg_type, + struct gsm_pcu_if_data *data_req) +{ + uint8_t is_ptcch; + struct gsm_bts_trx *trx; + struct gsm_bts_trx_ts *ts; + struct msgb *msg; + int rc = 0; + + LOGP(DPCU, LOGL_DEBUG, "Data request received: sapi=%s arfcn=%d " + "block=%d data=%s\n", sapi_string[data_req->sapi], + data_req->arfcn, data_req->block_nr, + osmo_hexdump(data_req->data, data_req->len)); + + switch (data_req->sapi) { + case PCU_IF_SAPI_BCCH: + if (data_req->len == 23) { + bts->si_valid |= (1 << SYSINFO_TYPE_13); + memcpy(bts->si_buf[SYSINFO_TYPE_13], data_req->data, + data_req->len); + } else { + bts->si_valid &= ~(1 << SYSINFO_TYPE_13); + } + osmo_signal_dispatch(SS_GLOBAL, S_NEW_SYSINFO, bts); + break; + case PCU_IF_SAPI_PCH: + if (msg_type == PCU_IF_MSG_PAG_REQ) { + /* FIXME: Add function to schedule paging request. + * This might not be required, if PCU_IF_MSG_DATA_REQ + * is used instead. */ + } else { + struct gsm_bts_role_bts *btsb = bts->role; + + paging_add_imm_ass(btsb->paging_state, data_req->data, + data_req->len); + } + break; + case PCU_IF_SAPI_AGCH: + msg = msgb_alloc(data_req->len, "pcu_agch"); + if (!msg) { + rc = -ENOMEM; + break; + } + msg->l3h = msgb_put(msg, data_req->len); + memcpy(msg->l3h, data_req->data, data_req->len); + if (bts_agch_enqueue(bts, msg) < 0) { + msgb_free(msg); + rc = -EIO; + } + break; + case PCU_IF_SAPI_PDTCH: + case PCU_IF_SAPI_PTCCH: + trx = trx_by_nr(bts, data_req->trx_nr); + if (!trx) { + LOGP(DPCU, LOGL_ERROR, "Received PCU data request with " + "not existing TRX %d\n", data_req->trx_nr); + rc = -EINVAL; + break; + } + ts = &trx->ts[data_req->ts_nr]; + is_ptcch = (data_req->sapi == PCU_IF_SAPI_PTCCH); + rc = l1sap_pdch_req(ts, is_ptcch, data_req->fn, data_req->arfcn, + data_req->block_nr, data_req->data, data_req->len); + break; + default: + LOGP(DPCU, LOGL_ERROR, "Received PCU data request with " + "unsupported sapi %d\n", data_req->sapi); + rc = -EINVAL; + } + + return rc; +} + +static int pcu_rx_act_req(struct gsm_bts *bts, + struct gsm_pcu_if_act_req *act_req) +{ + struct gsm_bts_trx *trx; + struct gsm_lchan *lchan; + + LOGP(DPCU, LOGL_INFO, "%s request received: TRX=%d TX=%d\n", + (act_req->activate) ? "Activate" : "Deactivate", + act_req->trx_nr, act_req->ts_nr); + + trx = trx_by_nr(bts, act_req->trx_nr); + if (!trx || act_req->ts_nr >= 8) + return -EINVAL; + + lchan = trx->ts[act_req->ts_nr].lchan; + lchan->rel_act_kind = LCHAN_REL_ACT_PCU; + if (lchan->type != GSM_LCHAN_PDTCH) { + LOGP(DPCU, LOGL_ERROR, + "%s request, but lchan is not of type PDTCH (is %s)\n", + (act_req->activate) ? "Activate" : "Deactivate", + gsm_lchant_name(lchan->type)); + return -EINVAL; + } + if (act_req->activate) + l1sap_chan_act(trx, gsm_lchan2chan_nr(lchan), NULL); + else + l1sap_chan_rel(trx, gsm_lchan2chan_nr(lchan)); + + return 0; +} + +static int pcu_rx(struct gsm_network *net, uint8_t msg_type, + struct gsm_pcu_if *pcu_prim) +{ + int rc = 0; + struct gsm_bts *bts; + + /* FIXME: allow multiple BTS */ + bts = llist_entry(net->bts_list.next, struct gsm_bts, list); + + switch (msg_type) { + case PCU_IF_MSG_DATA_REQ: + case PCU_IF_MSG_PAG_REQ: + rc = pcu_rx_data_req(bts, msg_type, &pcu_prim->u.data_req); + break; + case PCU_IF_MSG_ACT_REQ: + rc = pcu_rx_act_req(bts, &pcu_prim->u.act_req); + break; + default: + LOGP(DPCU, LOGL_ERROR, "Received unknwon PCU msg type %d\n", + msg_type); + rc = -EINVAL; + } + + return rc; +} + +/* + * PCU socket interface + */ + +struct pcu_sock_state { + struct gsm_network *net; + struct osmo_fd listen_bfd; /* fd for listen socket */ + struct osmo_fd conn_bfd; /* fd for connection to lcr */ + struct llist_head upqueue; /* queue for sending messages */ +}; + +static int pcu_sock_send(struct gsm_network *net, struct msgb *msg) +{ + struct pcu_sock_state *state = net->pcu_state; + struct osmo_fd *conn_bfd; + struct gsm_pcu_if *pcu_prim = (struct gsm_pcu_if *) msg->data; + + if (!state) { + if (pcu_prim->msg_type != PCU_IF_MSG_TIME_IND) + LOGP(DPCU, LOGL_INFO, "PCU socket not created, " + "dropping message\n"); + msgb_free(msg); + return -EINVAL; + } + conn_bfd = &state->conn_bfd; + if (conn_bfd->fd <= 0) { + if (pcu_prim->msg_type != PCU_IF_MSG_TIME_IND) + LOGP(DPCU, LOGL_NOTICE, "PCU socket not connected, " + "dropping message\n"); + msgb_free(msg); + return -EIO; + } + msgb_enqueue(&state->upqueue, msg); + conn_bfd->when |= BSC_FD_WRITE; + + return 0; +} + +static void pcu_sock_close(struct pcu_sock_state *state) +{ + struct osmo_fd *bfd = &state->conn_bfd; + struct gsm_bts *bts; + struct gsm_bts_trx *trx; + struct gsm_bts_trx_ts *ts; + int i, j; + + /* FIXME: allow multiple BTS */ + bts = llist_entry(state->net->bts_list.next, struct gsm_bts, list); + + LOGP(DPCU, LOGL_NOTICE, "PCU socket has LOST connection\n"); + + close(bfd->fd); + bfd->fd = -1; + osmo_fd_unregister(bfd); + + /* re-enable the generation of ACCEPT for new connections */ + state->listen_bfd.when |= BSC_FD_READ; + +#if 0 + /* remove si13, ... */ + bts->si_valid &= ~(1 << SYSINFO_TYPE_13); + osmo_signal_dispatch(SS_GLOBAL, S_NEW_SYSINFO, bts); +#endif + + /* release PDCH */ + for (i = 0; i < 8; i++) { + trx = trx_by_nr(bts, i); + if (!trx) + break; + for (j = 0; j < 8; j++) { + ts = &trx->ts[j]; + if (ts->mo.nm_state.operational == NM_OPSTATE_ENABLED + && ts->pchan == GSM_PCHAN_PDCH) { + ts->lchan->rel_act_kind = LCHAN_REL_ACT_PCU; + l1sap_chan_rel(trx, + gsm_lchan2chan_nr(ts->lchan)); + } + } + } + + /* flush the queue */ + while (!llist_empty(&state->upqueue)) { + struct msgb *msg = msgb_dequeue(&state->upqueue); + msgb_free(msg); + } +} + +static int pcu_sock_read(struct osmo_fd *bfd) +{ + struct pcu_sock_state *state = (struct pcu_sock_state *)bfd->data; + struct gsm_pcu_if *pcu_prim; + struct msgb *msg; + int rc; + + msg = msgb_alloc(sizeof(*pcu_prim), "pcu_sock_rx"); + if (!msg) + return -ENOMEM; + + pcu_prim = (struct gsm_pcu_if *) msg->tail; + + rc = recv(bfd->fd, msg->tail, msgb_tailroom(msg), 0); + if (rc == 0) + goto close; + + if (rc < 0) { + if (errno == EAGAIN) + return 0; + goto close; + } + + rc = pcu_rx(state->net, pcu_prim->msg_type, pcu_prim); + + /* as we always synchronously process the message in pcu_rx() and + * its callbacks, we can free the message here. */ + msgb_free(msg); + + return rc; + +close: + msgb_free(msg); + pcu_sock_close(state); + return -1; +} + +static int pcu_sock_write(struct osmo_fd *bfd) +{ + struct pcu_sock_state *state = bfd->data; + int rc; + + while (!llist_empty(&state->upqueue)) { + struct msgb *msg, *msg2; + struct gsm_pcu_if *pcu_prim; + + /* peek at the beginning of the queue */ + msg = llist_entry(state->upqueue.next, struct msgb, list); + pcu_prim = (struct gsm_pcu_if *)msg->data; + + bfd->when &= ~BSC_FD_WRITE; + + /* bug hunter 8-): maybe someone forgot msgb_put(...) ? */ + if (!msgb_length(msg)) { + LOGP(DPCU, LOGL_ERROR, "message type (%d) with ZERO " + "bytes!\n", pcu_prim->msg_type); + goto dontsend; + } + + /* try to send it over the socket */ + rc = write(bfd->fd, msgb_data(msg), msgb_length(msg)); + if (rc == 0) + goto close; + if (rc < 0) { + if (errno == EAGAIN) { + bfd->when |= BSC_FD_WRITE; + break; + } + goto close; + } + +dontsend: + /* _after_ we send it, we can deueue */ + msg2 = msgb_dequeue(&state->upqueue); + assert(msg == msg2); + msgb_free(msg); + } + return 0; + +close: + pcu_sock_close(state); + + return -1; +} + +static int pcu_sock_cb(struct osmo_fd *bfd, unsigned int flags) +{ + int rc = 0; + + if (flags & BSC_FD_READ) + rc = pcu_sock_read(bfd); + if (rc < 0) + return rc; + + if (flags & BSC_FD_WRITE) + rc = pcu_sock_write(bfd); + + return rc; +} + +/* accept connection comming from PCU */ +static int pcu_sock_accept(struct osmo_fd *bfd, unsigned int flags) +{ + struct pcu_sock_state *state = (struct pcu_sock_state *)bfd->data; + struct osmo_fd *conn_bfd = &state->conn_bfd; + struct sockaddr_un un_addr; + socklen_t len; + int rc; + + len = sizeof(un_addr); + rc = accept(bfd->fd, (struct sockaddr *) &un_addr, &len); + if (rc < 0) { + LOGP(DPCU, LOGL_ERROR, "Failed to accept a new connection\n"); + return -1; + } + + if (conn_bfd->fd >= 0) { + LOGP(DPCU, LOGL_NOTICE, "PCU connects but we already have " + "another active connection ?!?\n"); + /* We already have one PCU connected, this is all we support */ + state->listen_bfd.when &= ~BSC_FD_READ; + close(rc); + return 0; + } + + conn_bfd->fd = rc; + conn_bfd->when = BSC_FD_READ; + conn_bfd->cb = pcu_sock_cb; + conn_bfd->data = state; + + if (osmo_fd_register(conn_bfd) != 0) { + LOGP(DPCU, LOGL_ERROR, "Failed to register new connection " + "fd\n"); + close(conn_bfd->fd); + conn_bfd->fd = -1; + return -1; + } + + LOGP(DPCU, LOGL_NOTICE, "PCU socket connected to external PCU\n"); + + /* send current info */ + pcu_tx_info_ind(); + + return 0; +} + +int pcu_sock_init(const char *path) +{ + struct pcu_sock_state *state; + struct osmo_fd *bfd; + int rc; + + state = talloc_zero(NULL, struct pcu_sock_state); + if (!state) + return -ENOMEM; + + INIT_LLIST_HEAD(&state->upqueue); + state->net = &bts_gsmnet; + state->conn_bfd.fd = -1; + + bfd = &state->listen_bfd; + + 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)); + talloc_free(state); + return -1; + } + + bfd->when = BSC_FD_READ; + bfd->cb = pcu_sock_accept; + bfd->data = state; + + rc = osmo_fd_register(bfd); + if (rc < 0) { + LOGP(DPCU, LOGL_ERROR, "Could not register listen fd: %d\n", + rc); + close(bfd->fd); + talloc_free(state); + return rc; + } + + osmo_signal_register_handler(SS_GLOBAL, pcu_if_signal_cb, NULL); + + bts_gsmnet.pcu_state = state; + + return 0; +} + +void pcu_sock_exit(void) +{ + struct pcu_sock_state *state = bts_gsmnet.pcu_state; + struct osmo_fd *bfd, *conn_bfd; + + if (!state) + return; + + osmo_signal_unregister_handler(SS_GLOBAL, pcu_if_signal_cb, NULL); + conn_bfd = &state->conn_bfd; + if (conn_bfd->fd > 0) + pcu_sock_close(state); + bfd = &state->listen_bfd; + close(bfd->fd); + osmo_fd_unregister(bfd); + talloc_free(state); + bts_gsmnet.pcu_state = NULL; +} + +bool pcu_connected(void) { + struct gsm_network *net = &bts_gsmnet; + struct pcu_sock_state *state = net->pcu_state; + + if (!state) + return false; + if (state->conn_bfd.fd <= 0) + return false; + return true; +} -- To view, visit https://gerrit.osmocom.org/1169 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I46b0a65f1633c40053d43b57b786b042f20f12bd Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Oct 27 16:12:00 2016 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 27 Oct 2016 16:12:00 +0000 Subject: [PATCH] openbsc[master]: rbs2000: Add missing bts feature definitions In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1170 to look at the new patch set (#2). rbs2000: Add missing bts feature definitions function bts_model_rbs2k_start() in bts_ericsson_rbs2000.c lacks the feature definition for GPRS and EGPRS. Change-Id: I777a67862084aa6cca39cfc43f5708e47608b0e6 --- M openbsc/src/libbsc/bts_ericsson_rbs2000.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/70/1170/2 diff --git a/openbsc/src/libbsc/bts_ericsson_rbs2000.c b/openbsc/src/libbsc/bts_ericsson_rbs2000.c index 1300b4a..f61776c 100644 --- a/openbsc/src/libbsc/bts_ericsson_rbs2000.c +++ b/openbsc/src/libbsc/bts_ericsson_rbs2000.c @@ -180,6 +180,8 @@ model_rbs2k.features.data = &model_rbs2k._features_data[0]; model_rbs2k.features.data_len = sizeof(model_rbs2k._features_data); + gsm_btsmodel_set_feature(&model_rbs2k, BTS_FEAT_GPRS); + gsm_btsmodel_set_feature(&model_rbs2k, BTS_FEAT_EGPRS); gsm_btsmodel_set_feature(&model_rbs2k, BTS_FEAT_HOPPING); gsm_btsmodel_set_feature(&model_rbs2k, BTS_FEAT_HSCSD); gsm_btsmodel_set_feature(&model_rbs2k, BTS_FEAT_MULTI_TSC); -- To view, visit https://gerrit.osmocom.org/1170 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I777a67862084aa6cca39cfc43f5708e47608b0e6 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu Oct 27 16:15:00 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 27 Oct 2016 16:15:00 +0000 Subject: osmo-bts[master]: 11bit RACH support for osmo-bts-litecell15 In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1168 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie5207a15424fb287febf74e830297531232accde Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: bhargava_abhyankar Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu Oct 27 17:30:37 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 27 Oct 2016 17:30:37 +0000 Subject: openbsc[master]: DTX DL: Add FACCH cache In-Reply-To: References: Message-ID: Patch Set 1: I think workaround for broken vim parser should go into separate cosmetic commit. -- To view, visit https://gerrit.osmocom.org/1152 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I316e81af893b24766bf259baaed7a0be75a11694 Gerrit-PatchSet: 1 Gerrit-Project: openbsc 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 Oct 27 18:43:53 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 27 Oct 2016 18:43:53 +0000 Subject: [PATCH] openbsc[master]: DTX DL: Add FACCH cache In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1152 to look at the new patch set (#2). DTX DL: Add FACCH cache When DL DTX is active and silent period is in progress dtx.cache is populated by SID UPDATE message which about to be scheduled next. If at that moment FACCH message arrives (which have higher priority) we have to send ONSET message to L1 but we can't invalidate cache with SID UPDATE as it will be used for SID FIRST message to resume silent period after FACCH transmission is over (provided there were no incoming voice in between). Hence the necessity for separate buffer to store content of FACCH message while we're sending ONSET to L1 while keeping SID UPDATE cached. Change-Id: I316e81af893b24766bf259baaed7a0be75a11694 Related: OS#1801 --- M openbsc/include/openbsc/gsm_data_shared.h 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/52/1152/2 diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index 487a3f3..a254876 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -300,7 +300,10 @@ struct amr_multirate_conf amr_mr; struct { struct osmo_fsm_inst *dl_amr_fsm; + /* TCH cache */ uint8_t cache[20]; + /* FACCH cache */ + uint8_t facch[24]; uint8_t len; uint32_t fn; bool is_update; -- To view, visit https://gerrit.osmocom.org/1152 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I316e81af893b24766bf259baaed7a0be75a11694 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 Thu Oct 27 19:10:00 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 27 Oct 2016 19:10:00 +0000 Subject: [PATCH] osmo-bts[master]: DTX DL: split ONSET state handling 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/1145 to look at the new patch set (#12). DTX DL: split ONSET state handling Handle ONSET cause by Voice and FACCH separately. In case of Voice we have RTP payload which we have to cache and send later on in next response to L1 RTS. FACCH have higher priority so it preempts both voice and silence alike - hence we can send ONSET immediately but still have to track previous state in order to get back to it gracefully. This affects lc15 and sysmo hw as there's no FSM-based DTX implementation for other models yet. Note: this requires patch for OpenBSC which adds FACCH buffer to tch.dtx struct. Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Related: OS#1802 --- M include/osmo-bts/dtx_dl_amr_fsm.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 7 files changed, 119 insertions(+), 35 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/45/1145/12 diff --git a/include/osmo-bts/dtx_dl_amr_fsm.h b/include/osmo-bts/dtx_dl_amr_fsm.h index 8b19595..5c13c19 100644 --- a/include/osmo-bts/dtx_dl_amr_fsm.h +++ b/include/osmo-bts/dtx_dl_amr_fsm.h @@ -16,7 +16,6 @@ ST_U_INH, ST_SID_U, ST_ONSET_V, - ST_ONSET_F, ST_FACCH_V, ST_FACCH, }; diff --git a/src/common/dtx_dl_amr_fsm.c b/src/common/dtx_dl_amr_fsm.c index b110cf2..a75fd00 100644 --- a/src/common/dtx_dl_amr_fsm.c +++ b/src/common/dtx_dl_amr_fsm.c @@ -53,7 +53,7 @@ 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_FACCH, 0, 0); break; case E_COMPL: osmo_fsm_inst_state_chg(fi, ST_SID_F2, 0, 0); @@ -81,7 +81,7 @@ 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_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -97,7 +97,7 @@ osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -113,7 +113,7 @@ osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -126,7 +126,7 @@ { switch (event) { case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; case E_VOICE: osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); @@ -234,7 +234,7 @@ 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), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_FACCH) | X(ST_SID_F2) | X(ST_F1_INH) | X(ST_ONSET_V), .name = "SID-FIRST (P1)", .action = dtx_fsm_sid_f1, }, @@ -242,7 +242,7 @@ 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), - .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_ONSET_F), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_FACCH), .name = "SID-FIRST (P2)", .action = dtx_fsm_sid_f2, }, @@ -265,7 +265,7 @@ /* 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), + .out_state_mask = X(ST_FACCH) | X(ST_VOICE) | X(ST_U_INH) | X(ST_SID_U) | X(ST_ONSET_V), .name = "SID-UPDATE", .action = dtx_fsm_sid_upd, }, @@ -275,13 +275,6 @@ .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), .name = "ONSET (SPEECH)", .action = dtx_fsm_onset_v, - }, - /* ONSET - end of silent period due to incoming FACCH frame */ - [ST_ONSET_F]= { - .in_event_mask = X(E_VOICE) | X(E_FACCH) | X(E_SID_U), - .out_state_mask = X(ST_VOICE) | X(ST_FACCH), - .name = "ONSET (FACCH)", - .action = dtx_fsm_onset_f, }, /* FACCH sending state: SPEECH was observed before so once we're done FSM should get back to VOICE state */ diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 9c6f20f..4b21366 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -220,11 +220,22 @@ * \param[in] fn Frame Number for which we check scheduling * \returns true if transmission can be omitted, false otherwise */ -static inline bool dtx_amr_sid_optional(const struct gsm_lchan *lchan, - uint32_t fn) +static inline bool dtx_amr_sid_optional(struct gsm_lchan *lchan, uint32_t fn) { /* Compute approx. time delta x26 based on Fn duration */ uint32_t dx26 = 120 * (fn - lchan->tch.dtx.fn); + + /* We're resuming after FACCH interruption */ + if (lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + /* force STI bit to 0 so cache is treated as SID FIRST */ + lchan->tch.dtx.cache[6 + 2] &= ~16; + lchan->tch.dtx.is_update = false; + osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, E_SID_F, + (void *)lchan); + /* this FN was already used for ONSET message so we just prepare + things for next one */ + return true; + } /* according to 3GPP TS 26.093 A.5.1.1: (*26) to avoid float math, add 1 FN tolerance (-120) */ @@ -293,7 +304,11 @@ if (lchan->tch.dtx.len) { memcpy(dst, lchan->tch.dtx.cache, lchan->tch.dtx.len); lchan->tch.dtx.fn = fn; - lchan->tch.dtx.is_update = true; /* SID UPDATE sent */ + /* enforce SID UPDATE for next repetition - it might have + been altered by FACCH handling */ + lchan->tch.dtx.cache[6 + 2] |= 16; + if (lchan->tch.dtx.dl_amr_fsm->state == ST_SID_U) + lchan->tch.dtx.is_update = true; return lchan->tch.dtx.len + 1; } diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index f47634e..b6f35b7 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -53,6 +53,7 @@ #include #include #include +#include #include #include @@ -330,13 +331,15 @@ } static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache) { struct lc15l1_hdl *fl1 = trx_lc15l1_hdl(trx); struct msgb *l1msg = l1p_msgb_alloc(); + struct gsm_lchan *lchan; uint32_t u32Fn; uint8_t u8Tn, subCh, u8BlockNbr = 0, sapi = 0; uint8_t chan_nr, link_id; + bool rec = false; int len; if (!msg) { @@ -401,14 +404,46 @@ if (len) { /* data request */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); + lchan = get_lchan_by_chan_nr(trx, chan_nr); + + if (use_cache) + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, + lchan->tch.dtx.facch, msgb_l2len(msg)); + else if (trx->bts->dtxd && lchan->tch.dtx.dl_amr_fsm && + lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + if (sapi == GsmL1_Sapi_FacchF) { + sapi = GsmL1_Sapi_TchF; + } + if (sapi == GsmL1_Sapi_FacchH) { + sapi = GsmL1_Sapi_TchH; + } + if (sapi == GsmL1_Sapi_TchH || sapi == GsmL1_Sapi_TchF) { + /* FACCH interruption of DTX silence */ + /* cache FACCH data */ + memcpy(lchan->tch.dtx.facch, msg->l2h, + msgb_l2len(msg)); + /* prepare ONSET message */ + len = 3; + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_Onset; + /* ignored CMR/CMI pair */ + l1p->u.phDataReq.msgUnitParam.u8Buffer[1] = 0; + l1p->u.phDataReq.msgUnitParam.u8Buffer[2] = 0; + /* ONSET is ready, recursive call is necessary */ + rec = true; + } + } data_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr, len); - OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); - memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, msgb_l2len(msg)); + if (!rec && !use_cache) { + OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, + msgb_l2len(msg)); + } LOGP(DL1P, LOGL_DEBUG, "PH-DATA.req(%s)\n", - osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, - l1p->u.phDataReq.msgUnitParam.u8Size)); + osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, + l1p->u.phDataReq.msgUnitParam.u8Size)); } else { /* empty frame */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); @@ -422,6 +457,8 @@ msgb_free(l1msg); } + if (rec) + ph_data_req(trx, msg, l1sap, true); return 0; } @@ -566,7 +603,7 @@ * free()d below */ switch (OSMO_PRIM_HDR(&l1sap->oph)) { case OSMO_PRIM(PRIM_PH_DATA, PRIM_OP_REQUEST): - rc = ph_data_req(trx, msg, l1sap); + rc = ph_data_req(trx, msg, l1sap, false); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index b251388..70764f5 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -285,10 +285,9 @@ /* DTX DL-specific logic below: */ switch (lchan->tch.dtx.dl_amr_fsm->state) { case ST_ONSET_V: - case ST_ONSET_F: *payload_type = GsmL1_TchPlType_Amr_Onset; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); - *len = 1; + *len = 3; return 1; case ST_VOICE: *payload_type = GsmL1_TchPlType_Amr; @@ -306,6 +305,9 @@ *payload_type = GsmL1_TchPlType_Amr; rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, ft); + /* force STI bit to 0 to make sure resume after FACCH + works properly */ + l1_payload[6 + 2] &= ~16; return 0; case ST_SID_F2: *payload_type = GsmL1_TchPlType_Amr; diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index bef2d30..8729c89 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -325,13 +325,15 @@ } static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache) { struct femtol1_hdl *fl1 = trx_femtol1_hdl(trx); struct msgb *l1msg = l1p_msgb_alloc(); + struct gsm_lchan *lchan; uint32_t u32Fn; uint8_t u8Tn, subCh, u8BlockNbr = 0, sapi = 0; uint8_t chan_nr, link_id; + bool rec = false; int len; if (!msg) { @@ -396,14 +398,46 @@ if (len) { /* data request */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); + lchan = get_lchan_by_chan_nr(trx, chan_nr); + + if (use_cache) + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, + lchan->tch.dtx.facch, msgb_l2len(msg)); + else if (trx->bts->dtxd && lchan->tch.dtx.dl_amr_fsm && + lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + if (sapi == GsmL1_Sapi_FacchF) { + sapi = GsmL1_Sapi_TchF; + } + if (sapi == GsmL1_Sapi_FacchH) { + sapi = GsmL1_Sapi_TchH; + } + if (sapi == GsmL1_Sapi_TchH || sapi == GsmL1_Sapi_TchF) { + /* FACCH interruption of DTX silence */ + /* cache FACCH data */ + memcpy(lchan->tch.dtx.facch, msg->l2h, + msgb_l2len(msg)); + /* prepare ONSET message */ + len = 3; + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_Onset; + /* ignored CMR/CMI pair */ + l1p->u.phDataReq.msgUnitParam.u8Buffer[1] = 0; + l1p->u.phDataReq.msgUnitParam.u8Buffer[2] = 0; + /* ONSET is ready, recursive call is necessary */ + rec = true; + } + } data_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr, len); - OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); - memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, msgb_l2len(msg)); + if (!rec && !use_cache) { + OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, + msgb_l2len(msg)); + } LOGP(DL1P, LOGL_DEBUG, "PH-DATA.req(%s)\n", - osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, - l1p->u.phDataReq.msgUnitParam.u8Size)); + osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, + l1p->u.phDataReq.msgUnitParam.u8Size)); } else { /* empty frame */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); @@ -417,6 +451,8 @@ msgb_free(l1msg); } + if (rec) + ph_data_req(trx, msg, l1sap, true); return 0; } @@ -561,7 +597,7 @@ * free()d below */ switch (OSMO_PRIM_HDR(&l1sap->oph)) { case OSMO_PRIM(PRIM_PH_DATA, PRIM_OP_REQUEST): - rc = ph_data_req(trx, msg, l1sap); + rc = ph_data_req(trx, msg, l1sap, false); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index b08ba7e..fbb42b2 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -383,10 +383,9 @@ /* DTX DL-specific logic below: */ switch (lchan->tch.dtx.dl_amr_fsm->state) { case ST_ONSET_V: - case ST_ONSET_F: *payload_type = GsmL1_TchPlType_Amr_Onset; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); - *len = 1; + *len = 3; return 1; case ST_VOICE: *payload_type = GsmL1_TchPlType_Amr; @@ -404,6 +403,9 @@ *payload_type = GsmL1_TchPlType_Amr; rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, ft); + /* force STI bit to 0 to make sure resume after FACCH + works properly */ + l1_payload[6 + 2] &= ~16; return 0; case ST_SID_F2: *payload_type = GsmL1_TchPlType_Amr; -- To view, visit https://gerrit.osmocom.org/1145 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Gerrit-PatchSet: 12 Gerrit-Project: osmo-bts 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 Oct 28 06:03:05 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Fri, 28 Oct 2016 06:03:05 +0000 Subject: osmo-bts[master]: 11bit RACH support for osmo-bts-litecell15 In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 Verified+1 -- To view, visit https://gerrit.osmocom.org/1168 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie5207a15424fb287febf74e830297531232accde Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: bhargava_abhyankar Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Oct 28 07:57:24 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 07:57:24 +0000 Subject: osmo-bts[master]: 11bit RACH support for osmo-bts-litecell15 In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1168 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie5207a15424fb287febf74e830297531232accde Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: bhargava_abhyankar 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 Fri Oct 28 07:57:31 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 07:57:31 +0000 Subject: [MERGED] osmo-bts[master]: 11bit RACH support for osmo-bts-litecell15 In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: 11bit RACH support for osmo-bts-litecell15 ...................................................................... 11bit RACH support for osmo-bts-litecell15 Based on the indication from L1, number of bits in RACH and burst type is determined. Appropriate parameters are filled in osmo-bts-litecell15. These parameters are sent to osmo-pcu for processing of the RACH. Change-Id: Ie5207a15424fb287febf74e830297531232accde --- M src/osmo-bts-litecell15/l1_if.c 1 file changed, 40 insertions(+), 3 deletions(-) Approvals: Max: Looks good to me, but someone else must approve 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/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index f47634e..edc5f5b 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -945,7 +945,8 @@ struct gsm_lchan *lchan; struct osmo_phsap_prim *l1sap; uint32_t fn; - uint8_t ra, acc_delay = 0; + uint8_t acc_delay = 0; + uint16_t ra = 0, is_11bit = 0, burst_type = 0, temp = 0; int rc; /* increment number of busy RACH slots, if required */ @@ -967,16 +968,29 @@ btsb->load.rach.access++; dump_meas_res(LOGL_DEBUG, &ra_ind->measParam); + burst_type = ra_ind->burstType; - if (ra_ind->msgUnitParam.u8Size != 1) { + if ((ra_ind->msgUnitParam.u8Size != 1) && + (ra_ind->msgUnitParam.u8Size != 2)) { LOGP(DL1C, LOGL_ERROR, "PH-RACH-INDICATION has %d bits\n", ra_ind->sapi); msgb_free(l1p_msg); return 0; } + + if (ra_ind->msgUnitParam.u8Size == 2) { + is_11bit = 1; + ra = ra_ind->msgUnitParam.u8Buffer[0]; + ra = ra << 3; + temp = (ra_ind->msgUnitParam.u8Buffer[1] & 0x7); + ra = ra | temp; + } else { + is_11bit = 0; + ra = ra_ind->msgUnitParam.u8Buffer[0]; + } + fn = ra_ind->u32Fn; - ra = ra_ind->msgUnitParam.u8Buffer[0]; rc = msgb_trim(l1p_msg, sizeof(*l1sap)); if (rc < 0) MSGB_ABORT(l1p_msg, "No room for primitive data\n"); @@ -986,6 +1000,29 @@ l1sap->u.rach_ind.ra = ra; l1sap->u.rach_ind.acc_delay = acc_delay; l1sap->u.rach_ind.fn = fn; + l1sap->u.rach_ind.is_11bit = is_11bit; /* no of bits in 11 bit RACH */ + + /* mapping of the burst type, the values are specific to + * osmo-bts-litecell15 */ + switch (burst_type) { + case GsmL1_BurstType_Access_0: + l1sap->u.rach_ind.burst_type = + GSM_L1_BURST_TYPE_ACCESS_0; + break; + case GsmL1_BurstType_Access_1: + l1sap->u.rach_ind.burst_type = + GSM_L1_BURST_TYPE_ACCESS_1; + break; + case GsmL1_BurstType_Access_2: + l1sap->u.rach_ind.burst_type = + GSM_L1_BURST_TYPE_ACCESS_2; + break; + default: + l1sap->u.rach_ind.burst_type = + GSM_L1_BURST_TYPE_NONE; + break; + } + if (!lchan || lchan->ts->pchan == GSM_PCHAN_CCCH || lchan->ts->pchan == GSM_PCHAN_CCCH_SDCCH4) l1sap->u.rach_ind.chan_nr = 0x88; -- To view, visit https://gerrit.osmocom.org/1168 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie5207a15424fb287febf74e830297531232accde Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: bhargava_abhyankar Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: arvind.sirsikar From gerrit-no-reply at lists.osmocom.org Fri Oct 28 08:43:07 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 28 Oct 2016 08:43:07 +0000 Subject: [PATCH] libosmo-abis[master]: Fix metadata corruption Message-ID: Review at https://gerrit.osmocom.org/1171 Fix metadata corruption Use separate pointer for payload to make sure RTP header in mblk is not corrupted and rtp_get_* functions work as expected. Committed by: Max Change-Id: I205630e1da98693ba0ac25e86e21780284185077 Related: OS#1802 --- M src/trau/osmo_ortp.c 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/71/1171/1 diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index fc63e7f..e7c6fc4 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -145,14 +145,15 @@ static inline bool recv_with_cb(struct osmo_rtp_socket *rs) { + uint8_t *payload; mblk_t *mblk = rtp_session_recvm_with_ts(rs->sess, rs->rx_user_ts); if (!mblk) return false; - int plen = rtp_get_payload(mblk, &mblk->b_rptr); + int plen = rtp_get_payload(mblk, &payload); /* hand into receiver */ if (rs->rx_cb && plen > 0) - rs->rx_cb(rs, mblk->b_rptr, plen, rtp_get_seqnumber(mblk), + rs->rx_cb(rs, payload, plen, rtp_get_seqnumber(mblk), rtp_get_timestamp(mblk), rtp_get_markbit(mblk)); freemsg(mblk); if (plen > 0) -- To view, visit https://gerrit.osmocom.org/1171 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I205630e1da98693ba0ac25e86e21780284185077 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Fri Oct 28 09:03:36 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 09:03:36 +0000 Subject: [PATCH] libosmo-abis[master]: Fix metadata corruption In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1171 to look at the new patch set (#2). Fix metadata corruption Use separate pointer for payload to make sure mblk->b_rptr is not advanced (which breaks the use of rtp_get_* macros that assume mblk->b_rptr is pointing to the RTP header, not the payload). Committed by: Max Change-Id: I205630e1da98693ba0ac25e86e21780284185077 Related: OS#1802 --- M src/trau/osmo_ortp.c 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/71/1171/2 diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index fc63e7f..e7c6fc4 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -145,14 +145,15 @@ static inline bool recv_with_cb(struct osmo_rtp_socket *rs) { + uint8_t *payload; mblk_t *mblk = rtp_session_recvm_with_ts(rs->sess, rs->rx_user_ts); if (!mblk) return false; - int plen = rtp_get_payload(mblk, &mblk->b_rptr); + int plen = rtp_get_payload(mblk, &payload); /* hand into receiver */ if (rs->rx_cb && plen > 0) - rs->rx_cb(rs, mblk->b_rptr, plen, rtp_get_seqnumber(mblk), + rs->rx_cb(rs, payload, plen, rtp_get_seqnumber(mblk), rtp_get_timestamp(mblk), rtp_get_markbit(mblk)); freemsg(mblk); if (plen > 0) -- To view, visit https://gerrit.osmocom.org/1171 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I205630e1da98693ba0ac25e86e21780284185077 Gerrit-PatchSet: 2 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 Fri Oct 28 09:03:41 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 09:03:41 +0000 Subject: libosmo-abis[master]: Fix metadata corruption In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1171 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I205630e1da98693ba0ac25e86e21780284185077 Gerrit-PatchSet: 2 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 Fri Oct 28 09:03:59 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 09:03:59 +0000 Subject: libosmo-abis[master]: Unify RTP receiving In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/948 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id42e85b55eab33c5eb81ac7a2cdea7962b2e30ef Gerrit-PatchSet: 3 Gerrit-Project: libosmo-abis 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 Oct 28 09:04:02 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 09:04:02 +0000 Subject: [MERGED] libosmo-abis[master]: Unify RTP receiving In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Unify RTP receiving ...................................................................... Unify RTP receiving * Remove code duplication * Use return value of rtp_get_payload() instead of pointer arithmetic Change-Id: Id42e85b55eab33c5eb81ac7a2cdea7962b2e30ef --- M src/trau/osmo_ortp.c 1 file changed, 21 insertions(+), 31 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index e990487..fc63e7f 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -143,6 +143,22 @@ rtp_session_resync(rs); } +static inline bool recv_with_cb(struct osmo_rtp_socket *rs) +{ + mblk_t *mblk = rtp_session_recvm_with_ts(rs->sess, rs->rx_user_ts); + if (!mblk) + return false; + + int plen = rtp_get_payload(mblk, &mblk->b_rptr); + /* hand into receiver */ + if (rs->rx_cb && plen > 0) + rs->rx_cb(rs, mblk->b_rptr, plen, rtp_get_seqnumber(mblk), + rtp_get_timestamp(mblk), rtp_get_markbit(mblk)); + freemsg(mblk); + if (plen > 0) + return true; + return false; +} /*! \brief poll the socket for incoming data * \param[in] rs the socket to be polled @@ -150,28 +166,14 @@ */ int osmo_rtp_socket_poll(struct osmo_rtp_socket *rs) { - mblk_t *mblk; if (rs->flags & OSMO_RTP_F_DISABLED) return 0; - mblk = rtp_session_recvm_with_ts(rs->sess, rs->rx_user_ts); - if (mblk) { - rtp_get_payload(mblk, &mblk->b_rptr); - /* hand into receiver */ - if (rs->rx_cb) - rs->rx_cb(rs, mblk->b_rptr, - mblk->b_wptr - mblk->b_rptr, - rtp_get_seqnumber(mblk), - rtp_get_timestamp(mblk), - rtp_get_markbit(mblk)); - //rs->rx_user_ts += 160; - freemsg(mblk); + if (recv_with_cb(rs)) return 1; - } else { - LOGP(DLMIB, LOGL_INFO, "osmo_rtp_poll(%u): ERROR!\n", - rs->rx_user_ts); - return 0; - } + + LOGP(DLMIB, LOGL_INFO, "osmo_rtp_poll(%u): ERROR!\n", rs->rx_user_ts); + return 0; } /* Osmo FD callbacks */ @@ -179,7 +181,6 @@ static int osmo_rtp_fd_cb(struct osmo_fd *fd, unsigned int what) { struct osmo_rtp_socket *rs = fd->data; - mblk_t *mblk; if (what & BSC_FD_READ) { /* in polling mode, we don't want to be called here */ @@ -187,18 +188,7 @@ fd->when &= ~BSC_FD_READ; return 0; } - mblk = rtp_session_recvm_with_ts(rs->sess, rs->rx_user_ts); - if (mblk) { - rtp_get_payload(mblk, &mblk->b_rptr); - /* hand into receiver */ - if (rs->rx_cb) - rs->rx_cb(rs, mblk->b_rptr, - mblk->b_wptr - mblk->b_rptr, - rtp_get_seqnumber(mblk), - rtp_get_timestamp(mblk), - rtp_get_markbit(mblk)); - freemsg(mblk); - } else + if (!recv_with_cb(rs)) LOGP(DLMIB, LOGL_INFO, "recvm_with_ts(%u): ERROR!\n", rs->rx_user_ts); rs->rx_user_ts += 160; -- To view, visit https://gerrit.osmocom.org/948 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id42e85b55eab33c5eb81ac7a2cdea7962b2e30ef Gerrit-PatchSet: 3 Gerrit-Project: libosmo-abis 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 Oct 28 09:04:03 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 09:04:03 +0000 Subject: [MERGED] libosmo-abis[master]: Fix metadata corruption In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Fix metadata corruption ...................................................................... Fix metadata corruption Use separate pointer for payload to make sure mblk->b_rptr is not advanced (which breaks the use of rtp_get_* macros that assume mblk->b_rptr is pointing to the RTP header, not the payload). Committed by: Max Change-Id: I205630e1da98693ba0ac25e86e21780284185077 Related: OS#1802 --- M src/trau/osmo_ortp.c 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index fc63e7f..e7c6fc4 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -145,14 +145,15 @@ static inline bool recv_with_cb(struct osmo_rtp_socket *rs) { + uint8_t *payload; mblk_t *mblk = rtp_session_recvm_with_ts(rs->sess, rs->rx_user_ts); if (!mblk) return false; - int plen = rtp_get_payload(mblk, &mblk->b_rptr); + int plen = rtp_get_payload(mblk, &payload); /* hand into receiver */ if (rs->rx_cb && plen > 0) - rs->rx_cb(rs, mblk->b_rptr, plen, rtp_get_seqnumber(mblk), + rs->rx_cb(rs, payload, plen, rtp_get_seqnumber(mblk), rtp_get_timestamp(mblk), rtp_get_markbit(mblk)); freemsg(mblk); if (plen > 0) -- To view, visit https://gerrit.osmocom.org/1171 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I205630e1da98693ba0ac25e86e21780284185077 Gerrit-PatchSet: 2 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 Fri Oct 28 09:04:34 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 09:04:34 +0000 Subject: openbsc[master]: DTX DL: Add FACCH cache In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/1152/2/openbsc/include/openbsc/gsm_data_shared.h File openbsc/include/openbsc/gsm_data_shared.h: Line 306: uint8_t facch[24]; where does the magic number come from? A GSM L2 message is 23 bytes long (see GSM_MACBLOCK_LEN), so why is the FACCH 24? And if it is 23+1, then GSM_MACBLOCK_LEN+1 with a comment on the extra byte would be best. -- To view, visit https://gerrit.osmocom.org/1152 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I316e81af893b24766bf259baaed7a0be75a11694 Gerrit-PatchSet: 2 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-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Oct 28 09:07:28 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 28 Oct 2016 09:07:28 +0000 Subject: [PATCH] openbsc[master]: DTX DL: Add FACCH cache In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1152 to look at the new patch set (#3). DTX DL: Add FACCH cache When DL DTX is active and silent period is in progress dtx.cache is populated by SID UPDATE message which about to be scheduled next. If at that moment FACCH message arrives (which have higher priority) we have to send ONSET message to L1 but we can't invalidate cache with SID UPDATE as it will be used for SID FIRST message to resume silent period after FACCH transmission is over (provided there were no incoming voice in between). Hence the necessity for separate buffer to store content of FACCH message while we're sending ONSET to L1 while keeping SID UPDATE cached. Change-Id: I316e81af893b24766bf259baaed7a0be75a11694 Related: OS#1801 --- M openbsc/include/openbsc/gsm_data_shared.h 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/52/1152/3 diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index 487a3f3..4472310 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -300,7 +300,10 @@ struct amr_multirate_conf amr_mr; struct { struct osmo_fsm_inst *dl_amr_fsm; + /* TCH cache */ uint8_t cache[20]; + /* FACCH cache */ + uint8_t facch[GSM_MACBLOCK_LEN]; uint8_t len; uint32_t fn; bool is_update; -- To view, visit https://gerrit.osmocom.org/1152 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I316e81af893b24766bf259baaed7a0be75a11694 Gerrit-PatchSet: 3 Gerrit-Project: openbsc 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 Oct 28 09:21:52 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Fri, 28 Oct 2016 09:21:52 +0000 Subject: osmo-pcu[master]: EGPRS: fix for EPDAN out of window In-Reply-To: References: Message-ID: Patch Set 7: Code-Review+1 Verified+1 -- To view, visit https://gerrit.osmocom.org/862 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id07d178970f168f5389016c1eea31eb6b82057b6 Gerrit-PatchSet: 7 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Oct 28 09:22:00 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Fri, 28 Oct 2016 09:22:00 +0000 Subject: osmo-pcu[master]: EGPRS: add test case to show EPDAN BSN out of window bug In-Reply-To: References: Message-ID: Patch Set 9: Code-Review+1 Verified+1 -- To view, visit https://gerrit.osmocom.org/861 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If32b67f5c05707155281128b776a90a1e3d587b2 Gerrit-PatchSet: 9 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Oct 28 09:23:56 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 09:23:56 +0000 Subject: osmo-bts[master]: DTX DL: split ONSET state handling In-Reply-To: References: Message-ID: Patch Set 12: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1145 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Gerrit-PatchSet: 12 Gerrit-Project: osmo-bts 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 Oct 28 09:25:44 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 09:25:44 +0000 Subject: openbsc[master]: DTX DL: Add FACCH cache In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1152 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I316e81af893b24766bf259baaed7a0be75a11694 Gerrit-PatchSet: 3 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-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Oct 28 09:25:47 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 09:25:47 +0000 Subject: [MERGED] openbsc[master]: DTX DL: Add FACCH cache In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: DTX DL: Add FACCH cache ...................................................................... DTX DL: Add FACCH cache When DL DTX is active and silent period is in progress dtx.cache is populated by SID UPDATE message which about to be scheduled next. If at that moment FACCH message arrives (which have higher priority) we have to send ONSET message to L1 but we can't invalidate cache with SID UPDATE as it will be used for SID FIRST message to resume silent period after FACCH transmission is over (provided there were no incoming voice in between). Hence the necessity for separate buffer to store content of FACCH message while we're sending ONSET to L1 while keeping SID UPDATE cached. Change-Id: I316e81af893b24766bf259baaed7a0be75a11694 Related: OS#1801 --- M openbsc/include/openbsc/gsm_data_shared.h 1 file changed, 3 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 487a3f3..4472310 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -300,7 +300,10 @@ struct amr_multirate_conf amr_mr; struct { struct osmo_fsm_inst *dl_amr_fsm; + /* TCH cache */ uint8_t cache[20]; + /* FACCH cache */ + uint8_t facch[GSM_MACBLOCK_LEN]; uint8_t len; uint32_t fn; bool is_update; -- To view, visit https://gerrit.osmocom.org/1152 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I316e81af893b24766bf259baaed7a0be75a11694 Gerrit-PatchSet: 4 Gerrit-Project: openbsc 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 Oct 28 09:27:11 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 09:27:11 +0000 Subject: osmo-iuh[master]: hnbgw: cosmetic: local-ip config: drop getter function In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1166 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie91aea82ae5d128ad735a0857ea814b440c3232c Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh 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 Fri Oct 28 09:29:29 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 09:29:29 +0000 Subject: osmo-iuh[master]: hnbgw: parameterize iuh local port: add vty cmd In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1060 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4b5e9fe9fcfa489069a0728d47899ef4a61f7ce5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh 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 Fri Oct 28 09:30:07 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 09:30:07 +0000 Subject: osmo-iuh[master]: hnbgw: vty: set explicit go_parent_cb In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1061 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8d1c18a396c215e8425ae49872b5c73316087d7d Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh 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 Fri Oct 28 09:30:41 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 09:30:41 +0000 Subject: osmo-iuh[master]: hnbgw: parameterize IuCS and IuPS ips and ports: add vty cmds In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2c28977011009df4e1fa472290bbbc359e406971 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh 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 Fri Oct 28 09:30:44 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 09:30:44 +0000 Subject: [MERGED] osmo-iuh[master]: hnbgw: parameterize IuCS and IuPS ips and ports: add vty cmds In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: hnbgw: parameterize IuCS and IuPS ips and ports: add vty cmds ...................................................................... hnbgw: parameterize IuCS and IuPS ips and ports: add vty cmds Basically copy-paste the Iuh local-ip and local-port code to provide parameterization of the IuCS and IuPS remote addresses. Add IUCS and IUPS nodes, enhance go_parent_cb and config writing accordingly. Change-Id: I2c28977011009df4e1fa472290bbbc359e406971 --- M include/osmocom/iuh/hnbgw.h M include/osmocom/iuh/vty.h M src/hnbgw.c M src/hnbgw_vty.c 4 files changed, 139 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/iuh/hnbgw.h b/include/osmocom/iuh/hnbgw.h index 850c4d9..4880d48 100644 --- a/include/osmocom/iuh/hnbgw.h +++ b/include/osmocom/iuh/hnbgw.h @@ -20,6 +20,8 @@ #define HNBGW_LOCAL_IP_DEFAULT "0.0.0.0" +#define HNBGW_IUCS_REMOTE_IP_DEFAULT "127.0.0.1" +#define HNBGW_IUPS_REMOTE_IP_DEFAULT "127.0.0.2" /* 25.467 Section 7.1 */ #define IUH_DEFAULT_SCTP_PORT 29169 @@ -116,6 +118,10 @@ /*! The UDP port where we receive multiplexed CS user * plane traffic from HNBs */ uint16_t iuh_cs_mux_port; + const char *iucs_remote_ip; + uint16_t iucs_remote_port; + const char *iups_remote_ip; + uint16_t iups_remote_port; uint16_t rnc_id; bool hnbap_allow_tmsi; } config; diff --git a/include/osmocom/iuh/vty.h b/include/osmocom/iuh/vty.h index 905a949..3d05da5 100644 --- a/include/osmocom/iuh/vty.h +++ b/include/osmocom/iuh/vty.h @@ -5,5 +5,7 @@ enum osmo_iuh_vty_node { HNBGW_NODE = _LAST_OSMOVTY_NODE + 1, IUH_NODE, + IUCS_NODE, + IUPS_NODE, }; diff --git a/src/hnbgw.c b/src/hnbgw.c index 16a2e43..acca643 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -80,6 +80,14 @@ gw->config.iuh_local_ip = talloc_strdup(gw, HNBGW_LOCAL_IP_DEFAULT); gw->config.iuh_local_port = IUH_DEFAULT_SCTP_PORT; + gw->config.iucs_remote_ip = talloc_strdup(gw, + HNBGW_IUCS_REMOTE_IP_DEFAULT); + gw->config.iucs_remote_port = SUA_PORT; + + gw->config.iups_remote_ip = talloc_strdup(gw, + HNBGW_IUPS_REMOTE_IP_DEFAULT); + gw->config.iups_remote_port = SUA_PORT; + gw->next_ue_ctx_id = 23; INIT_LLIST_HEAD(&gw->hnb_list); INIT_LLIST_HEAD(&gw->ue_list); @@ -498,8 +506,16 @@ osmo_sua_set_log_area(DSUA); ranap_set_log_area(DRANAP); - g_hnb_gw->cnlink_cs = hnbgw_cnlink_init(g_hnb_gw, "127.0.0.1", SUA_PORT, 0); - g_hnb_gw->cnlink_ps = hnbgw_cnlink_init(g_hnb_gw, "127.0.0.2", SUA_PORT, 1); + OSMO_ASSERT(g_hnb_gw->config.iucs_remote_ip); + g_hnb_gw->cnlink_cs = hnbgw_cnlink_init(g_hnb_gw, + g_hnb_gw->config.iucs_remote_ip, + g_hnb_gw->config.iucs_remote_port, + 0); + OSMO_ASSERT(g_hnb_gw->config.iups_remote_ip); + g_hnb_gw->cnlink_ps = hnbgw_cnlink_init(g_hnb_gw, + g_hnb_gw->config.iups_remote_ip, + g_hnb_gw->config.iups_remote_port, + 1); OSMO_ASSERT(g_hnb_gw->config.iuh_local_ip); LOGP(DMAIN, LOGL_NOTICE, "Listening for Iuh at %s %d\n", diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index a458c76..59871da 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -24,6 +24,7 @@ #include #include +#include static void *tall_hnb_ctx = NULL; static struct hnb_gw *g_hnb_gw = NULL; @@ -54,10 +55,38 @@ return CMD_SUCCESS; } +static struct cmd_node iucs_node = { + IUCS_NODE, + "%s(config-hnbgw-iucs)# ", + 1, +}; + +DEFUN(cfg_hnbgw_iucs, cfg_hnbgw_iucs_cmd, + "iucs", "Configure IuCS options") +{ + vty->node = IUCS_NODE; + return CMD_SUCCESS; +} + +static struct cmd_node iups_node = { + IUPS_NODE, + "%s(config-hnbgw-iups)# ", + 1, +}; + +DEFUN(cfg_hnbgw_iups, cfg_hnbgw_iups_cmd, + "iups", "Configure IuPS options") +{ + vty->node = IUPS_NODE; + return CMD_SUCCESS; +} + int hnbgw_vty_go_parent(struct vty *vty) { switch (vty->node) { case IUH_NODE: + case IUCS_NODE: + case IUPS_NODE: vty->node = HNBGW_NODE; vty->index = NULL; break; @@ -153,6 +182,40 @@ return CMD_SUCCESS; } +DEFUN(cfg_hnbgw_iucs_remote_ip, cfg_hnbgw_iucs_remote_ip_cmd, "remote-ip A.B.C.D", + "Address to establish IuCS core network link to\n" + "Remote IuCS IP address (default: " HNBGW_IUCS_REMOTE_IP_DEFAULT ")") +{ + talloc_free((void*)g_hnb_gw->config.iucs_remote_ip); + g_hnb_gw->config.iucs_remote_ip = talloc_strdup(tall_hnb_ctx, argv[0]); + return CMD_SUCCESS; +} + +DEFUN(cfg_hnbgw_iucs_remote_port, cfg_hnbgw_iucs_remote_port_cmd, "remote-port <1-65535>", + "Remote port to establish IuCS core network link to\n" + "Remote IuCS port (default: 14001)") +{ + g_hnb_gw->config.iucs_remote_port = atoi(argv[0]); + return CMD_SUCCESS; +} + +DEFUN(cfg_hnbgw_iups_remote_ip, cfg_hnbgw_iups_remote_ip_cmd, "remote-ip A.B.C.D", + "Address to establish IuPS core network link to\n" + "Remote IuPS IP address (default: " HNBGW_IUPS_REMOTE_IP_DEFAULT ")") +{ + talloc_free((void*)g_hnb_gw->config.iups_remote_ip); + g_hnb_gw->config.iups_remote_ip = talloc_strdup(tall_hnb_ctx, argv[0]); + return CMD_SUCCESS; +} + +DEFUN(cfg_hnbgw_iups_remote_port, cfg_hnbgw_iups_remote_port_cmd, "remote-port <1-65535>", + "Remote port to establish IuPS core network link to\n" + "Remote IuPS port (default: 14001)") +{ + g_hnb_gw->config.iups_remote_port = atoi(argv[0]); + return CMD_SUCCESS; +} + static int config_write_hnbgw(struct vty *vty) { vty_out(vty, "hnbgw%s", VTY_NEWLINE); @@ -180,6 +243,42 @@ return CMD_SUCCESS; } +static int config_write_hnbgw_iucs(struct vty *vty) +{ + const char *addr; + uint16_t port; + + vty_out(vty, " iucs%s", VTY_NEWLINE); + + addr = g_hnb_gw->config.iucs_remote_ip; + if (addr && (strcmp(addr, HNBGW_IUCS_REMOTE_IP_DEFAULT) != 0)) + vty_out(vty, " remote-ip %s%s", addr, VTY_NEWLINE); + + port = g_hnb_gw->config.iucs_remote_port; + if (port && port != SUA_PORT) + vty_out(vty, " remote-port %u%s", port, VTY_NEWLINE); + + return CMD_SUCCESS; +} + +static int config_write_hnbgw_iups(struct vty *vty) +{ + const char *addr; + uint16_t port; + + vty_out(vty, " iups%s", VTY_NEWLINE); + + addr = g_hnb_gw->config.iups_remote_ip; + if (addr && (strcmp(addr, HNBGW_IUPS_REMOTE_IP_DEFAULT) != 0)) + vty_out(vty, " remote-ip %s%s", addr, VTY_NEWLINE); + + port = g_hnb_gw->config.iups_remote_port; + if (port && port != SUA_PORT) + vty_out(vty, " remote-port %u%s", port, VTY_NEWLINE); + + return CMD_SUCCESS; +} + void hnbgw_vty_init(struct hnb_gw *gw, void *tall_ctx) { g_hnb_gw = gw; @@ -197,6 +296,20 @@ install_element(IUH_NODE, &cfg_hnbgw_iuh_local_port_cmd); install_element(IUH_NODE, &cfg_hnbgw_iuh_hnbap_allow_tmsi_cmd); + install_element(HNBGW_NODE, &cfg_hnbgw_iucs_cmd); + install_node(&iucs_node, config_write_hnbgw_iucs); + vty_install_default(IUCS_NODE); + + install_element(IUCS_NODE, &cfg_hnbgw_iucs_remote_ip_cmd); + install_element(IUCS_NODE, &cfg_hnbgw_iucs_remote_port_cmd); + + install_element(HNBGW_NODE, &cfg_hnbgw_iups_cmd); + install_node(&iups_node, config_write_hnbgw_iups); + vty_install_default(IUPS_NODE); + + install_element(IUPS_NODE, &cfg_hnbgw_iups_remote_ip_cmd); + install_element(IUPS_NODE, &cfg_hnbgw_iups_remote_port_cmd); + install_element_ve(&show_hnb_cmd); install_element_ve(&show_ue_cmd); install_element_ve(&show_talloc_cmd); -- To view, visit https://gerrit.osmocom.org/1062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2c28977011009df4e1fa472290bbbc359e406971 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh 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 Fri Oct 28 09:30:44 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 09:30:44 +0000 Subject: [MERGED] osmo-iuh[master]: hnbgw: vty: set explicit go_parent_cb In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: hnbgw: vty: set explicit go_parent_cb ...................................................................... hnbgw: vty: set explicit go_parent_cb A second level of depth will be added to the hnbgw node soon, which will need explicit go-parent logic. Change-Id: I8d1c18a396c215e8425ae49872b5c73316087d7d --- M include/osmocom/iuh/hnbgw.h M src/hnbgw.c M src/hnbgw_vty.c 3 files changed, 23 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/iuh/hnbgw.h b/include/osmocom/iuh/hnbgw.h index 92d7674..850c4d9 100644 --- a/include/osmocom/iuh/hnbgw.h +++ b/include/osmocom/iuh/hnbgw.h @@ -148,3 +148,4 @@ void hnb_context_release(struct hnb_context *ctx); void hnbgw_vty_init(struct hnb_gw *gw, void *tall_ctx); +int hnbgw_vty_go_parent(struct vty *vty); diff --git a/src/hnbgw.c b/src/hnbgw.c index 2eecbea..16a2e43 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -346,6 +346,7 @@ static struct vty_app_info vty_info = { .name = "OsmoHNBGW", .version = "0", + .go_parent_cb = hnbgw_vty_go_parent, }; static struct { diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index ff75aea..a458c76 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -54,6 +54,27 @@ return CMD_SUCCESS; } +int hnbgw_vty_go_parent(struct vty *vty) +{ + switch (vty->node) { + case IUH_NODE: + vty->node = HNBGW_NODE; + vty->index = NULL; + break; + default: + case HNBGW_NODE: + vty->node = CONFIG_NODE; + vty->index = NULL; + break; + case CONFIG_NODE: + vty->node = ENABLE_NODE; + vty->index = NULL; + break; + } + + return vty->node; +} + static void vty_dump_hnb_info(struct vty *vty, struct hnb_context *hnb) { struct hnbgw_context_map *map; -- To view, visit https://gerrit.osmocom.org/1061 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8d1c18a396c215e8425ae49872b5c73316087d7d Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Oct 28 09:30:44 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 09:30:44 +0000 Subject: [MERGED] osmo-iuh[master]: hnbgw: parameterize iuh local port: add vty cmd In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: hnbgw: parameterize iuh local port: add vty cmd ...................................................................... hnbgw: parameterize iuh local port: add vty cmd For completeness' sake, add VTY command to set the local Iuh port, to go with the command that sets the local IP. Change-Id: I4b5e9fe9fcfa489069a0728d47899ef4a61f7ce5 --- M src/hnbgw_vty.c 1 file changed, 14 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c index 93c1f9a..ff75aea 100644 --- a/src/hnbgw_vty.c +++ b/src/hnbgw_vty.c @@ -114,6 +114,14 @@ return CMD_SUCCESS; } +DEFUN(cfg_hnbgw_iuh_local_port, cfg_hnbgw_iuh_local_port_cmd, "local-port <1-65535>", + "Accept Iuh connections on local port\n" + "Local interface port (default: 29169)") +{ + g_hnb_gw->config.iuh_local_port = atoi(argv[0]); + return CMD_SUCCESS; +} + DEFUN(cfg_hnbgw_iuh_hnbap_allow_tmsi, cfg_hnbgw_iuh_hnbap_allow_tmsi_cmd, "hnbap-allow-tmsi (0|1)", "Allow HNBAP UE Register messages with TMSI or PTMSI identity\n" @@ -133,12 +141,17 @@ static int config_write_hnbgw_iuh(struct vty *vty) { const char *addr; + uint16_t port; vty_out(vty, " iuh%s", VTY_NEWLINE); addr = g_hnb_gw->config.iuh_local_ip; if (addr && (strcmp(addr, HNBGW_LOCAL_IP_DEFAULT) != 0)) vty_out(vty, " local-ip %s%s", addr, VTY_NEWLINE); + + port = g_hnb_gw->config.iuh_local_port; + if (port && port != IUH_DEFAULT_SCTP_PORT) + vty_out(vty, " local-port %u%s", port, VTY_NEWLINE); if (g_hnb_gw->config.hnbap_allow_tmsi) vty_out(vty, " hnbap-allow-tmsi 1%s", VTY_NEWLINE); @@ -160,6 +173,7 @@ vty_install_default(IUH_NODE); install_element(IUH_NODE, &cfg_hnbgw_iuh_local_ip_cmd); + install_element(IUH_NODE, &cfg_hnbgw_iuh_local_port_cmd); install_element(IUH_NODE, &cfg_hnbgw_iuh_hnbap_allow_tmsi_cmd); install_element_ve(&show_hnb_cmd); -- To view, visit https://gerrit.osmocom.org/1060 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4b5e9fe9fcfa489069a0728d47899ef4a61f7ce5 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh 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 Fri Oct 28 09:30:44 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 09:30:44 +0000 Subject: [MERGED] osmo-iuh[master]: hnbgw: cosmetic: local-ip config: drop getter function In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: hnbgw: cosmetic: local-ip config: drop getter function ...................................................................... hnbgw: cosmetic: local-ip config: drop getter function Use the g_hnb_gw->config.iuh_local_ip directly, drop hnbgw_get_iuh_local_ip(). Change-Id: Ie91aea82ae5d128ad735a0857ea814b440c3232c Suggested-by: hwelte --- M include/osmocom/iuh/hnbgw.h M src/hnbgw.c 2 files changed, 5 insertions(+), 16 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/iuh/hnbgw.h b/include/osmocom/iuh/hnbgw.h index 6b5a855..92d7674 100644 --- a/include/osmocom/iuh/hnbgw.h +++ b/include/osmocom/iuh/hnbgw.h @@ -148,5 +148,3 @@ void hnb_context_release(struct hnb_context *ctx); void hnbgw_vty_init(struct hnb_gw *gw, void *tall_ctx); - -const char *hnbgw_get_iuh_local_ip(struct hnb_gw *gw); diff --git a/src/hnbgw.c b/src/hnbgw.c index eb36367..2eecbea 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -76,6 +76,8 @@ { struct hnb_gw *gw = talloc_zero(ctx, struct hnb_gw); + /* strdup so we can easily talloc_free in the VTY code */ + gw->config.iuh_local_ip = talloc_strdup(gw, HNBGW_LOCAL_IP_DEFAULT); gw->config.iuh_local_port = IUH_DEFAULT_SCTP_PORT; gw->next_ue_ctx_id = 23; @@ -308,18 +310,6 @@ return 0; } -/* - * Return IP address passed to the hnbgw/iuh/local-ip command, or - * HNBGW_LOCAL_IP_DEFAULT. - */ -const char *hnbgw_get_iuh_local_ip(struct hnb_gw *gw) -{ - const char *addr = gw->config.iuh_local_ip; - if (!addr) - addr = HNBGW_LOCAL_IP_DEFAULT; - return addr; -} - static const struct log_info_cat log_cat[] = { [DMAIN] = { .name = "DMAIN", .loglevel = LOGL_DEBUG, .enabled = 1, @@ -510,8 +500,9 @@ g_hnb_gw->cnlink_cs = hnbgw_cnlink_init(g_hnb_gw, "127.0.0.1", SUA_PORT, 0); g_hnb_gw->cnlink_ps = hnbgw_cnlink_init(g_hnb_gw, "127.0.0.2", SUA_PORT, 1); + OSMO_ASSERT(g_hnb_gw->config.iuh_local_ip); LOGP(DMAIN, LOGL_NOTICE, "Listening for Iuh at %s %d\n", - hnbgw_get_iuh_local_ip(g_hnb_gw), + g_hnb_gw->config.iuh_local_ip, g_hnb_gw->config.iuh_local_port); srv = osmo_stream_srv_link_create(tall_hnb_ctx); if (!srv) { @@ -520,7 +511,7 @@ } osmo_stream_srv_link_set_data(srv, g_hnb_gw); osmo_stream_srv_link_set_proto(srv, IPPROTO_SCTP); - osmo_stream_srv_link_set_addr(srv, hnbgw_get_iuh_local_ip(g_hnb_gw)); + osmo_stream_srv_link_set_addr(srv, g_hnb_gw->config.iuh_local_ip); osmo_stream_srv_link_set_port(srv, g_hnb_gw->config.iuh_local_port); osmo_stream_srv_link_set_accept_cb(srv, accept_cb); -- To view, visit https://gerrit.osmocom.org/1166 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie91aea82ae5d128ad735a0857ea814b440c3232c Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Oct 28 09:32:09 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 09:32:09 +0000 Subject: libosmocore[master]: COSMETIC: moving rr_cause_name() in gsm48.c In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1165 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie6c03a6ea02c370d8733db5ba2a709610cd70ce7 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore 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 Fri Oct 28 09:32:15 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 09:32:15 +0000 Subject: [MERGED] libosmocore[master]: COSMETIC: moving rr_cause_name() in gsm48.c In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: COSMETIC: moving rr_cause_name() in gsm48.c ...................................................................... COSMETIC: moving rr_cause_name() in gsm48.c rr_cause_name() is located a far of from value_string rr_cause_names[] while other value string functions are located right below their related value string definitions. This commit moves rr_cause_name() below rr_cause_names[] as it should be Change-Id: Ie6c03a6ea02c370d8733db5ba2a709610cd70ce7 --- M src/gsm/gsm48.c 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c index b4740cf..46f0b2f 100644 --- a/src/gsm/gsm48.c +++ b/src/gsm/gsm48.c @@ -162,6 +162,11 @@ { 0, NULL }, }; +const char *rr_cause_name(uint8_t cause) +{ + return get_value_string(rr_cause_names, cause); +} + /* FIXME: convert to value_string */ static const char *cc_state_names[32] = { "NULL", @@ -248,11 +253,6 @@ const char *gsm48_cc_msg_name(uint8_t msgtype) { return get_value_string(cc_msg_names, msgtype); -} - -const char *rr_cause_name(uint8_t cause) -{ - return get_value_string(rr_cause_names, cause); } const struct value_string gsm48_chan_mode_names[] = { -- To view, visit https://gerrit.osmocom.org/1165 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie6c03a6ea02c370d8733db5ba2a709610cd70ce7 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri Oct 28 09:34:49 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 09:34:49 +0000 Subject: libosmocore[master]: gsm0408: Completing GSM 04.08 RR message types In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1056 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3ceb070bf4dc8f5a071a5d43c6aa2d4e84c2dec6 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore 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 Fri Oct 28 09:34:56 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 09:34:56 +0000 Subject: [MERGED] libosmocore[master]: gsm0408: Completing GSM 04.08 RR message types In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: gsm0408: Completing GSM 04.08 RR message types ...................................................................... gsm0408: Completing GSM 04.08 RR message types - Add missing message types to be up to date with the latest specification release (3GPP TS 04.18) - Add value strings to translate RR message type identifiers into human readable strings. (see gsm48_rr_msg_name() in gsm48.h Change-Id: I3ceb070bf4dc8f5a071a5d43c6aa2d4e84c2dec6 --- M include/osmocom/gsm/gsm48.h M include/osmocom/gsm/protocol/gsm_04_08.h M src/gsm/gsm48.c M src/gsm/libosmogsm.map 4 files changed, 123 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gsm/gsm48.h b/include/osmocom/gsm/gsm48.h index d6e58c2..6a52c2d 100644 --- a/include/osmocom/gsm/gsm48.h +++ b/include/osmocom/gsm/gsm48.h @@ -20,6 +20,7 @@ extern const struct tlv_definition gsm48_mm_att_tlvdef; const char *gsm48_cc_state_name(uint8_t state); const char *gsm48_cc_msg_name(uint8_t msgtype); +const char *gsm48_rr_msg_name(uint8_t msgtype); const char *rr_cause_name(uint8_t cause); int gsm48_decode_lai(struct gsm48_loc_area_id *lai, uint16_t *mcc, diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index fa2bb06..767aa3d 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -1021,6 +1021,10 @@ #define GSM48_MT_RR_IMM_ASS 0x3f #define GSM48_MT_RR_IMM_ASS_EXT 0x39 #define GSM48_MT_RR_IMM_ASS_REJ 0x3a +#define GSM48_MT_RR_DTM_ASS_FAIL 0x48 +#define GSM48_MT_RR_DTM_REJECT 0x49 +#define GSM48_MT_RR_DTM_REQUEST 0x4A +#define GSM48_MT_RR_PACKET_ASS 0x4B #define GSM48_MT_RR_CIPH_M_CMD 0x35 #define GSM48_MT_RR_CIPH_M_COMPL 0x32 @@ -1036,6 +1040,8 @@ #define GSM48_MT_RR_HANDO_COMPL 0x2c #define GSM48_MT_RR_HANDO_FAIL 0x28 #define GSM48_MT_RR_HANDO_INFO 0x2d +#define GSM48_MT_RR_HANDO_INFO 0x2d +#define GSM48_MT_RR_DTM_ASS_CMD 0x4c #define GSM48_MT_RR_CELL_CHG_ORDER 0x08 #define GSM48_MT_RR_PDCH_ASS_CMD 0x23 @@ -1049,9 +1055,9 @@ #define GSM48_MT_RR_PAG_REQ_3 0x24 #define GSM48_MT_RR_PAG_RESP 0x27 #define GSM48_MT_RR_NOTIF_NCH 0x20 -#define GSM48_MT_RR_NOTIF_FACCH 0x25 +#define GSM48_MT_RR_NOTIF_FACCH 0x25 /* (Reserved) */ #define GSM48_MT_RR_NOTIF_RESP 0x26 - +#define GSM48_MT_RR_PACKET_NOTIF 0x4e #define GSM48_MT_RR_UTRAN_CLSM_CHG 0x60 #define GSM48_MT_RR_CDMA2K_CLSM_CHG 0x62 #define GSM48_MT_RR_IS_TO_UTRAN_HANDO 0x63 @@ -1077,6 +1083,10 @@ #define GSM48_MT_RR_SYSINFO_16 0x3d #define GSM48_MT_RR_SYSINFO_17 0x3e +#define GSM48_MT_RR_SYSINFO_18 0x40 +#define GSM48_MT_RR_SYSINFO_19 0x41 +#define GSM48_MT_RR_SYSINFO_20 0x42 + #define GSM48_MT_RR_CHAN_MODE_MODIF 0x10 #define GSM48_MT_RR_STATUS 0x12 #define GSM48_MT_RR_CHAN_MODE_MODIF_ACK 0x17 @@ -1087,6 +1097,7 @@ #define GSM48_MT_RR_EXT_MEAS_REP 0x36 #define GSM48_MT_RR_EXT_MEAS_REP_ORD 0x37 #define GSM48_MT_RR_GPRS_SUSP_REQ 0x34 +#define GSM48_MT_RR_DTM_INFO 0x4d #define GSM48_MT_RR_VGCS_UPL_GRANT 0x09 #define GSM48_MT_RR_UPLINK_RELEASE 0x0e diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c index 46f0b2f..b626f82 100644 --- a/src/gsm/gsm48.c +++ b/src/gsm/gsm48.c @@ -255,6 +255,114 @@ return get_value_string(cc_msg_names, msgtype); } + +static const struct value_string rr_msg_names[] = { + /* Channel establishment messages */ + { GSM48_MT_RR_INIT_REQ, "RR INITIALISATION REQUEST" }, + { GSM48_MT_RR_ADD_ASS, "ADDITIONAL ASSIGNMENT" }, + { GSM48_MT_RR_IMM_ASS, "IMMEDIATE ASSIGNMENT" }, + { GSM48_MT_RR_IMM_ASS_EXT, "MMEDIATE ASSIGNMENT EXTENDED" }, + { GSM48_MT_RR_IMM_ASS_REJ, "IMMEDIATE ASSIGNMENT REJECT" }, + { GSM48_MT_RR_DTM_ASS_FAIL, "DTM ASSIGNMENT FAILURE" }, + { GSM48_MT_RR_DTM_REJECT, "DTM REJECT" }, + { GSM48_MT_RR_DTM_REQUEST, "DTM REQUEST" }, + { GSM48_MT_RR_PACKET_ASS, "PACKET ASSIGNMENT" }, + + /* Ciphering messages */ + { GSM48_MT_RR_CIPH_M_CMD, "CIPHERING MODE COMMAND" }, + { GSM48_MT_RR_CIPH_M_COMPL, "CIPHERING MODE COMPLETE" }, + + /* Configuration change messages */ + { GSM48_MT_RR_CFG_CHG_CMD, "CONFIGURATION CHANGE COMMAND" }, + { GSM48_MT_RR_CFG_CHG_ACK, "CONFIGURATION CHANGE ACK" }, + { GSM48_MT_RR_CFG_CHG_REJ, "CONFIGURATION CHANGE REJECT" }, + + /* Handover messages */ + { GSM48_MT_RR_ASS_CMD, "ASSIGNMENT COMMAND" }, + { GSM48_MT_RR_ASS_COMPL, "ASSIGNMENT COMPLETE" }, + { GSM48_MT_RR_ASS_FAIL, "ASSIGNMENT FAILURE" }, + { GSM48_MT_RR_HANDO_CMD, "HANDOVER COMMAND" }, + { GSM48_MT_RR_HANDO_COMPL, "HANDOVER COMPLETE" }, + { GSM48_MT_RR_HANDO_FAIL, "HANDOVER FAILURE" }, + { GSM48_MT_RR_HANDO_INFO, "PHYSICAL INFORMATION" }, + { GSM48_MT_RR_DTM_ASS_CMD, "DTM ASSIGNMENT COMMAND" }, + + { GSM48_MT_RR_CELL_CHG_ORDER, "RR-CELL CHANGE ORDER" }, + { GSM48_MT_RR_PDCH_ASS_CMD, "PDCH ASSIGNMENT COMMAND" }, + + /* Channel release messages */ + { GSM48_MT_RR_CHAN_REL, "CHANNEL RELEASE" }, + { GSM48_MT_RR_PART_REL, "PARTIAL RELEASE" }, + { GSM48_MT_RR_PART_REL_COMP, "PARTIAL RELEASE COMPLETE" }, + + /* Paging and Notification messages */ + { GSM48_MT_RR_PAG_REQ_1, "PAGING REQUEST TYPE 1" }, + { GSM48_MT_RR_PAG_REQ_2, "PAGING REQUEST TYPE 2" }, + { GSM48_MT_RR_PAG_REQ_3, "PAGING REQUEST TYPE 3" }, + { GSM48_MT_RR_PAG_RESP, "PAGING RESPONSE" }, + { GSM48_MT_RR_NOTIF_NCH, "NOTIFICATION/NCH" }, + { GSM48_MT_RR_NOTIF_FACCH, "(Reserved)" }, + { GSM48_MT_RR_NOTIF_RESP, "NOTIFICATION/RESPONSE" }, + { GSM48_MT_RR_PACKET_NOTIF, "PACKET NOTIFICATION" }, + /* 3G Specific messages */ + { GSM48_MT_RR_UTRAN_CLSM_CHG, "UTRAN Classmark Change" }, + { GSM48_MT_RR_CDMA2K_CLSM_CHG, "cdma 2000 Classmark Change" }, + { GSM48_MT_RR_IS_TO_UTRAN_HANDO, "Inter System to UTRAN Handover Command" }, + { GSM48_MT_RR_IS_TO_CDMA2K_HANDO, "Inter System to cdma2000 Handover Command" }, + + /* System information messages */ + { GSM48_MT_RR_SYSINFO_8, "SYSTEM INFORMATION TYPE 8" }, + { GSM48_MT_RR_SYSINFO_1, "SYSTEM INFORMATION TYPE 1" }, + { GSM48_MT_RR_SYSINFO_2, "SYSTEM INFORMATION TYPE 2" }, + { GSM48_MT_RR_SYSINFO_3, "SYSTEM INFORMATION TYPE 3" }, + { GSM48_MT_RR_SYSINFO_4, "SYSTEM INFORMATION TYPE 4" }, + { GSM48_MT_RR_SYSINFO_5, "SYSTEM INFORMATION TYPE 5" }, + { GSM48_MT_RR_SYSINFO_6, "SYSTEM INFORMATION TYPE 6" }, + { GSM48_MT_RR_SYSINFO_7, "SYSTEM INFORMATION TYPE 7" }, + { GSM48_MT_RR_SYSINFO_2bis, "SYSTEM INFORMATION TYPE 2bis" }, + { GSM48_MT_RR_SYSINFO_2ter, "SYSTEM INFORMATION TYPE 2ter" }, + { GSM48_MT_RR_SYSINFO_2quater, "SYSTEM INFORMATION TYPE 2quater" }, + { GSM48_MT_RR_SYSINFO_5bis, "SYSTEM INFORMATION TYPE 5bis" }, + { GSM48_MT_RR_SYSINFO_5ter, "SYSTEM INFORMATION TYPE 5ter" }, + { GSM48_MT_RR_SYSINFO_9, "SYSTEM INFORMATION TYPE 9" }, + { GSM48_MT_RR_SYSINFO_13, "SYSTEM INFORMATION TYPE 13" }, + { GSM48_MT_RR_SYSINFO_16, "SYSTEM INFORMATION TYPE 16" }, + { GSM48_MT_RR_SYSINFO_17, "SYSTEM INFORMATION TYPE 17" }, + { GSM48_MT_RR_SYSINFO_18, "SYSTEM INFORMATION TYPE 18" }, + { GSM48_MT_RR_SYSINFO_19, "SYSTEM INFORMATION TYPE 19" }, + { GSM48_MT_RR_SYSINFO_20, "SYSTEM INFORMATION TYPE 20" }, + + /* Miscellaneous messages */ + { GSM48_MT_RR_CHAN_MODE_MODIF, "CHANNEL MODE MODIFY" }, + { GSM48_MT_RR_STATUS, "RR STATUS" }, + { GSM48_MT_RR_CHAN_MODE_MODIF_ACK, "CHANNEL MODE MODIFY ACKNOWLEDGE" }, + { GSM48_MT_RR_FREQ_REDEF, "FREQUENCY REDEFINITION" }, + { GSM48_MT_RR_MEAS_REP, "MEASUREMENT REPORT" }, + { GSM48_MT_RR_CLSM_CHG, "CLASSMARK CHANGE" }, + { GSM48_MT_RR_CLSM_ENQ, "CLASSMARK ENQUIRY" }, + { GSM48_MT_RR_EXT_MEAS_REP, "EXTENDED MEASUREMENT REPORT" }, + { GSM48_MT_RR_EXT_MEAS_REP_ORD, "EXTENDED MEASUREMENT ORDER" }, + { GSM48_MT_RR_GPRS_SUSP_REQ, "GPRS SUSPENSION REQUEST" }, + { GSM48_MT_RR_DTM_INFO, "DTM INFORMATION" }, + + /* VGCS uplink control messages */ + { GSM48_MT_RR_VGCS_UPL_GRANT, "VGCS UPLINK GRANT" }, + { GSM48_MT_RR_UPLINK_RELEASE, "UPLINK RELEASE" }, + { GSM48_MT_RR_UPLINK_FREE, "0c" }, + { GSM48_MT_RR_UPLINK_BUSY, "UPLINK BUSY" }, + { GSM48_MT_RR_TALKER_IND, "TALKER INDICATION" }, + + /* Application messages */ + { GSM48_MT_RR_APP_INFO, "Application Information" }, + { 0, NULL } +}; + +const char *gsm48_rr_msg_name(uint8_t msgtype) +{ + return get_value_string(rr_msg_names, msgtype); +} + + const struct value_string gsm48_chan_mode_names[] = { { GSM48_CMODE_SIGN, "SIGNALLING" }, { GSM48_CMODE_SPEECH_V1, "SPEECH_V1" }, diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index a83f92c..f0baa21 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -151,6 +151,7 @@ gsm48_att_tlvdef; gsm48_cc_msg_name; +gsm48_rr_msg_name; gsm48_cc_state_name; gsm48_construct_ra; gsm48_hdr_gmm_cipherable; -- To view, visit https://gerrit.osmocom.org/1056 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3ceb070bf4dc8f5a071a5d43c6aa2d4e84c2dec6 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore 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 Fri Oct 28 09:35:24 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 28 Oct 2016 09:35:24 +0000 Subject: [PATCH] osmo-bts[master]: DTX DL: split ONSET state handling 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/1145 to look at the new patch set (#13). DTX DL: split ONSET state handling Handle ONSET cause by Voice and FACCH separately. In case of Voice we have RTP payload which we have to cache and send later on in next response to L1 RTS. FACCH have higher priority so it preempts both voice and silence alike - hence we can send ONSET immediately but still have to track previous state in order to get back to it gracefully. This affects lc15 and sysmo hw as there's no FSM-based DTX implementation for other models yet. Note: this requires patch for OpenBSC which adds FACCH buffer to tch.dtx struct. Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Related: OS#1802 --- M include/osmo-bts/dtx_dl_amr_fsm.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 7 files changed, 120 insertions(+), 35 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/45/1145/13 diff --git a/include/osmo-bts/dtx_dl_amr_fsm.h b/include/osmo-bts/dtx_dl_amr_fsm.h index 8b19595..5c13c19 100644 --- a/include/osmo-bts/dtx_dl_amr_fsm.h +++ b/include/osmo-bts/dtx_dl_amr_fsm.h @@ -16,7 +16,6 @@ ST_U_INH, ST_SID_U, ST_ONSET_V, - ST_ONSET_F, ST_FACCH_V, ST_FACCH, }; diff --git a/src/common/dtx_dl_amr_fsm.c b/src/common/dtx_dl_amr_fsm.c index b110cf2..a75fd00 100644 --- a/src/common/dtx_dl_amr_fsm.c +++ b/src/common/dtx_dl_amr_fsm.c @@ -53,7 +53,7 @@ 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_FACCH, 0, 0); break; case E_COMPL: osmo_fsm_inst_state_chg(fi, ST_SID_F2, 0, 0); @@ -81,7 +81,7 @@ 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_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -97,7 +97,7 @@ osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -113,7 +113,7 @@ osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -126,7 +126,7 @@ { switch (event) { case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; case E_VOICE: osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); @@ -234,7 +234,7 @@ 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), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_FACCH) | X(ST_SID_F2) | X(ST_F1_INH) | X(ST_ONSET_V), .name = "SID-FIRST (P1)", .action = dtx_fsm_sid_f1, }, @@ -242,7 +242,7 @@ 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), - .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_ONSET_F), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_FACCH), .name = "SID-FIRST (P2)", .action = dtx_fsm_sid_f2, }, @@ -265,7 +265,7 @@ /* 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), + .out_state_mask = X(ST_FACCH) | X(ST_VOICE) | X(ST_U_INH) | X(ST_SID_U) | X(ST_ONSET_V), .name = "SID-UPDATE", .action = dtx_fsm_sid_upd, }, @@ -275,13 +275,6 @@ .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), .name = "ONSET (SPEECH)", .action = dtx_fsm_onset_v, - }, - /* ONSET - end of silent period due to incoming FACCH frame */ - [ST_ONSET_F]= { - .in_event_mask = X(E_VOICE) | X(E_FACCH) | X(E_SID_U), - .out_state_mask = X(ST_VOICE) | X(ST_FACCH), - .name = "ONSET (FACCH)", - .action = dtx_fsm_onset_f, }, /* FACCH sending state: SPEECH was observed before so once we're done FSM should get back to VOICE state */ diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 9c6f20f..4b21366 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -220,11 +220,22 @@ * \param[in] fn Frame Number for which we check scheduling * \returns true if transmission can be omitted, false otherwise */ -static inline bool dtx_amr_sid_optional(const struct gsm_lchan *lchan, - uint32_t fn) +static inline bool dtx_amr_sid_optional(struct gsm_lchan *lchan, uint32_t fn) { /* Compute approx. time delta x26 based on Fn duration */ uint32_t dx26 = 120 * (fn - lchan->tch.dtx.fn); + + /* We're resuming after FACCH interruption */ + if (lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + /* force STI bit to 0 so cache is treated as SID FIRST */ + lchan->tch.dtx.cache[6 + 2] &= ~16; + lchan->tch.dtx.is_update = false; + osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, E_SID_F, + (void *)lchan); + /* this FN was already used for ONSET message so we just prepare + things for next one */ + return true; + } /* according to 3GPP TS 26.093 A.5.1.1: (*26) to avoid float math, add 1 FN tolerance (-120) */ @@ -293,7 +304,11 @@ if (lchan->tch.dtx.len) { memcpy(dst, lchan->tch.dtx.cache, lchan->tch.dtx.len); lchan->tch.dtx.fn = fn; - lchan->tch.dtx.is_update = true; /* SID UPDATE sent */ + /* enforce SID UPDATE for next repetition - it might have + been altered by FACCH handling */ + lchan->tch.dtx.cache[6 + 2] |= 16; + if (lchan->tch.dtx.dl_amr_fsm->state == ST_SID_U) + lchan->tch.dtx.is_update = true; return lchan->tch.dtx.len + 1; } diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index f47634e..b6f35b7 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -53,6 +53,7 @@ #include #include #include +#include #include #include @@ -330,13 +331,15 @@ } static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache) { struct lc15l1_hdl *fl1 = trx_lc15l1_hdl(trx); struct msgb *l1msg = l1p_msgb_alloc(); + struct gsm_lchan *lchan; uint32_t u32Fn; uint8_t u8Tn, subCh, u8BlockNbr = 0, sapi = 0; uint8_t chan_nr, link_id; + bool rec = false; int len; if (!msg) { @@ -401,14 +404,46 @@ if (len) { /* data request */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); + lchan = get_lchan_by_chan_nr(trx, chan_nr); + + if (use_cache) + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, + lchan->tch.dtx.facch, msgb_l2len(msg)); + else if (trx->bts->dtxd && lchan->tch.dtx.dl_amr_fsm && + lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + if (sapi == GsmL1_Sapi_FacchF) { + sapi = GsmL1_Sapi_TchF; + } + if (sapi == GsmL1_Sapi_FacchH) { + sapi = GsmL1_Sapi_TchH; + } + if (sapi == GsmL1_Sapi_TchH || sapi == GsmL1_Sapi_TchF) { + /* FACCH interruption of DTX silence */ + /* cache FACCH data */ + memcpy(lchan->tch.dtx.facch, msg->l2h, + msgb_l2len(msg)); + /* prepare ONSET message */ + len = 3; + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_Onset; + /* ignored CMR/CMI pair */ + l1p->u.phDataReq.msgUnitParam.u8Buffer[1] = 0; + l1p->u.phDataReq.msgUnitParam.u8Buffer[2] = 0; + /* ONSET is ready, recursive call is necessary */ + rec = true; + } + } data_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr, len); - OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); - memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, msgb_l2len(msg)); + if (!rec && !use_cache) { + OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, + msgb_l2len(msg)); + } LOGP(DL1P, LOGL_DEBUG, "PH-DATA.req(%s)\n", - osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, - l1p->u.phDataReq.msgUnitParam.u8Size)); + osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, + l1p->u.phDataReq.msgUnitParam.u8Size)); } else { /* empty frame */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); @@ -422,6 +457,8 @@ msgb_free(l1msg); } + if (rec) + ph_data_req(trx, msg, l1sap, true); return 0; } @@ -566,7 +603,7 @@ * free()d below */ switch (OSMO_PRIM_HDR(&l1sap->oph)) { case OSMO_PRIM(PRIM_PH_DATA, PRIM_OP_REQUEST): - rc = ph_data_req(trx, msg, l1sap); + rc = ph_data_req(trx, msg, l1sap, false); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index b251388..70764f5 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -285,10 +285,9 @@ /* DTX DL-specific logic below: */ switch (lchan->tch.dtx.dl_amr_fsm->state) { case ST_ONSET_V: - case ST_ONSET_F: *payload_type = GsmL1_TchPlType_Amr_Onset; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); - *len = 1; + *len = 3; return 1; case ST_VOICE: *payload_type = GsmL1_TchPlType_Amr; @@ -306,6 +305,9 @@ *payload_type = GsmL1_TchPlType_Amr; rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, ft); + /* force STI bit to 0 to make sure resume after FACCH + works properly */ + l1_payload[6 + 2] &= ~16; return 0; case ST_SID_F2: *payload_type = GsmL1_TchPlType_Amr; diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index bef2d30..f7585ce 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -49,6 +49,7 @@ #include #include #include +#include #include #include @@ -325,13 +326,15 @@ } static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache) { struct femtol1_hdl *fl1 = trx_femtol1_hdl(trx); struct msgb *l1msg = l1p_msgb_alloc(); + struct gsm_lchan *lchan; uint32_t u32Fn; uint8_t u8Tn, subCh, u8BlockNbr = 0, sapi = 0; uint8_t chan_nr, link_id; + bool rec = false; int len; if (!msg) { @@ -396,14 +399,46 @@ if (len) { /* data request */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); + lchan = get_lchan_by_chan_nr(trx, chan_nr); + + if (use_cache) + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, + lchan->tch.dtx.facch, msgb_l2len(msg)); + else if (trx->bts->dtxd && lchan->tch.dtx.dl_amr_fsm && + lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + if (sapi == GsmL1_Sapi_FacchF) { + sapi = GsmL1_Sapi_TchF; + } + if (sapi == GsmL1_Sapi_FacchH) { + sapi = GsmL1_Sapi_TchH; + } + if (sapi == GsmL1_Sapi_TchH || sapi == GsmL1_Sapi_TchF) { + /* FACCH interruption of DTX silence */ + /* cache FACCH data */ + memcpy(lchan->tch.dtx.facch, msg->l2h, + msgb_l2len(msg)); + /* prepare ONSET message */ + len = 3; + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_Onset; + /* ignored CMR/CMI pair */ + l1p->u.phDataReq.msgUnitParam.u8Buffer[1] = 0; + l1p->u.phDataReq.msgUnitParam.u8Buffer[2] = 0; + /* ONSET is ready, recursive call is necessary */ + rec = true; + } + } data_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr, len); - OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); - memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, msgb_l2len(msg)); + if (!rec && !use_cache) { + OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, + msgb_l2len(msg)); + } LOGP(DL1P, LOGL_DEBUG, "PH-DATA.req(%s)\n", - osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, - l1p->u.phDataReq.msgUnitParam.u8Size)); + osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, + l1p->u.phDataReq.msgUnitParam.u8Size)); } else { /* empty frame */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); @@ -417,6 +452,8 @@ msgb_free(l1msg); } + if (rec) + ph_data_req(trx, msg, l1sap, true); return 0; } @@ -561,7 +598,7 @@ * free()d below */ switch (OSMO_PRIM_HDR(&l1sap->oph)) { case OSMO_PRIM(PRIM_PH_DATA, PRIM_OP_REQUEST): - rc = ph_data_req(trx, msg, l1sap); + rc = ph_data_req(trx, msg, l1sap, false); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index b08ba7e..fbb42b2 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -383,10 +383,9 @@ /* DTX DL-specific logic below: */ switch (lchan->tch.dtx.dl_amr_fsm->state) { case ST_ONSET_V: - case ST_ONSET_F: *payload_type = GsmL1_TchPlType_Amr_Onset; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); - *len = 1; + *len = 3; return 1; case ST_VOICE: *payload_type = GsmL1_TchPlType_Amr; @@ -404,6 +403,9 @@ *payload_type = GsmL1_TchPlType_Amr; rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, ft); + /* force STI bit to 0 to make sure resume after FACCH + works properly */ + l1_payload[6 + 2] &= ~16; return 0; case ST_SID_F2: *payload_type = GsmL1_TchPlType_Amr; -- To view, visit https://gerrit.osmocom.org/1145 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Gerrit-PatchSet: 13 Gerrit-Project: osmo-bts 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 Oct 28 10:08:48 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Fri, 28 Oct 2016 10:08:48 +0000 Subject: osmo-pcu[master]: Fix issues in URBB generation in EGPRS PUAN In-Reply-To: References: Message-ID: Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/412/3//COMMIT_MSG Commit Message: Line 11: 2. If length is not present, 0s are coded as remaining bits as the fix is already merged, please rename the patch to "refactoring of write_packet_ack_nack_desc_egprs to support CRBB" -- 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: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: prasadkg Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Oct 28 10:22:45 2016 From: gerrit-no-reply at lists.osmocom.org (pravin) Date: Fri, 28 Oct 2016 10:22:45 +0000 Subject: [PATCH] osmo-pcu[master]: Refactoring write_packet_ack_nack_desc_egprs to support CRBB In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/412 to look at the new patch set (#4). Refactoring write_packet_ack_nack_desc_egprs to support CRBB Change-Id: Ie5c25b6ee30f2f1b613e923c234b03a6ffe12ae2 --- M src/encoding.cpp M tests/tbf/TbfTest.err 2 files changed, 39 insertions(+), 36 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/12/412/4 diff --git a/src/encoding.cpp b/src/encoding.cpp index 7d3fa14..3325a49 100644 --- a/src/encoding.cpp +++ b/src/encoding.cpp @@ -332,7 +332,7 @@ if (!use_egprs) { bitvec_write_field(dest, wp,0x0,1); // Message escape - bitvec_write_field(dest, wp,tbf->current_cs().to_num()-1, 2); // CHANNEL_CODING_COMMAND + bitvec_write_field(dest, wp, tbf->current_cs().to_num()-1, 2); // CHANNEL_CODING_COMMAND bitvec_write_field(dest, wp,0x1,1); // TLLI_BLOCK_CHANNEL_CODING bitvec_write_field(dest, wp,0x1,1); // switch TIMING_ADVANCE_VALUE = on bitvec_write_field(dest, wp,tbf->ta(),6); // TIMING_ADVANCE_VALUE @@ -355,7 +355,7 @@ bitvec_write_field(dest, wp,ws_enc,5); // EGPRS Window Size bitvec_write_field(dest, wp,0x0,1); // No Access Technologies Request bitvec_write_field(dest, wp,0x0,1); // No ARAC RETRANSMISSION REQUEST - bitvec_write_field(dest, wp,0x1,1); // TLLI_BLOCK_CHANNEL_CODING + bitvec_write_field(dest, wp, 0x1, 1); // TLLI_BLOCK_CHANNEL_CODING bitvec_write_field(dest, wp,0x0,1); // No BEP_PERIOD2 bitvec_write_field(dest, wp,0x1,1); // switch TIMING_ADVANCE_VALUE = on @@ -612,14 +612,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 */ @@ -627,33 +630,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 @@ -664,17 +665,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 8c6b78c..effae4c 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -6278,7 +6278,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 @@ -6291,7 +6291,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: newpatchset Gerrit-Change-Id: Ie5c25b6ee30f2f1b613e923c234b03a6ffe12ae2 Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: prasadkg From gerrit-no-reply at lists.osmocom.org Fri Oct 28 13:42:19 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 13:42:19 +0000 Subject: osmo-bts[master]: DTX DL: split ONSET state handling In-Reply-To: References: Message-ID: Patch Set 13: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/1145 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Gerrit-PatchSet: 13 Gerrit-Project: osmo-bts 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 Oct 28 13:42:29 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 13:42:29 +0000 Subject: [MERGED] osmo-bts[master]: DTX DL: split ONSET state handling In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: DTX DL: split ONSET state handling ...................................................................... DTX DL: split ONSET state handling Handle ONSET cause by Voice and FACCH separately. In case of Voice we have RTP payload which we have to cache and send later on in next response to L1 RTS. FACCH have higher priority so it preempts both voice and silence alike - hence we can send ONSET immediately but still have to track previous state in order to get back to it gracefully. This affects lc15 and sysmo hw as there's no FSM-based DTX implementation for other models yet. Note: this requires patch for OpenBSC which adds FACCH buffer to tch.dtx struct. Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Related: OS#1802 --- M include/osmo-bts/dtx_dl_amr_fsm.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 7 files changed, 120 insertions(+), 35 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 8b19595..5c13c19 100644 --- a/include/osmo-bts/dtx_dl_amr_fsm.h +++ b/include/osmo-bts/dtx_dl_amr_fsm.h @@ -16,7 +16,6 @@ ST_U_INH, ST_SID_U, ST_ONSET_V, - ST_ONSET_F, ST_FACCH_V, ST_FACCH, }; diff --git a/src/common/dtx_dl_amr_fsm.c b/src/common/dtx_dl_amr_fsm.c index b110cf2..a75fd00 100644 --- a/src/common/dtx_dl_amr_fsm.c +++ b/src/common/dtx_dl_amr_fsm.c @@ -53,7 +53,7 @@ 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_FACCH, 0, 0); break; case E_COMPL: osmo_fsm_inst_state_chg(fi, ST_SID_F2, 0, 0); @@ -81,7 +81,7 @@ 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_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -97,7 +97,7 @@ osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -113,7 +113,7 @@ osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -126,7 +126,7 @@ { switch (event) { case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); break; case E_VOICE: osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); @@ -234,7 +234,7 @@ 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), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_FACCH) | X(ST_SID_F2) | X(ST_F1_INH) | X(ST_ONSET_V), .name = "SID-FIRST (P1)", .action = dtx_fsm_sid_f1, }, @@ -242,7 +242,7 @@ 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), - .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_ONSET_F), + .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_FACCH), .name = "SID-FIRST (P2)", .action = dtx_fsm_sid_f2, }, @@ -265,7 +265,7 @@ /* 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), + .out_state_mask = X(ST_FACCH) | X(ST_VOICE) | X(ST_U_INH) | X(ST_SID_U) | X(ST_ONSET_V), .name = "SID-UPDATE", .action = dtx_fsm_sid_upd, }, @@ -275,13 +275,6 @@ .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), .name = "ONSET (SPEECH)", .action = dtx_fsm_onset_v, - }, - /* ONSET - end of silent period due to incoming FACCH frame */ - [ST_ONSET_F]= { - .in_event_mask = X(E_VOICE) | X(E_FACCH) | X(E_SID_U), - .out_state_mask = X(ST_VOICE) | X(ST_FACCH), - .name = "ONSET (FACCH)", - .action = dtx_fsm_onset_f, }, /* FACCH sending state: SPEECH was observed before so once we're done FSM should get back to VOICE state */ diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 9c6f20f..4b21366 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -220,11 +220,22 @@ * \param[in] fn Frame Number for which we check scheduling * \returns true if transmission can be omitted, false otherwise */ -static inline bool dtx_amr_sid_optional(const struct gsm_lchan *lchan, - uint32_t fn) +static inline bool dtx_amr_sid_optional(struct gsm_lchan *lchan, uint32_t fn) { /* Compute approx. time delta x26 based on Fn duration */ uint32_t dx26 = 120 * (fn - lchan->tch.dtx.fn); + + /* We're resuming after FACCH interruption */ + if (lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + /* force STI bit to 0 so cache is treated as SID FIRST */ + lchan->tch.dtx.cache[6 + 2] &= ~16; + lchan->tch.dtx.is_update = false; + osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, E_SID_F, + (void *)lchan); + /* this FN was already used for ONSET message so we just prepare + things for next one */ + return true; + } /* according to 3GPP TS 26.093 A.5.1.1: (*26) to avoid float math, add 1 FN tolerance (-120) */ @@ -293,7 +304,11 @@ if (lchan->tch.dtx.len) { memcpy(dst, lchan->tch.dtx.cache, lchan->tch.dtx.len); lchan->tch.dtx.fn = fn; - lchan->tch.dtx.is_update = true; /* SID UPDATE sent */ + /* enforce SID UPDATE for next repetition - it might have + been altered by FACCH handling */ + lchan->tch.dtx.cache[6 + 2] |= 16; + if (lchan->tch.dtx.dl_amr_fsm->state == ST_SID_U) + lchan->tch.dtx.is_update = true; return lchan->tch.dtx.len + 1; } diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index edc5f5b..795172b 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -53,6 +53,7 @@ #include #include #include +#include #include #include @@ -330,13 +331,15 @@ } static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache) { struct lc15l1_hdl *fl1 = trx_lc15l1_hdl(trx); struct msgb *l1msg = l1p_msgb_alloc(); + struct gsm_lchan *lchan; uint32_t u32Fn; uint8_t u8Tn, subCh, u8BlockNbr = 0, sapi = 0; uint8_t chan_nr, link_id; + bool rec = false; int len; if (!msg) { @@ -401,14 +404,46 @@ if (len) { /* data request */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); + lchan = get_lchan_by_chan_nr(trx, chan_nr); + + if (use_cache) + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, + lchan->tch.dtx.facch, msgb_l2len(msg)); + else if (trx->bts->dtxd && lchan->tch.dtx.dl_amr_fsm && + lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + if (sapi == GsmL1_Sapi_FacchF) { + sapi = GsmL1_Sapi_TchF; + } + if (sapi == GsmL1_Sapi_FacchH) { + sapi = GsmL1_Sapi_TchH; + } + if (sapi == GsmL1_Sapi_TchH || sapi == GsmL1_Sapi_TchF) { + /* FACCH interruption of DTX silence */ + /* cache FACCH data */ + memcpy(lchan->tch.dtx.facch, msg->l2h, + msgb_l2len(msg)); + /* prepare ONSET message */ + len = 3; + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_Onset; + /* ignored CMR/CMI pair */ + l1p->u.phDataReq.msgUnitParam.u8Buffer[1] = 0; + l1p->u.phDataReq.msgUnitParam.u8Buffer[2] = 0; + /* ONSET is ready, recursive call is necessary */ + rec = true; + } + } data_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr, len); - OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); - memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, msgb_l2len(msg)); + if (!rec && !use_cache) { + OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, + msgb_l2len(msg)); + } LOGP(DL1P, LOGL_DEBUG, "PH-DATA.req(%s)\n", - osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, - l1p->u.phDataReq.msgUnitParam.u8Size)); + osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, + l1p->u.phDataReq.msgUnitParam.u8Size)); } else { /* empty frame */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); @@ -422,6 +457,8 @@ msgb_free(l1msg); } + if (rec) + ph_data_req(trx, msg, l1sap, true); return 0; } @@ -566,7 +603,7 @@ * free()d below */ switch (OSMO_PRIM_HDR(&l1sap->oph)) { case OSMO_PRIM(PRIM_PH_DATA, PRIM_OP_REQUEST): - rc = ph_data_req(trx, msg, l1sap); + rc = ph_data_req(trx, msg, l1sap, false); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index b251388..70764f5 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -285,10 +285,9 @@ /* DTX DL-specific logic below: */ switch (lchan->tch.dtx.dl_amr_fsm->state) { case ST_ONSET_V: - case ST_ONSET_F: *payload_type = GsmL1_TchPlType_Amr_Onset; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); - *len = 1; + *len = 3; return 1; case ST_VOICE: *payload_type = GsmL1_TchPlType_Amr; @@ -306,6 +305,9 @@ *payload_type = GsmL1_TchPlType_Amr; rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, ft); + /* force STI bit to 0 to make sure resume after FACCH + works properly */ + l1_payload[6 + 2] &= ~16; return 0; case ST_SID_F2: *payload_type = GsmL1_TchPlType_Amr; diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index bef2d30..f7585ce 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -49,6 +49,7 @@ #include #include #include +#include #include #include @@ -325,13 +326,15 @@ } static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg, - struct osmo_phsap_prim *l1sap) + struct osmo_phsap_prim *l1sap, bool use_cache) { struct femtol1_hdl *fl1 = trx_femtol1_hdl(trx); struct msgb *l1msg = l1p_msgb_alloc(); + struct gsm_lchan *lchan; uint32_t u32Fn; uint8_t u8Tn, subCh, u8BlockNbr = 0, sapi = 0; uint8_t chan_nr, link_id; + bool rec = false; int len; if (!msg) { @@ -396,14 +399,46 @@ if (len) { /* data request */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); + lchan = get_lchan_by_chan_nr(trx, chan_nr); + + if (use_cache) + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, + lchan->tch.dtx.facch, msgb_l2len(msg)); + else if (trx->bts->dtxd && lchan->tch.dtx.dl_amr_fsm && + lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + if (sapi == GsmL1_Sapi_FacchF) { + sapi = GsmL1_Sapi_TchF; + } + if (sapi == GsmL1_Sapi_FacchH) { + sapi = GsmL1_Sapi_TchH; + } + if (sapi == GsmL1_Sapi_TchH || sapi == GsmL1_Sapi_TchF) { + /* FACCH interruption of DTX silence */ + /* cache FACCH data */ + memcpy(lchan->tch.dtx.facch, msg->l2h, + msgb_l2len(msg)); + /* prepare ONSET message */ + len = 3; + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_Onset; + /* ignored CMR/CMI pair */ + l1p->u.phDataReq.msgUnitParam.u8Buffer[1] = 0; + l1p->u.phDataReq.msgUnitParam.u8Buffer[2] = 0; + /* ONSET is ready, recursive call is necessary */ + rec = true; + } + } data_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr, len); - OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); - memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, msgb_l2len(msg)); + if (!rec && !use_cache) { + OSMO_ASSERT(msgb_l2len(msg) <= sizeof(l1p->u.phDataReq.msgUnitParam.u8Buffer)); + memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, + msgb_l2len(msg)); + } LOGP(DL1P, LOGL_DEBUG, "PH-DATA.req(%s)\n", - osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, - l1p->u.phDataReq.msgUnitParam.u8Size)); + osmo_hexdump(l1p->u.phDataReq.msgUnitParam.u8Buffer, + l1p->u.phDataReq.msgUnitParam.u8Size)); } else { /* empty frame */ GsmL1_Prim_t *l1p = msgb_l1prim(l1msg); @@ -417,6 +452,8 @@ msgb_free(l1msg); } + if (rec) + ph_data_req(trx, msg, l1sap, true); return 0; } @@ -561,7 +598,7 @@ * free()d below */ switch (OSMO_PRIM_HDR(&l1sap->oph)) { case OSMO_PRIM(PRIM_PH_DATA, PRIM_OP_REQUEST): - rc = ph_data_req(trx, msg, l1sap); + rc = ph_data_req(trx, msg, l1sap, false); break; case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST): rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker); diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index b08ba7e..fbb42b2 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -383,10 +383,9 @@ /* DTX DL-specific logic below: */ switch (lchan->tch.dtx.dl_amr_fsm->state) { case ST_ONSET_V: - case ST_ONSET_F: *payload_type = GsmL1_TchPlType_Amr_Onset; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); - *len = 1; + *len = 3; return 1; case ST_VOICE: *payload_type = GsmL1_TchPlType_Amr; @@ -404,6 +403,9 @@ *payload_type = GsmL1_TchPlType_Amr; rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, ft); + /* force STI bit to 0 to make sure resume after FACCH + works properly */ + l1_payload[6 + 2] &= ~16; return 0; case ST_SID_F2: *payload_type = GsmL1_TchPlType_Amr; -- To view, visit https://gerrit.osmocom.org/1145 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Gerrit-PatchSet: 14 Gerrit-Project: osmo-bts 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 Oct 28 13:43:08 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 13:43:08 +0000 Subject: openbsc[master]: sndcp: Fixups for sndcp layer based on coverity-scan suggest... In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/965 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4f9adf251f5119e67ffe76baad6f1f996ac8dbad Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: wax miguel Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri Oct 28 13:43:10 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 28 Oct 2016 13:43:10 +0000 Subject: [MERGED] openbsc[master]: sndcp: Fixups for sndcp layer based on coverity-scan suggest... In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: sndcp: Fixups for sndcp layer based on coverity-scan suggestions ...................................................................... sndcp: Fixups for sndcp layer based on coverity-scan suggestions - missing break in gprs_sndcp_pcomp.c, line 143 - string overflow in slhc_test.c, line 211 - sizeof mismatch in gprs_sndcp_xid.c, line 1369 and 1378 - mismatching signedness in gprs_sndcp_xid.c, line 1377 - needless < 0 comparison in gprs_sndcp_xid.c, line 477 - needless < 0 comparison in gprs_sndcp_xid.c, line 209 - missing returncode check in v42bis_test.c, line 320 - wrong pointer dereferentialization in gprs_sndcp_comp.c, line 73 Change-Id: I4f9adf251f5119e67ffe76baad6f1f996ac8dbad --- M openbsc/src/gprs/gprs_sndcp_comp.c M openbsc/src/gprs/gprs_sndcp_pcomp.c M openbsc/src/gprs/gprs_sndcp_xid.c M openbsc/tests/slhc/slhc_test.c M openbsc/tests/v42bis/v42bis_test.c 5 files changed, 18 insertions(+), 13 deletions(-) Approvals: Harald Welte: 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 b13cb8b..cae0039 100644 --- a/openbsc/src/gprs/gprs_sndcp_comp.c +++ b/openbsc/src/gprs/gprs_sndcp_comp.c @@ -70,7 +70,7 @@ comp_field->v42bis_params->nsapi, sizeof(comp_entity->nsapi)); } else if (comp_field->v44_params) { - comp_entity->nsapi_len = comp_field->v42bis_params->nsapi_len; + comp_entity->nsapi_len = comp_field->v44_params->nsapi_len; memcpy(comp_entity->nsapi, comp_field->v42bis_params->nsapi, sizeof(comp_entity->nsapi)); diff --git a/openbsc/src/gprs/gprs_sndcp_pcomp.c b/openbsc/src/gprs/gprs_sndcp_pcomp.c index 5f6fb2c..493b263 100644 --- a/openbsc/src/gprs/gprs_sndcp_pcomp.c +++ b/openbsc/src/gprs/gprs_sndcp_pcomp.c @@ -141,6 +141,7 @@ switch (pcomp_index) { case 0: type = SL_TYPE_IP; + break; case 1: type = SL_TYPE_UNCOMPRESSED_TCP; break; diff --git a/openbsc/src/gprs/gprs_sndcp_xid.c b/openbsc/src/gprs/gprs_sndcp_xid.c index 270bdee..bb43eab 100644 --- a/openbsc/src/gprs/gprs_sndcp_xid.c +++ b/openbsc/src/gprs/gprs_sndcp_xid.c @@ -206,7 +206,6 @@ /* Bail if number of ROHC profiles exceeds limit * (ROHC supports only a maximum of 16 different profiles) */ - OSMO_ASSERT(params->profile_len >= 0); OSMO_ASSERT(params->profile_len <= 16); /* Zero out buffer */ @@ -475,8 +474,7 @@ for (i = 0; i < comp_field->comp_len; i++) { /* Check if submitted PCOMP/DCOMP values are within bounds */ - if ((comp_field->comp[i] < 0) - || (comp_field->comp[i] > 0x0F)) + if (comp_field->comp[i] > 0x0F) return -EINVAL; if (i & 1) { @@ -1360,26 +1358,29 @@ { struct gprs_sndcp_comp_field *comp_field; int i = 0; + int rc; if (!comp_fields) return -EINVAL; if (!lt) return -EINVAL; - memset(lt, 0, lt_len * sizeof(lt)); + memset(lt, 0, sizeof(*lt)); llist_for_each_entry(comp_field, comp_fields, list) { + if (comp_field->algo >= 0) { + lt[i].entity = comp_field->entity; + lt[i].algo = comp_field->algo; + rc = gprs_sndcp_get_compression_class(comp_field); - lt[i].entity = comp_field->entity; - lt[i].algo = comp_field->algo; - lt[i].compclass = gprs_sndcp_get_compression_class(comp_field); + if (rc < 0) { + memset(lt, 0, sizeof(*lt)); + return -EINVAL; + } - if (lt[i].compclass < 0) { - memset(lt, 0, lt_len * sizeof(lt)); - return -EINVAL; + lt[i].compclass = rc; + i++; } - - i++; } return i; diff --git a/openbsc/tests/slhc/slhc_test.c b/openbsc/tests/slhc/slhc_test.c index e8ea02f..d2e1cd9 100644 --- a/openbsc/tests/slhc/slhc_test.c +++ b/openbsc/tests/slhc/slhc_test.c @@ -182,6 +182,8 @@ memset(packet, 0, sizeof(packet)); memset(packet_compr, 0, sizeof(packet_compr)); memset(packet_decompr, 0, sizeof(packet_decompr)); + + OSMO_ASSERT(strlen(packets[i]) < sizeof(packet_ascii)); strcpy(packet_ascii, packets[i]); packet_len = diff --git a/openbsc/tests/v42bis/v42bis_test.c b/openbsc/tests/v42bis/v42bis_test.c index 4e05514..7e90785 100644 --- a/openbsc/tests/v42bis/v42bis_test.c +++ b/openbsc/tests/v42bis/v42bis_test.c @@ -318,6 +318,7 @@ len = strlen(uncompr_packets[packet_id]); testvec = talloc_zero_size(ctx, len); len = osmo_hexparse(uncompr_packets[packet_id], testvec, len); + OSMO_ASSERT(len > 0); v42bis(ctx, V42BIS_COMPRESSION_MODE_DYNAMIC, testvec, len); v42bis(ctx, V42BIS_COMPRESSION_MODE_ALWAYS, testvec, len); v42bis(ctx, V42BIS_COMPRESSION_MODE_NEVER, testvec, len); -- To view, visit https://gerrit.osmocom.org/965 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4f9adf251f5119e67ffe76baad6f1f996ac8dbad Gerrit-PatchSet: 5 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: dexter Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: wax miguel From gerrit-no-reply at lists.osmocom.org Fri Oct 28 16:53:07 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 28 Oct 2016 16:53:07 +0000 Subject: [PATCH] libosmocore[master]: Add logging for FSM deallocation Message-ID: Review at https://gerrit.osmocom.org/1172 Add logging for FSM deallocation osmo_fsm_inst_alloc() logs allocation but osmo_fsm_inst_free() is silent. Fix this by adding log message for deallocation to make FSM lifecycle tracking easier. Change-Id: I7e5b55a1fff8e36cf61c7fb61d3e79c1f00e29d2 --- M src/fsm.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/72/1172/1 diff --git a/src/fsm.c b/src/fsm.c index 31ed194..5a4428c 100644 --- a/src/fsm.c +++ b/src/fsm.c @@ -236,6 +236,8 @@ osmo_timer_del(&fi->timer); llist_del(&fi->list); talloc_free(fi); + + LOGPFSM(fi, "Deallocated\n"); } /*! \brief get human-readable name of FSM event -- To view, visit https://gerrit.osmocom.org/1172 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7e5b55a1fff8e36cf61c7fb61d3e79c1f00e29d2 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Oct 28 17:23:13 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 28 Oct 2016 17:23:13 +0000 Subject: [PATCH] libosmocore[master]: utils/conv_gen.py: use shared tables if possible Message-ID: Review at https://gerrit.osmocom.org/1173 utils/conv_gen.py: use shared tables if possible This change introduces the memory usage optimization, mentioned in d2d9760c08f35a231d32f0ebeb73b2927e5573b3. The aim is to make code generator able to detect, whether the same tables are used by several convolutional code definitions, and prevent one from writing these tables multiple times. For now, the detection process isn't fully automatic, so all shared polynomials should be placed inside the 'shared_polys' dictionary, for example: shared_polys = { "xcch" : [ ( G0, 1 ), ( G1, 1 ), ], "mcs" : [ ( G4, 1 ), ( G7, 1 ), ( G5, 1 ), ], } Change-Id: I84760f5cdfdaece376b801d2e6cb2954ee875a3b --- M utils/conv_gen.py 1 file changed, 61 insertions(+), 37 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/73/1173/1 diff --git a/utils/conv_gen.py b/utils/conv_gen.py index 78b2335..a51e0e0 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -163,7 +163,7 @@ # Up to 12 numbers should be placed per line print_formatted(self.puncture, "%3d, ", 12, fi) - def gen_tables(self, pref, fi): + def print_state_and_output(self, fi): pack = lambda n: \ sum([x << (self.rate_inv - i - 1) for i, x in enumerate(n)]) num_states = 1 << (self.k - 1) @@ -185,6 +185,14 @@ self._print_term(fi, num_states, pack) fi.write("};\n\n") + def gen_tables(self, pref, fi, shared_tables = False): + # Do not print shared tables + if not shared_tables: + self.print_state_and_output(fi) + table_pref = self.name + else: + table_pref = shared_tables + if len(self.puncture): fi.write("static const int %s_puncture[] = {\n" % self.name) self._print_puncture(fi) @@ -202,15 +210,15 @@ fi.write("\t.N = %d,\n" % self.rate_inv) fi.write("\t.K = %d,\n" % self.k) fi.write("\t.len = %d,\n" % self.block_len) - fi.write("\t.next_output = %s_output,\n" % self.name) - fi.write("\t.next_state = %s_state,\n" % self.name) + fi.write("\t.next_output = %s_output,\n" % table_pref) + fi.write("\t.next_state = %s_state,\n" % table_pref) if self.term_type is not None: fi.write("\t.term = %s,\n" % self.term_type) if self.recursive: - fi.write("\t.next_term_output = %s_term_output,\n" % self.name) - fi.write("\t.next_term_state = %s_term_state,\n" % self.name) + fi.write("\t.next_term_output = %s_term_output,\n" % table_pref) + fi.write("\t.next_term_state = %s_term_state,\n" % table_pref) if len(self.puncture): fi.write("\t.puncture = %s_puncture,\n" % self.name) @@ -238,6 +246,12 @@ fi.write("\n") +def print_shared(fi): + for name, polys in shared_polys.iteritems(): + # HACK + code = ConvolutionalCode(0, polys, name = name) + code.print_state_and_output(fi) + # Polynomials according to 3GPP TS 05.03 Annex B G0 = poly(0, 3, 4) G1 = poly(0, 1, 3, 4) @@ -248,22 +262,23 @@ G6 = poly(0, 1, 2, 3, 4, 6) G7 = poly(0, 1, 2, 3, 6) -CCH_poly = [ - ( G0, 1 ), - ( G1, 1 ), -] - -MCS_poly = [ - ( G4, 1 ), - ( G7, 1 ), - ( G5, 1 ), -] +shared_polys = { + "xcch" : [ + ( G0, 1 ), + ( G1, 1 ), + ], + "mcs" : [ + ( G4, 1 ), + ( G7, 1 ), + ( G5, 1 ), + ], +} conv_codes = [ # xCCH definition ConvolutionalCode( 224, - CCH_poly, + shared_polys["xcch"], name = "xcch", description = [ "xCCH convolutional code:", @@ -276,7 +291,7 @@ # RACH definition ConvolutionalCode( 14, - CCH_poly, + shared_polys["xcch"], name = "rach", description = ["RACH convolutional code"] ), @@ -284,7 +299,7 @@ # SCH definition ConvolutionalCode( 35, - CCH_poly, + shared_polys["xcch"], name = "sch", description = ["SCH convolutional code"] ), @@ -292,7 +307,7 @@ # CS2 definition ConvolutionalCode( 290, - CCH_poly, + shared_polys["xcch"], puncture = [ 15, 19, 23, 27, 31, 35, 43, 47, 51, 55, 59, 63, 67, 71, 75, 79, 83, 91, 95, 99, 103, 107, 111, 115, 119, 123, 127, 131, @@ -316,7 +331,7 @@ # CS3 definition ConvolutionalCode( 334, - CCH_poly, + shared_polys["xcch"], puncture = [ 15, 17, 21, 23, 27, 29, 33, 35, 39, 41, 45, 47, 51, 53, 57, 59, 63, 65, 69, 71, 75, 77, 81, 83, 87, 89, 93, 95, @@ -578,7 +593,7 @@ # TCH_FR definition ConvolutionalCode( 185, - CCH_poly, + shared_polys["xcch"], name = "tch_fr", description = ["TCH/F convolutional code"] ), @@ -723,7 +738,7 @@ # EDGE MCS1_DL_HDR definition ConvolutionalCode( 36, - MCS_poly, + shared_polys["mcs"], name = "mcs1_dl_hdr", term_type = "CONV_TERM_TAIL_BITING", description = [ @@ -738,7 +753,7 @@ # EDGE MCS1_UL_HDR definition ConvolutionalCode( 39, - MCS_poly, + shared_polys["mcs"], name = "mcs1_ul_hdr", term_type = "CONV_TERM_TAIL_BITING", description = [ @@ -753,7 +768,7 @@ # EDGE MCS1 definition ConvolutionalCode( 190, - MCS_poly, + shared_polys["mcs"], name = "mcs1", description = [ "EDGE MCS-1 data convolutional code:", @@ -767,7 +782,7 @@ # EDGE MCS2 definition ConvolutionalCode( 238, - MCS_poly, + shared_polys["mcs"], name = "mcs2", description = [ "EDGE MCS-2 data convolutional code:", @@ -781,7 +796,7 @@ # EDGE MCS3 definition ConvolutionalCode( 310, - MCS_poly, + shared_polys["mcs"], name = "mcs3", description = [ "EDGE MCS-3 data convolutional code:", @@ -795,7 +810,7 @@ # EDGE MCS4 definition ConvolutionalCode( 366, - MCS_poly, + shared_polys["mcs"], name = "mcs4", description = [ "EDGE MCS-4 data convolutional code:", @@ -809,7 +824,7 @@ # EDGE MCS5_DL_HDR definition ConvolutionalCode( 33, - MCS_poly, + shared_polys["mcs"], name = "mcs5_dl_hdr", term_type = "CONV_TERM_TAIL_BITING", description = [ @@ -824,7 +839,7 @@ # EDGE MCS5_UL_HDR definition ConvolutionalCode( 45, - MCS_poly, + shared_polys["mcs"], name = "mcs5_ul_hdr", term_type = "CONV_TERM_TAIL_BITING", description = [ @@ -839,7 +854,7 @@ # EDGE MCS5 definition ConvolutionalCode( 462, - MCS_poly, + shared_polys["mcs"], name = "mcs5", description = [ "EDGE MCS-5 data convolutional code:", @@ -853,7 +868,7 @@ # EDGE MCS6 definition ConvolutionalCode( 606, - MCS_poly, + shared_polys["mcs"], name = "mcs6", description = [ "EDGE MCS-6 data convolutional code:", @@ -867,7 +882,7 @@ # EDGE MCS7_DL_HDR definition ConvolutionalCode( 45, - MCS_poly, + shared_polys["mcs"], name = "mcs7_dl_hdr", term_type = "CONV_TERM_TAIL_BITING", description = [ @@ -882,7 +897,7 @@ # EDGE MCS7_UL_HDR definition ConvolutionalCode( 54, - MCS_poly, + shared_polys["mcs"], name = "mcs7_ul_hdr", term_type = "CONV_TERM_TAIL_BITING", description = [ @@ -897,7 +912,7 @@ # EDGE MCS7 definition ConvolutionalCode( 462, - MCS_poly, + shared_polys["mcs"], name = "mcs7", description = [ "EDGE MCS-7 data convolutional code:", @@ -911,7 +926,7 @@ # EDGE MCS8 definition ConvolutionalCode( 558, - MCS_poly, + shared_polys["mcs"], name = "mcs8", description = [ "EDGE MCS-8 data convolutional code:", @@ -925,7 +940,7 @@ # EDGE MCS9 definition ConvolutionalCode( 606, - MCS_poly, + shared_polys["mcs"], name = "mcs9", description = [ "EDGE MCS-9 data convolutional code:", @@ -948,10 +963,19 @@ f.write(mod_license + "\n") f.write("#include \n") f.write("#include \n\n") + print_shared(f) # Generate the tables one by one for code in conv_codes: sys.stderr.write("Generate '%s' definition\n" % code.name) - code.gen_tables(prefix, f) + + # Check whether shared polynomials are used + shared = False + for name, polys in shared_polys.iteritems(): + if code.polys == polys: + shared = name + break + + code.gen_tables(prefix, f, shared_tables = shared) sys.stderr.write("Generation complete.\n") -- To view, visit https://gerrit.osmocom.org/1173 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I84760f5cdfdaece376b801d2e6cb2954ee875a3b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Fri Oct 28 17:33:31 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 28 Oct 2016 17:33:31 +0000 Subject: libosmocore[master]: utils/conv_gen.py: use shared tables if possible In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/1173/1/utils/conv_gen.py File utils/conv_gen.py: Line 166: def print_state_and_output(self, fi): I am not sure about name. Maybe, there is a better one? -- To view, visit https://gerrit.osmocom.org/1173 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I84760f5cdfdaece376b801d2e6cb2954ee875a3b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri Oct 28 17:53:55 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 28 Oct 2016 17:53:55 +0000 Subject: [PATCH] osmo-bts[master]: DTX DL: add AMR HR support to scheduling check Message-ID: Review at https://gerrit.osmocom.org/1174 DTX DL: add AMR HR support to scheduling check superfemto.sh: Expand log converter to use case-insensitive matching to accommodate for spelling differences in DSP logs. Add strings/events specific to AMR HR. dtx_check.gawk: Remove redundand variables from output. Add checks specific to AMR HR. Change-Id: Icce3178605f46bbf3cad15d4eaff18a4d164ad1a --- M contrib/dtx_check.gawk M contrib/superfemto.sh 2 files changed, 29 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/74/1174/1 diff --git a/contrib/dtx_check.gawk b/contrib/dtx_check.gawk index 9e753e4..a18d84a 100755 --- a/contrib/dtx_check.gawk +++ b/contrib/dtx_check.gawk @@ -27,7 +27,7 @@ CHK = "FAIL: missing ONSET (" $2 ") after " TYPE "." ERR++ } - if ("FORCED_FIRST" == $2 || "FORCED_NODATA" == $2) { + if ("FORCED_FIRST" == $2 || "FORCED_NODATA" == $2 || "FORCED_F_P2" == $2 || "FORCED_F_INH" == $2 || "FORCED_U_INH" == $2) { CHK = "FAIL: event " $2 " inserted by DSP." FORCE++ ERR++ @@ -65,7 +65,7 @@ if ("UPDATE" == $2 || "FIRST" == $2) { # silence SILENCE = 1 } - print $1, $2, CHK, TYPE, DELTA, SILENCE + print $1, $2, CHK if ($2 != "EMPTY") { # skip over EMPTY records TYPE = $2 FN = $1 diff --git a/contrib/superfemto.sh b/contrib/superfemto.sh index cb871c0..a210cc4 100755 --- a/contrib/superfemto.sh +++ b/contrib/superfemto.sh @@ -19,21 +19,32 @@ ULST="_DecodeAndIdentify" # DL sed filters: -D_EMP='s/ Empty frame request!/EMPTY/' -D_FAC='s/ Coding a FACCH\/F frame !!/FACCH/' -D_FST='s/ Coding a RTP SID First frame !!/FIRST/' -D_UPD='s/ Coding a RTP SID Update frame !!/UPDATE/' -D_SPE='s/ Coding a RTP Speech frame !!/SPEECH/' -D_ONS='s/ Coding a Onset frame !!/ONSET/' -D_FO1='s/ A speech frame is following a NoData or SID First without an Onset./FORCED_FIRST/' -D_FO2='s/ A speech frame is following a NoData without an Onset./FORCED_NODATA/' +D_EMP='s/ Empty frame request!/EMPTY/i' +D_FAC='s/ Coding a FACCH\/. frame !!/FACCH/i' +D_FST='s/ Coding a RTP SID First frame !!/FIRST/i' +D_FS1='s/ Coding a SID First P1 frame !!/FIRST_P1/i' +D_FS2='s/ Coding a SID First P2 frame !!/FIRST_P2/i' +D_RP1='s/ Coding a RTP SID P1 frame !!/SID_P1/i' +D_UPD='s/ Coding a RTP SID Update frame !!/UPDATE/i' +D_SPE='s/ Coding a RTP Speech frame !!/SPEECH/i' +D_ONS='s/ Coding a Onset frame !!/ONSET/i' +D_FO1='s/ A speech frame is following a NoData or SID First without an Onset./FORCED_FIRST/i' +D_FO2='s/ A speech frame is following a NoData without an Onset./FORCED_NODATA/i' +D_FP2='s/ A speech frame is following a NoData or SID_FIRST_P2 without an Onset./FORCED_F_P2/i' +D_FIN='s/ A speech frame is following a SID_FIRST without inhibit. A SID_FIRST_INH will be inserted./FORCED_F_INH/i' +D_UIN='s/ A speech frame is following a SID_UPDATE without inhibit. A SID_UPDATE_INH will be inserted./FORCED_U_INH/i' # UL sed filters: -U_NOD='s/ It is a No Data frame !!/NODATA/' -U_ONS='s/ It is an ONSET frame !!/ONSET/' -U_UPD='s/ It is a SID UPDATE frame !!/UPDATE/' -U_FST='s/ It is a SID FIRST frame !!/FIRST/' -U_SPE='s/ It is a SPEECH frame !!/SPEECH/' +U_NOD='s/ It is a No Data frame !!/NODATA/i' +U_ONS='s/ It is an ONSET frame !!/ONSET/i' +U_UPD='s/ It is a SID UPDATE frame !!/UPDATE/i' +U_FST='s/ It is a SID FIRST frame !!/FIRST/i' +U_FP1='s/ It is a SID-First P1 frame !!/FIRST_P1/i' +U_FP2='s/ It is a SID-First P2 frame !!/FIRST_P2/i' +U_SPE='s/ It is a SPEECH frame *!!/SPEECH/i' +U_UIN='s/ It is a SID update InH frame !!/UPD_INH/i' +U_FIN='s/ It is a SID-First InH frame !!/FST_INH/i' +U_RAT='s/ It is a RATSCCH data frame !!/RATSCCH/i' DL () { # filter downlink-related entries grep $DLST $1 > $1.DL.tmp @@ -66,7 +77,7 @@ MT $1.UL PREP() { # prepare logs for reformatting - cat $1.raw | cut -f2 -d')' | cut -f1 -d',' | cut -f2 -d'>' | sed 's/\[u32Fn/fn/' | sed 's/fn = /fn=/' | sed 's/fn=//' | sed 's/\[Fn=//' | sed 's/ An Onset will be inserted.//' > $1.tmp1 + cat $1.raw | cut -f2 -d')' | cut -f1 -d',' | cut -f2 -d'>' | sed 's/\[u32Fn/fn/' | sed 's/\[ u32Fn/fn/' | sed 's/fn = /fn=/' | sed 's/fn=//' | sed 's/\[Fn=//' | sed 's/ An Onset will be inserted.//' > $1.tmp1 } PREP "$1.DL.MT" @@ -75,11 +86,11 @@ PREP "$1.UL.MO" RD() { # reformat DL logs for consistency checks - cat $1.tmp1 | sed "$D_FST" | sed "$D_SPE" | sed "$D_UPD" | sed "$D_ONS" | sed "$D_EMP" | sed "$D_FAC" | sed "$D_FO1" | sed "$D_FO2" > $1.tmp2 + cat $1.tmp1 | sed "$D_FST" | sed "$D_SPE" | sed "$D_FS1" | sed "$D_FS2" | sed "$D_UIN" | sed "$D_FIN" | sed "$D_UPD" | sed "$D_INH" | sed "$D_RP1" | sed "$D_ONS" | sed "$D_EMP" | sed "$D_FAC" | sed "$D_FO1" | sed "$D_FO2" | sed "$D_FP2" > $1.tmp2 } RU() { # reformat UL logs for consistency checks - cat $1.tmp1 | sed "$U_FST" | sed "$U_SPE" | sed "$U_UPD" | sed "$U_ONS" | sed "$U_NOD" > $1.tmp2 + cat $1.tmp1 | sed "$U_FST" | sed "$U_SPE" | sed "$U_FP1" | sed "$U_FP2" | sed "$U_UPD" | sed "$U_ONS" | sed "$U_NOD" | sed "$U_UIN" | sed "$U_FIN" | sed "$U_RAT" > $1.tmp2 } RD "$1.DL.MT" -- To view, visit https://gerrit.osmocom.org/1174 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icce3178605f46bbf3cad15d4eaff18a4d164ad1a Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Oct 28 17:53:55 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 28 Oct 2016 17:53:55 +0000 Subject: [PATCH] osmo-bts[master]: DTX fix ONSET handling Message-ID: Review at https://gerrit.osmocom.org/1175 DTX fix ONSET handling * re-introduce ST_ONSET_F to guard from repetitive ONSET messages in case multiple FACCH occur duriing DTX silence period. * produce ONSET event after both SID FIRST and UPDATE in case of AMR FR. * always dispatch E_SID_F (SID FIRST) signal if in talkspurt. * allow E_SID_* right after ONSET (zero-length talkspurt). * add missing E_ONSET signal description. * fix FSM transitions for AMR HR *Inhibited and First P*. * fix incorrect return from l1if_tch_encode() in ONSET FACCH with incoming SID UPDATE Change-Id: I0e9033c5f169da46aed9a0d1295faff489778dcf Related: OS#1801 --- M include/osmo-bts/dtx_dl_amr_fsm.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 7 files changed, 43 insertions(+), 26 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/75/1175/1 diff --git a/include/osmo-bts/dtx_dl_amr_fsm.h b/include/osmo-bts/dtx_dl_amr_fsm.h index 5c13c19..8b19595 100644 --- a/include/osmo-bts/dtx_dl_amr_fsm.h +++ b/include/osmo-bts/dtx_dl_amr_fsm.h @@ -16,6 +16,7 @@ ST_U_INH, ST_SID_U, ST_ONSET_V, + ST_ONSET_F, ST_FACCH_V, ST_FACCH, }; diff --git a/src/common/dtx_dl_amr_fsm.c b/src/common/dtx_dl_amr_fsm.c index a75fd00..5075957 100644 --- a/src/common/dtx_dl_amr_fsm.c +++ b/src/common/dtx_dl_amr_fsm.c @@ -53,7 +53,7 @@ osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); break; case E_COMPL: osmo_fsm_inst_state_chg(fi, ST_SID_F2, 0, 0); @@ -81,7 +81,10 @@ osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + 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); @@ -97,7 +100,7 @@ osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -110,7 +113,7 @@ { switch (event) { case E_VOICE: - osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); break; case E_FACCH: osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); @@ -126,7 +129,7 @@ { switch (event) { case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); + 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); @@ -152,6 +155,7 @@ void dtx_fsm_onset_v(struct osmo_fsm_inst *fi, uint32_t event, void *data) { switch (event) { + case E_SID_F: case E_SID_U: case E_VOICE: osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); @@ -169,6 +173,7 @@ void dtx_fsm_onset_f(struct osmo_fsm_inst *fi, uint32_t event, void *data) { switch (event) { + case E_SID_F: case E_SID_U: break; case E_VOICE: @@ -234,15 +239,15 @@ 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_FACCH) | X(ST_SID_F2) | X(ST_F1_INH) | X(ST_ONSET_V), + .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), .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), - .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_FACCH), + .in_event_mask = X(E_SID_U) | 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, }, @@ -258,23 +263,30 @@ incoming SPEECH or FACCH (only for AMR HR) */ [ST_U_INH]= { .in_event_mask = X(E_VOICE) | X(E_FACCH), - .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH), .name = "SID-UPDATE (Inh)", .action = dtx_fsm_u_inh, }, /* 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_FACCH) | X(ST_VOICE) | X(ST_U_INH) | X(ST_SID_U) | X(ST_ONSET_V), + .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", .action = dtx_fsm_sid_upd, }, /* ONSET - end of silent period due to incoming SPEECH frame */ [ST_ONSET_V]= { - .in_event_mask = X(E_VOICE) | X(E_FACCH), + .in_event_mask = X(E_SID_F) | X(E_SID_U) | X(E_VOICE) | X(E_FACCH), .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), .name = "ONSET (SPEECH)", .action = dtx_fsm_onset_v, + }, + /* ONSET - end of silent period due to incoming FACCH frame */ + [ST_ONSET_F]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH) | X(E_SID_U) | X(E_SID_F), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH), + .name = "ONSET (FACCH)", + .action = dtx_fsm_onset_f, }, /* FACCH sending state: SPEECH was observed before so once we're done FSM should get back to VOICE state */ @@ -296,6 +308,7 @@ const struct value_string dtx_dl_amr_fsm_event_names[] = { { E_VOICE, "Voice" }, + { E_ONSET, "ONSET" }, { E_FACCH, "FACCH" }, { E_COMPL, "Complete P1 -> P2" }, { E_INHIB, "Inhibit" }, diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 4b21366..6a07aa1 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -182,14 +182,15 @@ return 0; if (osmo_amr_is_speech(ft)) { - if (lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F1 || - lchan->tch.dtx.dl_amr_fsm->state == ST_SID_U) /* AMR HR */ - if (lchan->type == GSM_LCHAN_TCH_H && marker) - return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, - E_INHIB, - (void *)lchan); - /* AMR FR */ - if (marker && lchan->tch.dtx.dl_amr_fsm->state == ST_SID_U) + /* AMR HR - Inhibition */ + if (lchan->type == GSM_LCHAN_TCH_H && marker && + lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F1) + 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 )) 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, @@ -198,6 +199,9 @@ if (ft == AMR_SID) { dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, sti); + if (lchan->tch.dtx.dl_amr_fsm->state == ST_VOICE) + return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, + E_SID_F, (void *)lchan); return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, sti ? E_SID_U : E_SID_F, (void *)lchan); @@ -226,7 +230,8 @@ uint32_t dx26 = 120 * (fn - lchan->tch.dtx.fn); /* We're resuming after FACCH interruption */ - if (lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + if (lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH || + lchan->tch.dtx.dl_amr_fsm->state == ST_ONSET_F) { /* force STI bit to 0 so cache is treated as SID FIRST */ lchan->tch.dtx.cache[6 + 2] &= ~16; lchan->tch.dtx.is_update = false; diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index 795172b..0b1bad4 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -410,7 +410,7 @@ memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, lchan->tch.dtx.facch, msgb_l2len(msg)); else if (trx->bts->dtxd && lchan->tch.dtx.dl_amr_fsm && - lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + lchan->tch.dtx.dl_amr_fsm->state == ST_ONSET_F) { if (sapi == GsmL1_Sapi_FacchF) { sapi = GsmL1_Sapi_TchF; } diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index 70764f5..4337d68 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -328,8 +328,7 @@ return -EAGAIN; case ST_FACCH_V: case ST_FACCH: - /* FIXME: if this possible at all? */ - return 0; + return -EBADMSG; default: LOGP(DRTP, LOGL_ERROR, "Unhandled DTX DL AMR FSM state " "%d\n", lchan->tch.dtx.dl_amr_fsm->state); diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index f7585ce..51bde8b 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -405,7 +405,7 @@ memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, lchan->tch.dtx.facch, msgb_l2len(msg)); else if (trx->bts->dtxd && lchan->tch.dtx.dl_amr_fsm && - lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + lchan->tch.dtx.dl_amr_fsm->state == ST_ONSET_F) { if (sapi == GsmL1_Sapi_FacchF) { sapi = GsmL1_Sapi_TchF; } diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index fbb42b2..db5ca78 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -426,8 +426,7 @@ return -EAGAIN; case ST_FACCH_V: case ST_FACCH: - /* FIXME: if this possible at all? */ - return 0; + return -EBADMSG; default: LOGP(DRTP, LOGL_ERROR, "Unhandled DTX DL AMR FSM state " "%d\n", lchan->tch.dtx.dl_amr_fsm->state); -- To view, visit https://gerrit.osmocom.org/1175 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0e9033c5f169da46aed9a0d1295faff489778dcf Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri Oct 28 17:54:17 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 28 Oct 2016 17:54:17 +0000 Subject: osmo-bts[master]: DTX DL: add AMR HR support to scheduling check In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 -- To view, visit https://gerrit.osmocom.org/1174 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icce3178605f46bbf3cad15d4eaff18a4d164ad1a 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 Oct 28 17:54:27 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 28 Oct 2016 17:54:27 +0000 Subject: osmo-bts[master]: DTX fix ONSET handling In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 -- To view, visit https://gerrit.osmocom.org/1175 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0e9033c5f169da46aed9a0d1295faff489778dcf Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Oct 29 19:01:11 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 29 Oct 2016 19:01:11 +0000 Subject: openbsc[master]: ussd: Add band-aid for interrogationSS In-Reply-To: References: Message-ID: Patch Set 4: Normally I would just +2 and submit myself but I don't know if we still want that/do that. -- To view, visit https://gerrit.osmocom.org/503 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib0dc4485388f030eb172fe21f5327b7ab94751f5 Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Oct 29 19:01:42 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 29 Oct 2016 19:01:42 +0000 Subject: openbsc[master]: lchan: Release channel in case of late activation ack In-Reply-To: References: Message-ID: Patch Set 3: Neels. Please comment on Monday. I want to get it in. :) -- To view, visit https://gerrit.osmocom.org/713 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I63dc0deaf15ba7c21e20b1e0c7b85f0437e183ed Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Oct 29 19:37:59 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 29 Oct 2016 19:37:59 +0000 Subject: [PATCH] libosmocore[master]: bitcomp: Remove the t4 decoding from libosmocore Message-ID: Review at https://gerrit.osmocom.org/1176 bitcomp: Remove the t4 decoding from libosmocore As outlined 13.07.2016 the tree based approach in the PCU is magnitude more quick in decoding. Instead of having a slow one in the library and a quick one in the app, let's have a quick one in the app and at some point (after it has matured) move it to libosmocore. Execute the plan and remove t4_decode. Change-Id: I021424444625a097560d086c217c81eac4a5ee44 --- M include/osmocom/core/bitcomp.h M src/bitcomp.c M tests/bits/bitcomp_test.c M tests/bits/bitcomp_test.ok 4 files changed, 0 insertions(+), 151 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/76/1176/1 diff --git a/include/osmocom/core/bitcomp.h b/include/osmocom/core/bitcomp.h index 89eccbc..e87c0e1 100644 --- a/include/osmocom/core/bitcomp.h +++ b/include/osmocom/core/bitcomp.h @@ -37,6 +37,5 @@ int osmo_t4_encode(struct bitvec *bv); -int osmo_t4_decode(const struct bitvec *in, bool cc, struct bitvec *out); /*! @} */ diff --git a/src/bitcomp.c b/src/bitcomp.c index 8b3090e..9c01246 100644 --- a/src/bitcomp.c +++ b/src/bitcomp.c @@ -180,18 +180,10 @@ {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] = { { @@ -229,30 +221,6 @@ 0b011010100 } }; - -/*! \brief Attempt to decode compressed bit vector - * - * \return length of RLE according to modified ITU-T T.4 from TS 44.060 - * Table 9.1.10.2 or -1 if no applicable RLE found N. B: we need - * explicit bit length to make decoding unambiguous -*/ -static inline int t4_rle_term(unsigned w, bool b, unsigned bits) -{ - unsigned i; - for (i = 0; i < 64; i++) - if (w == t4_term[b][i] && bits == t4_term_length[b][i]) - return i; - return -1; -} - -static inline int t4_rle_makeup(unsigned w, bool b, unsigned bits) -{ - unsigned i; - for (i = 0; i < 15; i++) - if (w == t4_make_up[b][i] && bits == t4_make_up_length[b][i]) - return t4_make_up_ind[i]; - return -1; -} /*! \brief Make-up codes for a given length * @@ -337,102 +305,6 @@ } return bitvec_set_uint(bv, t4_term[b][len], t4_term_length[b][len]); -} - -enum dec_state { - EXPECT_TERM, - TOO_LONG, - NEED_MORE_BITS, - CORRUPT, - OK -}; - -static inline enum dec_state _t4_step(struct bitvec *v, uint16_t w, bool b, unsigned bits, bool term_only) -{ - if (bits > t4_max_make_up_length[b]) - return TOO_LONG; - if (bits < t4_min_term_length[b]) - return NEED_MORE_BITS; - - if (term_only) { - if (bits > t4_max_term_length[b]) - return CORRUPT; - int t = t4_rle_term(w, b, bits); - if (-1 != t) { - bitvec_fill(v, t, b ? ONE : ZERO); - return OK; - } - return NEED_MORE_BITS; - } - - int m = t4_rle_makeup(w, b, bits); - if (-1 != m) { - bitvec_fill(v, m, b ? ONE : ZERO); - return EXPECT_TERM; - } - - m = t4_rle_term(w, b, bits); - if (-1 != m) { - bitvec_fill(v, m, b ? ONE : ZERO); - return OK; - } - - return NEED_MORE_BITS; -} - -/*! \brief decode T4-encoded bit vector - * Assumes MSB first encoding. - * \param[in] in bit vector with encoded data - * \param[in] cc color code (whether decoding should start with 1 or 0) - * \param[out] out the bit vector to store result into - * \return 0 on success, negative value otherwise - */ -int osmo_t4_decode(const struct bitvec *in, bool cc, struct bitvec *out) -{ - uint8_t orig[in->data_len]; - struct bitvec vec; - vec.data = orig; - vec.data_len = in->data_len; - bitvec_zero(&vec); - memcpy(vec.data, in->data, in->data_len); - vec.cur_bit = in->cur_bit; - - /* init decoder using known color code: */ - unsigned bits = t4_min_term_length[cc]; - enum dec_state d; - int16_t w = bitvec_get_int16_msb(&vec, bits); - bool b = cc; - bool term_only = false; - - while (vec.cur_bit > 0) { - d = _t4_step(out, w, b, bits, term_only); - - switch (d) { - case EXPECT_TERM: - bitvec_shiftl(&vec, bits); - bits = t4_min_term_length[b]; - w = bitvec_get_int16_msb(&vec, bits); - term_only = true; - break; - case OK: - bitvec_shiftl(&vec, bits); - bits = t4_min_term_length[!b]; - w = bitvec_get_int16_msb(&vec, bits); - b = !b; - term_only = false; - break; - case NEED_MORE_BITS: - bits++; - w = bitvec_get_int16_msb(&vec, bits); - break; - case TOO_LONG: - return -E2BIG; - case CORRUPT: - return -EINVAL; - } - } - - return 0; } /*! \brief encode bit vector in-place using T4 encoding diff --git a/tests/bits/bitcomp_test.c b/tests/bits/bitcomp_test.c index f6895cf..587dd72 100644 --- a/tests/bits/bitcomp_test.c +++ b/tests/bits/bitcomp_test.c @@ -41,11 +41,6 @@ bitvec_set_uint(&bv, 4, 3); bitvec_to_string_r(&bv, lol); printf(" %s [%d]\n", lol, bv.cur_bit); - int d = osmo_t4_decode(&bv, 0, &out); - printf("\nDecoded:\n%d", d); - bitvec_to_string_r(&out, lol); - printf("%s [%d]\n", lol, out.cur_bit); - printf("Expected:\n 00110111 01000111 10000001 1111 \n"); printf("\nTEST2:\n 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000000 00\n"); bitvec_zero(&bv); @@ -54,13 +49,6 @@ bitvec_set_uint(&bv, 0xFFFFFC00, 26); bitvec_to_string_r(&bv, lol); printf("%s", lol); printf("\nEncoded:\n%d", osmo_t4_encode(&bv)); bitvec_to_string_r(&bv, lol); printf("%s", lol); printf(" [%d]\nExpected:\n1 11011101 01000001 00 [18]\n", bv.cur_bit); - - bitvec_zero(&out); - d = osmo_t4_decode(&bv, 1, &out); - printf("\nDecoded:\n%d", d); - bitvec_to_string_r(&out, lol); - printf("%s [%d]\n", lol, out.cur_bit); - printf("Expected:\n 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000000 00\n"); return 0; } diff --git a/tests/bits/bitcomp_test.ok b/tests/bits/bitcomp_test.ok index 238f3c4..d2ac16a 100644 --- a/tests/bits/bitcomp_test.ok +++ b/tests/bits/bitcomp_test.ok @@ -10,11 +10,6 @@ 0 11011110 10001000 01110101 01100101 100 [35] 11011110 10001000 01110101 01100101 100 [35] -Decoded: -0 00110111 01000111 10000001 1111 [28] -Expected: - 00110111 01000111 10000001 1111 - TEST2: 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000000 00 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000000 00 @@ -22,8 +17,3 @@ 1 11011101 01000001 00 [18] Expected: 1 11011101 01000001 00 [18] - -Decoded: -0 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000000 00 [90] -Expected: - 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000000 00 -- To view, visit https://gerrit.osmocom.org/1176 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I021424444625a097560d086c217c81eac4a5ee44 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Sat Oct 29 19:42:39 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 29 Oct 2016 19:42:39 +0000 Subject: libosmocore[master]: Add T.4 compression routines In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 Hi! Is there a test case for this routine as well? Code and commit message do not seem to match? -- 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: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: prasadkg Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Oct 29 19:44:12 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 29 Oct 2016 19:44:12 +0000 Subject: libosmocore[master]: utils/conv_gen.py: don't mix print and write() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 As a general comment please include a "why" in commit messages. It is clear that this helps with python3 support but is that the intention of the change? -- To view, visit https://gerrit.osmocom.org/1164 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5c8271d973f766aeb9cbcab30c4eddfdab54fcbb Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Oct 29 19:45:50 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 29 Oct 2016 19:45:50 +0000 Subject: libosmocore[master]: Add logging for FSM deallocation In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-2 (1 comment) Should have failed the ASAN test.. besides logging not being enabled for this region? Please see why this doesn't trigger an ASAN abort. https://gerrit.osmocom.org/#/c/1172/1/src/fsm.c File src/fsm.c: Line 240: LOGPFSM(fi, "Deallocated\n"); Use after free.. -- To view, visit https://gerrit.osmocom.org/1172 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7e5b55a1fff8e36cf61c7fb61d3e79c1f00e29d2 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat Oct 29 19:47:15 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 29 Oct 2016 19:47:15 +0000 Subject: libosmocore[master]: lapdm: Fix malformed Abis messages In-Reply-To: References: Message-ID: Patch Set 3: @Minh: Any update? Updating the testcase should be fairly simple! -- To view, visit https://gerrit.osmocom.org/266 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idbf43d4fdda6b2a6b4d8d15826735ce5f260ad89 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Oct 29 19:47:56 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 29 Oct 2016 19:47:56 +0000 Subject: osmo-pcu[master]: Fix: DL slot allocation based on direction configured In-Reply-To: References: Message-ID: Patch Set 7: Any comments? -- To view, visit https://gerrit.osmocom.org/819 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4b4a99194ccae68bb3417bce538d16e944d5ec71 Gerrit-PatchSet: 7 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: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Oct 29 19:48:23 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 29 Oct 2016 19:48:23 +0000 Subject: osmo-pcu[master]: Handle Timing Advance IE properly In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/552 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I786bf7fc999d401cc3d9e7f1e7a1fba953b5d458 Gerrit-PatchSet: 6 Gerrit-Project: osmo-pcu 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 Sat Oct 29 19:48:53 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 29 Oct 2016 19:48:53 +0000 Subject: osmo-pcu[master]: Handle Timing Advance IE properly In-Reply-To: References: Message-ID: Patch Set 6: I just wish we had a simple test framework that runs a download every night and records the (times).. -- To view, visit https://gerrit.osmocom.org/552 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I786bf7fc999d401cc3d9e7f1e7a1fba953b5d458 Gerrit-PatchSet: 6 Gerrit-Project: osmo-pcu 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 Sat Oct 29 19:51:20 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 29 Oct 2016 19:51:20 +0000 Subject: osmo-pcu[master]: Handle Timing Advance IE properly In-Reply-To: References: Message-ID: Patch Set 6: (1 comment) https://gerrit.osmocom.org/#/c/552/6/src/encoding.cpp File src/encoding.cpp: Line 270: uint8_t ta_ts = 0; /* FIXME: supply it as parameter from caller */ What is "ts" supposed to be here? -- To view, visit https://gerrit.osmocom.org/552 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I786bf7fc999d401cc3d9e7f1e7a1fba953b5d458 Gerrit-PatchSet: 6 Gerrit-Project: osmo-pcu 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 Sat Oct 29 19:55:02 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 29 Oct 2016 19:55:02 +0000 Subject: osmo-pcu[master]: Add BTS level counters In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (3 comments) Looks good. Thanks for adding many counters, some minor changes please. https://gerrit.osmocom.org/#/c/1167/1/src/tbf.cpp File src/tbf.cpp: Line 1004: bts->pkt_dl_assignemnt(); When is it NULL? Line 1079: bts->pkt_ul_assignment(); When is it NULL? https://gerrit.osmocom.org/#/c/1167/1/src/tbf_dl.cpp File src/tbf_dl.cpp: Line 652: coding_scheme = GprsCodingScheme::Scheme(cs); > separate function is preferred. yes -- To view, visit https://gerrit.osmocom.org/1167 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I605b0d66eb217decd35cbb8f87abfa577760245a Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: mrinal Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat Oct 29 20:02:27 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 29 Oct 2016 20:02:27 +0000 Subject: osmo-pcu[master]: EGPRS: fix for EPDAN out of window In-Reply-To: References: Message-ID: Patch Set 7: Code-Review-1 (3 comments) Looks good. Please comment on why not storing to unsigned right away? https://gerrit.osmocom.org/#/c/862/7/src/rlc.cpp File src/rlc.cpp: Line 109: uint16_t dist = distance(); store to "unsigned" directly? Line 110: unsigned num_blocks = rbb->cur_bit > (unsigned)dist avoid the cast here? https://gerrit.osmocom.org/#/c/862/7/src/tbf_dl.cpp File src/tbf_dl.cpp: Line 851: uint16_t distance = m_window.distance(); then store to unsigned int and stop cast? -- To view, visit https://gerrit.osmocom.org/862 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id07d178970f168f5389016c1eea31eb6b82057b6 Gerrit-PatchSet: 7 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat Oct 29 20:03:10 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 29 Oct 2016 20:03:10 +0000 Subject: osmo-pcu[master]: EGPRS: add test case to show EPDAN BSN out of window bug In-Reply-To: References: Message-ID: Patch Set 9: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/861 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If32b67f5c05707155281128b776a90a1e3d587b2 Gerrit-PatchSet: 9 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat Oct 29 20:04:27 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 29 Oct 2016 20:04:27 +0000 Subject: osmo-pcu[master]: Refactoring write_packet_ack_nack_desc_egprs to support CRBB In-Reply-To: References: Message-ID: Patch Set 4: Code-Review-1 Please drop the whitespace changes -- 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: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: prasadkg Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-Reviewer: prasadkg Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Oct 30 03:15:22 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Sun, 30 Oct 2016 03:15:22 +0000 Subject: [MERGED] osmo-pcu[master]: EGPRS: add test case to show EPDAN BSN out of window bug In-Reply-To: References: Message-ID: arvind.sirsikar has submitted this change and it was merged. Change subject: EGPRS: add test case to show EPDAN BSN out of window bug ...................................................................... EGPRS: add test case to show EPDAN BSN out of window bug This patch adds a test case test_tbf_epdan_out_of_rx_window, which expects a current bug with EPDAN for interpretation of the bitmap explained in section 9.1.8.2.4 in 44.060 version 7.27.0 Release 7. The specification explains that a bit within the uncompressed bitmap whose corresponding BSN is not within the transmit window shall be ignored. But current PCU implementation drops the EPDAN and does not update status of the BSN which are inside the window. The test's expectation is corrected along with the bug fix in a subsequent commit. Related: OS#1789 Change-Id: If32b67f5c05707155281128b776a90a1e3d587b2 --- M tests/tbf/TbfTest.cpp M tests/tbf/TbfTest.err M tests/tbf/TbfTest.ok 3 files changed, 140 insertions(+), 0 deletions(-) Approvals: arvind.sirsikar: Looks good to me, but someone else must approve; Verified Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index c716a55..8fb8bfe 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -26,6 +26,7 @@ #include "pcu_utils.h" #include "gprs_bssgp_pcu.h" #include "pcu_l1_if.h" +#include "decoding.h" extern "C" { #include "pcu_vty.h" @@ -2017,6 +2018,106 @@ printf("=== end %s ===\n", __func__); } +/* + * Test that a bit within the uncompressed bitmap whose BSN is not within + * the transmit window shall be ignored. See section 9.1.8.2.4 of 44.060 + * version 7.27.0 Release 7. + */ +static void test_tbf_epdan_out_of_rx_window(void) +{ + BTS the_bts; + gprs_rlcmac_bts *bts; + uint8_t ms_class = 11; + uint8_t egprs_ms_class = 11; + uint8_t trx_no; + uint32_t tlli = 0xffeeddcc; + gprs_rlcmac_dl_tbf *dl_tbf; + int ts_no = 4; + bitvec *block; + uint8_t bits_data[RLC_EGPRS_MAX_WS/8]; + bitvec bits; + int bsn_begin, bsn_end; + EGPRS_PD_AckNack_t *ack_nack; + RlcMacUplink_t ul_control_block; + gprs_rlc_v_b *prlcmvb; + gprs_rlc_dl_window *prlcdlwindow; + + printf("=== start %s ===\n", __func__); + + bts = the_bts.bts_data(); + + setup_bts(&the_bts, ts_no); + bts->dl_tbf_idle_msec = 200; + bts->egprs_enabled = 1; + /* ARQ II */ + bts->dl_arq_type = EGPRS_ARQ2; + + /* + * Simulate a message captured during over-the-air testing, + * where the following values were observed: + * v_a = 1176, vs = 1288, max sns = 2048, window size = 480. + */ + uint8_t data_msg[23] = {0x40, 0x20, 0x0b, 0xff, 0xd1, + 0x61, 0x00, 0x3e, 0x0e, 0x51, 0x9f, + 0xff, 0xff, 0xfb, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + + dl_tbf = create_dl_tbf(&the_bts, ms_class, egprs_ms_class, &trx_no); + dl_tbf->update_ms(tlli, GPRS_RLCMAC_DL_TBF); + prlcdlwindow = &dl_tbf->m_window; + prlcmvb = &prlcdlwindow->m_v_b; + prlcdlwindow->m_v_s = 1288; + prlcdlwindow->m_v_a = 1176; + prlcdlwindow->set_sns(2048); + prlcdlwindow->set_ws(480); + prlcmvb->mark_unacked(1176); + prlcmvb->mark_unacked(1177); + prlcmvb->mark_unacked(1286); + prlcmvb->mark_unacked(1287); + + OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_FLOW)); + + block = bitvec_alloc(23); + + bitvec_unpack(block, data_msg); + + bits.data = bits_data; + bits.data_len = sizeof(bits_data); + bits.cur_bit = 0; + + decode_gsm_rlcmac_uplink(block, &ul_control_block); + + ack_nack = &ul_control_block.u.Egprs_Packet_Downlink_Ack_Nack; + + OSMO_ASSERT(prlcmvb->is_unacked(1176)); + OSMO_ASSERT(prlcmvb->is_unacked(1177)); + OSMO_ASSERT(prlcmvb->is_unacked(1286)); + OSMO_ASSERT(prlcmvb->is_unacked(1287)); + + Decoding::decode_egprs_acknack_bits( + &ack_nack->EGPRS_AckNack.Desc, &bits, + &bsn_begin, &bsn_end, &dl_tbf->m_window); + + dl_tbf->rcvd_dl_ack( + ack_nack->EGPRS_AckNack.Desc.FINAL_ACK_INDICATION, + bsn_begin, &bits); + /* + * TODO:status of BSN:1176,1177 shall be invalid + * status of BSN:1286,1287 shall be acked. + * both condition fails because of existing bug. Which shall be + * fixed in subsequent commit + */ + + OSMO_ASSERT(prlcmvb->is_unacked(1176)); + OSMO_ASSERT(prlcmvb->is_unacked(1177)); + OSMO_ASSERT(prlcmvb->is_unacked(1286)); + OSMO_ASSERT(prlcmvb->is_unacked(1287)); + + bitvec_free(block); + tbf_free(dl_tbf); + printf("=== end %s ===\n", __func__); +} + static void test_tbf_egprs_two_phase_spb(void) { BTS the_bts; @@ -2695,6 +2796,7 @@ test_tbf_puan_urbb_len(); test_tbf_update_ws(); test_tbf_li_decoding(); + test_tbf_epdan_out_of_rx_window(); 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 8c6b78c..f8e6503 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -6478,3 +6478,39 @@ 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 +Searching for first unallocated TFI: TRX=0 + Found TFI=0. +********** TBF starts here ********** +Allocating DL 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 +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 5, because not enabled +- Skipping TS 6, because not enabled +- Skipping TS 7, because not enabled +- Assign downlink TS=4 TFI=0 +PDCH(TS 4, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS), 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 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 +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 +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge +- ack: (BSN=1176)"RRRRRRRRRRIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIRRRIRRRRRRRRRRRRRRRRRRRRRRRRRRI"(BSN=1288) R=ACK I=NACK +- ack range is out of V(A)..V(S) range TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Free TBF! +DL packet loss of IMSI= / TLLI=0xffeeddcc: 100% +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! +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 +********** TBF ends here ********** diff --git a/tests/tbf/TbfTest.ok b/tests/tbf/TbfTest.ok index eb870ea..2978d6d 100644 --- a/tests/tbf/TbfTest.ok +++ b/tests/tbf/TbfTest.ok @@ -66,3 +66,5 @@ === end test_tbf_update_ws === === start test_tbf_li_decoding === === end test_tbf_li_decoding === +=== start test_tbf_epdan_out_of_rx_window === +=== end test_tbf_epdan_out_of_rx_window === -- To view, visit https://gerrit.osmocom.org/861 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If32b67f5c05707155281128b776a90a1e3d587b2 Gerrit-PatchSet: 10 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar From gerrit-no-reply at lists.osmocom.org Sun Oct 30 03:30:37 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Sun, 30 Oct 2016 03:30:37 +0000 Subject: [PATCH] osmo-pcu[master]: EGPRS: fix for EPDAN out of window In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/862 to look at the new patch set (#8). EGPRS: fix for EPDAN out of window Fix alignment of EPDAN outside the RLC transmit window, according to section 9.1.8.2.4 in 44.060 version 7.27.0 Release 7. The specification explains that a bit within the uncompressed bitmap whose corresponding BSN is not within the transmit window shall be ignored. Without this fix PCU was dropping the EPDAN message and not updating the status of BSNs which are inside the RLC window. This patch updates the status of the BSNs which are inside the window and ignores the remaining bits. Related: OS#1789 Change-Id: Id07d178970f168f5389016c1eea31eb6b82057b6 --- M src/rlc.cpp M src/tbf_dl.cpp M tests/tbf/TbfTest.cpp M tests/tbf/TbfTest.err 4 files changed, 136 insertions(+), 36 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/62/862/8 diff --git a/src/rlc.cpp b/src/rlc.cpp index ee2635a..19fd3dc 100644 --- a/src/rlc.cpp +++ b/src/rlc.cpp @@ -105,7 +105,10 @@ uint16_t first_bsn, uint16_t *lost, uint16_t *received) { - unsigned num_blocks = rbb->cur_bit; + /* distance() is guaranteed to be positive because it does &mod_sns() */ + unsigned dist = (unsigned)distance(); + unsigned num_blocks = rbb->cur_bit > dist + ? dist : rbb->cur_bit; unsigned bsn; /* first_bsn is in range V(A)..V(S) */ diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index c89cd03..466ac35 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -847,6 +847,12 @@ unsigned received_packets = 0, lost_packets = 0; unsigned num_blocks = strlen(show_rbb); + /* distance() is guaranteed to be positive because it does &mod_sns() */ + unsigned distance = (unsigned)m_window.distance(); + + num_blocks = num_blocks > distance + ? distance : num_blocks; + /* SSN - 1 is in range V(A)..V(S)-1 */ for (unsigned int bitpos = 0; bitpos < num_blocks; bitpos++) { bool is_received; @@ -925,7 +931,10 @@ char show_rbb[RLC_MAX_SNS + 1]; int error_rate; struct ana_result ana_res; - unsigned num_blocks = rbb->cur_bit; + /* distance() is guaranteed to be positive because it does &mod_sns() */ + dist = m_window.distance(); + unsigned num_blocks = rbb->cur_bit > (unsigned)dist + ? dist : rbb->cur_bit; unsigned behind_last_bsn = m_window.mod_sns(first_bsn + num_blocks); Decoding::extract_rbb(rbb, show_rbb); @@ -933,25 +942,6 @@ LOGP(DRLCMACDL, LOGL_DEBUG, "- ack: (BSN=%d)\"%s\"" "(BSN=%d) R=ACK I=NACK\n", first_bsn, show_rbb, m_window.mod_sns(behind_last_bsn - 1)); - - /* apply received array to receive state (first_bsn..behind_last_bsn-1) */ - if (num_blocks > 0) { - /* calculate distance of ssn from V(S) */ - dist = m_window.mod_sns(m_window.v_s() - behind_last_bsn); - /* check if distance is less than distance V(A)..V(S) */ - if (dist >= m_window.distance()) { - /* this might happpen, if the downlink assignment - * was not received by ms and the ack refers - * to previous TBF - * FIXME: we should implement polling for - * control ack! - * TODO: check whether this FIXME still makes sense - */ - LOGP(DRLCMACDL, LOGL_NOTICE, "- ack range is out of " - "V(A)..V(S) range %s Free TBF!\n", tbf_name(this)); - return 1; /* indicate to free TBF */ - } - } error_rate = analyse_errors(show_rbb, behind_last_bsn, &ana_res); diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 8fb8bfe..cc48392 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -2101,17 +2101,11 @@ dl_tbf->rcvd_dl_ack( ack_nack->EGPRS_AckNack.Desc.FINAL_ACK_INDICATION, bsn_begin, &bits); - /* - * TODO:status of BSN:1176,1177 shall be invalid - * status of BSN:1286,1287 shall be acked. - * both condition fails because of existing bug. Which shall be - * fixed in subsequent commit - */ - OSMO_ASSERT(prlcmvb->is_unacked(1176)); - OSMO_ASSERT(prlcmvb->is_unacked(1177)); - OSMO_ASSERT(prlcmvb->is_unacked(1286)); - OSMO_ASSERT(prlcmvb->is_unacked(1287)); + OSMO_ASSERT(prlcmvb->is_invalid(1176)); + OSMO_ASSERT(prlcmvb->is_invalid(1177)); + OSMO_ASSERT(prlcmvb->is_acked(1286)); + OSMO_ASSERT(prlcmvb->is_acked(1287)); bitvec_free(block); tbf_free(dl_tbf); diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index f8e6503..fc3a113 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -446,7 +446,7 @@ Sending data request: trx=0 ts=4 sapi=5 arfcn=0 fn=91 block=9 data=07 00 28 0a 41 c6 c7 43 c0 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) downlink acknowledge - ack: (BSN=85)"RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR"(BSN=20) R=ACK I=NACK -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) DL analysis, range=0:21, lost=0, recv=21, skipped=0, bsn=127, info='RRRRRRRRRRRRRRRRRRRRR$..........................................' +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) DL analysis, range=0:21, lost=0, recv=21, skipped=0, bsn=0, info='RRRRRRRRRRRRRRRRRRRRR...........................................' - got ack for BSN=20 - got ack for BSN=19 - got ack for BSN=18 @@ -485,7 +485,7 @@ Sending data request: trx=0 ts=4 sapi=5 arfcn=0 fn=95 block=10 data=07 00 2a 4d 43 c0 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) downlink acknowledge - ack: (BSN=86)"RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR"(BSN=21) R=ACK I=NACK -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) DL analysis, range=21:22, lost=0, recv=1, skipped=0, bsn=20, info='R$..............................................................' +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) DL analysis, range=21:22, lost=0, recv=1, skipped=0, bsn=21, info='R...............................................................' - got ack for BSN=21 - V(B): (V(A)=22)""(V(S)-1=21) A=Acked N=Nacked U=Unacked X=Resend-Unacked I=Invalid Scheduling data message at RTS for DL TFI=0 (TRX=0, TS=4) prio=4 @@ -6504,9 +6504,122 @@ 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 TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink acknowledge -- ack: (BSN=1176)"RRRRRRRRRRIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIRRRIRRRRRRRRRRRRRRRRRRRRRRRRRRI"(BSN=1288) R=ACK I=NACK -- ack range is out of V(A)..V(S) range TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Free TBF! -DL packet loss of IMSI= / TLLI=0xffeeddcc: 100% +- 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................................................................................................................................................................................................................................................................................................................................................................................' +- got ack for BSN=1176 +- got ack for BSN=1177 +- got ack for BSN=1178 +- got ack for BSN=1179 +- got ack for BSN=1180 +- got ack for BSN=1181 +- got ack for BSN=1182 +- got ack for BSN=1183 +- got ack for BSN=1184 +- got ack for BSN=1185 +- got NACK for BSN=1186 +- got NACK for BSN=1187 +- got NACK for BSN=1188 +- got NACK for BSN=1189 +- got NACK for BSN=1190 +- got NACK for BSN=1191 +- got NACK for BSN=1192 +- got NACK for BSN=1193 +- got NACK for BSN=1194 +- got NACK for BSN=1195 +- got NACK for BSN=1196 +- got NACK for BSN=1197 +- got NACK for BSN=1198 +- got NACK for BSN=1199 +- got NACK for BSN=1200 +- got NACK for BSN=1201 +- got NACK for BSN=1202 +- got NACK for BSN=1203 +- got NACK for BSN=1204 +- got NACK for BSN=1205 +- got NACK for BSN=1206 +- got NACK for BSN=1207 +- got NACK for BSN=1208 +- got NACK for BSN=1209 +- got NACK for BSN=1210 +- got NACK for BSN=1211 +- got NACK for BSN=1212 +- got NACK for BSN=1213 +- got NACK for BSN=1214 +- got NACK for BSN=1215 +- got NACK for BSN=1216 +- got NACK for BSN=1217 +- got NACK for BSN=1218 +- got NACK for BSN=1219 +- got NACK for BSN=1220 +- got NACK for BSN=1221 +- got NACK for BSN=1222 +- got NACK for BSN=1223 +- got NACK for BSN=1224 +- got NACK for BSN=1225 +- got NACK for BSN=1226 +- got NACK for BSN=1227 +- got NACK for BSN=1228 +- got NACK for BSN=1229 +- got NACK for BSN=1230 +- got NACK for BSN=1231 +- got NACK for BSN=1232 +- got NACK for BSN=1233 +- got NACK for BSN=1234 +- got NACK for BSN=1235 +- got NACK for BSN=1236 +- got NACK for BSN=1237 +- got NACK for BSN=1238 +- got NACK for BSN=1239 +- got NACK for BSN=1240 +- got NACK for BSN=1241 +- got NACK for BSN=1242 +- got NACK for BSN=1243 +- got NACK for BSN=1244 +- got NACK for BSN=1245 +- got NACK for BSN=1246 +- got NACK for BSN=1247 +- got NACK for BSN=1248 +- got NACK for BSN=1249 +- got NACK for BSN=1250 +- got NACK for BSN=1251 +- got NACK for BSN=1252 +- got NACK for BSN=1253 +- got NACK for BSN=1254 +- got NACK for BSN=1255 +- got NACK for BSN=1256 +- got NACK for BSN=1257 +- got ack for BSN=1258 +- got ack for BSN=1259 +- got ack for BSN=1260 +- got NACK for BSN=1261 +- got ack for BSN=1262 +- got ack for BSN=1263 +- got ack for BSN=1264 +- got ack for BSN=1265 +- got ack for BSN=1266 +- got ack for BSN=1267 +- got ack for BSN=1268 +- got ack for BSN=1269 +- got ack for BSN=1270 +- got ack for BSN=1271 +- got ack for BSN=1272 +- got ack for BSN=1273 +- got ack for BSN=1274 +- got ack for BSN=1275 +- got ack for BSN=1276 +- got ack for BSN=1277 +- got ack for BSN=1278 +- got ack for BSN=1279 +- got ack for BSN=1280 +- got ack for BSN=1281 +- got ack for BSN=1282 +- got ack for BSN=1283 +- got ack for BSN=1284 +- got ack for BSN=1285 +- got ack for BSN=1286 +- got ack for BSN=1287 +- V(B): (V(A)=1186)"NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNAAANAAAAAAAAAAAAAAAAAAAAAAAAAA"(V(S)-1=1287) A=Acked N=Nacked U=Unacked X=Resend-Unacked I=Invalid +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! -- To view, visit https://gerrit.osmocom.org/862 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id07d178970f168f5389016c1eea31eb6b82057b6 Gerrit-PatchSet: 8 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar From gerrit-no-reply at lists.osmocom.org Sun Oct 30 03:32:30 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Sun, 30 Oct 2016 03:32:30 +0000 Subject: osmo-pcu[master]: EGPRS: fix for EPDAN out of window In-Reply-To: References: Message-ID: Patch Set 8: (3 comments) https://gerrit.osmocom.org/#/c/862/7/src/rlc.cpp File src/rlc.cpp: Line 109: unsigned dist = (unsigned)distance(); > store to "unsigned" directly? Done Line 110: unsigned num_blocks = rbb->cur_bit > dist > avoid the cast here? Done https://gerrit.osmocom.org/#/c/862/7/src/tbf_dl.cpp File src/tbf_dl.cpp: Line 851: unsigned distance = (unsigned)m_window.distance(); > then store to unsigned int and stop cast? Done -- To view, visit https://gerrit.osmocom.org/862 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id07d178970f168f5389016c1eea31eb6b82057b6 Gerrit-PatchSet: 8 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sun Oct 30 03:33:34 2016 From: gerrit-no-reply at lists.osmocom.org (arvind.sirsikar) Date: Sun, 30 Oct 2016 03:33:34 +0000 Subject: osmo-pcu[master]: EGPRS: fix for EPDAN out of window In-Reply-To: References: Message-ID: Patch Set 8: Holger, I have modified the patch as per your recommendation. Please check -- To view, visit https://gerrit.osmocom.org/862 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id07d178970f168f5389016c1eea31eb6b82057b6 Gerrit-PatchSet: 8 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: arvind.sirsikar Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: arvind.sirsikar Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Oct 30 04:40:08 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 30 Oct 2016 04:40:08 +0000 Subject: [PATCH] libosmocore[master]: utils/conv_gen.py: use shared tables if possible In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1173 to look at the new patch set (#2). utils/conv_gen.py: use shared tables if possible This change introduces the memory usage optimization, mentioned in d2d9760c08f35a231d32f0ebeb73b2927e5573b3. The aim is to make code generator able to detect, whether the same tables are used by several convolutional code definitions, and prevent one from writing these tables multiple times. For now, the detection process isn't fully automatic, so all shared polynomials should be placed inside the 'shared_polys' dictionary, for example: shared_polys = { "xcch" : [ ( G0, 1 ), ( G1, 1 ), ], "mcs" : [ ( G4, 1 ), ( G7, 1 ), ( G5, 1 ), ], } Change-Id: I84760f5cdfdaece376b801d2e6cb2954ee875a3b --- M utils/conv_gen.py 1 file changed, 61 insertions(+), 37 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/73/1173/2 diff --git a/utils/conv_gen.py b/utils/conv_gen.py index 78b2335..b277252 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -163,7 +163,7 @@ # Up to 12 numbers should be placed per line print_formatted(self.puncture, "%3d, ", 12, fi) - def gen_tables(self, pref, fi): + def print_state_and_output(self, fi): pack = lambda n: \ sum([x << (self.rate_inv - i - 1) for i, x in enumerate(n)]) num_states = 1 << (self.k - 1) @@ -185,6 +185,14 @@ self._print_term(fi, num_states, pack) fi.write("};\n\n") + def gen_tables(self, pref, fi, shared_tables = False): + # Do not print shared tables + if not shared_tables: + self.print_state_and_output(fi) + table_pref = self.name + else: + table_pref = shared_tables + if len(self.puncture): fi.write("static const int %s_puncture[] = {\n" % self.name) self._print_puncture(fi) @@ -202,15 +210,15 @@ fi.write("\t.N = %d,\n" % self.rate_inv) fi.write("\t.K = %d,\n" % self.k) fi.write("\t.len = %d,\n" % self.block_len) - fi.write("\t.next_output = %s_output,\n" % self.name) - fi.write("\t.next_state = %s_state,\n" % self.name) + fi.write("\t.next_output = %s_output,\n" % table_pref) + fi.write("\t.next_state = %s_state,\n" % table_pref) if self.term_type is not None: fi.write("\t.term = %s,\n" % self.term_type) if self.recursive: - fi.write("\t.next_term_output = %s_term_output,\n" % self.name) - fi.write("\t.next_term_state = %s_term_state,\n" % self.name) + fi.write("\t.next_term_output = %s_term_output,\n" % table_pref) + fi.write("\t.next_term_state = %s_term_state,\n" % table_pref) if len(self.puncture): fi.write("\t.puncture = %s_puncture,\n" % self.name) @@ -238,6 +246,12 @@ fi.write("\n") +def print_shared(fi): + for (name, polys) in shared_polys.items(): + # HACK + code = ConvolutionalCode(0, polys, name = name) + code.print_state_and_output(fi) + # Polynomials according to 3GPP TS 05.03 Annex B G0 = poly(0, 3, 4) G1 = poly(0, 1, 3, 4) @@ -248,22 +262,23 @@ G6 = poly(0, 1, 2, 3, 4, 6) G7 = poly(0, 1, 2, 3, 6) -CCH_poly = [ - ( G0, 1 ), - ( G1, 1 ), -] - -MCS_poly = [ - ( G4, 1 ), - ( G7, 1 ), - ( G5, 1 ), -] +shared_polys = { + "xcch" : [ + ( G0, 1 ), + ( G1, 1 ), + ], + "mcs" : [ + ( G4, 1 ), + ( G7, 1 ), + ( G5, 1 ), + ], +} conv_codes = [ # xCCH definition ConvolutionalCode( 224, - CCH_poly, + shared_polys["xcch"], name = "xcch", description = [ "xCCH convolutional code:", @@ -276,7 +291,7 @@ # RACH definition ConvolutionalCode( 14, - CCH_poly, + shared_polys["xcch"], name = "rach", description = ["RACH convolutional code"] ), @@ -284,7 +299,7 @@ # SCH definition ConvolutionalCode( 35, - CCH_poly, + shared_polys["xcch"], name = "sch", description = ["SCH convolutional code"] ), @@ -292,7 +307,7 @@ # CS2 definition ConvolutionalCode( 290, - CCH_poly, + shared_polys["xcch"], puncture = [ 15, 19, 23, 27, 31, 35, 43, 47, 51, 55, 59, 63, 67, 71, 75, 79, 83, 91, 95, 99, 103, 107, 111, 115, 119, 123, 127, 131, @@ -316,7 +331,7 @@ # CS3 definition ConvolutionalCode( 334, - CCH_poly, + shared_polys["xcch"], puncture = [ 15, 17, 21, 23, 27, 29, 33, 35, 39, 41, 45, 47, 51, 53, 57, 59, 63, 65, 69, 71, 75, 77, 81, 83, 87, 89, 93, 95, @@ -578,7 +593,7 @@ # TCH_FR definition ConvolutionalCode( 185, - CCH_poly, + shared_polys["xcch"], name = "tch_fr", description = ["TCH/F convolutional code"] ), @@ -723,7 +738,7 @@ # EDGE MCS1_DL_HDR definition ConvolutionalCode( 36, - MCS_poly, + shared_polys["mcs"], name = "mcs1_dl_hdr", term_type = "CONV_TERM_TAIL_BITING", description = [ @@ -738,7 +753,7 @@ # EDGE MCS1_UL_HDR definition ConvolutionalCode( 39, - MCS_poly, + shared_polys["mcs"], name = "mcs1_ul_hdr", term_type = "CONV_TERM_TAIL_BITING", description = [ @@ -753,7 +768,7 @@ # EDGE MCS1 definition ConvolutionalCode( 190, - MCS_poly, + shared_polys["mcs"], name = "mcs1", description = [ "EDGE MCS-1 data convolutional code:", @@ -767,7 +782,7 @@ # EDGE MCS2 definition ConvolutionalCode( 238, - MCS_poly, + shared_polys["mcs"], name = "mcs2", description = [ "EDGE MCS-2 data convolutional code:", @@ -781,7 +796,7 @@ # EDGE MCS3 definition ConvolutionalCode( 310, - MCS_poly, + shared_polys["mcs"], name = "mcs3", description = [ "EDGE MCS-3 data convolutional code:", @@ -795,7 +810,7 @@ # EDGE MCS4 definition ConvolutionalCode( 366, - MCS_poly, + shared_polys["mcs"], name = "mcs4", description = [ "EDGE MCS-4 data convolutional code:", @@ -809,7 +824,7 @@ # EDGE MCS5_DL_HDR definition ConvolutionalCode( 33, - MCS_poly, + shared_polys["mcs"], name = "mcs5_dl_hdr", term_type = "CONV_TERM_TAIL_BITING", description = [ @@ -824,7 +839,7 @@ # EDGE MCS5_UL_HDR definition ConvolutionalCode( 45, - MCS_poly, + shared_polys["mcs"], name = "mcs5_ul_hdr", term_type = "CONV_TERM_TAIL_BITING", description = [ @@ -839,7 +854,7 @@ # EDGE MCS5 definition ConvolutionalCode( 462, - MCS_poly, + shared_polys["mcs"], name = "mcs5", description = [ "EDGE MCS-5 data convolutional code:", @@ -853,7 +868,7 @@ # EDGE MCS6 definition ConvolutionalCode( 606, - MCS_poly, + shared_polys["mcs"], name = "mcs6", description = [ "EDGE MCS-6 data convolutional code:", @@ -867,7 +882,7 @@ # EDGE MCS7_DL_HDR definition ConvolutionalCode( 45, - MCS_poly, + shared_polys["mcs"], name = "mcs7_dl_hdr", term_type = "CONV_TERM_TAIL_BITING", description = [ @@ -882,7 +897,7 @@ # EDGE MCS7_UL_HDR definition ConvolutionalCode( 54, - MCS_poly, + shared_polys["mcs"], name = "mcs7_ul_hdr", term_type = "CONV_TERM_TAIL_BITING", description = [ @@ -897,7 +912,7 @@ # EDGE MCS7 definition ConvolutionalCode( 462, - MCS_poly, + shared_polys["mcs"], name = "mcs7", description = [ "EDGE MCS-7 data convolutional code:", @@ -911,7 +926,7 @@ # EDGE MCS8 definition ConvolutionalCode( 558, - MCS_poly, + shared_polys["mcs"], name = "mcs8", description = [ "EDGE MCS-8 data convolutional code:", @@ -925,7 +940,7 @@ # EDGE MCS9 definition ConvolutionalCode( 606, - MCS_poly, + shared_polys["mcs"], name = "mcs9", description = [ "EDGE MCS-9 data convolutional code:", @@ -948,10 +963,19 @@ f.write(mod_license + "\n") f.write("#include \n") f.write("#include \n\n") + print_shared(f) # Generate the tables one by one for code in conv_codes: sys.stderr.write("Generate '%s' definition\n" % code.name) - code.gen_tables(prefix, f) + + # Check whether shared polynomials are used + shared = False + for (name, polys) in shared_polys.items(): + if code.polys == polys: + shared = name + break + + code.gen_tables(prefix, f, shared_tables = shared) sys.stderr.write("Generation complete.\n") -- To view, visit https://gerrit.osmocom.org/1173 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I84760f5cdfdaece376b801d2e6cb2954ee875a3b Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt From gerrit-no-reply at lists.osmocom.org Sun Oct 30 04:51:31 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 30 Oct 2016 04:51:31 +0000 Subject: libosmocore[master]: utils/conv_gen.py: don't mix print and write() In-Reply-To: References: Message-ID: Patch Set 1: > As a general comment please include a "why" in commit messages. It > is clear that this helps with python3 support but is that the > intention of the change? Right, it helps with python3 support, but it wasn't a primary aim. There is also a problem with reduce(), which have to be imported manually in python3. So, this change is mostly code style change. I see two ways: 1) Leave this change as is (extending commit message), and import reduce() inside a new change like "enable python3 support". 2) Change the commit name to "enable python3 support", and import reduce exactly here. What do you think? -- To view, visit https://gerrit.osmocom.org/1164 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5c8271d973f766aeb9cbcab30c4eddfdab54fcbb Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Oct 30 05:00:16 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sun, 30 Oct 2016 05:00:16 +0000 Subject: libosmocore[master]: utils/conv_gen.py: use shared tables if possible In-Reply-To: References: Message-ID: Patch Set 2: > Build Failed > > http://jenkins.osmocom.org/jenkins/job/libosmocore-gerrit/360/ : > FAILURE Restart test please. -- To view, visit https://gerrit.osmocom.org/1173 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I84760f5cdfdaece376b801d2e6cb2954ee875a3b Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Oct 30 21:28:12 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 30 Oct 2016 21:28:12 +0000 Subject: [MERGED] openbsc[master]: info log: iu: add line break to and tweak rx RAB Ass Resp log In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: info log: iu: add line break to and tweak rx RAB Ass Resp log ...................................................................... info log: iu: add line break to and tweak rx RAB Ass Resp log Change-Id: I50e701493f3951a43506cc37753a30d47f8d601f --- M openbsc/src/libiu/iu.c 1 file changed, 2 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/libiu/iu.c b/openbsc/src/libiu/iu.c index 837385e..87a02d8 100644 --- a/openbsc/src/libiu/iu.c +++ b/openbsc/src/libiu/iu.c @@ -411,7 +411,8 @@ { int rc = -1; - LOGP(DRANAP, LOGL_INFO, "RAB Asignment Response:"); + LOGP(DRANAP, LOGL_INFO, + "Rx RAB Assignment Response for UE conn_id %u\n", ctx->conn_id); if (ies->presenceMask & RAB_ASSIGNMENTRESPONSEIES_RANAP_RAB_SETUPORMODIFIEDLIST_PRESENT) { /* TODO: Iterate over list of SetupOrModifiedList IEs and handle each one */ RANAP_IE_t *ranap_ie = ies->raB_SetupOrModifiedList.raB_SetupOrModifiedList_ies.list.array[0]; @@ -427,8 +428,6 @@ ranap_free_rab_setupormodifieditemies(&setup_ies); } - - LOGPC(DRANAP, LOGL_INFO, "\n"); return rc; } -- To view, visit https://gerrit.osmocom.org/1122 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I50e701493f3951a43506cc37753a30d47f8d601f Gerrit-PatchSet: 2 Gerrit-Project: openbsc 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 Sun Oct 30 21:37:25 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 30 Oct 2016 21:37:25 +0000 Subject: libosmocore[master]: bitcomp: Remove the t4 decoding from libosmocore In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 (1 comment) assuming that no-one out there is using it from libosmocore... https://gerrit.osmocom.org/#/c/1176/1//COMMIT_MSG Commit Message: Line 10: is magnitude more quick in decoding. Instead of having a "is faster by order of magnitudes" -- To view, visit https://gerrit.osmocom.org/1176 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I021424444625a097560d086c217c81eac4a5ee44 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sun Oct 30 21:40:14 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 30 Oct 2016 21:40:14 +0000 Subject: openbsc[master]: ussd: Add band-aid for interrogationSS In-Reply-To: References: Message-ID: Patch Set 4: > Normally I would just +2 and submit myself but I don't know if we > still want that/do that. Do you mean to imply that none of my comments above (10-13 14:16) are valid? -- To view, visit https://gerrit.osmocom.org/503 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib0dc4485388f030eb172fe21f5327b7ab94751f5 Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Oct 30 21:47:54 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 30 Oct 2016 21:47:54 +0000 Subject: openbsc[master]: gsm_subscriber_connection: mark BSC specific items In-Reply-To: References: Message-ID: Patch Set 4: > wouldn't it make sense to introduce a sub-structure like 'struct { > ...} bsc' to clearly mark those parts as bsc-specific? So far I didn't get around to it, but I've had a separation of BSC and MSC gsm_subscriber_connection on my to-do list for a long time now. Actually my plan was to have completely distinct structs in the two libs. The idea of these markings is to make the separating patch more readable; the separating patch itself still needs to be written. -- To view, visit https://gerrit.osmocom.org/1142 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib9666225fb9bfec2cf1e364343560571869fe6a7 Gerrit-PatchSet: 4 Gerrit-Project: openbsc 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 Sun Oct 30 22:00:24 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 30 Oct 2016 22:00:24 +0000 Subject: openbsc[master]: Attempt at extending dynamic PDCH support to Ericcson RBS2000 In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-2 Ah, no, you picked the wrong dyn_ts function. The rsl_ipacc_ functions are marked ipacc for a reason: they are about the ip.access way of activating dynamic channels. The ip.access channels are only TCH/F_PDCH, and ip.access invented a non-standard RSL message to de/activate PDCH. Instead, you want the "fully dynamic" channel type which we called "Osmocom style dyn TS", which extends the RSL Chan Activ message to add a PDCH channel type to the cbits, as well as a PDCH specific Channel Activation Type IE value. It looks like you duplicated this extension which is already present. You want to use the TCH/F_TCH/H_PDCH pchan type, which was actually designed to follow the way Ericsson does dyn TS. See * GSM_PCHAN_TCH_F_TCH_H_PDCH * rsl_chan_activate_lchan() at "if (act_type == RSL_ACT_OSMO_PDCH) {" * rsl_chan_activate_lchan_as_pdch(), which should in fact compose a message compatible to Ericsson hardware. If this is not compatible to Ericsson, we should make it so, including any changes that might be necessary in osmo-bts. We should probably have talked about this beforehand. Sorry about that... The two different kinds of dyn TS are definitely confusing if you don't know about them, and an intro would have been helpful. -- To view, visit https://gerrit.osmocom.org/1155 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I48089fcf8328d52f57e97b003790ffdeed766367 Gerrit-PatchSet: 2 Gerrit-Project: openbsc 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 Sun Oct 30 22:06:38 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 30 Oct 2016 22:06:38 +0000 Subject: openbsc[master]: Attempt at extending dynamic PDCH support to Ericcson RBS2000 In-Reply-To: References: Message-ID: Patch Set 2: In short, all of this should already be implemented by simply using the TCH/F_TCH/H_PDCH pchan type in the nitb.conf (code should only be adjusted in case it doesn't work with Ericsson HW yet). -- To view, visit https://gerrit.osmocom.org/1155 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I48089fcf8328d52f57e97b003790ffdeed766367 Gerrit-PatchSet: 2 Gerrit-Project: openbsc 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 Sun Oct 30 22:08:15 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 30 Oct 2016 22:08:15 +0000 Subject: openbsc[master]: abis_rsl: Add mandatory IE for Ericsson RBS2000 PDCH activation In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-2 duplicates RSL_ACT_OSMO_PDCH, see rsl_chan_activate_lchan_as_pdch() -- To view, visit https://gerrit.osmocom.org/1157 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I53bad674d3bb02f5210e71ca5b4280be9c956a57 Gerrit-PatchSet: 2 Gerrit-Project: openbsc 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 Sun Oct 30 22:11:18 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 30 Oct 2016 22:11:18 +0000 Subject: libosmocore[master]: utils/conv_gen.py: don't mix print and write() In-Reply-To: References: Message-ID: Patch Set 1: The pedantic way would be two separate commits, and if both help with py3, also mention py3 in both commit logs. We probably wouldn't block it if you had both in the same commit, either. -- To view, visit https://gerrit.osmocom.org/1164 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5c8271d973f766aeb9cbcab30c4eddfdab54fcbb Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Oct 30 22:15:08 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 30 Oct 2016 22:15:08 +0000 Subject: libosmocore[master]: utils/conv_gen.py: use shared tables if possible In-Reply-To: References: Message-ID: Patch Set 2: which name are you unsure about? shared_polys seems a pretty good choice to me. -- To view, visit https://gerrit.osmocom.org/1173 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I84760f5cdfdaece376b801d2e6cb2954ee875a3b Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Oct 30 22:16:29 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 30 Oct 2016 22:16:29 +0000 Subject: [PATCH] libosmocore[master]: bitcomp: Remove the t4 decoding from 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/1176 to look at the new patch set (#2). bitcomp: Remove the t4 decoding from libosmocore As outlined by mail on the 13th of July the tree based approach to decoding in the PCU is faster by order of magnitudes. Instead of having a slow implementation in the library and a quick one in the PCU, let's only have a quick one in the PCU and at some point in the future move it to libosmocore. Execute the plan and remove t4_decode. Change-Id: I021424444625a097560d086c217c81eac4a5ee44 --- M include/osmocom/core/bitcomp.h M src/bitcomp.c M tests/bits/bitcomp_test.c M tests/bits/bitcomp_test.ok 4 files changed, 0 insertions(+), 151 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/76/1176/2 diff --git a/include/osmocom/core/bitcomp.h b/include/osmocom/core/bitcomp.h index 89eccbc..e87c0e1 100644 --- a/include/osmocom/core/bitcomp.h +++ b/include/osmocom/core/bitcomp.h @@ -37,6 +37,5 @@ int osmo_t4_encode(struct bitvec *bv); -int osmo_t4_decode(const struct bitvec *in, bool cc, struct bitvec *out); /*! @} */ diff --git a/src/bitcomp.c b/src/bitcomp.c index 8b3090e..9c01246 100644 --- a/src/bitcomp.c +++ b/src/bitcomp.c @@ -180,18 +180,10 @@ {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] = { { @@ -229,30 +221,6 @@ 0b011010100 } }; - -/*! \brief Attempt to decode compressed bit vector - * - * \return length of RLE according to modified ITU-T T.4 from TS 44.060 - * Table 9.1.10.2 or -1 if no applicable RLE found N. B: we need - * explicit bit length to make decoding unambiguous -*/ -static inline int t4_rle_term(unsigned w, bool b, unsigned bits) -{ - unsigned i; - for (i = 0; i < 64; i++) - if (w == t4_term[b][i] && bits == t4_term_length[b][i]) - return i; - return -1; -} - -static inline int t4_rle_makeup(unsigned w, bool b, unsigned bits) -{ - unsigned i; - for (i = 0; i < 15; i++) - if (w == t4_make_up[b][i] && bits == t4_make_up_length[b][i]) - return t4_make_up_ind[i]; - return -1; -} /*! \brief Make-up codes for a given length * @@ -337,102 +305,6 @@ } return bitvec_set_uint(bv, t4_term[b][len], t4_term_length[b][len]); -} - -enum dec_state { - EXPECT_TERM, - TOO_LONG, - NEED_MORE_BITS, - CORRUPT, - OK -}; - -static inline enum dec_state _t4_step(struct bitvec *v, uint16_t w, bool b, unsigned bits, bool term_only) -{ - if (bits > t4_max_make_up_length[b]) - return TOO_LONG; - if (bits < t4_min_term_length[b]) - return NEED_MORE_BITS; - - if (term_only) { - if (bits > t4_max_term_length[b]) - return CORRUPT; - int t = t4_rle_term(w, b, bits); - if (-1 != t) { - bitvec_fill(v, t, b ? ONE : ZERO); - return OK; - } - return NEED_MORE_BITS; - } - - int m = t4_rle_makeup(w, b, bits); - if (-1 != m) { - bitvec_fill(v, m, b ? ONE : ZERO); - return EXPECT_TERM; - } - - m = t4_rle_term(w, b, bits); - if (-1 != m) { - bitvec_fill(v, m, b ? ONE : ZERO); - return OK; - } - - return NEED_MORE_BITS; -} - -/*! \brief decode T4-encoded bit vector - * Assumes MSB first encoding. - * \param[in] in bit vector with encoded data - * \param[in] cc color code (whether decoding should start with 1 or 0) - * \param[out] out the bit vector to store result into - * \return 0 on success, negative value otherwise - */ -int osmo_t4_decode(const struct bitvec *in, bool cc, struct bitvec *out) -{ - uint8_t orig[in->data_len]; - struct bitvec vec; - vec.data = orig; - vec.data_len = in->data_len; - bitvec_zero(&vec); - memcpy(vec.data, in->data, in->data_len); - vec.cur_bit = in->cur_bit; - - /* init decoder using known color code: */ - unsigned bits = t4_min_term_length[cc]; - enum dec_state d; - int16_t w = bitvec_get_int16_msb(&vec, bits); - bool b = cc; - bool term_only = false; - - while (vec.cur_bit > 0) { - d = _t4_step(out, w, b, bits, term_only); - - switch (d) { - case EXPECT_TERM: - bitvec_shiftl(&vec, bits); - bits = t4_min_term_length[b]; - w = bitvec_get_int16_msb(&vec, bits); - term_only = true; - break; - case OK: - bitvec_shiftl(&vec, bits); - bits = t4_min_term_length[!b]; - w = bitvec_get_int16_msb(&vec, bits); - b = !b; - term_only = false; - break; - case NEED_MORE_BITS: - bits++; - w = bitvec_get_int16_msb(&vec, bits); - break; - case TOO_LONG: - return -E2BIG; - case CORRUPT: - return -EINVAL; - } - } - - return 0; } /*! \brief encode bit vector in-place using T4 encoding diff --git a/tests/bits/bitcomp_test.c b/tests/bits/bitcomp_test.c index f6895cf..587dd72 100644 --- a/tests/bits/bitcomp_test.c +++ b/tests/bits/bitcomp_test.c @@ -41,11 +41,6 @@ bitvec_set_uint(&bv, 4, 3); bitvec_to_string_r(&bv, lol); printf(" %s [%d]\n", lol, bv.cur_bit); - int d = osmo_t4_decode(&bv, 0, &out); - printf("\nDecoded:\n%d", d); - bitvec_to_string_r(&out, lol); - printf("%s [%d]\n", lol, out.cur_bit); - printf("Expected:\n 00110111 01000111 10000001 1111 \n"); printf("\nTEST2:\n 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000000 00\n"); bitvec_zero(&bv); @@ -54,13 +49,6 @@ bitvec_set_uint(&bv, 0xFFFFFC00, 26); bitvec_to_string_r(&bv, lol); printf("%s", lol); printf("\nEncoded:\n%d", osmo_t4_encode(&bv)); bitvec_to_string_r(&bv, lol); printf("%s", lol); printf(" [%d]\nExpected:\n1 11011101 01000001 00 [18]\n", bv.cur_bit); - - bitvec_zero(&out); - d = osmo_t4_decode(&bv, 1, &out); - printf("\nDecoded:\n%d", d); - bitvec_to_string_r(&out, lol); - printf("%s [%d]\n", lol, out.cur_bit); - printf("Expected:\n 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000000 00\n"); return 0; } diff --git a/tests/bits/bitcomp_test.ok b/tests/bits/bitcomp_test.ok index 238f3c4..d2ac16a 100644 --- a/tests/bits/bitcomp_test.ok +++ b/tests/bits/bitcomp_test.ok @@ -10,11 +10,6 @@ 0 11011110 10001000 01110101 01100101 100 [35] 11011110 10001000 01110101 01100101 100 [35] -Decoded: -0 00110111 01000111 10000001 1111 [28] -Expected: - 00110111 01000111 10000001 1111 - TEST2: 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000000 00 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000000 00 @@ -22,8 +17,3 @@ 1 11011101 01000001 00 [18] Expected: 1 11011101 01000001 00 [18] - -Decoded: -0 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000000 00 [90] -Expected: - 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 00000000 00 -- To view, visit https://gerrit.osmocom.org/1176 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I021424444625a097560d086c217c81eac4a5ee44 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun Oct 30 22:16:34 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 30 Oct 2016 22:16:34 +0000 Subject: libosmocore[master]: bitcomp: Remove the t4 decoding from libosmocore In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/1176/1//COMMIT_MSG Commit Message: Line 10: decoding in the PCU is faster by order of magnitudes. Instead of having > "is faster by order of magnitudes" plural? -- To view, visit https://gerrit.osmocom.org/1176 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I021424444625a097560d086c217c81eac4a5ee44 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore 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 Sun Oct 30 22:17:25 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 30 Oct 2016 22:17:25 +0000 Subject: openbsc[master]: ussd: Add band-aid for interrogationSS In-Reply-To: References: Message-ID: Patch Set 4: > Do you mean to imply that none of my comments above (10-13 14:16) > are valid? No, I simply didn't see/remember them when seeing this change has no score. Feel free to -1 in the future. -- To view, visit https://gerrit.osmocom.org/503 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib0dc4485388f030eb172fe21f5327b7ab94751f5 Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Oct 30 22:22:28 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 30 Oct 2016 22:22:28 +0000 Subject: libosmocore[master]: bitcomp: Remove the t4 decoding from libosmocore In-Reply-To: References: Message-ID: Patch Set 2: > plural? right, sorry, "by order of magnitude" -- To view, visit https://gerrit.osmocom.org/1176 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I021424444625a097560d086c217c81eac4a5ee44 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther 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 Sun Oct 30 22:29:57 2016 From: gerrit-no-reply at lists.osmocom.org (tnt) Date: Sun, 30 Oct 2016 22:29:57 +0000 Subject: libosmocore[master]: utils/conv_gen.py: don't mix print and write() In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/1164 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5c8271d973f766aeb9cbcab30c4eddfdab54fcbb Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun Oct 30 22:32:58 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 30 Oct 2016 22:32:58 +0000 Subject: openbsc[master]: ussd: Add band-aid for interrogationSS In-Reply-To: References: Message-ID: Patch Set 4: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/503/4/openbsc/src/libmsc/ussd.c File openbsc/src/libmsc/ussd.c: Line 61: if (req.ussd_text[0] == '\0') { > I see in decode_ussd_request this code: Good catch... -- To view, visit https://gerrit.osmocom.org/503 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib0dc4485388f030eb172fe21f5327b7ab94751f5 Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sun Oct 30 22:36:10 2016 From: gerrit-no-reply at lists.osmocom.org (tnt) Date: Sun, 30 Oct 2016 22:36:10 +0000 Subject: libosmocore[master]: utils/conv_gen.py: use shared tables if possible In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 (2 comments) https://gerrit.osmocom.org/#/c/1173/2/utils/conv_gen.py File utils/conv_gen.py: Line 188: def gen_tables(self, pref, fi, shared_tables = False): Default to None and not 'False'. If you set a default to False, it kind of implies it's a boolean, which it is not. Then use 'shared_tables is None' or 'shared_tables is not None' to test. Line 973: shared = False Again 'False' vs 'None' -- To view, visit https://gerrit.osmocom.org/1173 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I84760f5cdfdaece376b801d2e6cb2954ee875a3b Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Oct 31 00:30:45 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 31 Oct 2016 00:30:45 +0000 Subject: [PATCH] openbsc[master]: lchan: Release channel in case of late activation ack In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/713 to look at the new patch set (#4). lchan: Release channel in case of late activation ack In case of the sysmoBTS and receiving a channel activation ack on a channel that was marked as broken, release it again. Use a normal release without SACCH deactivation and release the rqd_ta data. Cosmetic: add local variable 'ts' to shorten some lines. Tweaked-By: nhofmeyr Change-Id: I63dc0deaf15ba7c21e20b1e0c7b85f0437e183ed --- M openbsc/src/libbsc/abis_rsl.c 1 file changed, 20 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/13/713/4 diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c index 9656961..d963b6b 100644 --- a/openbsc/src/libbsc/abis_rsl.c +++ b/openbsc/src/libbsc/abis_rsl.c @@ -1175,6 +1175,7 @@ { struct abis_rsl_dchan_hdr *rslh = msgb_l2(msg); struct gsm_lchan *lchan = msg->lchan; + struct gsm_bts_trx_ts *ts = lchan->ts; /* BTS has confirmed channel activation, we now need * to assign the activated channel to the MS */ @@ -1184,8 +1185,24 @@ osmo_timer_del(&lchan->act_timer); if (lchan->state == LCHAN_S_BROKEN) { - LOGP(DRSL, LOGL_NOTICE, "%s CHAN ACT ACK for broken channel.\n", - gsm_lchan_name(lchan)); + int do_release = is_sysmobts_v2(ts->trx->bts); + LOGP(DRSL, LOGL_NOTICE, "%s CHAN ACT ACK for broken channel. %s\n", + gsm_lchan_name(lchan), + do_release ? "Releasing it" : "Keeping it broken"); + if (do_release) { + talloc_free(lchan->rqd_ref); + lchan->rqd_ref = NULL; + lchan->rqd_ta = 0; + rsl_lchan_set_state(msg->lchan, LCHAN_S_ACTIVE); + if (ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH) { + /* Make sure that rsl_rx_rf_chan_rel_ack() + * will switch back to PDCH: */ + if (ts->dyn.pchan_is == GSM_PCHAN_PDCH) + ts->dyn.pchan_is = GSM_PCHAN_NONE; + ts->dyn.pchan_want = GSM_PCHAN_NONE; + } + rsl_rf_chan_release(msg->lchan, 0, SACCH_NONE); + } return 0; } @@ -1195,7 +1212,7 @@ gsm_lchans_name(lchan->state)); rsl_lchan_set_state(lchan, LCHAN_S_ACTIVE); - if (lchan->ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH) + if (ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH) dyn_ts_switchover_complete(lchan); if (lchan->rqd_ref) { -- To view, visit https://gerrit.osmocom.org/713 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I63dc0deaf15ba7c21e20b1e0c7b85f0437e183ed Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 31 00:36:59 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 31 Oct 2016 00:36:59 +0000 Subject: openbsc[master]: lchan: Release channel in case of late activation ack In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+1 tested with sysmobts and TCH/F_TCH/H_PDCH timeslots: patch set 3 ended up never re-activating PDCH, so tweaked the patch as outlined in my long comment, which turns out to be correct. Also some cosmetic tweaks: * name the flag 'do_release' instead of 'do_free'. * say 'Releasing' with 'ing' to match rsl_rx_rf_chan_rel_ack(). * use local 'ts' var. BTW, the IPACC style dyn TS should work as well because a PDCH act is sent from rsl_rx_rf_chan_rel_ack(). Of course with any other BTS type than sysmobts, these situations will always result in a permanently broken lchan. -- To view, visit https://gerrit.osmocom.org/713 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I63dc0deaf15ba7c21e20b1e0c7b85f0437e183ed Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Oct 31 00:40:23 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 31 Oct 2016 00:40:23 +0000 Subject: openbsc[master]: lchan: Release channel in case of late activation ack In-Reply-To: References: Message-ID: Patch Set 4: and, btw, tested by hacking a chan act ack delay for TCH/H into osmo-bts, see osmo-bts branch neels/delay_tch_h_act_ack -- To view, visit https://gerrit.osmocom.org/713 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I63dc0deaf15ba7c21e20b1e0c7b85f0437e183ed Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Oct 31 07:15:20 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Mon, 31 Oct 2016 07:15:20 +0000 Subject: openbsc[master]: Attempt at extending dynamic PDCH support to Ericcson RBS2000 In-Reply-To: References: Message-ID: Patch Set 2: -Code-Review > Ah, no, you picked the wrong dyn_ts function. The rsl_ipacc_ > functions are marked ipacc for a reason: they are about the > ip.access way of activating dynamic channels. Pleaes note that this patch was written in early July, when your work regarding osmocom dynamic TS didn't exist yet. So the patch allows us to activate PDCH on the Ericsson RBS2k for now, but needs to be re-written to fit into the new architecture. I'll leave it to Philipp and you to convert it to the "new style". You can probably do the patch very quickly, and Philipp can quickly verify the results on the RBS. -- To view, visit https://gerrit.osmocom.org/1155 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I48089fcf8328d52f57e97b003790ffdeed766367 Gerrit-PatchSet: 2 Gerrit-Project: openbsc 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 Oct 31 09:23:51 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 31 Oct 2016 09:23:51 +0000 Subject: openbsc[master]: Attempt at extending dynamic PDCH support to Ericcson RBS2000 In-Reply-To: References: Message-ID: Patch Set 2: > Pleaes note that this patch was written in early July, when your > work regarding osmocom dynamic TS didn't exist yet. Ah, that changes the perspective, thanks :) Yes, I can integrate this, no problem, and will then ask pmaier to test. Let me know whether you want this in master for the time being, and I'll remove my -2. -- To view, visit https://gerrit.osmocom.org/1155 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I48089fcf8328d52f57e97b003790ffdeed766367 Gerrit-PatchSet: 2 Gerrit-Project: openbsc 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 Oct 31 13:05:06 2016 From: gerrit-no-reply at lists.osmocom.org (Minh-Quang Nguyen) Date: Mon, 31 Oct 2016 13:05:06 +0000 Subject: libosmocore[master]: lapdm: Fix malformed Abis messages In-Reply-To: References: Message-ID: Patch Set 3: > @Minh: Any update? Updating the testcase should be fairly simple! Hi Harald, Since I have been assigned to work in an urgent task, I will look into updating the test case for this bug and inform you later. -- To view, visit https://gerrit.osmocom.org/266 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idbf43d4fdda6b2a6b4d8d15826735ce5f260ad89 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Minh-Quang Nguyen Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Minh-Quang Nguyen Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Oct 31 13:10:56 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 31 Oct 2016 13:10:56 +0000 Subject: libosmocore[master]: utils/conv_gen.py: use shared tables if possible In-Reply-To: References: Message-ID: Patch Set 2: > which name are you unsure about? shared_polys seems a pretty good > choice to me. Neels, about the print_state_and_output(). -- To view, visit https://gerrit.osmocom.org/1173 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I84760f5cdfdaece376b801d2e6cb2954ee875a3b Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon Oct 31 13:13:47 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 31 Oct 2016 13:13:47 +0000 Subject: openbsc[master]: lchan: Release channel in case of late activation ack In-Reply-To: References: Message-ID: Patch Set 4: (1 comment) https://gerrit.osmocom.org/#/c/713/4/openbsc/src/libbsc/abis_rsl.c File openbsc/src/libbsc/abis_rsl.c: Line 1197: if (ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH) { Why not call dyn_ts_switchover_complete(lchan)? shouldn't it put the lchan in the same state as the successful activation? -- To view, visit https://gerrit.osmocom.org/713 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I63dc0deaf15ba7c21e20b1e0c7b85f0437e183ed Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Oct 31 13:16:41 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Mon, 31 Oct 2016 13:16:41 +0000 Subject: [PATCH] libosmocore[master]: utils/conv_gen.py: use shared tables if possible In-Reply-To: References: Message-ID: Hello tnt, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1173 to look at the new patch set (#3). utils/conv_gen.py: use shared tables if possible This change introduces the memory usage optimization, mentioned in d2d9760c08f35a231d32f0ebeb73b2927e5573b3. The aim is to make code generator able to detect, whether the same tables are used by several convolutional code definitions, and prevent one from writing these tables multiple times. For now, the detection process isn't fully automatic, so all shared polynomials should be placed inside the 'shared_polys' dictionary, for example: shared_polys = { "xcch" : [ ( G0, 1 ), ( G1, 1 ), ], "mcs" : [ ( G4, 1 ), ( G7, 1 ), ( G5, 1 ), ], } Change-Id: I84760f5cdfdaece376b801d2e6cb2954ee875a3b --- M utils/conv_gen.py 1 file changed, 61 insertions(+), 37 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/73/1173/3 diff --git a/utils/conv_gen.py b/utils/conv_gen.py index 78b2335..1284db3 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -163,7 +163,7 @@ # Up to 12 numbers should be placed per line print_formatted(self.puncture, "%3d, ", 12, fi) - def gen_tables(self, pref, fi): + def print_state_and_output(self, fi): pack = lambda n: \ sum([x << (self.rate_inv - i - 1) for i, x in enumerate(n)]) num_states = 1 << (self.k - 1) @@ -185,6 +185,14 @@ self._print_term(fi, num_states, pack) fi.write("};\n\n") + def gen_tables(self, pref, fi, shared_tables = None): + # Do not print shared tables + if shared_tables is None: + self.print_state_and_output(fi) + table_pref = self.name + else: + table_pref = shared_tables + if len(self.puncture): fi.write("static const int %s_puncture[] = {\n" % self.name) self._print_puncture(fi) @@ -202,15 +210,15 @@ fi.write("\t.N = %d,\n" % self.rate_inv) fi.write("\t.K = %d,\n" % self.k) fi.write("\t.len = %d,\n" % self.block_len) - fi.write("\t.next_output = %s_output,\n" % self.name) - fi.write("\t.next_state = %s_state,\n" % self.name) + fi.write("\t.next_output = %s_output,\n" % table_pref) + fi.write("\t.next_state = %s_state,\n" % table_pref) if self.term_type is not None: fi.write("\t.term = %s,\n" % self.term_type) if self.recursive: - fi.write("\t.next_term_output = %s_term_output,\n" % self.name) - fi.write("\t.next_term_state = %s_term_state,\n" % self.name) + fi.write("\t.next_term_output = %s_term_output,\n" % table_pref) + fi.write("\t.next_term_state = %s_term_state,\n" % table_pref) if len(self.puncture): fi.write("\t.puncture = %s_puncture,\n" % self.name) @@ -238,6 +246,12 @@ fi.write("\n") +def print_shared(fi): + for (name, polys) in shared_polys.items(): + # HACK + code = ConvolutionalCode(0, polys, name = name) + code.print_state_and_output(fi) + # Polynomials according to 3GPP TS 05.03 Annex B G0 = poly(0, 3, 4) G1 = poly(0, 1, 3, 4) @@ -248,22 +262,23 @@ G6 = poly(0, 1, 2, 3, 4, 6) G7 = poly(0, 1, 2, 3, 6) -CCH_poly = [ - ( G0, 1 ), - ( G1, 1 ), -] - -MCS_poly = [ - ( G4, 1 ), - ( G7, 1 ), - ( G5, 1 ), -] +shared_polys = { + "xcch" : [ + ( G0, 1 ), + ( G1, 1 ), + ], + "mcs" : [ + ( G4, 1 ), + ( G7, 1 ), + ( G5, 1 ), + ], +} conv_codes = [ # xCCH definition ConvolutionalCode( 224, - CCH_poly, + shared_polys["xcch"], name = "xcch", description = [ "xCCH convolutional code:", @@ -276,7 +291,7 @@ # RACH definition ConvolutionalCode( 14, - CCH_poly, + shared_polys["xcch"], name = "rach", description = ["RACH convolutional code"] ), @@ -284,7 +299,7 @@ # SCH definition ConvolutionalCode( 35, - CCH_poly, + shared_polys["xcch"], name = "sch", description = ["SCH convolutional code"] ), @@ -292,7 +307,7 @@ # CS2 definition ConvolutionalCode( 290, - CCH_poly, + shared_polys["xcch"], puncture = [ 15, 19, 23, 27, 31, 35, 43, 47, 51, 55, 59, 63, 67, 71, 75, 79, 83, 91, 95, 99, 103, 107, 111, 115, 119, 123, 127, 131, @@ -316,7 +331,7 @@ # CS3 definition ConvolutionalCode( 334, - CCH_poly, + shared_polys["xcch"], puncture = [ 15, 17, 21, 23, 27, 29, 33, 35, 39, 41, 45, 47, 51, 53, 57, 59, 63, 65, 69, 71, 75, 77, 81, 83, 87, 89, 93, 95, @@ -578,7 +593,7 @@ # TCH_FR definition ConvolutionalCode( 185, - CCH_poly, + shared_polys["xcch"], name = "tch_fr", description = ["TCH/F convolutional code"] ), @@ -723,7 +738,7 @@ # EDGE MCS1_DL_HDR definition ConvolutionalCode( 36, - MCS_poly, + shared_polys["mcs"], name = "mcs1_dl_hdr", term_type = "CONV_TERM_TAIL_BITING", description = [ @@ -738,7 +753,7 @@ # EDGE MCS1_UL_HDR definition ConvolutionalCode( 39, - MCS_poly, + shared_polys["mcs"], name = "mcs1_ul_hdr", term_type = "CONV_TERM_TAIL_BITING", description = [ @@ -753,7 +768,7 @@ # EDGE MCS1 definition ConvolutionalCode( 190, - MCS_poly, + shared_polys["mcs"], name = "mcs1", description = [ "EDGE MCS-1 data convolutional code:", @@ -767,7 +782,7 @@ # EDGE MCS2 definition ConvolutionalCode( 238, - MCS_poly, + shared_polys["mcs"], name = "mcs2", description = [ "EDGE MCS-2 data convolutional code:", @@ -781,7 +796,7 @@ # EDGE MCS3 definition ConvolutionalCode( 310, - MCS_poly, + shared_polys["mcs"], name = "mcs3", description = [ "EDGE MCS-3 data convolutional code:", @@ -795,7 +810,7 @@ # EDGE MCS4 definition ConvolutionalCode( 366, - MCS_poly, + shared_polys["mcs"], name = "mcs4", description = [ "EDGE MCS-4 data convolutional code:", @@ -809,7 +824,7 @@ # EDGE MCS5_DL_HDR definition ConvolutionalCode( 33, - MCS_poly, + shared_polys["mcs"], name = "mcs5_dl_hdr", term_type = "CONV_TERM_TAIL_BITING", description = [ @@ -824,7 +839,7 @@ # EDGE MCS5_UL_HDR definition ConvolutionalCode( 45, - MCS_poly, + shared_polys["mcs"], name = "mcs5_ul_hdr", term_type = "CONV_TERM_TAIL_BITING", description = [ @@ -839,7 +854,7 @@ # EDGE MCS5 definition ConvolutionalCode( 462, - MCS_poly, + shared_polys["mcs"], name = "mcs5", description = [ "EDGE MCS-5 data convolutional code:", @@ -853,7 +868,7 @@ # EDGE MCS6 definition ConvolutionalCode( 606, - MCS_poly, + shared_polys["mcs"], name = "mcs6", description = [ "EDGE MCS-6 data convolutional code:", @@ -867,7 +882,7 @@ # EDGE MCS7_DL_HDR definition ConvolutionalCode( 45, - MCS_poly, + shared_polys["mcs"], name = "mcs7_dl_hdr", term_type = "CONV_TERM_TAIL_BITING", description = [ @@ -882,7 +897,7 @@ # EDGE MCS7_UL_HDR definition ConvolutionalCode( 54, - MCS_poly, + shared_polys["mcs"], name = "mcs7_ul_hdr", term_type = "CONV_TERM_TAIL_BITING", description = [ @@ -897,7 +912,7 @@ # EDGE MCS7 definition ConvolutionalCode( 462, - MCS_poly, + shared_polys["mcs"], name = "mcs7", description = [ "EDGE MCS-7 data convolutional code:", @@ -911,7 +926,7 @@ # EDGE MCS8 definition ConvolutionalCode( 558, - MCS_poly, + shared_polys["mcs"], name = "mcs8", description = [ "EDGE MCS-8 data convolutional code:", @@ -925,7 +940,7 @@ # EDGE MCS9 definition ConvolutionalCode( 606, - MCS_poly, + shared_polys["mcs"], name = "mcs9", description = [ "EDGE MCS-9 data convolutional code:", @@ -948,10 +963,19 @@ f.write(mod_license + "\n") f.write("#include \n") f.write("#include \n\n") + print_shared(f) # Generate the tables one by one for code in conv_codes: sys.stderr.write("Generate '%s' definition\n" % code.name) - code.gen_tables(prefix, f) + + # Check whether shared polynomials are used + shared = None + for (name, polys) in shared_polys.items(): + if code.polys == polys: + shared = name + break + + code.gen_tables(prefix, f, shared_tables = shared) sys.stderr.write("Generation complete.\n") -- To view, visit https://gerrit.osmocom.org/1173 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I84760f5cdfdaece376b801d2e6cb2954ee875a3b Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: tnt From gerrit-no-reply at lists.osmocom.org Mon Oct 31 13:26:38 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 31 Oct 2016 13:26:38 +0000 Subject: [PATCH] openbsc[master]: ussd: Add band-aid for interrogationSS In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/503 to look at the new patch set (#5). ussd: Add band-aid for interrogationSS This is a speculative change for interrogateSS and by not answering the request the radio connection would remain open long. The SS/USSD code is from a time where none of knew much about GSM. We do not support SS but should reject it. We have checked for an empty string in the text field to guess if it is a result/release to not send more information. The right way forward is to decode the ASN1 into the fields REQUEST/RESULT(last). Fix an issue and make the code worse. Assume ss_code > 0 to see if this is a interrogate invoke. The issue is that code 0 is a well defined value but unlikely to be used. MAP ASN1 definition: SS-Code ::= OCTET STRING (SIZE (1)) -- This type is used to represent the code identifying a single -- supplementary service, a group of supplementary services, or -- all supplementary services. The services and abbreviations -- used are defined in TS 3GPP TS 22.004 [5]. The internal structure is -- defined as follows: -- -- bits 87654321: group (bits 8765), and specific service -- (bits 4321) allSS SS-Code ::= '00000000'B Change-Id: Ib0dc4485388f030eb172fe21f5327b7ab94751f5 --- M openbsc/include/openbsc/gsm_04_80.h M openbsc/src/libmsc/gsm_04_80.c M openbsc/src/libmsc/ussd.c 3 files changed, 20 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/03/503/5 diff --git a/openbsc/include/openbsc/gsm_04_80.h b/openbsc/include/openbsc/gsm_04_80.h index 0a60652..74701ac 100644 --- a/openbsc/include/openbsc/gsm_04_80.h +++ b/openbsc/include/openbsc/gsm_04_80.h @@ -9,10 +9,10 @@ int gsm0480_send_ussd_response(struct gsm_subscriber_connection *conn, const struct msgb *in_msg, const char* response_text, - const struct ussd_request *req); + const struct ss_request *req); int gsm0480_send_ussd_reject(struct gsm_subscriber_connection *conn, const struct msgb *msg, - const struct ussd_request *request); + const struct ss_request *request); int gsm0480_send_ussdNotify(struct gsm_subscriber_connection *conn, int level, const char *text); int gsm0480_send_releaseComplete(struct gsm_subscriber_connection *conn); diff --git a/openbsc/src/libmsc/gsm_04_80.c b/openbsc/src/libmsc/gsm_04_80.c index f1d75f2..1744455 100644 --- a/openbsc/src/libmsc/gsm_04_80.c +++ b/openbsc/src/libmsc/gsm_04_80.c @@ -63,7 +63,7 @@ /* Send response to a mobile-originated ProcessUnstructuredSS-Request */ int gsm0480_send_ussd_response(struct gsm_subscriber_connection *conn, const struct msgb *in_msg, const char *response_text, - const struct ussd_request *req) + const struct ss_request *req) { struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 USSD RSP"); struct gsm48_hdr *gh; @@ -111,7 +111,7 @@ int gsm0480_send_ussd_reject(struct gsm_subscriber_connection *conn, const struct msgb *in_msg, - const struct ussd_request *req) + const struct ss_request *req) { struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 USSD REJ"); struct gsm48_hdr *gh; diff --git a/openbsc/src/libmsc/ussd.c b/openbsc/src/libmsc/ussd.c index 7f01eae..fccf38f 100644 --- a/openbsc/src/libmsc/ussd.c +++ b/openbsc/src/libmsc/ussd.c @@ -38,19 +38,19 @@ const char USSD_TEXT_OWN_NUMBER[] = "*#100#"; /* Forward declarations of network-specific handler functions */ -static int send_own_number(struct gsm_subscriber_connection *conn, const struct msgb *msg, const struct ussd_request *req); +static int send_own_number(struct gsm_subscriber_connection *conn, const struct msgb *msg, const struct ss_request *req); /* Entrypoint - handler function common to all mobile-originated USSDs */ int handle_rcv_ussd(struct gsm_subscriber_connection *conn, struct msgb *msg) { int rc; - struct ussd_request req; + struct ss_request req; struct gsm48_hdr *gh; memset(&req, 0, sizeof(req)); gh = msgb_l3(msg); - rc = gsm0480_decode_ussd_request(gh, msgb_l3len(msg), &req); + 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); @@ -58,15 +58,23 @@ return rc; } - /* Release-Complete */ - if (req.text[0] == '\0') + /* Interrogation or releaseComplete? */ + if (req.ussd_text[0] == '\0' || req.ussd_text[0] = 0xFF) { + 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 */ return 0; + } - if (!strcmp(USSD_TEXT_OWN_NUMBER, (const char *)req.text)) { + if (!strcmp(USSD_TEXT_OWN_NUMBER, (const char *)req.ussd_text)) { DEBUGP(DMM, "USSD: Own number requested\n"); rc = send_own_number(conn, msg, &req); } else { - DEBUGP(DMM, "Unhandled USSD %s\n", req.text); + DEBUGP(DMM, "Unhandled USSD %s\n", req.ussd_text); rc = gsm0480_send_ussd_reject(conn, msg, &req); } @@ -76,7 +84,7 @@ } /* A network-specific handler function */ -static int send_own_number(struct gsm_subscriber_connection *conn, const struct msgb *msg, const struct ussd_request *req) +static int send_own_number(struct gsm_subscriber_connection *conn, const struct msgb *msg, const struct ss_request *req) { char *own_number = conn->subscr->extension; char response_string[GSM_EXTENSION_LENGTH + 20]; -- To view, visit https://gerrit.osmocom.org/503 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib0dc4485388f030eb172fe21f5327b7ab94751f5 Gerrit-PatchSet: 5 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 31 14:14:32 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 31 Oct 2016 14:14:32 +0000 Subject: [PATCH] openbsc[master]: ussd: Add band-aid for interrogationSS In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/503 to look at the new patch set (#6). ussd: Add band-aid for interrogationSS This is a speculative change for interrogateSS and by not answering the request the radio connection would remain open long. The SS/USSD code is from a time where none of knew much about GSM. We do not support SS but should reject it. We have checked for an empty string in the text field to guess if it is a result/release to not send more information. The right way forward is to decode the ASN1 into the fields REQUEST/RESULT(last). Fix an issue and make the code worse. Assume ss_code > 0 to see if this is a interrogate invoke. The issue is that code 0 is a well defined value but unlikely to be used. MAP ASN1 definition: SS-Code ::= OCTET STRING (SIZE (1)) -- This type is used to represent the code identifying a single -- supplementary service, a group of supplementary services, or -- all supplementary services. The services and abbreviations -- used are defined in TS 3GPP TS 22.004 [5]. The internal structure is -- defined as follows: -- -- bits 87654321: group (bits 8765), and specific service -- (bits 4321) allSS SS-Code ::= '00000000'B Change-Id: Ib0dc4485388f030eb172fe21f5327b7ab94751f5 --- M openbsc/include/openbsc/gsm_04_80.h M openbsc/src/libmsc/gsm_04_80.c M openbsc/src/libmsc/ussd.c 3 files changed, 20 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/03/503/6 diff --git a/openbsc/include/openbsc/gsm_04_80.h b/openbsc/include/openbsc/gsm_04_80.h index 0a60652..74701ac 100644 --- a/openbsc/include/openbsc/gsm_04_80.h +++ b/openbsc/include/openbsc/gsm_04_80.h @@ -9,10 +9,10 @@ int gsm0480_send_ussd_response(struct gsm_subscriber_connection *conn, const struct msgb *in_msg, const char* response_text, - const struct ussd_request *req); + const struct ss_request *req); int gsm0480_send_ussd_reject(struct gsm_subscriber_connection *conn, const struct msgb *msg, - const struct ussd_request *request); + const struct ss_request *request); int gsm0480_send_ussdNotify(struct gsm_subscriber_connection *conn, int level, const char *text); int gsm0480_send_releaseComplete(struct gsm_subscriber_connection *conn); diff --git a/openbsc/src/libmsc/gsm_04_80.c b/openbsc/src/libmsc/gsm_04_80.c index f1d75f2..1744455 100644 --- a/openbsc/src/libmsc/gsm_04_80.c +++ b/openbsc/src/libmsc/gsm_04_80.c @@ -63,7 +63,7 @@ /* Send response to a mobile-originated ProcessUnstructuredSS-Request */ int gsm0480_send_ussd_response(struct gsm_subscriber_connection *conn, const struct msgb *in_msg, const char *response_text, - const struct ussd_request *req) + const struct ss_request *req) { struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 USSD RSP"); struct gsm48_hdr *gh; @@ -111,7 +111,7 @@ int gsm0480_send_ussd_reject(struct gsm_subscriber_connection *conn, const struct msgb *in_msg, - const struct ussd_request *req) + const struct ss_request *req) { struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 USSD REJ"); struct gsm48_hdr *gh; diff --git a/openbsc/src/libmsc/ussd.c b/openbsc/src/libmsc/ussd.c index 7f01eae..f12c1f2 100644 --- a/openbsc/src/libmsc/ussd.c +++ b/openbsc/src/libmsc/ussd.c @@ -38,19 +38,19 @@ const char USSD_TEXT_OWN_NUMBER[] = "*#100#"; /* Forward declarations of network-specific handler functions */ -static int send_own_number(struct gsm_subscriber_connection *conn, const struct msgb *msg, const struct ussd_request *req); +static int send_own_number(struct gsm_subscriber_connection *conn, const struct msgb *msg, const struct ss_request *req); /* Entrypoint - handler function common to all mobile-originated USSDs */ int handle_rcv_ussd(struct gsm_subscriber_connection *conn, struct msgb *msg) { int rc; - struct ussd_request req; + struct ss_request req; struct gsm48_hdr *gh; memset(&req, 0, sizeof(req)); gh = msgb_l3(msg); - rc = gsm0480_decode_ussd_request(gh, msgb_l3len(msg), &req); + 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); @@ -58,15 +58,23 @@ return rc; } - /* Release-Complete */ - if (req.text[0] == '\0') + /* Interrogation or releaseComplete? */ + if (req.ussd_text[0] == '\0' || req.ussd_text[0] == 0xFF) { + 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 */ return 0; + } - if (!strcmp(USSD_TEXT_OWN_NUMBER, (const char *)req.text)) { + if (!strcmp(USSD_TEXT_OWN_NUMBER, (const char *)req.ussd_text)) { DEBUGP(DMM, "USSD: Own number requested\n"); rc = send_own_number(conn, msg, &req); } else { - DEBUGP(DMM, "Unhandled USSD %s\n", req.text); + DEBUGP(DMM, "Unhandled USSD %s\n", req.ussd_text); rc = gsm0480_send_ussd_reject(conn, msg, &req); } @@ -76,7 +84,7 @@ } /* A network-specific handler function */ -static int send_own_number(struct gsm_subscriber_connection *conn, const struct msgb *msg, const struct ussd_request *req) +static int send_own_number(struct gsm_subscriber_connection *conn, const struct msgb *msg, const struct ss_request *req) { char *own_number = conn->subscr->extension; char response_string[GSM_EXTENSION_LENGTH + 20]; -- To view, visit https://gerrit.osmocom.org/503 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib0dc4485388f030eb172fe21f5327b7ab94751f5 Gerrit-PatchSet: 6 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon Oct 31 16:27:20 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 31 Oct 2016 16:27:20 +0000 Subject: openbsc[master]: lchan: Release channel in case of late activation ack In-Reply-To: References: Message-ID: Patch Set 4: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/713/4/openbsc/src/libbsc/abis_rsl.c File openbsc/src/libbsc/abis_rsl.c: Line 1197: if (ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH) { > Why not call dyn_ts_switchover_complete(lchan)? shouldn't it put the lchan Hmm, it occurs to me that I can't explain against this good point, I need to test again to find out exactly why it didn't work. -- To view, visit https://gerrit.osmocom.org/713 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I63dc0deaf15ba7c21e20b1e0c7b85f0437e183ed Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon Oct 31 17:20:39 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 31 Oct 2016 17:20:39 +0000 Subject: [PATCH] osmo-pcu[master]: Handle Timing Advance IE properly 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/552 to look at the new patch set (#7). Handle Timing Advance IE properly Move writing Timing Advance IE and Timing Advance Index into separate functions to simplify adding PTCCH support. This also fixes previous incorrect (and unused) code for writing Packet TA IE which has not set TS for TA. Change-Id: I786bf7fc999d401cc3d9e7f1e7a1fba953b5d458 Related: OS#1545 --- M src/encoding.cpp 1 file changed, 43 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/52/552/7 diff --git a/src/encoding.cpp b/src/encoding.cpp index a778ef0..6d5f960 100644 --- a/src/encoding.cpp +++ b/src/encoding.cpp @@ -35,6 +35,43 @@ #include #include +/* { 0 | 1 < TIMING_ADVANCE_INDEX : bit (4) > } */ +static inline bool write_tai(bitvec *dest, unsigned& wp, int8_t tai) +{ + if (tai < 0) { /* No TIMING_ADVANCE_INDEX: */ + bitvec_write_field(dest, wp, 0, 1); + return false; + } + /* TIMING_ADVANCE_INDEX: */ + bitvec_write_field(dest, wp, 1, 1); + bitvec_write_field(dest, wp, tai, 4); + return true; +} + +/* { 0 | 1 < TIMING_ADVANCE_VALUE : bit (6) > } */ +static inline void write_ta(bitvec *dest, unsigned& wp, int8_t ta) +{ + if (ta < 0) /* No TIMING_ADVANCE_VALUE: */ + bitvec_write_field(dest, wp, 0, 1); + else { /* TIMING_ADVANCE_VALUE: */ + bitvec_write_field(dest, wp, 1, 1); + bitvec_write_field(dest, wp, ta, 6); + } +} + +/* 3GPP TS 44.060 ? 12.12: + { 0 | 1 < TIMING_ADVANCE_VALUE : bit (6) > } + { 0 | 1 < TIMING_ADVANCE_INDEX : bit (4) > + < TIMING_ADVANCE_TIMESLOT_NUMBER : bit (3) > } + */ +static inline void write_ta_ie(bitvec *dest, unsigned& wp, + int8_t ta, int8_t tai, uint8_t ts) +{ + write_ta(dest, wp, ta); + if (write_tai(dest, wp, tai)) /* TIMING_ADVANCE_TIMESLOT_NUMBER: */ + bitvec_write_field(dest, wp, ts, 3); +} + static int write_ia_rest_downlink( gprs_rlcmac_dl_tbf *tbf, bitvec * dest, unsigned& wp, @@ -62,12 +99,7 @@ bitvec_write_field(dest, wp,gamma,5); // GAMMA power control parameter bitvec_write_field(dest, wp,polling,1); // Polling Bit bitvec_write_field(dest, wp, ta_valid, 1); // N. B: NOT related to TAI! - if (ta_idx < 0) { - bitvec_write_field(dest, wp,0x0,1); // switch TIMING_ADVANCE_INDEX = off - } else { - bitvec_write_field(dest, wp,0x1,1); // switch TIMING_ADVANCE_INDEX = on - bitvec_write_field(dest, wp,ta_idx,4); // TIMING_ADVANCE_INDEX - } + write_tai(dest, wp, ta_idx); if (polling) { bitvec_write_field(dest, wp,0x1,1); // TBF Starting TIME present bitvec_write_field(dest, wp,(fn / (26 * 51)) % 32,5); // T1' @@ -110,12 +142,7 @@ } else bitvec_write_field(dest, wp,0x0,1); // ALPHA = not present bitvec_write_field(dest, wp,gamma,5); // GAMMA power control parameter - if (ta_idx < 0) { - bitvec_write_field(dest, wp,0x0,1); // switch TIMING_ADVANCE_INDEX = off - } else { - bitvec_write_field(dest, wp,0x1,1); // switch TIMING_ADVANCE_INDEX = on - bitvec_write_field(dest, wp,ta_idx,4); // TIMING_ADVANCE_INDEX - } + write_tai(dest, wp, ta_idx); bitvec_write_field(dest, wp, 1, 1); // TBF_STARTING_TIME_FLAG bitvec_write_field(dest, wp,(fn / (26 * 51)) % 32,5); // T1' bitvec_write_field(dest, wp,fn % 51,6); // T3 @@ -244,6 +271,8 @@ // TODO We should use our implementation of encode RLC/MAC Control messages. unsigned wp = 0; uint8_t ts; + /* timeslot assigned for the Continuous Timing Advance procedure */ + uint8_t ta_ts = 0; /* FIXME: supply it as parameter from caller */ bitvec_write_field(dest, wp,0x1,2); // Payload Type bitvec_write_field(dest, wp,0x0,2); // Uplink block with TDMA framenumber (N+13) @@ -267,15 +296,7 @@ bitvec_write_field(dest, wp,0x0,1); // Message escape bitvec_write_field(dest, wp,tbf->current_cs().to_num()-1, 2); // CHANNEL_CODING_COMMAND bitvec_write_field(dest, wp,0x1,1); // TLLI_BLOCK_CHANNEL_CODING - bitvec_write_field(dest, wp,0x1,1); // switch TIMING_ADVANCE_VALUE = on - bitvec_write_field(dest, wp,tbf->ta(),6); // TIMING_ADVANCE_VALUE - if (ta_idx < 0) { - bitvec_write_field(dest, wp,0x0,1); // switch TIMING_ADVANCE_INDEX = off - } else { - bitvec_write_field(dest, wp,0x1,1); // switch TIMING_ADVANCE_INDEX = on - bitvec_write_field(dest, wp,ta_idx,4); // TIMING_ADVANCE_INDEX - } - + write_ta_ie(dest, wp,tbf->ta(), ta_idx, ta_ts); } else { /* EPGRS */ unsigned int ws_enc = (tbf->m_window.ws() - 64) / 32; bitvec_write_field(dest, wp,0x1,1); // Message escape @@ -289,16 +310,7 @@ bitvec_write_field(dest, wp,0x0,1); // No ARAC RETRANSMISSION REQUEST bitvec_write_field(dest, wp,0x1,1); // TLLI_BLOCK_CHANNEL_CODING bitvec_write_field(dest, wp,0x0,1); // No BEP_PERIOD2 - - bitvec_write_field(dest, wp,0x1,1); // switch TIMING_ADVANCE_VALUE = on - bitvec_write_field(dest, wp,tbf->ta(),6); // TIMING_ADVANCE_VALUE - if (ta_idx < 0) { - bitvec_write_field(dest, wp,0x0,1); // switch TIMING_ADVANCE_INDEX = off - } else { - bitvec_write_field(dest, wp,0x1,1); // switch TIMING_ADVANCE_INDEX = on - bitvec_write_field(dest, wp,ta_idx,4); // TIMING_ADVANCE_INDEX - } - + write_ta_ie(dest, wp,tbf->ta(), ta_idx, ta_ts); bitvec_write_field(dest, wp,0x0,1); // No Packet Extended Timing Advance } -- To view, visit https://gerrit.osmocom.org/552 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I786bf7fc999d401cc3d9e7f1e7a1fba953b5d458 Gerrit-PatchSet: 7 Gerrit-Project: osmo-pcu 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 Oct 31 17:21:45 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 31 Oct 2016 17:21:45 +0000 Subject: osmo-pcu[master]: Handle Timing Advance IE properly In-Reply-To: References: Message-ID: Patch Set 6: It's timeslot - I've added explanatory comments. As for test system you've mentioned in previous comment - might be a god idea to make a ticket for it. -- To view, visit https://gerrit.osmocom.org/552 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I786bf7fc999d401cc3d9e7f1e7a1fba953b5d458 Gerrit-PatchSet: 6 Gerrit-Project: osmo-pcu 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 Oct 31 18:19:59 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 31 Oct 2016 18:19:59 +0000 Subject: [PATCH] osmo-bts[master]: DTX DL: add AMR HR support to scheduling check In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1174 to look at the new patch set (#2). DTX DL: add AMR HR support to scheduling check superfemto.sh: Expand log converter to use case-insensitive matching to accommodate for spelling differences in DSP logs. Add strings/events specific to AMR HR. dtx_check.gawk: Remove redundand variables from output. Add checks specific to AMR HR. Change-Id: Icce3178605f46bbf3cad15d4eaff18a4d164ad1a --- M contrib/dtx_check.gawk M contrib/superfemto.sh 2 files changed, 37 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/74/1174/2 diff --git a/contrib/dtx_check.gawk b/contrib/dtx_check.gawk index 9e753e4..7ac8b6d 100755 --- a/contrib/dtx_check.gawk +++ b/contrib/dtx_check.gawk @@ -27,9 +27,17 @@ CHK = "FAIL: missing ONSET (" $2 ") after " TYPE "." ERR++ } - if ("FORCED_FIRST" == $2 || "FORCED_NODATA" == $2) { + if ("SID_P1" == $2) { + CHK = "FAIL: regular AMR payload with FT SID and STI=0 (should be either pyaload Update or STI=1)." + ERR++ + } + if ("FORCED_FIRST" == $2 || "FORCED_NODATA" == $2 || "FORCED_F_P2" == $2 || "FORCED_F_INH" == $2 || "FORCED_U_INH" == $2) { CHK = "FAIL: event " $2 " inserted by DSP." FORCE++ + ERR++ + } + if ("FIRST_P2" != $2 && "FIRST_P1" == TYPE) { + CHK = "FAIL: " TYPE " followed by " $2 " instead of P2." ERR++ } if ("OK" == CHK) { # check inter-SID distances: @@ -65,7 +73,7 @@ if ("UPDATE" == $2 || "FIRST" == $2) { # silence SILENCE = 1 } - print $1, $2, CHK, TYPE, DELTA, SILENCE + print $1, $2, CHK if ($2 != "EMPTY") { # skip over EMPTY records TYPE = $2 FN = $1 diff --git a/contrib/superfemto.sh b/contrib/superfemto.sh index cb871c0..a210cc4 100755 --- a/contrib/superfemto.sh +++ b/contrib/superfemto.sh @@ -19,21 +19,32 @@ ULST="_DecodeAndIdentify" # DL sed filters: -D_EMP='s/ Empty frame request!/EMPTY/' -D_FAC='s/ Coding a FACCH\/F frame !!/FACCH/' -D_FST='s/ Coding a RTP SID First frame !!/FIRST/' -D_UPD='s/ Coding a RTP SID Update frame !!/UPDATE/' -D_SPE='s/ Coding a RTP Speech frame !!/SPEECH/' -D_ONS='s/ Coding a Onset frame !!/ONSET/' -D_FO1='s/ A speech frame is following a NoData or SID First without an Onset./FORCED_FIRST/' -D_FO2='s/ A speech frame is following a NoData without an Onset./FORCED_NODATA/' +D_EMP='s/ Empty frame request!/EMPTY/i' +D_FAC='s/ Coding a FACCH\/. frame !!/FACCH/i' +D_FST='s/ Coding a RTP SID First frame !!/FIRST/i' +D_FS1='s/ Coding a SID First P1 frame !!/FIRST_P1/i' +D_FS2='s/ Coding a SID First P2 frame !!/FIRST_P2/i' +D_RP1='s/ Coding a RTP SID P1 frame !!/SID_P1/i' +D_UPD='s/ Coding a RTP SID Update frame !!/UPDATE/i' +D_SPE='s/ Coding a RTP Speech frame !!/SPEECH/i' +D_ONS='s/ Coding a Onset frame !!/ONSET/i' +D_FO1='s/ A speech frame is following a NoData or SID First without an Onset./FORCED_FIRST/i' +D_FO2='s/ A speech frame is following a NoData without an Onset./FORCED_NODATA/i' +D_FP2='s/ A speech frame is following a NoData or SID_FIRST_P2 without an Onset./FORCED_F_P2/i' +D_FIN='s/ A speech frame is following a SID_FIRST without inhibit. A SID_FIRST_INH will be inserted./FORCED_F_INH/i' +D_UIN='s/ A speech frame is following a SID_UPDATE without inhibit. A SID_UPDATE_INH will be inserted./FORCED_U_INH/i' # UL sed filters: -U_NOD='s/ It is a No Data frame !!/NODATA/' -U_ONS='s/ It is an ONSET frame !!/ONSET/' -U_UPD='s/ It is a SID UPDATE frame !!/UPDATE/' -U_FST='s/ It is a SID FIRST frame !!/FIRST/' -U_SPE='s/ It is a SPEECH frame !!/SPEECH/' +U_NOD='s/ It is a No Data frame !!/NODATA/i' +U_ONS='s/ It is an ONSET frame !!/ONSET/i' +U_UPD='s/ It is a SID UPDATE frame !!/UPDATE/i' +U_FST='s/ It is a SID FIRST frame !!/FIRST/i' +U_FP1='s/ It is a SID-First P1 frame !!/FIRST_P1/i' +U_FP2='s/ It is a SID-First P2 frame !!/FIRST_P2/i' +U_SPE='s/ It is a SPEECH frame *!!/SPEECH/i' +U_UIN='s/ It is a SID update InH frame !!/UPD_INH/i' +U_FIN='s/ It is a SID-First InH frame !!/FST_INH/i' +U_RAT='s/ It is a RATSCCH data frame !!/RATSCCH/i' DL () { # filter downlink-related entries grep $DLST $1 > $1.DL.tmp @@ -66,7 +77,7 @@ MT $1.UL PREP() { # prepare logs for reformatting - cat $1.raw | cut -f2 -d')' | cut -f1 -d',' | cut -f2 -d'>' | sed 's/\[u32Fn/fn/' | sed 's/fn = /fn=/' | sed 's/fn=//' | sed 's/\[Fn=//' | sed 's/ An Onset will be inserted.//' > $1.tmp1 + cat $1.raw | cut -f2 -d')' | cut -f1 -d',' | cut -f2 -d'>' | sed 's/\[u32Fn/fn/' | sed 's/\[ u32Fn/fn/' | sed 's/fn = /fn=/' | sed 's/fn=//' | sed 's/\[Fn=//' | sed 's/ An Onset will be inserted.//' > $1.tmp1 } PREP "$1.DL.MT" @@ -75,11 +86,11 @@ PREP "$1.UL.MO" RD() { # reformat DL logs for consistency checks - cat $1.tmp1 | sed "$D_FST" | sed "$D_SPE" | sed "$D_UPD" | sed "$D_ONS" | sed "$D_EMP" | sed "$D_FAC" | sed "$D_FO1" | sed "$D_FO2" > $1.tmp2 + cat $1.tmp1 | sed "$D_FST" | sed "$D_SPE" | sed "$D_FS1" | sed "$D_FS2" | sed "$D_UIN" | sed "$D_FIN" | sed "$D_UPD" | sed "$D_INH" | sed "$D_RP1" | sed "$D_ONS" | sed "$D_EMP" | sed "$D_FAC" | sed "$D_FO1" | sed "$D_FO2" | sed "$D_FP2" > $1.tmp2 } RU() { # reformat UL logs for consistency checks - cat $1.tmp1 | sed "$U_FST" | sed "$U_SPE" | sed "$U_UPD" | sed "$U_ONS" | sed "$U_NOD" > $1.tmp2 + cat $1.tmp1 | sed "$U_FST" | sed "$U_SPE" | sed "$U_FP1" | sed "$U_FP2" | sed "$U_UPD" | sed "$U_ONS" | sed "$U_NOD" | sed "$U_UIN" | sed "$U_FIN" | sed "$U_RAT" > $1.tmp2 } RD "$1.DL.MT" -- To view, visit https://gerrit.osmocom.org/1174 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Icce3178605f46bbf3cad15d4eaff18a4d164ad1a 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 Mon Oct 31 18:19:59 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 31 Oct 2016 18:19:59 +0000 Subject: [PATCH] osmo-bts[master]: DTX fix ONSET handling In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1175 to look at the new patch set (#2). DTX fix ONSET handling * re-introduce ST_ONSET_F to guard from repetitive ONSET messages in case multiple FACCH occur duriing DTX silence period. * produce ONSET event after both SID FIRST and UPDATE in case of AMR FR. * always dispatch E_SID_F (SID FIRST) signal if in talkspurt. * allow E_SID_* right after ONSET (zero-length talkspurt). * add missing E_ONSET signal description. * fix FSM transitions for AMR HR *Inhibited and First P*. * fix incorrect return from l1if_tch_encode() in ONSET FACCH with incoming SID UPDATE Change-Id: I0e9033c5f169da46aed9a0d1295faff489778dcf Related: OS#1801 --- M include/osmo-bts/dtx_dl_amr_fsm.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 7 files changed, 57 insertions(+), 28 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/75/1175/2 diff --git a/include/osmo-bts/dtx_dl_amr_fsm.h b/include/osmo-bts/dtx_dl_amr_fsm.h index 5c13c19..8b19595 100644 --- a/include/osmo-bts/dtx_dl_amr_fsm.h +++ b/include/osmo-bts/dtx_dl_amr_fsm.h @@ -16,6 +16,7 @@ ST_U_INH, ST_SID_U, ST_ONSET_V, + ST_ONSET_F, ST_FACCH_V, ST_FACCH, }; diff --git a/src/common/dtx_dl_amr_fsm.c b/src/common/dtx_dl_amr_fsm.c index a75fd00..5075957 100644 --- a/src/common/dtx_dl_amr_fsm.c +++ b/src/common/dtx_dl_amr_fsm.c @@ -53,7 +53,7 @@ osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); break; case E_COMPL: osmo_fsm_inst_state_chg(fi, ST_SID_F2, 0, 0); @@ -81,7 +81,10 @@ osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); + 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); @@ -97,7 +100,7 @@ osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); break; case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_ONSET_F, 0, 0); break; default: LOGP(DL1P, LOGL_ERROR, "Unexpected event %d\n", event); @@ -110,7 +113,7 @@ { switch (event) { case E_VOICE: - osmo_fsm_inst_state_chg(fi, ST_ONSET_V, 0, 0); + osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); break; case E_FACCH: osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); @@ -126,7 +129,7 @@ { switch (event) { case E_FACCH: - osmo_fsm_inst_state_chg(fi, ST_FACCH, 0, 0); + 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); @@ -152,6 +155,7 @@ void dtx_fsm_onset_v(struct osmo_fsm_inst *fi, uint32_t event, void *data) { switch (event) { + case E_SID_F: case E_SID_U: case E_VOICE: osmo_fsm_inst_state_chg(fi, ST_VOICE, 0, 0); @@ -169,6 +173,7 @@ void dtx_fsm_onset_f(struct osmo_fsm_inst *fi, uint32_t event, void *data) { switch (event) { + case E_SID_F: case E_SID_U: break; case E_VOICE: @@ -234,15 +239,15 @@ 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_FACCH) | X(ST_SID_F2) | X(ST_F1_INH) | X(ST_ONSET_V), + .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), .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), - .out_state_mask = X(ST_SID_U) | X(ST_VOICE) | X(ST_FACCH), + .in_event_mask = X(E_SID_U) | 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, }, @@ -258,23 +263,30 @@ incoming SPEECH or FACCH (only for AMR HR) */ [ST_U_INH]= { .in_event_mask = X(E_VOICE) | X(E_FACCH), - .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH), .name = "SID-UPDATE (Inh)", .action = dtx_fsm_u_inh, }, /* 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_FACCH) | X(ST_VOICE) | X(ST_U_INH) | X(ST_SID_U) | X(ST_ONSET_V), + .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", .action = dtx_fsm_sid_upd, }, /* ONSET - end of silent period due to incoming SPEECH frame */ [ST_ONSET_V]= { - .in_event_mask = X(E_VOICE) | X(E_FACCH), + .in_event_mask = X(E_SID_F) | X(E_SID_U) | X(E_VOICE) | X(E_FACCH), .out_state_mask = X(ST_VOICE) | X(ST_FACCH_V), .name = "ONSET (SPEECH)", .action = dtx_fsm_onset_v, + }, + /* ONSET - end of silent period due to incoming FACCH frame */ + [ST_ONSET_F]= { + .in_event_mask = X(E_VOICE) | X(E_FACCH) | X(E_SID_U) | X(E_SID_F), + .out_state_mask = X(ST_VOICE) | X(ST_FACCH), + .name = "ONSET (FACCH)", + .action = dtx_fsm_onset_f, }, /* FACCH sending state: SPEECH was observed before so once we're done FSM should get back to VOICE state */ @@ -296,6 +308,7 @@ const struct value_string dtx_dl_amr_fsm_event_names[] = { { E_VOICE, "Voice" }, + { E_ONSET, "ONSET" }, { E_FACCH, "FACCH" }, { E_COMPL, "Complete P1 -> P2" }, { E_INHIB, "Inhibit" }, diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 4b21366..851aacb 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -33,6 +33,8 @@ #include #include +#define STI_BIT_MASK 16 + static int check_fom(struct abis_om_hdr *omh, size_t len) { if (omh->length != len) { @@ -182,14 +184,15 @@ return 0; if (osmo_amr_is_speech(ft)) { - if (lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F1 || - lchan->tch.dtx.dl_amr_fsm->state == ST_SID_U) /* AMR HR */ - if (lchan->type == GSM_LCHAN_TCH_H && marker) - return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, - E_INHIB, - (void *)lchan); - /* AMR FR */ - if (marker && lchan->tch.dtx.dl_amr_fsm->state == ST_SID_U) + /* AMR HR - Inhibition */ + if (lchan->type == GSM_LCHAN_TCH_H && marker && + lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F1) + 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 )) 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, @@ -198,6 +201,9 @@ if (ft == AMR_SID) { dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, sti); + if (lchan->tch.dtx.dl_amr_fsm->state == ST_VOICE) + return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, + E_SID_F, (void *)lchan); return osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, sti ? E_SID_U : E_SID_F, (void *)lchan); @@ -215,6 +221,16 @@ return 0; } +static inline void dtx_sti_set(struct gsm_lchan *lchan) +{ + lchan->tch.dtx.cache[6 + 2] |= STI_BIT_MASK; +} +/* STI is located in payload byte 6, cache contains 2 byte prefix (CMR/CMI) */ +static inline void dtx_sti_unset(struct gsm_lchan *lchan) +{ + lchan->tch.dtx.cache[6 + 2] &= ~STI_BIT_MASK; +} + /*! \brief Check if enough time has passed since last SID (if any) to repeat it * \param[in] lchan Logical channel on which we check scheduling * \param[in] fn Frame Number for which we check scheduling @@ -226,9 +242,10 @@ uint32_t dx26 = 120 * (fn - lchan->tch.dtx.fn); /* We're resuming after FACCH interruption */ - if (lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + if (lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH || + lchan->tch.dtx.dl_amr_fsm->state == ST_ONSET_F) { /* force STI bit to 0 so cache is treated as SID FIRST */ - lchan->tch.dtx.cache[6 + 2] &= ~16; + dtx_sti_unset(lchan); lchan->tch.dtx.is_update = false; osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, E_SID_F, (void *)lchan); @@ -306,7 +323,7 @@ lchan->tch.dtx.fn = fn; /* enforce SID UPDATE for next repetition - it might have been altered by FACCH handling */ - lchan->tch.dtx.cache[6 + 2] |= 16; + dtx_sti_set(lchan); if (lchan->tch.dtx.dl_amr_fsm->state == ST_SID_U) lchan->tch.dtx.is_update = true; return lchan->tch.dtx.len + 1; diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index 795172b..0b1bad4 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -410,7 +410,7 @@ memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, lchan->tch.dtx.facch, msgb_l2len(msg)); else if (trx->bts->dtxd && lchan->tch.dtx.dl_amr_fsm && - lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + lchan->tch.dtx.dl_amr_fsm->state == ST_ONSET_F) { if (sapi == GsmL1_Sapi_FacchF) { sapi = GsmL1_Sapi_TchF; } diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index 70764f5..4337d68 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -328,8 +328,7 @@ return -EAGAIN; case ST_FACCH_V: case ST_FACCH: - /* FIXME: if this possible at all? */ - return 0; + return -EBADMSG; default: LOGP(DRTP, LOGL_ERROR, "Unhandled DTX DL AMR FSM state " "%d\n", lchan->tch.dtx.dl_amr_fsm->state); diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index f7585ce..51bde8b 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -405,7 +405,7 @@ memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, lchan->tch.dtx.facch, msgb_l2len(msg)); else if (trx->bts->dtxd && lchan->tch.dtx.dl_amr_fsm && - lchan->tch.dtx.dl_amr_fsm->state == ST_FACCH) { + lchan->tch.dtx.dl_amr_fsm->state == ST_ONSET_F) { if (sapi == GsmL1_Sapi_FacchF) { sapi = GsmL1_Sapi_TchF; } diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index fbb42b2..db5ca78 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -426,8 +426,7 @@ return -EAGAIN; case ST_FACCH_V: case ST_FACCH: - /* FIXME: if this possible at all? */ - return 0; + return -EBADMSG; default: LOGP(DRTP, LOGL_ERROR, "Unhandled DTX DL AMR FSM state " "%d\n", lchan->tch.dtx.dl_amr_fsm->state); -- To view, visit https://gerrit.osmocom.org/1175 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0e9033c5f169da46aed9a0d1295faff489778dcf Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max