Change in osmo-bsc[master]: bssap: Handle BSSMAP CONFUSION message.
ipse has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/18232 ) Change subject: bssap: Handle BSSMAP CONFUSION message. .. Patch Set 1: I guess this will fail until the libosmocore changes hit the master -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/18232 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ib4cd94f185f751b238484678ff671ac413c4 Gerrit-Change-Number: 18232 Gerrit-PatchSet: 1 Gerrit-Owner: ipse Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: ipse Gerrit-Comment-Date: Tue, 12 May 2020 21:54:45 + Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-bsc[master]: bssap: Handle BSSMAP CONFUSION message.
ipse has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/18232 ) Change subject: bssap: Handle BSSMAP CONFUSION message. .. bssap: Handle BSSMAP CONFUSION message. We decode the mesage and print it to the log files at ERROR log level. We also count it in the BSSMAP message counters. There is not much else we could do about it. Change-Id: Ib4cd94f185f751b238484678ff671ac413c4 --- M include/osmocom/bsc/bsc_msc_data.h M src/osmo-bsc/osmo_bsc_bssap.c M src/osmo-bsc/osmo_bsc_msc.c 3 files changed, 66 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/32/18232/1 diff --git a/include/osmocom/bsc/bsc_msc_data.h b/include/osmocom/bsc/bsc_msc_data.h index 74a6f3c..fc816b4 100644 --- a/include/osmocom/bsc/bsc_msc_data.h +++ b/include/osmocom/bsc/bsc_msc_data.h @@ -69,6 +69,7 @@ MSC_CTR_BSSMAP_RX_DT1_LCLS_CONNECT_CTRL, MSC_CTR_BSSMAP_RX_DT1_HANDOVER_CMD, MSC_CTR_BSSMAP_RX_DT1_CLASSMARK_RQST, + MSC_CTR_BSSMAP_RX_DT1_CONFUSION, MSC_CTR_BSSMAP_RX_DT1_UNKNOWN, MSC_CTR_BSSMAP_RX_DT1_DTAP, MSC_CTR_BSSMAP_RX_DT1_DTAP_ERROR, diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 6f5aaa8..edc313b 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -1006,6 +1006,66 @@ return -EINVAL; } +/* Handle Confusion message, MSC indicating an error to us: + * + * See 3GPP TS 48.008 §3.2.1.45 + */ +static int bssmap_handle_confusion(struct gsm_subscriber_connection *conn, + struct msgb *msg, unsigned int length) +{ + struct tlv_parsed tp; + int diag_len; + enum gsm0808_cause cause; + enum gsm0808_cause_class cause_class; + struct gsm0808_diagnostics *diag; + + osmo_bssap_tlv_parse(&tp, msg->l4h + 1, length - 1); + + /* Check for the Cause and Diagnostic mandatory elements */ + if (!TLVP_PRESENT(&tp, GSM0808_IE_CAUSE) || !TLVP_PRESENT(&tp, GSM0808_IE_DIAGNOSTIC)) { + LOGPFSML(conn->fi, LOGL_ERROR, +"Received Confusion message," +" but either Cause or Diagnostic mandatory IE is not present: %s\n", +osmo_hexdump(msg->l4h, length)); + return -EINVAL; + } + + diag_len = TLVP_LEN(&tp, GSM0808_IE_DIAGNOSTIC); + if (diag_len < 5) { + LOGPFSML(conn->fi, LOGL_ERROR, +"Received Confusion message with short Diagnostic length: %d (expected > 5)\n", +diag_len); + return -EINVAL; + } + + cause = gsm0808_get_cause(&tp); + cause_class = gsm0808_cause_class(cause); + LOGPFSML(conn->fi, LOGL_ERROR, +"Received Confusion message: Cause %d/0x%x (%s)", +cause, cause, gsm0808_cause_name(cause)); + LOGPFSML(conn->fi, LOGL_ERROR, +"Received Confusion message: Cause class %d/0x%x (%s)", +cause_class, cause_class, gsm0808_cause_class_name(cause_class)); + + diag = (struct gsm0808_diagnostics *)TLVP_VAL(&tp, GSM0808_IE_DIAGNOSTIC); + /* octet location */ + LOGPFSML(conn->fi, LOGL_ERROR, +" Confusion Diagnostics error octet location %d (%s)\n", +diag->error_pointer_octet, + gsm0808_diagnostics_octet_location_str(diag->error_pointer_octet)); + /* bit location */ + LOGPFSML(conn->fi, LOGL_ERROR, +" Confusion Diagnostics error bit location: %d (%s)\n", +diag->error_pointer_bit, +gsm0808_diagnostics_bit_location_str(diag->error_pointer_bit)); + /* received message dump */ + LOGPFSML(conn->fi, LOGL_ERROR, +" Confusion Diagnostics message that provoked the error: %s\n", +osmo_hexdump(diag->msg, diag_len-2)); + + return 0; +} + static int bssmap_rcvmsg_udt(struct bsc_msc_data *msc, struct msgb *msg, unsigned int length) { @@ -1082,6 +1142,10 @@ rate_ctr_inc(&ctrs[MSC_CTR_BSSMAP_RX_DT1_CLASSMARK_RQST]); ret = gsm48_send_rr_classmark_enquiry(conn->lchan); break; + case BSS_MAP_MSG_CONFUSION: + rate_ctr_inc(&ctrs[MSC_CTR_BSSMAP_RX_DT1_CONFUSION]); + ret = bssmap_handle_confusion(conn, msg, length); + break; default: rate_ctr_inc(&ctrs[MSC_CTR_BSSMAP_RX_DT1_UNKNOWN]); LOGP(DMSC, LOGL_NOTICE, "Unimplemented msg type: %s\n", diff --git a/src/osmo-bsc/osmo_bsc_msc.c b/src/osmo-bsc/osmo_bsc_msc.c index db3ffe4..e58ff7f 100644 --- a/src/osmo-bsc/osmo_bsc_msc.c +++ b/src/osmo-bsc/osmo_bsc_msc.c @@ -55,6 +55,7 @@ [MSC_CTR_BSSMAP_RX_DT1_LCLS_CONNECT_CTRL] = {"bssmap:rx:dt1:lcls_connect_ctrl:
Change in libosmocore[master]: gsm0808_utils: Fix gsm0808_cause_class() function
ipse has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/18230 ) Change subject: gsm0808_utils: Fix gsm0808_cause_class() function .. gsm0808_utils: Fix gsm0808_cause_class() function Cause class is in bits 5-7 of the cause value. For the cause value 0x52 old version returned 0xa instead of a correct 0x5. See section 3.2.2.5 Cause of TS 08.08 for the details. Change-Id: I46646740c5daaafe20123e709f26dd1d2c1b6f8d --- M include/osmocom/gsm/gsm0808_utils.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/30/18230/1 diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h index 1cdca8c..a8852e4 100644 --- a/include/osmocom/gsm/gsm0808_utils.h +++ b/include/osmocom/gsm/gsm0808_utils.h @@ -145,7 +145,7 @@ /*! \returns 3GPP TS 08.08 §3.2.2.5 Class of a given Cause */ static inline enum gsm0808_cause_class gsm0808_cause_class(enum gsm0808_cause cause) { - return (cause << 1) >> 4; + return (cause >> 4) & 0x7; } /*! \returns true if 3GPP TS 08.08 §3.2.2.5 Class has extended bit set */ -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18230 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I46646740c5daaafe20123e709f26dd1d2c1b6f8d Gerrit-Change-Number: 18230 Gerrit-PatchSet: 1 Gerrit-Owner: ipse Gerrit-MessageType: newchange
Change in libosmocore[master]: gsm0808: Make a function to extract Cause IE publicly available.
ipse has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/18229 ) Change subject: gsm0808: Make a function to extract Cause IE publicly available. .. gsm0808: Make a function to extract Cause IE publicly available. Function gsm0808_get_cipher_reject_cause() was previously available in private gsm0808_utils.h. In practice, the exact same code is useful to extract Cause IE value from any of the many other BSSMAP messages which use it. So let's rename it to gsm0808_get_cause() and make it avilable to everyone to use. Change-Id: Idf2b99e9ef014eba26e3d4f0f38c2714d3a0520a --- M include/osmocom/gsm/gsm0808.h M include/osmocom/gsm/gsm0808_utils.h M src/gsm/gsm0808.c M src/gsm/gsm0808_utils.c M src/gsm/libosmogsm.map M tests/gsm0808/gsm0808_test.c 6 files changed, 22 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/29/18229/1 diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h index 373b434..5a33f60 100644 --- a/include/osmocom/gsm/gsm0808.h +++ b/include/osmocom/gsm/gsm0808.h @@ -315,6 +315,10 @@ const char *gsm0808_cause_name(enum gsm0808_cause cause); const char *gsm0808_cause_class_name(enum gsm0808_cause_class class); +/*! Parse Cause TLV 3GPP TS 08.08 §3.2.2.5 + * \returns Cause value */ +enum gsm0808_cause gsm0808_get_cause(const struct tlv_parsed *tp); + extern const struct value_string gsm0808_lcls_config_names[]; extern const struct value_string gsm0808_lcls_control_names[]; extern const struct value_string gsm0808_lcls_status_names[]; diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h index ccdf5ed..1cdca8c 100644 --- a/include/osmocom/gsm/gsm0808_utils.h +++ b/include/osmocom/gsm/gsm0808_utils.h @@ -155,8 +155,6 @@ return (cause & 0x80) && !(cause & 0x0F); } -int gsm0808_get_cipher_reject_cause(const struct tlv_parsed *tp); - /*! \returns 3GPP TS 48.008 3.2.2.49 Current Channel Type 1 from enum gsm_chan_t. */ static inline uint8_t gsm0808_current_channel_type_1(enum gsm_chan_t type) { diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c index 02288e6..788f6c3 100644 --- a/src/gsm/gsm0808.c +++ b/src/gsm/gsm0808.c @@ -1654,6 +1654,22 @@ return get_value_string(gsm0808_cause_names, cause); } +enum gsm0808_cause gsm0808_get_cause(const struct tlv_parsed *tp) +{ + const uint8_t *buf = TLVP_VAL_MINLEN(tp, GSM0808_IE_CAUSE, 1); + + if (!buf) + return -EBADMSG; + + if (TLVP_LEN(tp, GSM0808_IE_CAUSE) > 1) { + if (!gsm0808_cause_ext(buf[0])) + return -EINVAL; + return buf[1]; + } + + return buf[0]; +} + const struct value_string gsm0808_lcls_config_names[] = { { GSM0808_LCLS_CFG_BOTH_WAY, "Connect both-way" }, { GSM0808_LCLS_CFG_BOTH_WAY_AND_BICAST_UL, diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c index 7416d8f..6f3c07a 100644 --- a/src/gsm/gsm0808_utils.c +++ b/src/gsm/gsm0808_utils.c @@ -1563,22 +1563,6 @@ return 0; } -int gsm0808_get_cipher_reject_cause(const struct tlv_parsed *tp) -{ - const uint8_t *buf = TLVP_VAL_MINLEN(tp, GSM0808_IE_CAUSE, 1); - - if (!buf) - return -EBADMSG; - - if (TLVP_LEN(tp, GSM0808_IE_CAUSE) > 1) { - if (!gsm0808_cause_ext(buf[0])) - return -EINVAL; - return buf[1]; - } - - return buf[0]; -} - /*! Print a human readable name of the cell identifier to the char buffer. * This is useful both for struct gsm0808_cell_id and struct gsm0808_cell_id_list2. * See also gsm0808_cell_id_name() and gsm0808_cell_id_list_name(). diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index a518b28..1ff1286 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -157,6 +157,7 @@ gsm0808_bssmap_name; gsm0808_cause_name; gsm0808_cause_class_name; +gsm0808_get_cause; gsm0808_create_ass; gsm0808_create_ass2; gsm0808_create_assignment_completed; diff --git a/tests/gsm0808/gsm0808_test.c b/tests/gsm0808/gsm0808_test.c index ec24914..ce73390 100644 --- a/tests/gsm0808/gsm0808_test.c +++ b/tests/gsm0808/gsm0808_test.c @@ -306,7 +306,7 @@ if (rc < 0) printf("FIXME: failed (%d) to parse created message %s\n", rc, msgb_hexdump(msg)); - rc = gsm0808_get_cipher_reject_cause(&tp); + rc = gsm0808_get_cause(&tp); if (rc < 0) printf("FIXME: failed (%s) to extract Cause from created message %s\n", strerror(-rc), msgb_hexdump(msg)); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18229 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Idf2b99e9ef014eba26e3d4f0f38c2714d3a0520a Gerrit-Change-Number: 18229 Gerrit-P
Change in libosmocore[master]: gsm0808: Implement helper functions for CONFUSION BSSMAP message deco...
ipse has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/18231 ) Change subject: gsm0808: Implement helper functions for CONFUSION BSSMAP message decoding. .. gsm0808: Implement helper functions for CONFUSION BSSMAP message decoding. Also add a test for an actual CONFUSION message parsing. Change-Id: If8afd2d096fb66c6c2f255a08fc1129de3d09cec --- M include/osmocom/gsm/gsm0808.h M include/osmocom/gsm/protocol/gsm_08_08.h M src/gsm/gsm0808.c M src/gsm/libosmogsm.map M tests/gsm0808/gsm0808_test.c M tests/gsm0808/gsm0808_test.ok 6 files changed, 111 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/31/18231/1 diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h index 5a33f60..34cec3c 100644 --- a/include/osmocom/gsm/gsm0808.h +++ b/include/osmocom/gsm/gsm0808.h @@ -319,6 +319,9 @@ * \returns Cause value */ enum gsm0808_cause gsm0808_get_cause(const struct tlv_parsed *tp); +const char *gsm0808_diagnostics_octet_location_str(uint8_t pointer); +const char *gsm0808_diagnostics_bit_location_str(uint8_t bit_pointer); + extern const struct value_string gsm0808_lcls_config_names[]; extern const struct value_string gsm0808_lcls_control_names[]; extern const struct value_string gsm0808_lcls_status_names[]; diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h b/include/osmocom/gsm/protocol/gsm_08_08.h index e791b07..8b7ed8c 100644 --- a/include/osmocom/gsm/protocol/gsm_08_08.h +++ b/include/osmocom/gsm/protocol/gsm_08_08.h @@ -669,3 +669,16 @@ GSM0808_LCLS_STS_LOCALLY_SWITCHED = 0x04, GSM0808_LCLS_STS_NA = 0xFF }; + +/* 3GPP TS 48.008 3.2.2.32 Diagnostics */ +struct gsm0808_diagnostics { + uint8_t error_pointer_octet; +#if OSMO_IS_LITTLE_ENDIAN + uint8_t error_pointer_bit_spare:4, + error_pointer_bit:4; +#elif OSMO_IS_BIG_ENDIAN + uint8_t error_pointer_bit:4, + error_pointer_bit_spare:4; +#endif + uint8_t msg[0]; /*! received message which provoked the error */ +} __attribute__((packed)); diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c index 788f6c3..28f487e 100644 --- a/src/gsm/gsm0808.c +++ b/src/gsm/gsm0808.c @@ -21,6 +21,8 @@ * */ +#include + #include #include #include @@ -34,6 +36,9 @@ * message generation/encoding. */ +/*! Char buffer to return strings from functions */ +static __thread char str_buff[512]; + /*! Create "Complete L3 Info" for AoIP, legacy implementation. * Instead use gsm0808_create_layer3_aoip2(), which is capable of three-digit MNC with leading zeros. * \param[in] msg_l3 msgb containing Layer 3 Message @@ -1670,6 +1675,37 @@ return buf[0]; } +const char *gsm0808_diagnostics_octet_location_str(uint8_t pointer) +{ + if (pointer == 0) + return "Error location not determined"; + else if (pointer == 1) + return "The first octet of the message received (i.e. the message type) was found erroneous (unknown)"; + else if (pointer == 0xfd) + return "The first octet of the BSSAP header (Discrimination) was found erroneous"; + else if (pointer == 0xfe) + return "(DTAP only) The DLCI (second) octet of the BSSAP header was found erroneous"; + else if (pointer == 0xff) + return "The last octet of the BSSAP header (length indicator) was found erroneous"; + + snprintf(str_buff, sizeof(str_buff), "The %d octet of the message received was found erroneous", pointer); + return str_buff; +} + +const char *gsm0808_diagnostics_bit_location_str(uint8_t bit_pointer) +{ + if (bit_pointer == 0) { + return "No particular part of the octet is indicated"; + } else if (bit_pointer > 8) { + return "Reserved value"; + } + + snprintf(str_buff, sizeof(str_buff), +"An error was provoked by the field whose most significant bit is in bit position %d", +bit_pointer); + return str_buff; +} + const struct value_string gsm0808_lcls_config_names[] = { { GSM0808_LCLS_CFG_BOTH_WAY, "Connect both-way" }, { GSM0808_LCLS_CFG_BOTH_WAY_AND_BICAST_UL, diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 1ff1286..bf0cc01 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -158,6 +158,8 @@ gsm0808_cause_name; gsm0808_cause_class_name; gsm0808_get_cause; +gsm0808_diagnostics_octet_location_str; +gsm0808_diagnostics_bit_location_str; gsm0808_create_ass; gsm0808_create_ass2; gsm0808_create_assignment_completed; diff --git a/tests/gsm0808/gsm0808_test.c b/tests/gsm0808/gsm0808_test.c index ce73390..9e1e52e 100644 --- a/tests/gsm0808/gsm0808_test.c +++ b/tests/gsm0808/gsm0808_test.c @@ -379,6 +379,55 @@ msgb_free(msg); } +static void test_dec_confusion() +{
Change in osmo-pcu[master]: bts: Drop specific functions to add values to stats
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/18228 ) Change subject: bts: Drop specific functions to add values to stats .. bts: Drop specific functions to add values to stats Change-Id: I877a9c9a35b6c94c3dd6b1ab3019bc57f6c8568a --- M src/bts.h M src/gprs_ms_storage.cpp 2 files changed, 11 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/28/18228/1 diff --git a/src/bts.h b/src/bts.h index 5090f58..15dd482 100644 --- a/src/bts.h +++ b/src/bts.h @@ -263,6 +263,10 @@ CTR_EGPRS_UL_MCS9, }; +enum { + STAT_MS_PRESENT, +}; + #ifdef __cplusplus /** * I represent a GSM BTS. I have one or more TRX, I know the current @@ -271,10 +275,6 @@ */ struct BTS { public: - enum { - STAT_MS_PRESENT, - }; - BTS(); ~BTS(); void cleanup(); @@ -318,19 +318,13 @@ const uint8_t *data, unsigned int len); /* -* Statistics -*/ - - void ms_present(int32_t n); - int32_t ms_present_get(); - - /* * Below for C interface for the VTY */ struct rate_ctr_group *rate_counters() const; struct osmo_stat_item_group *stat_items() const; void do_rate_ctr_inc(unsigned int ctr_id); void do_rate_ctr_add(unsigned int ctr_id, int inc); + void stat_item_add(unsigned int stat_id, int inc); LListHead& ul_tbfs(); LListHead& dl_tbfs(); @@ -408,18 +402,10 @@ rate_ctr_add(&m_ratectrs->ctr[ctr_id], inc); } - -#define CREATE_STAT_INLINE(func_name, func_name_get, stat_name) \ - inline void BTS::func_name(int32_t val) {\ - osmo_stat_item_set(m_statg->items[stat_name], val); \ - } \ - inline int32_t BTS::func_name_get() {\ - return osmo_stat_item_get_last(m_statg->items[stat_name]); \ - } - -CREATE_STAT_INLINE(ms_present, ms_present_get, STAT_MS_PRESENT); - -#undef CREATE_STAT_INLINE +inline void BTS::stat_item_add(unsigned int stat_id, int inc) { + int32_t val = osmo_stat_item_get_last(m_statg->items[stat_id]); + osmo_stat_item_set(m_statg->items[stat_id], val + inc); +} #endif diff --git a/src/gprs_ms_storage.cpp b/src/gprs_ms_storage.cpp index 04518c5..19b6e1c 100644 --- a/src/gprs_ms_storage.cpp +++ b/src/gprs_ms_storage.cpp @@ -55,7 +55,7 @@ { llist_del(&ms->list()); if (m_bts) - m_bts->ms_present(m_bts->ms_present_get() - 1); + m_bts->stat_item_add(STAT_MS_PRESENT, -1); if (ms->is_idle()) delete ms; } @@ -102,7 +102,7 @@ ms->set_callback(this); llist_add(&ms->list(), &m_list); if (m_bts) - m_bts->ms_present(m_bts->ms_present_get() + 1); + m_bts->stat_item_add(STAT_MS_PRESENT, 1); return ms; } -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/18228 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I877a9c9a35b6c94c3dd6b1ab3019bc57f6c8568a Gerrit-Change-Number: 18228 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange
Change in osmo-pcu[master]: bts: Drop specific functions to add values to counters
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/18227 ) Change subject: bts: Drop specific functions to add values to counters .. bts: Drop specific functions to add values to counters It's super annoying seeing lots of functions being called everywhere only to find out they are only incrementing a counter. Let's drop all those functions and increment the counter so people looking at code doesn't see dozens of code paths evyerwhere. Most of the commit was generated by following sh snippet: """ #!/bin/bash define_pattern="^CREATE_COUNT_ADD_INLINE" generic_func="do_rate_ctr_add" grep -r -l "${define_pattern}" . | xargs cat | grep "${define_pattern}("| tr -d ",;" | tr "()" " " | awk '{ print $2 " " $3 }' >/tmp/hello while read -r func_name ctr_name do #echo "$func_name -> $ctr_name"; files="$(grep -r -l "${func_name}(" .)" for f in $files; do echo "$f: $func_name -> $ctr_name"; sed -i "s#${func_name}(#${generic_func}(${ctr_name}, #g" $f done; done < /tmp/hello grep -r -l "void ${generic_func}" | xargs sed -i "/void ${generic_func}(CTR/d" grep -r -l "$define_pattern" | xargs sed -i "/$define_pattern/d" """ Change-Id: I966221d6f9fb9bb4f6068bf45ca2978008a0efed --- M src/bts.h M src/gprs_rlcmac_sched.cpp M src/pdch.cpp M src/tbf_dl.cpp M src/tbf_ul.cpp 5 files changed, 10 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/27/18227/1 diff --git a/src/bts.h b/src/bts.h index 471ac2e..5090f58 100644 --- a/src/bts.h +++ b/src/bts.h @@ -320,12 +320,6 @@ /* * Statistics */ - void rlc_dl_bytes(int bytes); - void rlc_dl_payload_bytes(int bytes); - void rlc_ul_bytes(int bytes); - void rlc_ul_payload_bytes(int bytes); - void llc_dl_bytes(int bytes); - void llc_ul_bytes(int bytes); void ms_present(int32_t n); int32_t ms_present_get(); @@ -336,6 +330,7 @@ struct rate_ctr_group *rate_counters() const; struct osmo_stat_item_group *stat_items() const; void do_rate_ctr_inc(unsigned int ctr_id); + void do_rate_ctr_add(unsigned int ctr_id, int inc); LListHead& ul_tbfs(); LListHead& dl_tbfs(); @@ -409,17 +404,10 @@ rate_ctr_inc(&m_ratectrs->ctr[ctr_id]); } -#define CREATE_COUNT_ADD_INLINE(func_name, ctr_name) \ - inline void BTS::func_name(int inc) {\ - rate_ctr_add(&m_ratectrs->ctr[ctr_name], inc); \ - } +inline void BTS::do_rate_ctr_add(unsigned int ctr_id, int inc) { + rate_ctr_add(&m_ratectrs->ctr[ctr_id], inc); +} -CREATE_COUNT_ADD_INLINE(rlc_dl_bytes, CTR_RLC_DL_BYTES); -CREATE_COUNT_ADD_INLINE(rlc_dl_payload_bytes, CTR_RLC_DL_PAYLOAD_BYTES); -CREATE_COUNT_ADD_INLINE(rlc_ul_bytes, CTR_RLC_UL_BYTES); -CREATE_COUNT_ADD_INLINE(rlc_ul_payload_bytes, CTR_RLC_UL_PAYLOAD_BYTES); -CREATE_COUNT_ADD_INLINE(llc_dl_bytes, CTR_LLC_DL_BYTES); -CREATE_COUNT_ADD_INLINE(llc_ul_bytes, CTR_LLC_UL_BYTES); #define CREATE_STAT_INLINE(func_name, func_name_get, stat_name) \ inline void BTS::func_name(int32_t val) {\ diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index 6a53468..3db3365 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -444,7 +444,7 @@ if (!msg) return -ENOMEM; /* msg is now available */ - bts->bts->rlc_dl_bytes(msg->data_len); + bts->bts->do_rate_ctr_add(CTR_RLC_DL_BYTES, msg->data_len); /* set USF */ OSMO_ASSERT(msgb_length(msg) > 0); diff --git a/src/pdch.cpp b/src/pdch.cpp index 202f642..fb02d59 100644 --- a/src/pdch.cpp +++ b/src/pdch.cpp @@ -759,7 +759,7 @@ return -EINVAL; } - bts()->rlc_ul_bytes(len); + bts()->do_rate_ctr_add(CTR_RLC_UL_BYTES, len); LOGP(DRLCMACUL, LOGL_DEBUG, "Got RLC block, coding scheme: %s, " "length: %d (%d))\n", mcs_name(cs), len, cs.usedSizeUL()); diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 5197717..dab1e29 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -630,14 +630,14 @@ &m_llc, &write_offset, &num_chunks, data, is_final, &payload_written); if (payload_written > 0) - bts->rlc_dl_payload_bytes(payload_written); + bts->do_rate_ctr_add(CTR_RLC_DL_PAYLOAD_BYTES, payload_written); if (ar == Encoding::AR_NEED_MORE_BLOCKS) break; LOGPTBFDL(this, LOGL_DEBUG, "Complete DL frame, len=%d\n", m_llc.frame_length()); gprs_rlcmac_dl_bw(this, m_llc.frame_length()); - bts->llc_dl_bytes(m_llc.frame_length()); + bts->do_rate_ctr_add(CTR_LLC_DL_BYTES, m_llc.frame_length()); m_llc.reset(); if (is_final) { diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 90cbf8d..fee9919 100644 --- a/src/tb
Change in osmo-pcu[master]: bts: Drop specific functions to increase counters
pespin has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-pcu/+/18226 ) Change subject: bts: Drop specific functions to increase counters .. bts: Drop specific functions to increase counters It's super annoying seeing lots of functions being called everywhere only to find out they are only incrementing a counter. Let's drop all those functions and increment the counter so people looking at code doesn't see dozens of code paths evyerwhere. Most of the commit was generated by following sh snippet: """ #!/bin/bash grep -r -l ^CREATE_COUNT_INLINE . | xargs cat | grep "^CREATE_COUNT_INLINE("| tr -d ",;" | tr "()" " " | awk '{ print $2 " " $3 }' >/tmp/hello while read -r func_name ctr_name do #echo "$func_name -> $ctr_name" files="$(grep -r -l "${func_name}()" .)" for f in $files; do echo "$f: $func_name -> $ctr_name"; sed -i "s#${func_name}()#do_rate_ctr_inc(${ctr_name})#g" $f done; done < /tmp/hello grep -r -l "void do_rate_ctr_inc" | xargs sed -i "/void do_rate_ctr_inc(CTR/d" grep -r -l "CREATE_COUNT_INLINE" | xargs sed -i "/^CREATE_COUNT_INLINE/d" """ Change-Id: I360e322a30edf639aefb3c0f0e4354d98c9035a3 --- M src/bts.cpp M src/bts.h M src/gprs_rlcmac_sched.cpp M src/gprs_rlcmac_ts_alloc.cpp M src/llc.cpp M src/pdch.cpp M src/rlc.cpp M src/sba.cpp M src/tbf.cpp M src/tbf_dl.cpp M src/tbf_ul.cpp 11 files changed, 186 insertions(+), 346 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/26/18226/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/18226 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I360e322a30edf639aefb3c0f0e4354d98c9035a3 Gerrit-Change-Number: 18226 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-CC: Jenkins Builder Gerrit-MessageType: newpatchset
Change in osmo-pcu[master]: bts: Drop specific functions to increase counters
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/18226 ) Change subject: bts: Drop specific functions to increase counters .. bts: Drop specific functions to increase counters Most of the commit was generated by following sh snippet: """ #!/bin/bash grep -r -l ^CREATE_COUNT_INLINE . | xargs cat | grep "^CREATE_COUNT_INLINE("| tr -d ",;" | tr "()" " " | awk '{ print $2 " " $3 }' >/tmp/hello while read -r func_name ctr_name do #echo "$func_name -> $ctr_name" files="$(grep -r -l "${func_name}()" .)" for f in $files; do echo "$f: $func_name -> $ctr_name"; sed -i "s#${func_name}()#do_rate_ctr_inc(${ctr_name})#g" $f done; done < /tmp/hello grep -r -l "void do_rate_ctr_inc" | xargs sed -i "/void do_rate_ctr_inc(CTR/d" grep -r -l "CREATE_COUNT_INLINE" | xargs sed -i "/^CREATE_COUNT_INLINE/d" """ Change-Id: I360e322a30edf639aefb3c0f0e4354d98c9035a3 --- M src/bts.cpp M src/bts.h M src/gprs_rlcmac_sched.cpp M src/gprs_rlcmac_ts_alloc.cpp M src/llc.cpp M src/pdch.cpp M src/rlc.cpp M src/sba.cpp M src/tbf.cpp M src/tbf_dl.cpp M src/tbf_ul.cpp 11 files changed, 188 insertions(+), 339 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/26/18226/1 diff --git a/src/bts.cpp b/src/bts.cpp index 2916ee7..2cf219a 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -344,7 +344,7 @@ LOGP(DRLCMAC, LOGL_NOTICE, "Late RLC block, FN delta: %d FN: %d curFN: %d\n", delay, fn, current_frame_number()); - rlc_late_block(); + do_rate_ctr_inc(CTR_RLC_LATE_BLOCK); } m_cur_blk_fn = fn; @@ -755,10 +755,10 @@ bool failure = false; GprsMs *ms; - rach_frame(); + do_rate_ctr_inc(CTR_RACH_REQUESTS); if (is_11bit) - rach_frame_11bit(); + do_rate_ctr_inc(CTR_11BIT_RACH_REQUESTS); /* Determine full frame number */ Fn = rfn_to_fn(Fn); @@ -831,7 +831,7 @@ plen = Encoding::write_immediate_assignment_reject( immediate_assignment, ra, Fn, burst_type); - immediate_assignment_reject(); + do_rate_ctr_inc(CTR_IMMEDIATE_ASSIGN_REJ); } else { LOGP(DRLCMAC, LOGL_DEBUG, @@ -845,7 +845,7 @@ } if (plen >= 0) { - immediate_assignment_ul_tbf(); + do_rate_ctr_inc(CTR_IMMEDIATE_ASSIGN_UL_TBF); pcu_l1if_tx_agch(immediate_assignment, plen); } @@ -920,7 +920,7 @@ tbf->poll_fn, m_bts.alpha, m_bts.gamma, -1, GSM_L1_BURST_TYPE_ACCESS_0); if (plen >= 0) { - immediate_assignment_dl_tbf(); + do_rate_ctr_inc(CTR_IMMEDIATE_ASSIGN_DL_TBF); pcu_l1if_tx_pch(immediate_assignment, plen, pgroup); } diff --git a/src/bts.h b/src/bts.h index 4fddc0b..76a6073 100644 --- a/src/bts.h +++ b/src/bts.h @@ -175,7 +175,97 @@ uint32_t app_info_pending; /* Count of MS with active TBF, to which we did not send app_info yet */ }; +enum { + CTR_TBF_DL_ALLOCATED, + CTR_TBF_DL_FREED, + CTR_TBF_DL_ABORTED, + CTR_TBF_UL_ALLOCATED, + CTR_TBF_UL_FREED, + CTR_TBF_UL_ABORTED, + CTR_TBF_REUSED, + CTR_TBF_ALLOC_ALGO_A, + CTR_TBF_ALLOC_ALGO_B, + CTR_TBF_FAILED_EGPRS_ONLY, + CTR_RLC_SENT, + CTR_RLC_RESENT, + CTR_RLC_RESTARTED, + CTR_RLC_STALLED, + CTR_RLC_NACKED, + CTR_RLC_FINAL_BLOCK_RESENT, + CTR_RLC_ASS_TIMEDOUT, + CTR_RLC_ASS_FAILED, + CTR_RLC_ACK_TIMEDOUT, + CTR_RLC_ACK_FAILED, + CTR_RLC_REL_TIMEDOUT, + CTR_RLC_LATE_BLOCK, + CTR_RLC_SENT_DUMMY, + CTR_RLC_SENT_CONTROL, + CTR_RLC_DL_BYTES, + CTR_RLC_DL_PAYLOAD_BYTES, + CTR_RLC_UL_BYTES, + CTR_RLC_UL_PAYLOAD_BYTES, + CTR_DECODE_ERRORS, + CTR_SBA_ALLOCATED, + CTR_SBA_FREED, + CTR_SBA_TIMEDOUT, + CTR_LLC_FRAME_TIMEDOUT, + CTR_LLC_FRAME_DROPPED, + CTR_LLC_FRAME_SCHED, + CTR_LLC_DL_BYTES, + CTR_LLC_UL_BYTES, + CTR_RACH_REQUESTS, + CTR_11BIT_RACH_REQUESTS, + CTR_SPB_UL_FIRST_SEGMENT, + CTR_SPB_UL_SECOND_SEGMENT, + CTR_SPB_DL_FIRST_SEGMENT, + CTR_SPB_DL_SECOND_SEGMENT, + CTR_IMMEDIATE_ASSIGN_UL_TBF, + CTR_IMMEDIATE_ASSIGN_REJ, + CTR_IMMEDIATE_ASSIGN_DL_TBF, + CTR_CHANNEL_REQUEST_DESCRIPTION, + CTR_PKT_UL_ASSIGNMENT, + CTR_PKT_ACCESS_REJ, + 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_PD
Build failure of network:osmocom:nightly/osmo-uecups in Debian_9.0/armv7l
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-uecups/Debian_9.0/armv7l Package network:osmocom:nightly/osmo-uecups failed to build in Debian_9.0/armv7l Check out the package for editing: osc checkout network:osmocom:nightly osmo-uecups Last lines of build log: [ 593s]^~~ [ 593s] main.c: In function 'main': [ 593s] main.c:776:23: error: implicit declaration of function 'osmo_signalfd_setup' [-Werror=implicit-function-declaration] [ 593s] g_daemon->signalfd = osmo_signalfd_setup(g_daemon, sigset, signal_cb, g_daemon); [ 593s]^~~ [ 593s] main.c:776:21: warning: assignment makes pointer from integer without a cast [-Wint-conversion] [ 593s] g_daemon->signalfd = osmo_signalfd_setup(g_daemon, sigset, signal_cb, g_daemon); [ 593s] ^ [ 593s] cc1: some warnings being treated as errors [ 593s] Makefile:469: recipe for target 'main.o' failed [ 593s] make[3]: *** [main.o] Error 1 [ 593s] make[3]: Leaving directory '/usr/src/packages/BUILD/daemon' [ 593s] Makefile:402: recipe for target 'all-recursive' failed [ 593s] make[2]: *** [all-recursive] Error 1 [ 593s] make[2]: Leaving directory '/usr/src/packages/BUILD' [ 593s] Makefile:349: recipe for target 'all' failed [ 593s] make[1]: *** [all] Error 2 [ 593s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 593s] dh_auto_build: make -j1 returned exit code 2 [ 593s] debian/rules:45: recipe for target 'build' failed [ 593s] make: *** [build] Error 2 [ 593s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 593s] ### VM INTERACTION START ### [ 596s] [ 552.276034] sysrq: SysRq : Power Off [ 596s] [ 552.279180] reboot: Power down [ 596s] ### VM INTERACTION END ### [ 596s] [ 596s] armbuild17 failed "build osmo-uecups_0.1.3.1.8362.dsc" at Tue May 12 19:30:12 UTC 2020. [ 596s] -- Configure notifications at https://build.opensuse.org/my/subscriptions openSUSE Build Service (https://build.opensuse.org/)
Change in pysim[master]: Treat MCC and MNC as strings, not integers
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/18225 ) Change subject: Treat MCC and MNC as strings, not integers .. Treat MCC and MNC as strings, not integers A MNC of 02 and 002 are *not* equal. The former is a two-digit MNC and the latter is a three-digit MNC. Hence, we shouldn't treat MNCs as integer values as we have no clue how many leading zeroes (if any) the user entered. Change-Id: I9d1d07a64888c76703c3e430bbdd822080c05819 Closes: OS#4523 --- M pySim-prog.py M pySim/utils.py 2 files changed, 19 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/25/18225/1 diff --git a/pySim-prog.py b/pySim-prog.py index 67719b4..4ac480c 100755 --- a/pySim-prog.py +++ b/pySim-prog.py @@ -98,13 +98,13 @@ help="Country code [default: %default]", default=1, ) - parser.add_option("-x", "--mcc", dest="mcc", type="int", + parser.add_option("-x", "--mcc", dest="mcc", type="string", help="Mobile Country Code [default: %default]", - default=901, + default="901", ) - parser.add_option("-y", "--mnc", dest="mnc", type="int", + parser.add_option("-y", "--mnc", dest="mnc", type="string", help="Mobile Network Code [default: %default]", - default=55, + default="55", ) parser.add_option("--mnclen", dest="mnclen", type="choice", help="Length of Mobile Network Code [default: %default]", @@ -219,7 +219,7 @@ return d[0:len] def _mcc_mnc_digits(mcc, mnc): - return ('%03d%03d' if mnc > 100 else '%03d%02d') % (mcc, mnc) + return '%s%s' % (mcc, mnc) def _cc_digits(cc): return ('%03d' if cc > 100 else '%02d') % cc @@ -272,8 +272,17 @@ mcc = opts.mcc mnc = opts.mnc - if not ((0 < mcc < 999) and (0 < mnc < 999)): - raise ValueError('mcc & mnc must be between 0 and 999') + if not mcc.isdigit() or not mnc.isdigit(): + raise ValueError('mcc & mnc must only contain decimal digits') + if len(mcc) < 1 or len(mcc) > 3: + raise ValueError('mcc must be between 1 .. 3 digits') + if len(mnc) < 1 or len(mnc) > 3: + raise ValueError('mnc must be between 1 .. 3 digits') + + # MCC always has 3 digits + mcc = lpad(mcc, 3, "0") + # MNC must be at least 2 digits + mnc = lpad(mnc, 2, "0") # Digitize country code (2 or 3 digits) cc_digits = _cc_digits(opts.country) diff --git a/pySim/utils.py b/pySim/utils.py index a1689ca..43616a9 100644 --- a/pySim/utils.py +++ b/pySim/utils.py @@ -102,7 +102,9 @@ def enc_plmn(mcc, mnc): """Converts integer MCC/MNC into 3 bytes for EF""" - return swap_nibbles(lpad('%d' % int(mcc), 3) + lpad('%d' % int(mnc), 3)) + if len(mnc) == 2: + mnc = "F%s" % mnc + return swap_nibbles("%s%s" % (mcc, mnc)) def dec_spn(ef): byte1 = int(ef[0:2]) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/18225 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I9d1d07a64888c76703c3e430bbdd822080c05819 Gerrit-Change-Number: 18225 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange
Change in libosmocore[master]: gsm0505_amr_dtx: add missing value strings
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17931 ) Change subject: gsm0505_amr_dtx: add missing value strings .. gsm0505_amr_dtx: add missing value strings The value string array that explain the type of the AMR DTX / SID frames is incomplete, lets add the missing strings. Change-Id: If9e80b4bd8bdc31323c7c276155b2538e20a99be Related: OS#2978 --- M src/coding/gsm0503_amr_dtx.c M tests/dtx/dtx_gsm0503_test.ok 2 files changed, 7 insertions(+), 5 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/coding/gsm0503_amr_dtx.c b/src/coding/gsm0503_amr_dtx.c index 724cf09..7069b96 100644 --- a/src/coding/gsm0503_amr_dtx.c +++ b/src/coding/gsm0503_amr_dtx.c @@ -45,16 +45,18 @@ static const ubit_t codec_mode_4_sid[] = { 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1 }; const struct value_string gsm0503_amr_dtx_frame_names[] = { + { AMR_OTHER,"AMR_OTHER (audio)" }, { AFS_SID_FIRST,"AFS_SID_FIRST" }, - { AFS_SID_UPDATE, "AFS_SID_UPDATE" }, + { AFS_SID_UPDATE, "AFS_SID_UPDATE (marker)" }, + { AFS_SID_UPDATE_CN,"AFS_SID_UPDATE_CN (audio)" }, { AFS_ONSET,"AFS_ONSET" }, - { AHS_SID_UPDATE, "AHS_SID_UPDATE" }, + { AHS_SID_UPDATE, "AHS_SID_UPDATE (marker)" }, + { AHS_SID_UPDATE_CN,"AHS_SID_UPDATE_CN (audio)" }, { AHS_SID_FIRST_P1, "AHS_SID_FIRST_P1" }, { AHS_SID_FIRST_P2, "AHS_SID_FIRST_P2" }, { AHS_ONSET,"AHS_ONSET" }, { AHS_SID_FIRST_INH,"AHS_SID_FIRST_INH" }, { AHS_SID_UPDATE_INH, "AHS_SID_UPDATE_INH" }, - { AMR_OTHER,"NON DTX FRAME (OTHER)" }, { 0, NULL } }; diff --git a/tests/dtx/dtx_gsm0503_test.ok b/tests/dtx/dtx_gsm0503_test.ok index a95a18b..77a4936 100644 --- a/tests/dtx/dtx_gsm0503_test.ok +++ b/tests/dtx/dtx_gsm0503_test.ok @@ -1,9 +1,9 @@ FR AMR DTX FRAMES: ==> AFS_SID_FIRST, n_errors=0, n_bits_total=212 - ==> AFS_SID_UPDATE, n_errors=0, n_bits_total=212 + ==> AFS_SID_UPDATE (marker), n_errors=0, n_bits_total=212 ==> AFS_ONSET, n_errors=0, n_bits_total=228 HR AMR DTX FRAMES: - ==> AHS_SID_UPDATE, n_errors=0, n_bits_total=212 + ==> AHS_SID_UPDATE (marker), n_errors=0, n_bits_total=212 ==> AHS_SID_FIRST_P1, n_errors=0, n_bits_total=212 ==> AHS_SID_FIRST_P2, n_errors=0, n_bits_total=114 ==> AHS_ONSET, n_errors=0, n_bits_total=114 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17931 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: If9e80b4bd8bdc31323c7c276155b2538e20a99be Gerrit-Change-Number: 17931 Gerrit-PatchSet: 4 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged
Change in libosmocore[master]: gsm0505_amr_dtx: add missing value strings
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17931 ) Change subject: gsm0505_amr_dtx: add missing value strings .. Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17931 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: If9e80b4bd8bdc31323c7c276155b2538e20a99be Gerrit-Change-Number: 17931 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 May 2020 18:13:25 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-bts[master]: osmo-bts-trx/scheduler: remove a left-over from UL TCH handlers
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/18218 ) Change subject: osmo-bts-trx/scheduler: remove a left-over from UL TCH handlers .. osmo-bts-trx/scheduler: remove a left-over from UL TCH handlers Change-Id: I58eedd611ecd31cc36017545de2cf29acf49f521 Signed-off-by: Vadim Yanitskiy --- M src/osmo-bts-trx/scheduler_trx.c 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index e5c5519..8a2bb12 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -1127,7 +1127,6 @@ struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, bi->tn); struct l1sched_chan_state *chan_state = &l1ts->chan_state[chan]; sbit_t *burst, **bursts_p = &chan_state->ul_bursts; - uint32_t *first_fn = &chan_state->ul_first_fn; uint8_t *mask = &chan_state->ul_mask; uint8_t rsl_cmode = chan_state->rsl_cmode; uint8_t tch_mode = chan_state->tch_mode; @@ -1161,7 +1160,6 @@ if (bid == 0) { memset(*bursts_p + 464, 0, 464); *mask = 0x0; - *first_fn = bi->fn; } /* update mask */ @@ -1366,7 +1364,6 @@ struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, bi->tn); struct l1sched_chan_state *chan_state = &l1ts->chan_state[chan]; sbit_t *burst, **bursts_p = &chan_state->ul_bursts; - uint32_t *first_fn = &chan_state->ul_first_fn; uint8_t *mask = &chan_state->ul_mask; uint8_t rsl_cmode = chan_state->rsl_cmode; uint8_t tch_mode = chan_state->tch_mode; @@ -1405,7 +1402,6 @@ if (bid == 0) { memset(*bursts_p + 464, 0, 232); *mask = 0x0; - *first_fn = bi->fn; } /* update mask */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/18218 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I58eedd611ecd31cc36017545de2cf29acf49f521 Gerrit-Change-Number: 18218 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in osmo-bts[master]: osmo-bts-trx/scheduler: remove a left-over from UL TCH handlers
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/18218 ) Change subject: osmo-bts-trx/scheduler: remove a left-over from UL TCH handlers .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/18218 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I58eedd611ecd31cc36017545de2cf29acf49f521 Gerrit-Change-Number: 18218 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 18:12:49 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in pysim[master]: pySim-prog, pySim-read, do not echo reader id
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/18221 ) Change subject: pySim-prog, pySim-read, do not echo reader id .. pySim-prog, pySim-read, do not echo reader id pySim-prog and pySim-read currently echo back the pcsc reader id (or baudrate/socket, depending on the interface used). This makes the output unecessarly undeterministic, which becomes a problem when verifying the putput in tests. Lets not echo those variable, user supplied parameters back. Also lets move the code that does the initalization to utils, so that it can be used from pySim-prog and from pySim-read (code dup). Change-Id: I243cc332f075d007b1c111292effcc610e874eb3 Related: OS#4503 --- M pySim-prog.py M pySim-read.py M pySim/utils.py M pysim-testdata/Fairwaves-SIM.ok M pysim-testdata/Wavemobile-SIM.ok M pysim-testdata/fakemagicsim.ok M pysim-testdata/sysmoISIM-SJA2.ok M pysim-testdata/sysmoUSIM-SJS1.ok M pysim-testdata/sysmosim-gr1.ok M tests/pysim-test.sh 10 files changed, 32 insertions(+), 47 deletions(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/pySim-prog.py b/pySim-prog.py index c709959..67719b4 100755 --- a/pySim-prog.py +++ b/pySim-prog.py @@ -40,7 +40,7 @@ from pySim.commands import SimCardCommands from pySim.cards import _cards_classes, card_detect -from pySim.utils import h2b, swap_nibbles, rpad, derive_milenage_opc, calculate_luhn, dec_iccid +from pySim.utils import h2b, swap_nibbles, rpad, derive_milenage_opc, calculate_luhn, dec_iccid, init_reader from pySim.ts_51_011 import EF from pySim.card_handler import * from pySim.utils import * @@ -688,21 +688,7 @@ opts = parse_options() # Init card reader driver - if opts.pcsc_dev is not None: - print("Using PC/SC reader (dev=%d) interface" - % opts.pcsc_dev) - from pySim.transport.pcsc import PcscSimLink - sl = PcscSimLink(opts.pcsc_dev) - elif opts.osmocon_sock is not None: - print("Using Calypso-based (OsmocomBB, sock=%s) reader interface" - % opts.osmocon_sock) - from pySim.transport.calypso import CalypsoSimLink - sl = CalypsoSimLink(sock_path=opts.osmocon_sock) - else: # Serial reader is default - print("Using serial reader (port=%s, baudrate=%d) interface" - % (opts.device, opts.baudrate)) - from pySim.transport.serial import SerialSimLink - sl = SerialSimLink(device=opts.device, baudrate=opts.baudrate) + sl = init_reader(opts) # Create command layer scc = SimCardCommands(transport=sl) diff --git a/pySim-read.py b/pySim-read.py index 33e93a7..df21531 100755 --- a/pySim-read.py +++ b/pySim-read.py @@ -34,8 +34,8 @@ from pySim.commands import SimCardCommands from pySim.cards import card_detect, Card -from pySim.utils import h2b, swap_nibbles, rpad, dec_imsi, dec_iccid, dec_msisdn, format_xplmn_w_act, dec_spn, dec_st - +from pySim.utils import h2b, swap_nibbles, rpad, dec_imsi, dec_iccid, dec_msisdn +from pySim.utils import format_xplmn_w_act, dec_spn, dec_st, init_reader def parse_options(): @@ -72,21 +72,7 @@ opts = parse_options() # Init card reader driver - if opts.pcsc_dev is not None: - print("Using PC/SC reader (dev=%d) interface" - % opts.pcsc_dev) - from pySim.transport.pcsc import PcscSimLink - sl = PcscSimLink(opts.pcsc_dev) - elif opts.osmocon_sock is not None: - print("Using Calypso-based (OsmocomBB, sock=%s) reader interface" - % opts.osmocon_sock) - from pySim.transport.calypso import CalypsoSimLink - sl = CalypsoSimLink(sock_path=opts.osmocon_sock) - else: # Serial reader is default - print("Using serial reader (port=%s, baudrate=%d) interface" - % (opts.device, opts.baudrate)) - from pySim.transport.serial import SerialSimLink - sl = SerialSimLink(device=opts.device, baudrate=opts.baudrate) + sl = init_reader(opts) # Create command layer scc = SimCardCommands(transport=sl) diff --git a/pySim/utils.py b/pySim/utils.py index dbc7337..a1689ca 100644 --- a/pySim/utils.py +++ b/pySim/utils.py @@ -436,3 +436,22 @@ s += "\t%s # %s\n" % (i2h(content), i2s(content)) return s + +def init_reader(opts): + """ + Init card reader driver + """ + if opts.pcsc_dev is not None: + print("Using PC/SC reader interface") + from pySim.transport.pcsc import PcscSimLink + sl = PcscSimLink(opts.pcsc_dev) + elif opts.osmocon_sock is not None: + print("Usi
Change in pysim[master]: pySim-prog, pySim-read, do not echo reader id
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/18221 ) Change subject: pySim-prog, pySim-read, do not echo reader id .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/18221 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I243cc332f075d007b1c111292effcc610e874eb3 Gerrit-Change-Number: 18221 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 May 2020 18:11:32 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-sgsn[master]: gsup: send RAT type on LU
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/16745 ) Change subject: gsup: send RAT type on LU .. Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/16745 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I5dbe610738aed7ea1edf6b33543b1c03818cc274 Gerrit-Change-Number: 16745 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Comment-Date: Tue, 12 May 2020 18:12:00 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-sgsn[master]: gsup: send RAT type on LU
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/16745 ) Change subject: gsup: send RAT type on LU .. gsup: send RAT type on LU At 36c3, osmo-hlr was run with a patch that records the RAN type of attached subscribers. Even though this is not in osmo-hlr master, it is nice information to send along. Change-Id: I5dbe610738aed7ea1edf6b33543b1c03818cc274 --- M src/sgsn/gprs_subscriber.c 1 file changed, 14 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/sgsn/gprs_subscriber.c b/src/sgsn/gprs_subscriber.c index 484c7ef..c23b332 100644 --- a/src/sgsn/gprs_subscriber.c +++ b/src/sgsn/gprs_subscriber.c @@ -812,7 +812,7 @@ return gprs_subscr_tx_gsup_message(subscr, &gsup_msg); } -int gprs_subscr_location_update(struct gprs_subscr *subscr) +int gprs_subscr_location_update(struct gprs_subscr *subscr, enum sgsn_ran_type ran_type) { struct osmo_gsup_message gsup_msg = {0}; @@ -820,6 +820,18 @@ "subscriber data is not available\n"); gsup_msg.message_type = OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST; + + switch (ran_type) { + case MM_CTX_T_GERAN_Gb: + gsup_msg.current_rat_type = OSMO_RAT_GERAN_A; + break; + case MM_CTX_T_UTRAN_Iu: + gsup_msg.current_rat_type = OSMO_RAT_UTRAN_IU; + break; + default: + break; + } + return gprs_subscr_tx_gsup_message(subscr, &gsup_msg); } @@ -884,7 +896,7 @@ subscr->flags |= GPRS_SUBSCRIBER_UPDATE_LOCATION_PENDING; - rc = gprs_subscr_location_update(subscr); + rc = gprs_subscr_location_update(subscr, mmctx->ran_type); gprs_subscr_put(subscr); return rc; } -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/16745 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I5dbe610738aed7ea1edf6b33543b1c03818cc274 Gerrit-Change-Number: 16745 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-MessageType: merged
Change in libosmocore[master]: logging: do not allow multiple calls of log_init()
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18222 ) Change subject: logging: do not allow multiple calls of log_init() .. logging: do not allow multiple calls of log_init() calling log_init() multiple times would lead into memory leaks. The function should only be called once on startup of the process. Lets make sure that it does not get called multiple times by accident. Change-Id: Ibb300e4c9b04767581116ab530b2e6a9a195db08 --- M src/logging.c 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved laforge: Looks good to me, approved diff --git a/src/logging.c b/src/logging.c index 4aaf515..c14e696 100644 --- a/src/logging.c +++ b/src/logging.c @@ -1028,6 +1028,9 @@ int i; struct log_info_cat *cat_ptr; + /* Ensure that log_init is not called multiple times */ + OSMO_ASSERT(tall_log_ctx == NULL) + tall_log_ctx = talloc_named_const(ctx, 1, "logging"); if (!tall_log_ctx) return -ENOMEM; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18222 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ibb300e4c9b04767581116ab530b2e6a9a195db08 Gerrit-Change-Number: 18222 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: merged
Change in libosmocore[master]: logging: use LOGL_NOTICE when no loglevel is set
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17604 ) Change subject: logging: use LOGL_NOTICE when no loglevel is set .. Patch Set 8: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17604 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib9e180261505062505fc4605a98023910f76cde6 Gerrit-Change-Number: 17604 Gerrit-PatchSet: 8 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 18:09:20 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: logging: do not allow multiple calls of log_init()
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18222 ) Change subject: logging: do not allow multiple calls of log_init() .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18222 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ibb300e4c9b04767581116ab530b2e6a9a195db08 Gerrit-Change-Number: 18222 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 May 2020 18:09:57 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: logging: use LOGL_NOTICE when no loglevel is set
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17604 ) Change subject: logging: use LOGL_NOTICE when no loglevel is set .. logging: use LOGL_NOTICE when no loglevel is set when the API user of libosmocores logging infrastructure does not set a pre-defined logging level in struct log_info_cat, the result would be an invalid logging level. In order to avoid problems with that and to spare all the additional .loglevel = LOGL_NOTICE (API users are advised to use LOGL_NOTICE as default) lines in the user code lets check the logging level on startup and set LOGL_NOTICE if there is no logging level set. Change-Id: Ib9e180261505062505fc4605a98023910f76cde6 Related: OS#2577 --- M src/logging.c 1 file changed, 17 insertions(+), 9 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved laforge: Looks good to me, approved diff --git a/src/logging.c b/src/logging.c index 4d6224d..4aaf515 100644 --- a/src/logging.c +++ b/src/logging.c @@ -1026,6 +1026,7 @@ int log_init(const struct log_info *inf, void *ctx) { int i; + struct log_info_cat *cat_ptr; tall_log_ctx = talloc_named_const(ctx, 1, "logging"); if (!tall_log_ctx) @@ -1043,29 +1044,36 @@ osmo_log_info->num_cat += inf->num_cat; } - osmo_log_info->cat = talloc_zero_array(osmo_log_info, - struct log_info_cat, - osmo_log_info->num_cat); - if (!osmo_log_info->cat) { + cat_ptr = talloc_zero_array(osmo_log_info, struct log_info_cat, + osmo_log_info->num_cat); + if (!cat_ptr) { talloc_free(osmo_log_info); osmo_log_info = NULL; return -ENOMEM; } - if (inf) { /* copy over the user part */ + /* copy over the user part and sanitize loglevel */ + if (inf) { for (i = 0; i < inf->num_cat; i++) { - memcpy((struct log_info_cat *) &osmo_log_info->cat[i], - &inf->cat[i], sizeof(struct log_info_cat)); + memcpy(&cat_ptr[i], &inf->cat[i], + sizeof(struct log_info_cat)); + + /* Make sure that the loglevel is set to NOTICE in case +* no loglevel has been preset. */ + if (!cat_ptr[i].loglevel) { + cat_ptr[i].loglevel = LOGL_NOTICE; + } } } /* copy over the library part */ for (i = 0; i < ARRAY_SIZE(internal_cat); i++) { unsigned int cn = osmo_log_info->num_cat_user + i; - memcpy((struct log_info_cat *) &osmo_log_info->cat[cn], - &internal_cat[i], sizeof(struct log_info_cat)); + memcpy(&cat_ptr[cn], &internal_cat[i], sizeof(struct log_info_cat)); } + osmo_log_info->cat = cat_ptr; + return 0; } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17604 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib9e180261505062505fc4605a98023910f76cde6 Gerrit-Change-Number: 17604 Gerrit-PatchSet: 8 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in pysim[master]: commands: add features to verify data written to files
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/18211 ) Change subject: commands: add features to verify data written to files .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/18211 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I7be842004102f4998af376790c97647c107be3d5 Gerrit-Change-Number: 18211 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 May 2020 18:08:17 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in pysim[master]: commands: add method to determine size of a non record oriented file
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/18209 ) Change subject: commands: add method to determine size of a non record oriented file .. Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/18209 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I0593f2de7f34d5654a19e949dc567a236e44e20c Gerrit-Change-Number: 18209 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 May 2020 18:07:16 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in pysim[master]: utils: do not crash when all bytes of EF.IMSI are 0xFF
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/18208 ) Change subject: utils: do not crash when all bytes of EF.IMSI are 0xFF .. Patch Set 3: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/pysim/+/18208/3//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/pysim/+/18208/3//COMMIT_MSG@12 PS3, Line 12: worls works -- To view, visit https://gerrit.osmocom.org/c/pysim/+/18208 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I93874a1d7e0b87d39e4b06a5c504643cfabb451c Gerrit-Change-Number: 18208 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 May 2020 18:06:56 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in pysim[master]: cards: remove len calculation
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/18205 ) Change subject: cards: remove len calculation .. cards: remove len calculation The method update_ad() caluclates the size of the data it had just read from EF.AD, but the result is never used, lets remove that line Change-Id: Id38c0dc725ab6874de3ea60132482a09372abe9e --- M pySim/cards.py 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved fixeria: Looks good to me, approved diff --git a/pySim/cards.py b/pySim/cards.py index 8937ee8..f469cae 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -149,7 +149,6 @@ raise RuntimeError('unable to calculate proper mnclen') data = self._scc.read_binary(EF['AD'], length=None, offset=0) - size = len(data[0]) // 2 content = data[0][0:6] + "%02X" % mnclen data, sw = self._scc.update_binary(EF['AD'], content) return sw -- To view, visit https://gerrit.osmocom.org/c/pysim/+/18205 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Id38c0dc725ab6874de3ea60132482a09372abe9e Gerrit-Change-Number: 18205 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: merged
Change in pysim[master]: pysim-prog: move ADM sanitation to utils.py
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/18207 ) Change subject: pysim-prog: move ADM sanitation to utils.py .. Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/18207 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ifead29724cc13a91de9e2e89314d7fb23c063d50 Gerrit-Change-Number: 18207 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 May 2020 18:06:20 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in pysim[master]: cards: reset uninitalized EF.AD
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/18206 ) Change subject: cards: reset uninitalized EF.AD .. Patch Set 3: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/pysim/+/18206/3//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/pysim/+/18206/3//COMMIT_MSG@9 PS3, Line 9: me may? -- To view, visit https://gerrit.osmocom.org/c/pysim/+/18206 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I57cf53e0c540469f11b6d85bd3daf3f9e14c237e Gerrit-Change-Number: 18206 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 May 2020 18:06:03 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in pysim[master]: cards: remove len calculation
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/18205 ) Change subject: cards: remove len calculation .. Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/18205 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Id38c0dc725ab6874de3ea60132482a09372abe9e Gerrit-Change-Number: 18205 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 May 2020 18:05:10 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmo-netif[master]: amr: Fix OA<->BWE conversion.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/17997 ) Change subject: amr: Fix OA<->BWE conversion. .. Patch Set 7: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/17997 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I9fc5fb92e9bada22a47a82fcfb0925e892e50ced Gerrit-Change-Number: 17997 Gerrit-PatchSet: 7 Gerrit-Owner: ipse Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: ipse Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 18:04:40 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-bts[master]: measurement: expect at least 1 SUB frame for AMR
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17929 ) Change subject: measurement: expect at least 1 SUB frame for AMR .. Patch Set 5: (1 comment) https://gerrit.osmocom.org/c/osmo-bts/+/17929/1/src/common/measurement.c File src/common/measurement.c: https://gerrit.osmocom.org/c/osmo-bts/+/17929/1/src/common/measurement.c@665 PS1, Line 665: if (lchan->tch_mode != GSM48_CMODE_SPEECH_AMR) { > This comment has not yet been addressesd It again has not been addressed? -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17929 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1fd91b576ff7274caa6d4356bcd7a4fa4311219d Gerrit-Change-Number: 17929 Gerrit-PatchSet: 5 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 18:01:08 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment
Change in osmo-pcu[master]: Drop unneeded arg 'ta' in tbf_alloc_ul()
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/18224 ) Change subject: Drop unneeded arg 'ta' in tbf_alloc_ul() .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/18224 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iebb9c57f458690e045ddc45c800209ad8cf621e0 Gerrit-Change-Number: 18224 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 May 2020 18:00:00 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-pcu[master]: pdch: rcv_resource_request(): Clarify tbf_free only needed if MS used...
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/18223 ) Change subject: pdch: rcv_resource_request(): Clarify tbf_free only needed if MS used to exist beforehand .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/18223 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I62f24fe04ca10fca19bedda288fe3ed3ce75413f Gerrit-Change-Number: 18223 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 12 May 2020 17:59:24 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-bts[master]: osmo-bts-trx/scheduler: remove a left-over from UL TCH handlers
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/18218 ) Change subject: osmo-bts-trx/scheduler: remove a left-over from UL TCH handlers .. Patch Set 1: > Patch Set 1: Code-Review+1 > > Wait, chan_state->ul_first_fn is not used then? why not dropping that field? It's used by other lchan handlers, such as rx_data_fn() or rx_pdtch_fn(). -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/18218 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I58eedd611ecd31cc36017545de2cf29acf49f521 Gerrit-Change-Number: 18218 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 17:42:36 + Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-bts[master]: osmo-bts-trx/scheduler: remove a left-over from UL TCH handlers
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/18218 ) Change subject: osmo-bts-trx/scheduler: remove a left-over from UL TCH handlers .. Patch Set 1: Code-Review+1 Wait, chan_state->ul_first_fn is not used then? why not dropping that field? -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/18218 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I58eedd611ecd31cc36017545de2cf29acf49f521 Gerrit-Change-Number: 18218 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 17:35:48 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-bts[master]: osmo-bts-trx/scheduler: remove a left-over from UL TCH handlers
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/18218 ) Change subject: osmo-bts-trx/scheduler: remove a left-over from UL TCH handlers .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/18218 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I58eedd611ecd31cc36017545de2cf29acf49f521 Gerrit-Change-Number: 18218 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 17:34:25 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-pcu[master]: pdch: rcv_resource_request(): Clarify tbf_free only needed if MS used...
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/18223 ) Change subject: pdch: rcv_resource_request(): Clarify tbf_free only needed if MS used to exist beforehand .. pdch: rcv_resource_request(): Clarify tbf_free only needed if MS used to exist beforehand Variable found is used to always call Guard() on MS to avoid possible unexpected freeing regressions. Change-Id: I62f24fe04ca10fca19bedda288fe3ed3ce75413f --- M src/pdch.cpp 1 file changed, 25 insertions(+), 23 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/23/18223/1 diff --git a/src/pdch.cpp b/src/pdch.cpp index 149ca1f..048577d 100644 --- a/src/pdch.cpp +++ b/src/pdch.cpp @@ -548,38 +548,41 @@ struct gprs_rlcmac_sba *sba; if (request->ID.UnionType) { - struct gprs_rlcmac_ul_tbf *ul_tbf = NULL; - struct gprs_rlcmac_dl_tbf *dl_tbf = NULL; + struct gprs_rlcmac_ul_tbf *ul_tbf; + struct gprs_rlcmac_dl_tbf *dl_tbf; uint32_t tlli = request->ID.u.TLLI; uint8_t ta = GSM48_TA_INVALID; + bool found = true; GprsMs *ms = bts()->ms_by_tlli(tlli); - if (!ms) + if (!ms) { + found = false; ms = bts()->ms_alloc(0, 0); /* ms class updated later */ + } /* Keep the ms, even if it gets idle temporarily */ GprsMs::Guard guard(ms); - ul_tbf = ms->ul_tbf(); - dl_tbf = ms->dl_tbf(); - ta = ms->ta(); - /* We got a RACH so the MS was in packet idle mode and thus -* didn't have any active TBFs */ - if (ul_tbf) { - LOGPTBFUL(ul_tbf, LOGL_NOTICE, - "Got RACH from TLLI=0x%08x while TBF still exists. Killing pending UL TBF\n", - tlli); - tbf_free(ul_tbf); - ul_tbf = NULL; + if (found) { + ul_tbf = ms->ul_tbf(); + dl_tbf = ms->dl_tbf(); + ta = ms->ta(); + /* We got a RACH so the MS was in packet idle mode and thus +* didn't have any active TBFs */ + if (ul_tbf) { + LOGPTBFUL(ul_tbf, LOGL_NOTICE, + "Got RACH from TLLI=0x%08x while TBF still exists. Killing pending UL TBF\n", + tlli); + tbf_free(ul_tbf); + } + if (dl_tbf) { + LOGPTBFUL(dl_tbf, LOGL_NOTICE, + "Got RACH from TLLI=0x%08x while TBF still exists. Release pending DL TBF\n", + tlli); + tbf_free(dl_tbf); + } } - if (dl_tbf) { - LOGPTBFUL(dl_tbf, LOGL_NOTICE, - "Got RACH from TLLI=0x%08x while TBF still exists. Release pending DL TBF\n", - tlli); - tbf_free(dl_tbf); - dl_tbf = NULL; - } LOGP(DRLCMAC, LOGL_DEBUG, "MS requests UL TBF " "in packet resource request of single " "block, so we provide one:\n"); @@ -606,12 +609,11 @@ if (!ms->ms_class()) LOGP(DRLCMAC, LOGL_NOTICE, "MS does not give us a class.\n"); if (ms->egprs_ms_class()) - LOGP(DRLCMAC, LOGL_NOTICE, + LOGP(DRLCMAC, LOGL_INFO, "MS supports EGPRS multislot class %d.\n", ms->egprs_ms_class()); ul_tbf = tbf_alloc_ul(bts_data(), ms, trx_no(), tlli, ta); - if (!ul_tbf) { handle_tbf_reject(bts_data(), ms, tlli, trx_no(), ts_no); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/18223 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I62f24fe04ca10fca19bedda288fe3ed3ce75413f Gerrit-Change-Number: 18223 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange
Change in osmo-pcu[master]: Drop unneeded arg 'ta' in tbf_alloc_ul()
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/18224 ) Change subject: Drop unneeded arg 'ta' in tbf_alloc_ul() .. Drop unneeded arg 'ta' in tbf_alloc_ul() The function is simply setting the ta on the ms, so simply make sure ta is set on callers before passing the ms object. Change-Id: Iebb9c57f458690e045ddc45c800209ad8cf621e0 --- M src/pdch.cpp M src/tbf.cpp M src/tbf.h M tests/tbf/TbfTest.err 4 files changed, 16 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/24/18224/1 diff --git a/src/pdch.cpp b/src/pdch.cpp index 048577d..88d5d31 100644 --- a/src/pdch.cpp +++ b/src/pdch.cpp @@ -118,7 +118,7 @@ bts->channel_request_description(); /* This call will register the new TBF with the MS on success */ - gprs_rlcmac_ul_tbf *ul_tbf = tbf_alloc_ul(bts_data, tbf->ms(), tbf->trx->trx_no, tbf->tlli(), tbf->ta()); + gprs_rlcmac_ul_tbf *ul_tbf = tbf_alloc_ul(bts_data, tbf->ms(), tbf->trx->trx_no, tbf->tlli()); /* schedule uplink assignment or reject */ if (ul_tbf) { @@ -551,7 +551,6 @@ struct gprs_rlcmac_ul_tbf *ul_tbf; struct gprs_rlcmac_dl_tbf *dl_tbf; uint32_t tlli = request->ID.u.TLLI; - uint8_t ta = GSM48_TA_INVALID; bool found = true; GprsMs *ms = bts()->ms_by_tlli(tlli); @@ -566,7 +565,6 @@ if (found) { ul_tbf = ms->ul_tbf(); dl_tbf = ms->dl_tbf(); - ta = ms->ta(); /* We got a RACH so the MS was in packet idle mode and thus * didn't have any active TBFs */ if (ul_tbf) { @@ -593,7 +591,7 @@ "block, but there is no resource request " "scheduled!\n"); } else { - ta = sba->ta; + ms->set_ta(sba->ta); bts()->sba()->free_sba(sba); } if (request->Exist_MS_Radio_Access_capability2) { @@ -613,7 +611,7 @@ "MS supports EGPRS multislot class %d.\n", ms->egprs_ms_class()); - ul_tbf = tbf_alloc_ul(bts_data(), ms, trx_no(), tlli, ta); + ul_tbf = tbf_alloc_ul(bts_data(), ms, trx_no(), tlli); if (!ul_tbf) { handle_tbf_reject(bts_data(), ms, tlli, trx_no(), ts_no); diff --git a/src/tbf.cpp b/src/tbf.cpp index 56fdcd1..2693223 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -416,7 +416,7 @@ } gprs_rlcmac_ul_tbf *tbf_alloc_ul(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx, -uint32_t tlli, uint8_t ta) +uint32_t tlli) { struct gprs_rlcmac_ul_tbf *tbf; @@ -435,8 +435,6 @@ tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); OSMO_ASSERT(tbf->ms()); - tbf->ms()->set_ta(ta); - return tbf; } diff --git a/src/tbf.h b/src/tbf.h index 5ebd2e8..2b4cf6d 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -347,7 +347,7 @@ struct gprs_rlcmac_ul_tbf *tbf_alloc_ul(struct gprs_rlcmac_bts *bts, GprsMs *ms, - int8_t use_trx, uint32_t tlli, uint8_t ta); + int8_t use_trx, uint32_t tlli); struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_tbf(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx, bool single_slot); diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 6019def..ca16149 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -1526,6 +1526,7 @@ - RX : Uplink Control Block - Creating MS object, TLLI = 0x MS requests UL TBF in packet resource request of single block, so we provide one: +Modifying MS object, TLLI = 0x, TA 220 -> 7 Modifying MS object, TLLI = 0x, MS class 0 -> 1 ** UL-TBF starts here ** Allocating UL TBF: MS_CLASS=1/0 @@ -1545,7 +1546,6 @@ TBF(TFI=0 TLLI=0x DIR=UL STATE=NULL) changes state from NULL to ASSIGN TBF(TFI=0 TLLI=0x DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 5 sec. 0 microsec, cur_fn=0 Modifying MS object, UL TLLI: 0x -> 0xf1223344, not yet confirmed -Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assignment is complete. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH) @@ -1608,6 +1608,7 @@ - RX : Uplink Contr
Change in pysim[master]: pySim-prog, pySim-read, do not echo reader id
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/18221 ) Change subject: pySim-prog, pySim-read, do not echo reader id .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/18221 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I243cc332f075d007b1c111292effcc610e874eb3 Gerrit-Change-Number: 18221 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Tue, 12 May 2020 17:21:33 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-pcu[master]: Expect ms object to exist before calling tbf_alloc_dl_tbf()
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/18134 ) Change subject: Expect ms object to exist before calling tbf_alloc_dl_tbf() .. Patch Set 2: Code-Review+2 REadding +2 after adding requesting OSMO_ASSERT -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/18134 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I87f6cdf8288a688466020bda0874e68b57aa71c4 Gerrit-Change-Number: 18134 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 17:09:17 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-pcu[master]: Expect ms object to exist before calling tbf_alloc_ul_tbf()
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/18133 ) Change subject: Expect ms object to exist before calling tbf_alloc_ul_tbf() .. Expect ms object to exist before calling tbf_alloc_ul_tbf() It's really non-sense from architectural point of view to pass an optional pointer to the MS holding the TBF and creating it otherwise. TBFs shouldn't be creating MS they belong too. This simple change requiring so many code line changes really exhibits how badly entangled the object relationship is. Another commit will follow doing the same for dl tbf. Change-Id: I010aa5877902816ae246e09ad5ad87946f96855c --- M src/bts.cpp M src/pdch.cpp M src/tbf.cpp M src/tbf.h M tests/alloc/AllocTest.cpp M tests/tbf/TbfTest.cpp M tests/tbf/TbfTest.err M tests/types/TypesTest.cpp 8 files changed, 105 insertions(+), 103 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/bts.cpp b/src/bts.cpp index 1d073aa..2916ee7 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -753,6 +753,7 @@ uint8_t tsc = 0, ta = qta2ta(qta); uint8_t egprs_ms_class = egprs_mslot_class_from_ra(ra, is_11bit); bool failure = false; + GprsMs *ms; rach_frame(); @@ -792,9 +793,10 @@ "Uplink (AGCH)\n"); } } else { + ms = ms_alloc(0, egprs_ms_class); // Create new TBF /* FIXME: Copy and paste with other routines.. */ - tbf = tbf_alloc_ul_tbf(&m_bts, NULL, -1, 0, egprs_ms_class, true); + tbf = tbf_alloc_ul_tbf(&m_bts, ms, -1, true); if (!tbf) { LOGP(DRLCMAC, LOGL_NOTICE, "No PDCH resource sending " diff --git a/src/pdch.cpp b/src/pdch.cpp index 77be1b5..149ca1f 100644 --- a/src/pdch.cpp +++ b/src/pdch.cpp @@ -118,8 +118,7 @@ bts->channel_request_description(); /* This call will register the new TBF with the MS on success */ - gprs_rlcmac_ul_tbf *ul_tbf = tbf_alloc_ul(bts_data, tbf->trx->trx_no, tbf->ms_class(), - tbf->ms()->egprs_ms_class(), tbf->tlli(), tbf->ta(), tbf->ms()); + gprs_rlcmac_ul_tbf *ul_tbf = tbf_alloc_ul(bts_data, tbf->ms(), tbf->trx->trx_no, tbf->tlli(), tbf->ta()); /* schedule uplink assignment or reject */ if (ul_tbf) { @@ -552,19 +551,17 @@ struct gprs_rlcmac_ul_tbf *ul_tbf = NULL; struct gprs_rlcmac_dl_tbf *dl_tbf = NULL; uint32_t tlli = request->ID.u.TLLI; - uint8_t ms_class = 0; - uint8_t egprs_ms_class = 0; uint8_t ta = GSM48_TA_INVALID; GprsMs *ms = bts()->ms_by_tlli(tlli); + if (!ms) + ms = bts()->ms_alloc(0, 0); /* ms class updated later */ + /* Keep the ms, even if it gets idle temporarily */ GprsMs::Guard guard(ms); - - if (ms) { - ul_tbf = ms->ul_tbf(); - dl_tbf = ms->dl_tbf(); - ta = ms->ta(); - } + ul_tbf = ms->ul_tbf(); + dl_tbf = ms->dl_tbf(); + ta = ms->ta(); /* We got a RACH so the MS was in packet idle mode and thus * didn't have any active TBFs */ @@ -597,20 +594,23 @@ bts()->sba()->free_sba(sba); } if (request->Exist_MS_Radio_Access_capability2) { + uint8_t ms_class, egprs_ms_class; ms_class = Decoding::get_ms_class_by_capability( &request->MS_Radio_Access_capability2); + ms->set_ms_class(ms_class); egprs_ms_class = Decoding::get_egprs_ms_class_by_capability( &request->MS_Radio_Access_capability2); + ms->set_egprs_ms_class(egprs_ms_class); } - if (!ms_class) + if (!ms->ms_class()) LOGP(DRLCMAC, LOGL_NOTICE, "MS does not give us a class.\n"); - if (egprs_ms_class) + if (ms->egprs_ms_class()) LOGP(DRLCMAC, LOGL_NOTICE, "MS supports EGPRS multislot class %d.\n", - egprs_ms_class); - ul_tbf = tbf_alloc_ul(bts_data(), trx_no(), ms_class, - egprs_ms_class, tlli, ta, ms); + ms->egprs_ms_class()); + + ul_tbf = tbf_alloc_ul(bts_data(), ms, trx_no(), tlli, ta); if (!ul_tbf) { handle_tbf_reject(bts_data(), ms, tlli,
Change in osmo-pcu[master]: Expect ms object to exist before calling tbf_alloc_dl_tbf()
Hello fixeria, laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/18134 to look at the new patch set (#2). Change subject: Expect ms object to exist before calling tbf_alloc_dl_tbf() .. Expect ms object to exist before calling tbf_alloc_dl_tbf() Same as previous commit, this time for the DL counterpart. Change-Id: I87f6cdf8288a688466020bda0874e68b57aa71c4 --- M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M tests/alloc/AllocTest.cpp M tests/app_info/AppInfoTest.cpp M tests/tbf/TbfTest.cpp M tests/tbf/TbfTest.err M tests/types/TypesTest.cpp 8 files changed, 223 insertions(+), 221 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/34/18134/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/18134 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I87f6cdf8288a688466020bda0874e68b57aa71c4 Gerrit-Change-Number: 18134 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset
Change in osmo-pcu[master]: Expect ms object to exist before calling tbf_alloc_dl_tbf()
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/18134 ) Change subject: Expect ms object to exist before calling tbf_alloc_dl_tbf() .. Patch Set 1: (2 comments) https://gerrit.osmocom.org/c/osmo-pcu/+/18134/1/src/tbf.cpp File src/tbf.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/18134/1/src/tbf.cpp@1057 PS1, Line 1057: ms->egprs_ms_class() == 0 > So if we're in 'EGPRS only' mode, and both egprs_ms_class and ms_class == 0, > then a phone gets accep […] yeah, looks like... god nows.. all this egprs_enabled needs to go away soon anyway... https://gerrit.osmocom.org/c/osmo-pcu/+/18134/1/src/tbf.cpp@1063 PS1, Line 1063: ms->set_egprs_ms_class(1); > Wow, unrelated question: why do we overwrite the MS class here? o_O Well, because according to the assumptions above, this MS must be EGPRS capable lol so broken. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/18134 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I87f6cdf8288a688466020bda0874e68b57aa71c4 Gerrit-Change-Number: 18134 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 16:31:42 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria Gerrit-MessageType: comment
Change in osmo-pcu[master]: Expect ms object to exist before calling tbf_alloc_ul_tbf()
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/18133 ) Change subject: Expect ms object to exist before calling tbf_alloc_ul_tbf() .. Patch Set 1: > Patch Set 1: Code-Review+2 > > (1 comment) > > I am wondering if it's possible to avoid these formal (dummy) MS allocations > and make it legal for a TBF to exist without being associated to particular > MS instance until it's know to whom it belongs to. No way! Let's please skip this model where objects can have or not associations to other objects. A TBF is ALWAYS associated to an MS even if we lack some information about that MS. Let's always have an objet and let the object handle all the state on what information we have about it instead of trying to figure out in all different places. If a TBF is to be created, it has to be created from an MS. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/18133 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I010aa5877902816ae246e09ad5ad87946f96855c Gerrit-Change-Number: 18133 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 16:28:41 + Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in libosmocore[master]: logging: do not allow multiple calls of log_init()
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18222 ) Change subject: logging: do not allow multiple calls of log_init() .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18222 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ibb300e4c9b04767581116ab530b2e6a9a195db08 Gerrit-Change-Number: 18222 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Tue, 12 May 2020 16:16:16 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: logging: use LOGL_NOTICE when no loglevel is set
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17604 ) Change subject: logging: use LOGL_NOTICE when no loglevel is set .. Patch Set 8: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17604 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib9e180261505062505fc4605a98023910f76cde6 Gerrit-Change-Number: 17604 Gerrit-PatchSet: 8 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 16:15:59 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-pcu[master]: Expect ms object to exist before calling tbf_alloc_dl_tbf()
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/18134 ) Change subject: Expect ms object to exist before calling tbf_alloc_dl_tbf() .. Patch Set 1: Code-Review+2 (3 comments) https://gerrit.osmocom.org/c/osmo-pcu/+/18134/1/src/tbf.cpp File src/tbf.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/18134/1/src/tbf.cpp@1055 PS1, Line 1055: int rc; Makes sense to add OSMO_ASSERT(ms != NULL) here, like you did in the previous change. https://gerrit.osmocom.org/c/osmo-pcu/+/18134/1/src/tbf.cpp@1057 PS1, Line 1057: ms->egprs_ms_class() == 0 So if we're in 'EGPRS only' mode, and both egprs_ms_class and ms_class == 0, then a phone gets accepted just fine? Just trying to understand the logic behind this, not related to this change. https://gerrit.osmocom.org/c/osmo-pcu/+/18134/1/src/tbf.cpp@1063 PS1, Line 1063: ms->set_egprs_ms_class(1); Wow, unrelated question: why do we overwrite the MS class here? o_O -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/18134 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I87f6cdf8288a688466020bda0874e68b57aa71c4 Gerrit-Change-Number: 18134 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 16:14:43 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-pcu[master]: Expect ms object to exist before calling tbf_alloc_ul_tbf()
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/18133 ) Change subject: Expect ms object to exist before calling tbf_alloc_ul_tbf() .. Patch Set 1: Code-Review+2 (1 comment) I am wondering if it's possible to avoid these formal (dummy) MS allocations and make it legal for a TBF to exist without being associated to particular MS instance until it's know to whom it belongs to. https://gerrit.osmocom.org/c/osmo-pcu/+/18133/1/src/pdch.cpp File src/pdch.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/18133/1/src/pdch.cpp@a563 PS1, Line 563: if (ms) { I would keep this 'if', and rather allocate the MS in the 'else' branch or so. It does not make sense to call ms->ul_tbf() or ms->dl_tbf() if the MS instance was just allocated... -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/18133 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I010aa5877902816ae246e09ad5ad87946f96855c Gerrit-Change-Number: 18133 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 16:04:08 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: logging: use LOGL_NOTICE when no loglevel is set
Hello fixeria, pespin, laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/17604 to look at the new patch set (#8). Change subject: logging: use LOGL_NOTICE when no loglevel is set .. logging: use LOGL_NOTICE when no loglevel is set when the API user of libosmocores logging infrastructure does not set a pre-defined logging level in struct log_info_cat, the result would be an invalid logging level. In order to avoid problems with that and to spare all the additional .loglevel = LOGL_NOTICE (API users are advised to use LOGL_NOTICE as default) lines in the user code lets check the logging level on startup and set LOGL_NOTICE if there is no logging level set. Change-Id: Ib9e180261505062505fc4605a98023910f76cde6 Related: OS#2577 --- M src/logging.c 1 file changed, 17 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/04/17604/8 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17604 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib9e180261505062505fc4605a98023910f76cde6 Gerrit-Change-Number: 17604 Gerrit-PatchSet: 8 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset
Change in libosmocore[master]: logging: do not allow multiple calls of log_init()
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/18222 ) Change subject: logging: do not allow multiple calls of log_init() .. logging: do not allow multiple calls of log_init() calling log_init() multiple times would lead into memory leaks. The function should only be called once on startup of the process. Lets make sure that it does not get called multiple times by accident. Change-Id: Ibb300e4c9b04767581116ab530b2e6a9a195db08 --- M src/logging.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/22/18222/1 diff --git a/src/logging.c b/src/logging.c index 4aaf515..c14e696 100644 --- a/src/logging.c +++ b/src/logging.c @@ -1028,6 +1028,9 @@ int i; struct log_info_cat *cat_ptr; + /* Ensure that log_init is not called multiple times */ + OSMO_ASSERT(tall_log_ctx == NULL) + tall_log_ctx = talloc_named_const(ctx, 1, "logging"); if (!tall_log_ctx) return -ENOMEM; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18222 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ibb300e4c9b04767581116ab530b2e6a9a195db08 Gerrit-Change-Number: 18222 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-MessageType: newchange
Change in pysim[master]: pySim-prog, pySim-read, do not echo reader id
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/18221 ) Change subject: pySim-prog, pySim-read, do not echo reader id .. pySim-prog, pySim-read, do not echo reader id pySim-prog and pySim-read currently echo back the pcsc reader id (or baudrate/socket, depending on the interface used). This makes the output unecessarly undeterministic, which becomes a problem when verifying the putput in tests. Lets not echo those variable, user supplied parameters back. Also lets move the code that does the initalization to utils, so that it can be used from pySim-prog and from pySim-read (code dup). Change-Id: I243cc332f075d007b1c111292effcc610e874eb3 Related: OS#4503 --- M pySim-prog.py M pySim-read.py M pySim/utils.py M pysim-testdata/Fairwaves-SIM.ok M pysim-testdata/Wavemobile-SIM.ok M pysim-testdata/fakemagicsim.ok M pysim-testdata/sysmoISIM-SJA2.ok M pysim-testdata/sysmoUSIM-SJS1.ok M pysim-testdata/sysmosim-gr1.ok M tests/pysim-test.sh 10 files changed, 32 insertions(+), 47 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/21/18221/1 diff --git a/pySim-prog.py b/pySim-prog.py index c709959..67719b4 100755 --- a/pySim-prog.py +++ b/pySim-prog.py @@ -40,7 +40,7 @@ from pySim.commands import SimCardCommands from pySim.cards import _cards_classes, card_detect -from pySim.utils import h2b, swap_nibbles, rpad, derive_milenage_opc, calculate_luhn, dec_iccid +from pySim.utils import h2b, swap_nibbles, rpad, derive_milenage_opc, calculate_luhn, dec_iccid, init_reader from pySim.ts_51_011 import EF from pySim.card_handler import * from pySim.utils import * @@ -688,21 +688,7 @@ opts = parse_options() # Init card reader driver - if opts.pcsc_dev is not None: - print("Using PC/SC reader (dev=%d) interface" - % opts.pcsc_dev) - from pySim.transport.pcsc import PcscSimLink - sl = PcscSimLink(opts.pcsc_dev) - elif opts.osmocon_sock is not None: - print("Using Calypso-based (OsmocomBB, sock=%s) reader interface" - % opts.osmocon_sock) - from pySim.transport.calypso import CalypsoSimLink - sl = CalypsoSimLink(sock_path=opts.osmocon_sock) - else: # Serial reader is default - print("Using serial reader (port=%s, baudrate=%d) interface" - % (opts.device, opts.baudrate)) - from pySim.transport.serial import SerialSimLink - sl = SerialSimLink(device=opts.device, baudrate=opts.baudrate) + sl = init_reader(opts) # Create command layer scc = SimCardCommands(transport=sl) diff --git a/pySim-read.py b/pySim-read.py index 33e93a7..df21531 100755 --- a/pySim-read.py +++ b/pySim-read.py @@ -34,8 +34,8 @@ from pySim.commands import SimCardCommands from pySim.cards import card_detect, Card -from pySim.utils import h2b, swap_nibbles, rpad, dec_imsi, dec_iccid, dec_msisdn, format_xplmn_w_act, dec_spn, dec_st - +from pySim.utils import h2b, swap_nibbles, rpad, dec_imsi, dec_iccid, dec_msisdn +from pySim.utils import format_xplmn_w_act, dec_spn, dec_st, init_reader def parse_options(): @@ -72,21 +72,7 @@ opts = parse_options() # Init card reader driver - if opts.pcsc_dev is not None: - print("Using PC/SC reader (dev=%d) interface" - % opts.pcsc_dev) - from pySim.transport.pcsc import PcscSimLink - sl = PcscSimLink(opts.pcsc_dev) - elif opts.osmocon_sock is not None: - print("Using Calypso-based (OsmocomBB, sock=%s) reader interface" - % opts.osmocon_sock) - from pySim.transport.calypso import CalypsoSimLink - sl = CalypsoSimLink(sock_path=opts.osmocon_sock) - else: # Serial reader is default - print("Using serial reader (port=%s, baudrate=%d) interface" - % (opts.device, opts.baudrate)) - from pySim.transport.serial import SerialSimLink - sl = SerialSimLink(device=opts.device, baudrate=opts.baudrate) + sl = init_reader(opts) # Create command layer scc = SimCardCommands(transport=sl) diff --git a/pySim/utils.py b/pySim/utils.py index dbc7337..a1689ca 100644 --- a/pySim/utils.py +++ b/pySim/utils.py @@ -436,3 +436,22 @@ s += "\t%s # %s\n" % (i2h(content), i2s(content)) return s + +def init_reader(opts): + """ + Init card reader driver + """ + if opts.pcsc_dev is not None: + print("Using PC/SC reader interface") + from pySim.transport.pcsc import PcscSimLink + sl = PcscSimLink(opts.pcsc_dev) + elif opts.osmocon_sock is not None: + print("Using Calypso-based (OsmocomBB) reader interface") +
Change in docker-playground[master]: osmo-gsm-tester: Fix typo in path in jenkins.sh
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/18220 ) Change subject: osmo-gsm-tester: Fix typo in path in jenkins.sh .. osmo-gsm-tester: Fix typo in path in jenkins.sh Change-Id: Icdbd94a9e3de81ae60ce18da86ad57ebf70fb04f --- M osmo-gsm-tester/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/20/18220/1 diff --git a/osmo-gsm-tester/jenkins.sh b/osmo-gsm-tester/jenkins.sh index 5b1541b..64de38f 100755 --- a/osmo-gsm-tester/jenkins.sh +++ b/osmo-gsm-tester/jenkins.sh @@ -80,7 +80,7 @@ /bin/sh -c "/data/osmo-gsm-tester-slave.sh >/data/sshd.log 2>&1" echo Starting container with osmo-gsm-tester main unit -OSMO_GSM_TESTER_CONF=${OSMO_GSM_TESTER_CONF:-/tmp/osmo-gsm-tester/sysmoco/main.conf} +OSMO_GSM_TESTER_CONF=${OSMO_GSM_TESTER_CONF:-/tmp/osmo-gsm-tester/sysmocom/main.conf} OSMO_GSM_TESTER_OPTS=${OSMO_GSM_TESTER_OPTS:--T -l dbg -s 4g:srsenb-rftype@zmq+srsue-rftype@zmq -t ping} docker run --rm \ --cap-add=NET_ADMIN \ -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/18220 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Icdbd94a9e3de81ae60ce18da86ad57ebf70fb04f Gerrit-Change-Number: 18220 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange
Change in docker-playground[master]: osmo-gsm-tester: Fix typo in path in jenkins.sh
pespin has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/18220 ) Change subject: osmo-gsm-tester: Fix typo in path in jenkins.sh .. osmo-gsm-tester: Fix typo in path in jenkins.sh Change-Id: Icdbd94a9e3de81ae60ce18da86ad57ebf70fb04f --- M osmo-gsm-tester/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: pespin: Looks good to me, approved; Verified diff --git a/osmo-gsm-tester/jenkins.sh b/osmo-gsm-tester/jenkins.sh index 5b1541b..64de38f 100755 --- a/osmo-gsm-tester/jenkins.sh +++ b/osmo-gsm-tester/jenkins.sh @@ -80,7 +80,7 @@ /bin/sh -c "/data/osmo-gsm-tester-slave.sh >/data/sshd.log 2>&1" echo Starting container with osmo-gsm-tester main unit -OSMO_GSM_TESTER_CONF=${OSMO_GSM_TESTER_CONF:-/tmp/osmo-gsm-tester/sysmoco/main.conf} +OSMO_GSM_TESTER_CONF=${OSMO_GSM_TESTER_CONF:-/tmp/osmo-gsm-tester/sysmocom/main.conf} OSMO_GSM_TESTER_OPTS=${OSMO_GSM_TESTER_OPTS:--T -l dbg -s 4g:srsenb-rftype@zmq+srsue-rftype@zmq -t ping} docker run --rm \ --cap-add=NET_ADMIN \ -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/18220 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Icdbd94a9e3de81ae60ce18da86ad57ebf70fb04f Gerrit-Change-Number: 18220 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in docker-playground[master]: osmo-gsm-tester: Fix typo in path in jenkins.sh
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/18220 ) Change subject: osmo-gsm-tester: Fix typo in path in jenkins.sh .. Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/18220 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Icdbd94a9e3de81ae60ce18da86ad57ebf70fb04f Gerrit-Change-Number: 18220 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 14:43:15 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-gsm-tester[master]: config: Allow setting trial directory in main.conf
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18219 ) Change subject: config: Allow setting trial directory in main.conf .. config: Allow setting trial directory in main.conf Change-Id: Ia4141001d084f690897dbdff5eae6c69ff2e521c --- M doc/manuals/chapters/config.adoc M selftest/resource_test/resource_test.ok M selftest/scenario_test/scenario_test.ok M selftest/suite_test/suite_test.ok M src/osmo-gsm-tester.py M src/osmo_gsm_tester/core/config.py 6 files changed, 23 insertions(+), 9 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/doc/manuals/chapters/config.adoc b/doc/manuals/chapters/config.adoc index fec5c87..17cf825 100644 --- a/doc/manuals/chapters/config.adoc +++ b/doc/manuals/chapters/config.adoc @@ -27,6 +27,7 @@ - 'state_dir': Path to <> directory - 'suites_dir': Path to <> directory +- 'trial_dir': Path to <> directory to test against (overridden by cmdline argument) - 'scenarios_dir': Path to <> directory (optional) - 'default_suites_conf_path': Path to <> file (optional) - 'defaults_conf_path': Path to <> file (optional) @@ -46,6 +47,7 @@ state_dir: '/var/tmp/osmo-gsm-tester/state' suites_dir: '/usr/local/src/osmo-gsm-tester/suites' scenarios_dir: './scenarios' +trial_dir: './trial' default_suites_conf_path: './default-suites.conf' defaults_conf_path: './defaults.conf' resource_conf_path: './resources.conf' diff --git a/selftest/resource_test/resource_test.ok b/selftest/resource_test/resource_test.ok index 8a0b52f..0ad760e 100644 --- a/selftest/resource_test/resource_test.ok +++ b/selftest/resource_test/resource_test.ok @@ -16,7 +16,8 @@ 'resource_conf_path': '[PATH]/selftest/resource_test/conf/resources.conf', 'scenarios_dir': '[PATH]/selftest/resource_test/conf/scenarios', 'state_dir': '[PATH]/selftest/resource_test/conf/test_work/state_dir', - 'suites_dir': '[PATH]/selftest/resource_test/conf/suite_test'} + 'suites_dir': '[PATH]/selftest/resource_test/conf/suite_test', + 'trial_dir': '[PATH]/selftest/resource_test/conf/trial'} *** all resources: {'arfcn': [{'_hash': 'e620569450f8259b3f0212ec19c285dd07df063c', 'arfcn': '512', diff --git a/selftest/scenario_test/scenario_test.ok b/selftest/scenario_test/scenario_test.ok index e37ef57..e845f4c 100644 --- a/selftest/scenario_test/scenario_test.ok +++ b/selftest/scenario_test/scenario_test.ok @@ -5,7 +5,8 @@ 'resource_conf_path': '[PATH]/selftest/scenario_test/resources.conf', 'scenarios_dir': '[PATH]/selftest/scenario_test', 'state_dir': '[PATH]/selftest/scenario_test/test_work/state_dir', - 'suites_dir': '[PATH]/selftest/scenario_test'} + 'suites_dir': '[PATH]/selftest/scenario_test', + 'trial_dir': '[PATH]/selftest/scenario_test/trial'} scenario_case_01.conf {'anotherlist': ['4', '0'], 'foobar': 'True', diff --git a/selftest/suite_test/suite_test.ok b/selftest/suite_test/suite_test.ok index fb26a06..d55317b 100644 --- a/selftest/suite_test/suite_test.ok +++ b/selftest/suite_test/suite_test.ok @@ -6,7 +6,8 @@ 'resource_conf_path': '[PATH]/selftest/suite_test/resources.conf', 'scenarios_dir': '[PATH]/selftest/suite_test/scenarios', 'state_dir': '[PATH]/selftest/suite_test/test_work/state_dir', - 'suites_dir': '[PATH]/selftest/suite_test'} + 'suites_dir': '[PATH]/selftest/suite_test', + 'trial_dir': '[PATH]/selftest/suite_test/trial'} --- -: ERR: RuntimeError: Suite not found: 'does_not_exist' in [PATH]/selftest/suite_test - no suite.conf cnf empty_dir: DBG: reading suite.conf diff --git a/src/osmo-gsm-tester.py b/src/osmo-gsm-tester.py index 204b1c7..cfe55f6 100755 --- a/src/osmo-gsm-tester.py +++ b/src/osmo-gsm-tester.py @@ -24,9 +24,9 @@ Examples: -./osmo-gsm-tester.py -c doc/examples/2g_osmocom/main.conf ~/my_trial_package/ -s osmo_trx -./osmo-gsm-tester.py -c doc/examples/2g_osmocom/main.conf ~/my_trial_package/ -s sms_tests:dyn_ts+eu_band+bts_sysmo -./osmo-gsm-tester.py -c sysmocom/main.conf ~/my_trial_package/ -s sms_tests/mo_mt_sms:bts_trx +./osmo-gsm-tester.py -c doc/examples/2g_osmocom/main.conf ~/my_trial_dir/ -s osmo_trx +./osmo-gsm-tester.py -c doc/examples/2g_osmocom/main.conf ~/my_trial_dir/ -s sms_tests:dyn_ts+eu_band+bts_sysmo +./osmo-gsm-tester.py -c sysmocom/main.conf ~/my_trial_dir/ -s sms_tests/mo_mt_sms:bts_trx (The names for test suites and scenarios used in these examples must be defined by the osmo-gsm-tester configuration.) @@ -104,7 +104,7 @@ help='Show version') parser.add_argument('-c', '--conf-path', dest='conf_path', help='''Specify main configuration file path''') -parser.add_argument('trial_package', +parser.add_argument('trial_dir', nargs='?', default=None, help='Directory containing binaries to test') parser.add_argument('-s', '--suite-scenario', dest='suite_scenario', action='append', help='''A suite-scenarios c
Change in osmo-gsm-tester[master]: config: Allow setting trial directory in main.conf
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18219 ) Change subject: config: Allow setting trial directory in main.conf .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18219 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ia4141001d084f690897dbdff5eae6c69ff2e521c Gerrit-Change-Number: 18219 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 14:38:32 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: logging: use LOGL_NOTICE when no loglevel is set
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17604 ) Change subject: logging: use LOGL_NOTICE when no loglevel is set .. Patch Set 7: Code-Review+1 (2 comments) https://gerrit.osmocom.org/c/libosmocore/+/17604/7/src/logging.c File src/logging.c: https://gerrit.osmocom.org/c/libosmocore/+/17604/7/src/logging.c@1031 PS7, Line 1031: tall_log_ctx = talloc_named_const(ctx, 1, "logging"); > Regarding fixeria's comment on free(): Correct. […] Rather OSMO_ASSERT(tall_log_ctx == NULL)... https://gerrit.osmocom.org/c/libosmocore/+/17604/7/src/logging.c@1048 PS7, Line 1048: Alignment is broken :/ -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17604 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib9e180261505062505fc4605a98023910f76cde6 Gerrit-Change-Number: 17604 Gerrit-PatchSet: 7 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 14:29:03 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: pespin Gerrit-MessageType: comment
Change in osmo-gsm-tester[master]: config: Allow setting trial directory in main.conf
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18219 to look at the new patch set (#2). Change subject: config: Allow setting trial directory in main.conf .. config: Allow setting trial directory in main.conf Change-Id: Ia4141001d084f690897dbdff5eae6c69ff2e521c --- M doc/manuals/chapters/config.adoc M selftest/resource_test/resource_test.ok M selftest/scenario_test/scenario_test.ok M selftest/suite_test/suite_test.ok M src/osmo-gsm-tester.py M src/osmo_gsm_tester/core/config.py 6 files changed, 23 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/19/18219/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18219 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ia4141001d084f690897dbdff5eae6c69ff2e521c Gerrit-Change-Number: 18219 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
Change in libosmocore[master]: logging: use LOGL_NOTICE when no loglevel is set
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17604 ) Change subject: logging: use LOGL_NOTICE when no loglevel is set .. Patch Set 7: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/17604/7/src/logging.c File src/logging.c: https://gerrit.osmocom.org/c/libosmocore/+/17604/7/src/logging.c@1031 PS7, Line 1031: tall_log_ctx = talloc_named_const(ctx, 1, "logging"); Regarding fixeria's comment on free(): Correct. But then please submit a new patch freeing tall_log_ctx here before assigning it, in case log_init is called more than once. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17604 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib9e180261505062505fc4605a98023910f76cde6 Gerrit-Change-Number: 17604 Gerrit-PatchSet: 7 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 14:25:15 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: logging: use LOGL_NOTICE when no loglevel is set
Hello fixeria, pespin, laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/17604 to look at the new patch set (#7). Change subject: logging: use LOGL_NOTICE when no loglevel is set .. logging: use LOGL_NOTICE when no loglevel is set when the API user of libosmocores logging infrastructure does not set a pre-defined logging level in struct log_info_cat, the result would be an invalid logging level. In order to avoid problems with that and to spare all the additional .loglevel = LOGL_NOTICE (API users are advised to use LOGL_NOTICE as default) lines in the user code lets check the logging level on startup and set LOGL_NOTICE if there is no logging level set. Change-Id: Ib9e180261505062505fc4605a98023910f76cde6 Related: OS#2577 --- M src/logging.c 1 file changed, 16 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/04/17604/7 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17604 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib9e180261505062505fc4605a98023910f76cde6 Gerrit-Change-Number: 17604 Gerrit-PatchSet: 7 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset
Change in libosmocore[master]: logging: use LOGL_NOTICE when not loglevel is set
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17604 ) Change subject: logging: use LOGL_NOTICE when not loglevel is set .. Patch Set 6: (2 comments) https://gerrit.osmocom.org/c/libosmocore/+/17604/6/src/logging.c File src/logging.c: https://gerrit.osmocom.org/c/libosmocore/+/17604/6/src/logging.c@1047 PS6, Line 1047: cat_temp_ptr = talloc_zero_array(osmo_log_info, > please change name, "temp" seems to say the variable is function-scoped and > should be freed before e […] I can be 'cat_ptr' or even just 'cat'. https://gerrit.osmocom.org/c/libosmocore/+/17604/6/src/logging.c@1077 PS6, Line 1077: osmo_log_info->cat = cat_temp_ptr; > if osmo_log_info->cat is not NULL, talloc_free it before assigning it, to > make sure we don't leak if […] osmo_log_info is allocated by this function using talloc_zero(), and this is the only place where it's actually initialized. Thus no need to check not free() anything. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17604 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib9e180261505062505fc4605a98023910f76cde6 Gerrit-Change-Number: 17604 Gerrit-PatchSet: 6 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 13:30:43 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment
Change in osmo-gsm-tester[master]: config: Allow setting trial directory in main.conf
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18219 ) Change subject: config: Allow setting trial directory in main.conf .. config: Allow setting trial directory in main.conf Change-Id: Ia4141001d084f690897dbdff5eae6c69ff2e521c --- M doc/manuals/chapters/config.adoc M src/osmo-gsm-tester.py M src/osmo_gsm_tester/core/config.py 3 files changed, 17 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/19/18219/1 diff --git a/doc/manuals/chapters/config.adoc b/doc/manuals/chapters/config.adoc index fec5c87..17cf825 100644 --- a/doc/manuals/chapters/config.adoc +++ b/doc/manuals/chapters/config.adoc @@ -27,6 +27,7 @@ - 'state_dir': Path to <> directory - 'suites_dir': Path to <> directory +- 'trial_dir': Path to <> directory to test against (overridden by cmdline argument) - 'scenarios_dir': Path to <> directory (optional) - 'default_suites_conf_path': Path to <> file (optional) - 'defaults_conf_path': Path to <> file (optional) @@ -46,6 +47,7 @@ state_dir: '/var/tmp/osmo-gsm-tester/state' suites_dir: '/usr/local/src/osmo-gsm-tester/suites' scenarios_dir: './scenarios' +trial_dir: './trial' default_suites_conf_path: './default-suites.conf' defaults_conf_path: './defaults.conf' resource_conf_path: './resources.conf' diff --git a/src/osmo-gsm-tester.py b/src/osmo-gsm-tester.py index 204b1c7..cfe55f6 100755 --- a/src/osmo-gsm-tester.py +++ b/src/osmo-gsm-tester.py @@ -24,9 +24,9 @@ Examples: -./osmo-gsm-tester.py -c doc/examples/2g_osmocom/main.conf ~/my_trial_package/ -s osmo_trx -./osmo-gsm-tester.py -c doc/examples/2g_osmocom/main.conf ~/my_trial_package/ -s sms_tests:dyn_ts+eu_band+bts_sysmo -./osmo-gsm-tester.py -c sysmocom/main.conf ~/my_trial_package/ -s sms_tests/mo_mt_sms:bts_trx +./osmo-gsm-tester.py -c doc/examples/2g_osmocom/main.conf ~/my_trial_dir/ -s osmo_trx +./osmo-gsm-tester.py -c doc/examples/2g_osmocom/main.conf ~/my_trial_dir/ -s sms_tests:dyn_ts+eu_band+bts_sysmo +./osmo-gsm-tester.py -c sysmocom/main.conf ~/my_trial_dir/ -s sms_tests/mo_mt_sms:bts_trx (The names for test suites and scenarios used in these examples must be defined by the osmo-gsm-tester configuration.) @@ -104,7 +104,7 @@ help='Show version') parser.add_argument('-c', '--conf-path', dest='conf_path', help='''Specify main configuration file path''') -parser.add_argument('trial_package', +parser.add_argument('trial_dir', nargs='?', default=None, help='Directory containing binaries to test') parser.add_argument('-s', '--suite-scenario', dest='suite_scenario', action='append', help='''A suite-scenarios combination @@ -129,7 +129,7 @@ exit(0) print('combinations:', repr(args.suite_scenario)) -print('trial:', repr(args.trial_package)) +print('trial:', repr(args.trial_dir)) print('tests:', repr(args.test)) # create a default log to stdout @@ -144,6 +144,11 @@ if args.conf_path: config.override_conf = args.conf_path +if args.trial_dir is not None: +trial_dir = args.trial_dir +else: +trial_dir = config.get_main_config_value(config.CFG_TRIAL_DIR) + combination_strs = list(args.suite_scenario or []) if not combination_strs: @@ -187,7 +192,7 @@ test_names = sorted(set(test_names)) print(repr(test_names)) -with trial.Trial(args.trial_package) as current_trial: +with trial.Trial(trial_dir) as current_trial: current_trial.verify() for suite_scenario_str, suite_def, scenarios in suite_scenarios: current_trial.add_suite_run(suite_scenario_str, suite_def, scenarios) diff --git a/src/osmo_gsm_tester/core/config.py b/src/osmo_gsm_tester/core/config.py index ea16e33..9380cca 100644 --- a/src/osmo_gsm_tester/core/config.py +++ b/src/osmo_gsm_tester/core/config.py @@ -65,6 +65,7 @@ CFG_STATE_DIR = 'state_dir' CFG_SUITES_DIR = 'suites_dir' CFG_SCENARIOS_DIR = 'scenarios_dir' +CFG_TRIAL_DIR = 'trial_dir' CFG_DEFAULT_SUITES_CONF = 'default_suites_conf_path' CFG_DEFAULTS_CONF = 'defaults_conf_path' CFG_RESOURCES_CONF = 'resource_conf_path' @@ -72,6 +73,7 @@ CFG_STATE_DIR: schema.STR, CFG_SUITES_DIR: schema.STR, CFG_SCENARIOS_DIR: schema.STR, +CFG_TRIAL_DIR: schema.STR, CFG_DEFAULT_SUITES_CONF: schema.STR, CFG_DEFAULTS_CONF: schema.STR, CFG_RESOURCES_CONF: schema.STR, @@ -80,6 +82,7 @@ DF_CFG_STATE_DIR = '/var/tmp/osmo-gsm-tester/state/' DF_CFG_SUITES_DIR = './suites' DF_CFG_SCENARIOS_DIR = './scenarios' +DF_CFG_TRIAL_DIR = './trial' DF_CFG_DEFAULT_SUITES_CONF = './default-suites.conf' DF_CFG_DEFAULTS_CONF = './defaults.conf' DF_CFG_RESOURCES_CONF = './resources.conf' @@ -133,6 +136,7 @@ CFG_STATE_DIR: DF_CFG_STATE_DIR, CFG_SUITES_DIR: DF_CFG_SUITES
Change in osmo-bts[master]: osmo-bts-trx/scheduler: remove a left-over from UL TCH handlers
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/18218 ) Change subject: osmo-bts-trx/scheduler: remove a left-over from UL TCH handlers .. osmo-bts-trx/scheduler: remove a left-over from UL TCH handlers Change-Id: I58eedd611ecd31cc36017545de2cf29acf49f521 Signed-off-by: Vadim Yanitskiy --- M src/osmo-bts-trx/scheduler_trx.c 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/18/18218/1 diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index e5c5519..8a2bb12 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -1127,7 +1127,6 @@ struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, bi->tn); struct l1sched_chan_state *chan_state = &l1ts->chan_state[chan]; sbit_t *burst, **bursts_p = &chan_state->ul_bursts; - uint32_t *first_fn = &chan_state->ul_first_fn; uint8_t *mask = &chan_state->ul_mask; uint8_t rsl_cmode = chan_state->rsl_cmode; uint8_t tch_mode = chan_state->tch_mode; @@ -1161,7 +1160,6 @@ if (bid == 0) { memset(*bursts_p + 464, 0, 464); *mask = 0x0; - *first_fn = bi->fn; } /* update mask */ @@ -1366,7 +1364,6 @@ struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, bi->tn); struct l1sched_chan_state *chan_state = &l1ts->chan_state[chan]; sbit_t *burst, **bursts_p = &chan_state->ul_bursts; - uint32_t *first_fn = &chan_state->ul_first_fn; uint8_t *mask = &chan_state->ul_mask; uint8_t rsl_cmode = chan_state->rsl_cmode; uint8_t tch_mode = chan_state->tch_mode; @@ -1405,7 +1402,6 @@ if (bid == 0) { memset(*bursts_p + 464, 0, 232); *mask = 0x0; - *first_fn = bi->fn; } /* update mask */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/18218 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I58eedd611ecd31cc36017545de2cf29acf49f521 Gerrit-Change-Number: 18218 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange
Change in osmo-gsm-tester[master]: Move update_version.sh to contrib/
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18217 ) Change subject: Move update_version.sh to contrib/ .. Move update_version.sh to contrib/ Change-Id: I26218cd512a739fc26ba04be05f01260152d785f --- M .gitignore M Makefile A contrib/update_version.sh D update_version.sh 4 files changed, 13 insertions(+), 12 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/.gitignore b/.gitignore index a0c4088..ad9b423 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ __pycache__ pid .*.sw? -version +.version _version.py tags set_pythonpath diff --git a/Makefile b/Makefile index 38ff6c8..558f739 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ ./contrib/check_dependencies.py version: - ./update_version.sh + ./contrib/update_version.sh manual: $(MAKE) -C doc/manuals diff --git a/contrib/update_version.sh b/contrib/update_version.sh new file mode 100755 index 000..ab2674a --- /dev/null +++ b/contrib/update_version.sh @@ -0,0 +1,11 @@ +#!/bin/sh +set -e +ROOTDIR=$(git rev-parse --show-toplevel) +git describe --abbrev=8 --dirty | sed 's/v\([^-]*\)-\([^-]*\)-\(.*\)/\1.dev\2.\3/' > $ROOTDIR/.version +cat $ROOTDIR/.version +echo "# osmo-gsm-tester version. +# Automatically generated by update_version.sh. +# Gets imported by __init__.py. + +_version = '$(cat $ROOTDIR/.version)'" \ + > $ROOTDIR/src/osmo_gsm_tester/_version.py diff --git a/update_version.sh b/update_version.sh deleted file mode 100755 index 3d5fe42..000 --- a/update_version.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -set -e -git describe --abbrev=8 --dirty | sed 's/v\([^-]*\)-\([^-]*\)-\(.*\)/\1.dev\2.\3/' > version -cat version -echo "# osmo-gsm-tester version. -# Automatically generated by update_version.sh. -# Gets imported by __init__.py. - -_version = '$(cat version)'" \ - > src/osmo_gsm_tester/_version.py -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18217 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I26218cd512a739fc26ba04be05f01260152d785f Gerrit-Change-Number: 18217 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in osmo-gsm-tester[master]: Cmdline arg -c sets main configuration file (old paths.conf) instead ...
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18204 ) Change subject: Cmdline arg -c sets main configuration file (old paths.conf) instead of dir containing it .. Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18204 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ieca65b71b543c44cfcec8e83efd0fe053c432e55 Gerrit-Change-Number: 18204 Gerrit-PatchSet: 4 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 12:53:45 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-gsm-tester[master]: doc/manuals: Swap order of schemas and config files
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18215 ) Change subject: doc/manuals: Swap order of schemas and config files .. doc/manuals: Swap order of schemas and config files First explain the different config files and directories, later describe the schemas used in each of them. Change-Id: Iaf31808a655a5c77a1dfaa155e86d42585130820 --- M doc/manuals/chapters/config.adoc 1 file changed, 211 insertions(+), 211 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/doc/manuals/chapters/config.adoc b/doc/manuals/chapters/config.adoc index c302cd6..fec5c87 100644 --- a/doc/manuals/chapters/config.adoc +++ b/doc/manuals/chapters/config.adoc @@ -1,216 +1,5 @@ == Configuration -=== Schemas - -All configuration attributes in {app-name} are stored and provided as YAML -files, which are handled internally mostly as sets of dictionaries, lists and -scalars. Each of these configurations have a known format (set of keys and -values), which is called 'schema'. Each provided configuration is validated -against its 'schema' at parse time. Hence, 'schemas' can be seen as a namespace -containing a structured tree of configuration attributes. Each attribute has a -schema type assigned which constrains the type of value it can hold. - -There are several well-known schemas used across {app-name}, and they are -described in following sub-sections. - -[[schema_main_cfg]] - Schema 'main config' - -This schema defines all the attributes available in {app-name} the main -configuration file <>, and it is used to validate it. - -[[schema_resources]] - Schema 'resources' - -This schema defines all the attributes which can be assigned to -a _resource_, and it is used to validate the <> -file. Hence, the <> contains a list of elements -for each resource type. This schema is also used and extended by the -<>. - -It is important to understand that the content in this schema refers to a list of -resources for each resource class. Since a list is ordered by definition, it -clearly identifies specific resources by order. This is important when applying -filters or modifiers, since they are applied per-resource in the list. One can -for instance apply attribute A to first resource of class C, while not applying -it or applying another attribute B to second resources of the same class. As a -result, complex forms can be used to filter and modify a list of resources -required by a testsuite. - -On the other hand, it's also important to note that lists for simple or scalar -types are currently being treated as unordered sets, which mean combination of -filters or modifiers apply differently. In the future, it may be possible to -have both behaviors for scalar/simple types by using also the YAML 'set' type in -{app-name}. - -//TODO: update this list and use a table for each resource type in its own object section - -These kinds of resources and their attributes are known: - -'ip_address':: - List of IP addresses to run osmo-nitb instances on. The main unit - typically has a limited number of such IP addresses configured, which - the connected BTS models can see on their network. - 'addr'::: - IPv4 address of the local interface. - -'bts':: - List of available BTS hardware. - 'label'::: - human readable label for your own reference - 'type'::: - which way to launch this BTS, one of - - 'osmo-bts-sysmo' - - 'osmo-bts-trx' - - 'osmo-bts-octphy' - - 'ipa-nanobts' - 'ipa_unit_id'::: - ip.access unit id to be used by the BTS, written into BTS and BSC config. - 'addr'::: - Remote IP address of the BTS for BTS like sysmoBTS, and local IP address - to bind to for locally run BTS such as osmo-bts-trx. - 'band'::: - GSM band that this BTS shoud use (*TODO*: allow multiple bands). One of: - - 'GSM-1800' - - 'GSM-1900' - - (*TODO*: more bands) - 'trx_list'::: - Specific TRX configurations for this BTS. There should be as many of - these as the BTS has TRXes. (*TODO*: a way to define >1 TRX without - special configuration for them.) -'hw_addr' - Hardware (MAC) address of the TRX in the form of '11:22:33:44:55:66', - only used for osmo-bts-octphy. (*TODO*: and nanobts??) -'net_device' - Local network device to reach the TRX's 'hw_addr' at, only used for - osmo-bts-octphy. Example: 'eth0'. -'nominal_power' - Nominal power to be used by the TRX. -'max_power_red' - Max power reduction to apply to the nominal power of the TRX. -'arfcn':: - List of ARFCNs to use for running BTSes, which defines the actual RF - frequency bands used. - 'arfcn'::: - ARFCN number, see e.g. - https://en.wikipedia.org/wiki/Absolute_radio-frequency_channel_number - (note that the res
Change in osmo-gsm-tester[master]: Move check_dependencies.py to contrib/
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18216 ) Change subject: Move check_dependencies.py to contrib/ .. Move check_dependencies.py to contrib/ Change-Id: I8def867b1042cbb98bb36ff4a473b4cdb92ce122 --- M Makefile R contrib/check_dependencies.py 2 files changed, 7 insertions(+), 3 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/Makefile b/Makefile index c36aa9a..38ff6c8 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ .PHONY: version check deps: - ./check_dependencies.py + ./contrib/check_dependencies.py version: ./update_version.sh diff --git a/check_dependencies.py b/contrib/check_dependencies.py similarity index 94% rename from check_dependencies.py rename to contrib/check_dependencies.py index daf46dc..61d08b0 100755 --- a/check_dependencies.py +++ b/contrib/check_dependencies.py @@ -36,7 +36,7 @@ pass def import_all_py_in_dir(rel_path, skip_modules=[]): -selfdir = os.path.dirname(os.path.abspath(__file__)) +selfdir = os.getcwd() dir = os.path.join(selfdir, rel_path) print('importing files in directory %s' % dir) for entry in os.listdir(dir): @@ -112,8 +112,12 @@ print('Skip checking modules: %r' % skip_obj_modules) +rootdir = os.path.realpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..')) +print('Changing workdir dir to %s' % rootdir) +os.chdir(rootdir) +sys.path.insert(0, rootdir) # We need to add it for cross-references between osmo_ms_driver and osmo_gsm_tester to work: -sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), 'src/')) +sys.path.insert(0, os.path.join(rootdir, 'src/')) import_all_py_in_dir('src/osmo_ms_driver') import_all_py_in_dir('src/osmo_gsm_tester/core') import_all_py_in_dir('src/osmo_gsm_tester/obj', skip_obj_modules) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18216 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I8def867b1042cbb98bb36ff4a473b4cdb92ce122 Gerrit-Change-Number: 18216 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in osmo-ci[master]: osmo-gsm-tester: Point config parameter to file instead of its dirname
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/18202 ) Change subject: osmo-gsm-tester: Point config parameter to file instead of its dirname .. osmo-gsm-tester: Point config parameter to file instead of its dirname Since osmo-gsm-tester.git Change-Id Ieca65b71b543c44cfcec8e83efd0fe053c432e55, the -c parameter holds the config file and not the directory where it is contained. Change-Id: I9aca57c4dd3180367eb17ec92177b90a9c411a6a --- M jobs/osmo-gsm-tester-runner.yml M jobs/osmo-gsm-tester_ttcn3.sh 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved; Verified diff --git a/jobs/osmo-gsm-tester-runner.yml b/jobs/osmo-gsm-tester-runner.yml index 788f057..041ef93 100644 --- a/jobs/osmo-gsm-tester-runner.yml +++ b/jobs/osmo-gsm-tester-runner.yml @@ -236,7 +236,7 @@ docker run --rm=true \ -e HOME=/build \ -e JOB_NAME="$JOB_NAME" \ - -e OSMO_GSM_TESTER_CONF="/build/osmo-gsm-tester/sysmocom" \ + -e OSMO_GSM_TESTER_CONF="/build/osmo-gsm-tester/sysmocom/main.conf" \ -e OSMO_GSM_TESTER_OPTS="$OSMO_GSM_TESTER_OPTS" \ -e BUILD_NUMBER="$BUILD_NUMBER" \ -w /build -i \ diff --git a/jobs/osmo-gsm-tester_ttcn3.sh b/jobs/osmo-gsm-tester_ttcn3.sh index cb973fd..c844d22 100644 --- a/jobs/osmo-gsm-tester_ttcn3.sh +++ b/jobs/osmo-gsm-tester_ttcn3.sh @@ -2,7 +2,7 @@ set -e -x # On our hardware, we actually use the ttcn3 configuration as-is. -export OSMO_GSM_TESTER_CONF="$PWD/osmo-gsm-tester/sysmocom/ttcn3" +export OSMO_GSM_TESTER_CONF="$PWD/osmo-gsm-tester/sysmocom/ttcn3/main.conf" # debug: provoke a failure #export OSMO_GSM_TESTER_OPTS="-s debug -t fail" -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/18202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I9aca57c4dd3180367eb17ec92177b90a9c411a6a Gerrit-Change-Number: 18202 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in docker-playground[master]: osmo-gsm-tester: Point config parameter to file instead of its dirname
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/18203 ) Change subject: osmo-gsm-tester: Point config parameter to file instead of its dirname .. Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/18203 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I5aa0507d0e82616ee3cca74573fea6bdb7459b53 Gerrit-Change-Number: 18203 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 12:53:30 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-gsm-tester[master]: Cmdline arg -c sets main configuration file (old paths.conf) instead ...
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18204 ) Change subject: Cmdline arg -c sets main configuration file (old paths.conf) instead of dir containing it .. Cmdline arg -c sets main configuration file (old paths.conf) instead of dir containing it It has been notified that current configuration system is difficult to understand and to use, so it has been envisioned to refactor it a bit. The idea is that the user passes a -c path/to/main.conf file, which in turn contains whatever osmo-gsm-tester main settings supports (basically what old paths.conf used to be, plus some files harcoded to the same -c directory are now configurable through the main configuration file). Change-Id: Ieca65b71b543c44cfcec8e83efd0fe053c432e55 --- M contrib/jenkins-run.sh M doc/examples/2g_osmocom/README.md A doc/examples/2g_osmocom/main.conf D doc/examples/2g_osmocom/paths.conf M doc/examples/4g_srsLTE/README.md A doc/examples/4g_srsLTE/main.conf D doc/examples/4g_srsLTE/paths.conf M doc/manuals/chapters/config.adoc M selftest/resource_test/resource_test.ok M selftest/resource_test/resource_test.py M selftest/scenario_test/scenario_test.ok M selftest/scenario_test/scenario_test.py M selftest/suite_test/suite_test.ok M selftest/suite_test/suite_test.py M src/osmo-gsm-tester.py M src/osmo_gsm_tester/core/config.py M src/osmo_gsm_tester/core/resource.py M sysmocom/README.md A sysmocom/main.conf D sysmocom/paths.conf D sysmocom/ttcn3/defaults.conf M sysmocom/ttcn3/jenkins-run.sh A sysmocom/ttcn3/main.conf D sysmocom/ttcn3/paths.conf 24 files changed, 290 insertions(+), 212 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins-run.sh b/contrib/jenkins-run.sh index 89ff13f..1c31a9d 100755 --- a/contrib/jenkins-run.sh +++ b/contrib/jenkins-run.sh @@ -2,7 +2,7 @@ set -e -x base="$PWD" SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P) # this file's directory -OSMO_GSM_TESTER_CONF=${OSMO_GSM_TESTER_CONF:-${SCRIPT_DIR}/../sysmocom} +OSMO_GSM_TESTER_CONF=${OSMO_GSM_TESTER_CONF:-${SCRIPT_DIR}/../sysmocom/main.conf} time_start="$(date '+%F %T')" diff --git a/doc/examples/2g_osmocom/README.md b/doc/examples/2g_osmocom/README.md index 47b0737..b85ee1f 100644 --- a/doc/examples/2g_osmocom/README.md +++ b/doc/examples/2g_osmocom/README.md @@ -1,13 +1,14 @@ This a sample 2G test suite configured and ready to use. The only thing missing is a trial dir containing binaries. -You can point osmo-gsm-tester.py at this config using the '-c $DIR' command line -argument, where DIR is the directory path where this README file resides. +You can point osmo-gsm-tester.py at this config using the '-c $DIR/main.conf' +command line argument, where DIR is the directory path where this README file +resides. If you have your trial with binary tar archives in ~/my_trial you can run the suite for example like this: ``` -osmo-gsm-tester.py -c $DIR ~/my_trial +osmo-gsm-tester.py -c $DIR/main.conf ~/my_trial ``` Alternatively you can setup this example as default config for your user by @@ -19,4 +20,4 @@ A ./state dir will be created to store the current osmo-gsm-tester state. If you prefer not to write to $DIR, set up an own configuration pointing at a -different path (see paths.conf: 'state_dir'). +different path (see main.conf: 'state_dir'). diff --git a/doc/examples/2g_osmocom/main.conf b/doc/examples/2g_osmocom/main.conf new file mode 100644 index 000..b810519 --- /dev/null +++ b/doc/examples/2g_osmocom/main.conf @@ -0,0 +1,6 @@ +state_dir: '/var/tmp/osmo-gsm-tester/state' +suites_dir: './suites' +scenarios_dir: './scenarios' +default_suites_conf_path: './default-suites.conf' +defaults_conf_path: './defaults.conf' +resource_conf_path: './resources.conf' diff --git a/doc/examples/2g_osmocom/paths.conf b/doc/examples/2g_osmocom/paths.conf deleted file mode 100644 index 27c5818..000 --- a/doc/examples/2g_osmocom/paths.conf +++ /dev/null @@ -1,3 +0,0 @@ -state_dir: '/var/tmp/osmo-gsm-tester/state' -suites_dir: './suites' -scenarios_dir: './scenarios' diff --git a/doc/examples/4g_srsLTE/README.md b/doc/examples/4g_srsLTE/README.md index b577035..09af755 100644 --- a/doc/examples/4g_srsLTE/README.md +++ b/doc/examples/4g_srsLTE/README.md @@ -1,13 +1,14 @@ This a sample 4G test suite configured and ready to use srsLTE stack. The only thing missing is a trial dir containing binaries. -You can point osmo-gsm-tester.py at this config using the '-c $DIR' command line -argument, where DIR is the directory path where this README file resides. +You can point osmo-gsm-tester.py at this config using the '-c $DIR/main.conf' +command line argument, where DIR is the directory path where this README file +resides. If you have your trial with binary tar archives in ~/my_trial you can run the suite for example like this: ``` -osmo-gsm-tester.py -c $DIR ~/my_tr
Change in osmo-gsm-tester[master]: doc/manuals: Swap order of schemas and config files
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18215 ) Change subject: doc/manuals: Swap order of schemas and config files .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18215 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Iaf31808a655a5c77a1dfaa155e86d42585130820 Gerrit-Change-Number: 18215 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 12:53:47 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ci[master]: osmo-gsm-tester: Point config parameter to file instead of its dirname
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/18202 ) Change subject: osmo-gsm-tester: Point config parameter to file instead of its dirname .. Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/18202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I9aca57c4dd3180367eb17ec92177b90a9c411a6a Gerrit-Change-Number: 18202 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 12:53:05 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-gsm-tester[master]: Move update_version.sh to contrib/
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18217 ) Change subject: Move update_version.sh to contrib/ .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18217 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I26218cd512a739fc26ba04be05f01260152d785f Gerrit-Change-Number: 18217 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 12:53:51 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in docker-playground[master]: osmo-gsm-tester: Point config parameter to file instead of its dirname
pespin has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/18203 ) Change subject: osmo-gsm-tester: Point config parameter to file instead of its dirname .. osmo-gsm-tester: Point config parameter to file instead of its dirname Since osmo-gsm-tester.git Change-Id Ieca65b71b543c44cfcec8e83efd0fe053c432e55, the -c parameter holds the config file and not the directory where it is contained. Change-Id: I5aa0507d0e82616ee3cca74573fea6bdb7459b53 --- M osmo-gsm-tester/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved; Verified diff --git a/osmo-gsm-tester/jenkins.sh b/osmo-gsm-tester/jenkins.sh index 89f7116..5b1541b 100755 --- a/osmo-gsm-tester/jenkins.sh +++ b/osmo-gsm-tester/jenkins.sh @@ -80,7 +80,7 @@ /bin/sh -c "/data/osmo-gsm-tester-slave.sh >/data/sshd.log 2>&1" echo Starting container with osmo-gsm-tester main unit -OSMO_GSM_TESTER_CONF=${OSMO_GSM_TESTER_CONF:-/tmp/osmo-gsm-tester/sysmocom} +OSMO_GSM_TESTER_CONF=${OSMO_GSM_TESTER_CONF:-/tmp/osmo-gsm-tester/sysmoco/main.conf} OSMO_GSM_TESTER_OPTS=${OSMO_GSM_TESTER_OPTS:--T -l dbg -s 4g:srsenb-rftype@zmq+srsue-rftype@zmq -t ping} docker run --rm \ --cap-add=NET_ADMIN \ -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/18203 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I5aa0507d0e82616ee3cca74573fea6bdb7459b53 Gerrit-Change-Number: 18203 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in osmo-gsm-tester[master]: Move check_dependencies.py to contrib/
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18216 ) Change subject: Move check_dependencies.py to contrib/ .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18216 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I8def867b1042cbb98bb36ff4a473b4cdb92ce122 Gerrit-Change-Number: 18216 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 12:53:49 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-bsc[master]: VTY: make configurable: X23002, X23005, X23006
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/17973 ) Change subject: VTY: make configurable: X23002, X23005, X23006 .. Patch Set 5: I'd rather pick saner numbers, mentioned in https://osmocom.org/issues/4539 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/17973 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I637fcdde93c11158de46157d494c060bb36bdcfb Gerrit-Change-Number: 17973 Gerrit-PatchSet: 5 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 12 May 2020 12:29:41 + Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-bsc[master]: stats: Add counters and gauges for BORKEN lchans/TS
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/18192 ) Change subject: stats: Add counters and gauges for BORKEN lchans/TS .. Patch Set 3: (1 comment) (or we can start a contest of introducing ever more broken spellings of the word "broken", in the sense that the "broken" concept is self-referentially broken... but the internet is serious business!) https://gerrit.osmocom.org/c/osmo-bsc/+/18192/3/src/osmo-bsc/gsm_data.c File src/osmo-bsc/gsm_data.c: https://gerrit.osmocom.org/c/osmo-bsc/+/18192/3/src/osmo-bsc/gsm_data.c@395 PS3, Line 395: { "lchan_borked", "Number of lchans in the BORKEN state", "", 16, 0 }, here too. I'd prefer "broken", or "borken" would be acceptable if others prefer that. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/18192 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I427bbe1613a0e92bff432a7d76592fe50f620ebe Gerrit-Change-Number: 18192 Gerrit-PatchSet: 3 Gerrit-Owner: ipse Gerrit-Assignee: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: ipse Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 12:27:16 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-bsc[master]: stats: Add counters and gauges for BORKEN lchans/TS
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/18192 ) Change subject: stats: Add counters and gauges for BORKEN lchans/TS .. Patch Set 3: Code-Review-1 (1 comment) I regret keeping the misspelled "borken" in the FSMs, maybe the exported stats could say "broken" instead? (OTOH fine with me if the spelling should match the logs.) But let's definitely not introduce yet another misspelling as in this patch (s.b.) https://gerrit.osmocom.org/c/osmo-bsc/+/18192/3/include/osmocom/bsc/gsm_data.h File include/osmocom/bsc/gsm_data.h: https://gerrit.osmocom.org/c/osmo-bsc/+/18192/3/include/osmocom/bsc/gsm_data.h@1520 PS3, Line 1520: BTS_STAT_TS_BORKED, let's not introduce another variation of "broken" -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/18192 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I427bbe1613a0e92bff432a7d76592fe50f620ebe Gerrit-Change-Number: 18192 Gerrit-PatchSet: 3 Gerrit-Owner: ipse Gerrit-Assignee: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: ipse Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 12:24:01 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-gsm-tester[master]: doc/manuals: Swap order of schemas and config files
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18215 to look at the new patch set (#2). Change subject: doc/manuals: Swap order of schemas and config files .. doc/manuals: Swap order of schemas and config files First explain the different config files and directories, later describe the schemas used in each of them. Change-Id: Iaf31808a655a5c77a1dfaa155e86d42585130820 --- M doc/manuals/chapters/config.adoc 1 file changed, 211 insertions(+), 211 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/15/18215/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18215 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Iaf31808a655a5c77a1dfaa155e86d42585130820 Gerrit-Change-Number: 18215 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
Change in osmo-gsm-tester[master]: Move update_version.sh to contrib/
pespin has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18217 ) Change subject: Move update_version.sh to contrib/ .. Move update_version.sh to contrib/ Change-Id: I26218cd512a739fc26ba04be05f01260152d785f --- M .gitignore M Makefile A contrib/update_version.sh D update_version.sh 4 files changed, 13 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/17/18217/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18217 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I26218cd512a739fc26ba04be05f01260152d785f Gerrit-Change-Number: 18217 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-CC: Jenkins Builder Gerrit-MessageType: newpatchset
Change in osmo-gsm-tester[master]: Cmdline arg -c sets main configuration file (old paths.conf) instead ...
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18204 to look at the new patch set (#4). Change subject: Cmdline arg -c sets main configuration file (old paths.conf) instead of dir containing it .. Cmdline arg -c sets main configuration file (old paths.conf) instead of dir containing it It has been notified that current configuration system is difficult to understand and to use, so it has been envisioned to refactor it a bit. The idea is that the user passes a -c path/to/main.conf file, which in turn contains whatever osmo-gsm-tester main settings supports (basically what old paths.conf used to be, plus some files harcoded to the same -c directory are now configurable through the main configuration file). Change-Id: Ieca65b71b543c44cfcec8e83efd0fe053c432e55 --- M contrib/jenkins-run.sh M doc/examples/2g_osmocom/README.md A doc/examples/2g_osmocom/main.conf D doc/examples/2g_osmocom/paths.conf M doc/examples/4g_srsLTE/README.md A doc/examples/4g_srsLTE/main.conf D doc/examples/4g_srsLTE/paths.conf M doc/manuals/chapters/config.adoc M selftest/resource_test/resource_test.ok M selftest/resource_test/resource_test.py M selftest/scenario_test/scenario_test.ok M selftest/scenario_test/scenario_test.py M selftest/suite_test/suite_test.ok M selftest/suite_test/suite_test.py M src/osmo-gsm-tester.py M src/osmo_gsm_tester/core/config.py M src/osmo_gsm_tester/core/resource.py M sysmocom/README.md A sysmocom/main.conf D sysmocom/paths.conf D sysmocom/ttcn3/defaults.conf M sysmocom/ttcn3/jenkins-run.sh A sysmocom/ttcn3/main.conf D sysmocom/ttcn3/paths.conf 24 files changed, 290 insertions(+), 212 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/04/18204/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18204 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ieca65b71b543c44cfcec8e83efd0fe053c432e55 Gerrit-Change-Number: 18204 Gerrit-PatchSet: 4 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset
Change in osmo-gsm-tester[master]: Move check_dependencies.py to contrib/
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18216 to look at the new patch set (#2). Change subject: Move check_dependencies.py to contrib/ .. Move check_dependencies.py to contrib/ Change-Id: I8def867b1042cbb98bb36ff4a473b4cdb92ce122 --- M Makefile R contrib/check_dependencies.py 2 files changed, 7 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/16/18216/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18216 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I8def867b1042cbb98bb36ff4a473b4cdb92ce122 Gerrit-Change-Number: 18216 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
Change in osmo-sgsn[master]: gsup: send RAT type on LU
Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-sgsn/+/16745 to look at the new patch set (#3). Change subject: gsup: send RAT type on LU .. gsup: send RAT type on LU At 36c3, osmo-hlr was run with a patch that records the RAN type of attached subscribers. Even though this is not in osmo-hlr master, it is nice information to send along. Change-Id: I5dbe610738aed7ea1edf6b33543b1c03818cc274 --- M src/sgsn/gprs_subscriber.c 1 file changed, 14 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/45/16745/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/16745 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I5dbe610738aed7ea1edf6b33543b1c03818cc274 Gerrit-Change-Number: 16745 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-MessageType: newpatchset
Change in osmo-gsm-tester[master]: Move update_version.sh to contrib/
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18217 ) Change subject: Move update_version.sh to contrib/ .. Move update_version.sh to contrib/ Change-Id: I26218cd512a739fc26ba04be05f01260152d785f --- M .gitignore M Makefile A contrib/update_version.sh D update_version.sh 4 files changed, 13 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/17/18217/1 diff --git a/.gitignore b/.gitignore index a0c4088..ad9b423 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ __pycache__ pid .*.sw? -version +.version _version.py tags set_pythonpath diff --git a/Makefile b/Makefile index 38ff6c8..558f739 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ ./contrib/check_dependencies.py version: - ./update_version.sh + ./contrib/update_version.sh manual: $(MAKE) -C doc/manuals diff --git a/contrib/update_version.sh b/contrib/update_version.sh new file mode 100755 index 000..ab2674a --- /dev/null +++ b/contrib/update_version.sh @@ -0,0 +1,11 @@ +#!/bin/sh +set -e +ROOTDIR=$(git rev-parse --show-toplevel) +git describe --abbrev=8 --dirty | sed 's/v\([^-]*\)-\([^-]*\)-\(.*\)/\1.dev\2.\3/' > $ROOTDIR/.version +cat $ROOTDIR/.version +echo "# osmo-gsm-tester version. +# Automatically generated by update_version.sh. +# Gets imported by __init__.py. + +_version = '$(cat $ROOTDIR/.version)'" \ + > $ROOTDIR/src/osmo_gsm_tester/_version.py diff --git a/update_version.sh b/update_version.sh deleted file mode 100755 index 3d5fe42..000 --- a/update_version.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -set -e -git describe --abbrev=8 --dirty | sed 's/v\([^-]*\)-\([^-]*\)-\(.*\)/\1.dev\2.\3/' > version -cat version -echo "# osmo-gsm-tester version. -# Automatically generated by update_version.sh. -# Gets imported by __init__.py. - -_version = '$(cat version)'" \ - > src/osmo_gsm_tester/_version.py -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18217 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I26218cd512a739fc26ba04be05f01260152d785f Gerrit-Change-Number: 18217 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange
Change in osmo-pcu[master]: gprs_debug: Use only LOGL_NOTICE as default loglevel
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17609 ) Change subject: gprs_debug: Use only LOGL_NOTICE as default loglevel .. Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17609 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ibb1cd1a94fb4fdd0147e073f8c1c82562c2c14ef Gerrit-Change-Number: 17609 Gerrit-PatchSet: 4 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 11:51:07 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: gsm_04_08.h: fix big endian structs
neels has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18210 ) Change subject: gsm_04_08.h: fix big endian structs .. gsm_04_08.h: fix big endian structs Affected: - struct gsm48_range_1024 - struct gsm48_range_512 - struct gsm48_range_256 - struct gsm48_range_128 In commit [1], the automatic little-to-big-endian compatibility by struct_endianness.py introduced doubled little/big endian struct listings by accident, resulting in a wrong big endian structure (due to double reversal in the original big endian part). Remove the old conditionals around the new automatic ones to fix the structs for big endian. [1] Ia0b99d76932aeb03e93bd0c62d3bf025dec5f9d2 Change-Id: Iaccdd4a204841209f5eb50f336b30962ff00da0b --- M include/osmocom/gsm/protocol/gsm_04_08.h 1 file changed, 0 insertions(+), 238 deletions(-) Approvals: fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index 8370eca..1bca068 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -77,7 +77,6 @@ void osmo_gsm48_classmark_update(struct osmo_gsm48_classmark *dst, const struct osmo_gsm48_classmark *src); int8_t osmo_gsm48_rfpowercap2powerclass(enum gsm_band band, uint8_t rf_power_cap); /* Chapter 10.5.2.1b.3 */ -#if OSMO_IS_LITTLE_ENDIAN == 1 struct gsm48_range_1024 { #if OSMO_IS_LITTLE_ENDIAN uint8_t w1_hi:2, @@ -131,64 +130,8 @@ uint8_t w15_lo:2, w16:6; #endif } __attribute__ ((packed)); -#else -struct gsm48_range_1024 { -#if OSMO_IS_LITTLE_ENDIAN - uint8_t form_id:5, - f0:1, - w1_hi:2; - uint8_t w1_lo; - uint8_t w2_hi; - uint8_t w2_lo:1, - w3_hi:7; - uint8_t w3_lo:2, - w4_hi:6; - uint8_t w4_lo:2, - w5_hi:6; - uint8_t w5_lo:2, - w6_hi:6; - uint8_t w6_lo:2, - w7_hi:6; - uint8_t w7_lo:2, - w8_hi:6; - uint8_t w8_lo:1, - w9:7; - uint8_t w10:7, - w11_hi:1; - uint8_t w11_lo:6, - w12_hi:2; - uint8_t w12_lo:5, - w13_hi:3; - uint8_t w13_lo:4, - w14_hi:4; - uint8_t w14_lo:3, - w15_hi:5; - uint8_t w15_lo:2, - w16:6; -#elif OSMO_IS_BIG_ENDIAN -/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ - uint8_t w1_hi:2, f0:1, form_id:5; - uint8_t w1_lo; - uint8_t w2_hi; - uint8_t w3_hi:7, w2_lo:1; - uint8_t w4_hi:6, w3_lo:2; - uint8_t w5_hi:6, w4_lo:2; - uint8_t w6_hi:6, w5_lo:2; - uint8_t w7_hi:6, w6_lo:2; - uint8_t w8_hi:6, w7_lo:2; - uint8_t w9:7, w8_lo:1; - uint8_t w11_hi:1, w10:7; - uint8_t w12_hi:2, w11_lo:6; - uint8_t w13_hi:3, w12_lo:5; - uint8_t w14_hi:4, w13_lo:4; - uint8_t w15_hi:5, w14_lo:3; - uint8_t w16:6, w15_lo:2; -#endif -} __attribute__ ((packed)); -#endif /* Chapter 10.5.2.1b.4 */ -#if OSMO_IS_LITTLE_ENDIAN == 1 struct gsm48_range_512 { #if OSMO_IS_LITTLE_ENDIAN uint8_t orig_arfcn_hi:1, @@ -242,64 +185,8 @@ uint8_t w16_lo:3, w17:5; #endif } __attribute__ ((packed)); -#else -struct gsm48_range_512 { -#if OSMO_IS_LITTLE_ENDIAN - uint8_t form_id:7, - orig_arfcn_hi:1; - uint8_t orig_arfcn_mid; - uint8_t orig_arfcn_lo:1, - w1_hi:7; - uint8_t w1_lo:2, - w2_hi:6; - uint8_t w2_lo:2, - w3_hi:6; - uint8_t w3_lo:2, - w4_hi:6; - uint8_t w4_lo:1, - w5:7; - uint8_t w6:7, - w7_hi:1; - uint8_t w7_lo:6, - w8_hi:2; - uint8_t w8_lo:4, - w9_hi:4; - uint8_t w9_lo:2, - w10:6; - uint8_t w11:6, - w12_hi:2; - uint8_t w12_lo:4, - w13_hi:4; - uint8_t w13_lo:2, - w14:6; - uint8_t w15:6, - w16_hi:2; - uint8_t w16_lo:3, - w17:5; -#elif OSMO_IS_BIG_ENDIAN -/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ - uint8_t orig_arfcn_hi:1, form_id:7; - uint8_t orig_arfcn_mid; - uint8_t w1_hi:7, orig_arfcn_lo:1; - uint8_t w2_hi:6, w1_lo:2; - uint8_t w3_hi:6, w2_lo:2; - uint8_t w4_hi:6, w3_lo:2; - uint8_t w5:7, w4_lo:1; - uint8_t w7_hi:1, w6:7; - uint8_t w8_hi:2, w7_lo:6; - uint8_t w9_hi:4, w8_lo:4; - uint8_t w10:6, w9_lo:2; - uint8_t w12_hi:2, w11:6; - uint8_t w13_hi:4, w12_lo:4; - uint8_t w14:6, w13_lo:
Change in osmo-hlr[master]: doc: do not use loglevel info for log category ss
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/17600 ) Change subject: doc: do not use loglevel info for log category ss .. Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/17600 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I192a5f07cb7f45adb6f3af1c511b706738bdadf4 Gerrit-Change-Number: 17600 Gerrit-PatchSet: 4 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 11:50:01 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: logging: use LOGL_NOTICE when not loglevel is set
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17604 ) Change subject: logging: use LOGL_NOTICE when not loglevel is set .. Patch Set 6: Code-Review-1 (4 comments) https://gerrit.osmocom.org/c/libosmocore/+/17604/6//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/libosmocore/+/17604/6//COMMIT_MSG@7 PS6, Line 7: logging: use LOGL_NOTICE when not loglevel is set "no loglevel" https://gerrit.osmocom.org/c/libosmocore/+/17604/6/src/logging.c File src/logging.c: https://gerrit.osmocom.org/c/libosmocore/+/17604/6/src/logging.c@1047 PS6, Line 1047: cat_temp_ptr = talloc_zero_array(osmo_log_info, please change name, "temp" seems to say the variable is function-scoped and should be freed before exiting, and this is not the case, since this struct is probably gonna be left there for the entire run of the process. https://gerrit.osmocom.org/c/libosmocore/+/17604/6/src/logging.c@1074 PS6, Line 1074:sizeof(struct log_info_cat)); you can move this to previous line, there's still space for it. https://gerrit.osmocom.org/c/libosmocore/+/17604/6/src/logging.c@1077 PS6, Line 1077: osmo_log_info->cat = cat_temp_ptr; if osmo_log_info->cat is not NULL, talloc_free it before assigning it, to make sure we don't leak if somebody calls log_init twice. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17604 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib9e180261505062505fc4605a98023910f76cde6 Gerrit-Change-Number: 17604 Gerrit-PatchSet: 6 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 11:49:21 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-hlr[master]: doc: do not use loglevel info for log category ss
Hello fixeria, pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/17600 to look at the new patch set (#4). Change subject: doc: do not use loglevel info for log category ss .. doc: do not use loglevel info for log category ss The log category ss uses info as loglevel vor ss, this is to verbose, lets use notice instead. Change-Id: I192a5f07cb7f45adb6f3af1c511b706738bdadf4 --- M doc/examples/osmo-hlr.cfg M tests/test_nodes.vty 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/00/17600/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/17600 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I192a5f07cb7f45adb6f3af1c511b706738bdadf4 Gerrit-Change-Number: 17600 Gerrit-PatchSet: 4 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset
Change in osmo-gsm-tester[master]: Move check_dependencies.py to contrib/
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18216 ) Change subject: Move check_dependencies.py to contrib/ .. Move check_dependencies.py to contrib/ Change-Id: I8def867b1042cbb98bb36ff4a473b4cdb92ce122 --- M Makefile R contrib/check_dependencies.py 2 files changed, 7 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/16/18216/1 diff --git a/Makefile b/Makefile index c36aa9a..38ff6c8 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ .PHONY: version check deps: - ./check_dependencies.py + ./contrib/check_dependencies.py version: ./update_version.sh diff --git a/check_dependencies.py b/contrib/check_dependencies.py similarity index 94% rename from check_dependencies.py rename to contrib/check_dependencies.py index daf46dc..61d08b0 100755 --- a/check_dependencies.py +++ b/contrib/check_dependencies.py @@ -36,7 +36,7 @@ pass def import_all_py_in_dir(rel_path, skip_modules=[]): -selfdir = os.path.dirname(os.path.abspath(__file__)) +selfdir = os.getcwd() dir = os.path.join(selfdir, rel_path) print('importing files in directory %s' % dir) for entry in os.listdir(dir): @@ -112,8 +112,12 @@ print('Skip checking modules: %r' % skip_obj_modules) +rootdir = os.path.realpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..')) +print('Changing workdir dir to %s' % rootdir) +os.chdir(rootdir) +sys.path.insert(0, rootdir) # We need to add it for cross-references between osmo_ms_driver and osmo_gsm_tester to work: -sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), 'src/')) +sys.path.insert(0, os.path.join(rootdir, 'src/')) import_all_py_in_dir('src/osmo_ms_driver') import_all_py_in_dir('src/osmo_gsm_tester/core') import_all_py_in_dir('src/osmo_gsm_tester/obj', skip_obj_modules) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18216 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I8def867b1042cbb98bb36ff4a473b4cdb92ce122 Gerrit-Change-Number: 18216 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange
Change in osmo-ggsn[master]: debug: use LOGL_NOTICE instead of LOGL_DEBUG
dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/17607 ) Change subject: debug: use LOGL_NOTICE instead of LOGL_DEBUG .. debug: use LOGL_NOTICE instead of LOGL_DEBUG In debug.c the log category DICMP6 uses LOGL_DEBUG as default. This is way to verbose, lets use LOGL_NOTICE instead. Change-Id: I4c6a9165114d1240e7e2cfa98d30d571a3f4e9d2 Related: OS#2577 --- M lib/debug.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: fixeria: Looks good to me, but someone else must approve dexter: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/lib/debug.c b/lib/debug.c index cb918b1..c79e493 100644 --- a/lib/debug.c +++ b/lib/debug.c @@ -29,7 +29,7 @@ [DICMP6] = { .name = "DICMP6", .description = "ICMPv6", - .enabled = 1, .loglevel = LOGL_DEBUG, + .enabled = 1, .loglevel = LOGL_NOTICE, }, }; -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/17607 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: I4c6a9165114d1240e7e2cfa98d30d571a3f4e9d2 Gerrit-Change-Number: 17607 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in osmo-ggsn[master]: debug: use LOGL_NOTICE instead of LOGL_DEBUG
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/17607 ) Change subject: debug: use LOGL_NOTICE instead of LOGL_DEBUG .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/17607 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: I4c6a9165114d1240e7e2cfa98d30d571a3f4e9d2 Gerrit-Change-Number: 17607 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 11:31:54 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmo-sccp[master]: doc: make sure all log categories are set to level notice
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/17597 ) Change subject: doc: make sure all log categories are set to level notice .. Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/17597 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I3b17aa4354f30b55da8fc77f4fe6af0373de7983 Gerrit-Change-Number: 17597 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 11:29:09 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmo-sccp[master]: doc: make sure all log categories are set to level notice
dexter has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/17597 ) Change subject: doc: make sure all log categories are set to level notice .. doc: make sure all log categories are set to level notice Lets make sure all logging levels are set to notice Change-Id: I3b17aa4354f30b55da8fc77f4fe6af0373de7983 --- M doc/examples/osmo-stp.cfg 1 file changed, 1 insertion(+), 4 deletions(-) Approvals: fixeria: Looks good to me, but someone else must approve dexter: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/doc/examples/osmo-stp.cfg b/doc/examples/osmo-stp.cfg index 1d683ea..602a9ce 100644 --- a/doc/examples/osmo-stp.cfg +++ b/doc/examples/osmo-stp.cfg @@ -7,10 +7,7 @@ logging color 1 logging print category 1 logging timestamp 0 - logging level lss7 info - logging level lsccp info - logging level lsua info - logging level lm3ua info + logging level set-all notice line vty no login ! -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/17597 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I3b17aa4354f30b55da8fc77f4fe6af0373de7983 Gerrit-Change-Number: 17597 Gerrit-PatchSet: 4 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in libosmocore[master]: logging: use LOGL_NOTICE when not loglevel is set
Hello fixeria, laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/17604 to look at the new patch set (#6). Change subject: logging: use LOGL_NOTICE when not loglevel is set .. logging: use LOGL_NOTICE when not loglevel is set when the API user of libosmocores logging infrastructure does not set a pre-defined logging level in struct log_info_cat, the result would be an invalid logging level. In order to avoid problems with that and to spare all the additional .loglevel = LOGL_NOTICE (API users are advised to use LOGL_NOTICE as default) lines in the user code lets check the logging level on startup and set LOGL_NOTICE if there is no logging level set. Change-Id: Ib9e180261505062505fc4605a98023910f76cde6 Related: OS#2577 --- M src/logging.c 1 file changed, 17 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/04/17604/6 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17604 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib9e180261505062505fc4605a98023910f76cde6 Gerrit-Change-Number: 17604 Gerrit-PatchSet: 6 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset
Change in libosmocore[master]: gsm0505_amr_dtx: add missing value strings
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/17931 to look at the new patch set (#3). Change subject: gsm0505_amr_dtx: add missing value strings .. gsm0505_amr_dtx: add missing value strings The value string array that explain the type of the AMR DTX / SID frames is incomplete, lets add the missing strings. Change-Id: If9e80b4bd8bdc31323c7c276155b2538e20a99be Related: OS#2978 --- M src/coding/gsm0503_amr_dtx.c M tests/dtx/dtx_gsm0503_test.ok 2 files changed, 7 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/31/17931/3 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17931 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: If9e80b4bd8bdc31323c7c276155b2538e20a99be Gerrit-Change-Number: 17931 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
Change in osmo-gsm-tester[master]: Cmdline arg -c sets main configuration file (old paths.conf) instead ...
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18204 ) Change subject: Cmdline arg -c sets main configuration file (old paths.conf) instead of dir containing it .. Patch Set 3: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18204 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ieca65b71b543c44cfcec8e83efd0fe053c432e55 Gerrit-Change-Number: 18204 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 12 May 2020 11:13:03 + Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-gsm-tester[master]: doc/manuals: Swap order of schemas and config files
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18215 ) Change subject: doc/manuals: Swap order of schemas and config files .. doc/manuals: Swap order of schemas and config files First explain the different config files and directories, later describe the schemas used in each of them. Change-Id: Iaf31808a655a5c77a1dfaa155e86d42585130820 --- M doc/manuals/chapters/config.adoc 1 file changed, 211 insertions(+), 211 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/15/18215/1 diff --git a/doc/manuals/chapters/config.adoc b/doc/manuals/chapters/config.adoc index c302cd6..fec5c87 100644 --- a/doc/manuals/chapters/config.adoc +++ b/doc/manuals/chapters/config.adoc @@ -1,216 +1,5 @@ == Configuration -=== Schemas - -All configuration attributes in {app-name} are stored and provided as YAML -files, which are handled internally mostly as sets of dictionaries, lists and -scalars. Each of these configurations have a known format (set of keys and -values), which is called 'schema'. Each provided configuration is validated -against its 'schema' at parse time. Hence, 'schemas' can be seen as a namespace -containing a structured tree of configuration attributes. Each attribute has a -schema type assigned which constrains the type of value it can hold. - -There are several well-known schemas used across {app-name}, and they are -described in following sub-sections. - -[[schema_main_cfg]] - Schema 'main config' - -This schema defines all the attributes available in {app-name} the main -configuration file <>, and it is used to validate it. - -[[schema_resources]] - Schema 'resources' - -This schema defines all the attributes which can be assigned to -a _resource_, and it is used to validate the <> -file. Hence, the <> contains a list of elements -for each resource type. This schema is also used and extended by the -<>. - -It is important to understand that the content in this schema refers to a list of -resources for each resource class. Since a list is ordered by definition, it -clearly identifies specific resources by order. This is important when applying -filters or modifiers, since they are applied per-resource in the list. One can -for instance apply attribute A to first resource of class C, while not applying -it or applying another attribute B to second resources of the same class. As a -result, complex forms can be used to filter and modify a list of resources -required by a testsuite. - -On the other hand, it's also important to note that lists for simple or scalar -types are currently being treated as unordered sets, which mean combination of -filters or modifiers apply differently. In the future, it may be possible to -have both behaviors for scalar/simple types by using also the YAML 'set' type in -{app-name}. - -//TODO: update this list and use a table for each resource type in its own object section - -These kinds of resources and their attributes are known: - -'ip_address':: - List of IP addresses to run osmo-nitb instances on. The main unit - typically has a limited number of such IP addresses configured, which - the connected BTS models can see on their network. - 'addr'::: - IPv4 address of the local interface. - -'bts':: - List of available BTS hardware. - 'label'::: - human readable label for your own reference - 'type'::: - which way to launch this BTS, one of - - 'osmo-bts-sysmo' - - 'osmo-bts-trx' - - 'osmo-bts-octphy' - - 'ipa-nanobts' - 'ipa_unit_id'::: - ip.access unit id to be used by the BTS, written into BTS and BSC config. - 'addr'::: - Remote IP address of the BTS for BTS like sysmoBTS, and local IP address - to bind to for locally run BTS such as osmo-bts-trx. - 'band'::: - GSM band that this BTS shoud use (*TODO*: allow multiple bands). One of: - - 'GSM-1800' - - 'GSM-1900' - - (*TODO*: more bands) - 'trx_list'::: - Specific TRX configurations for this BTS. There should be as many of - these as the BTS has TRXes. (*TODO*: a way to define >1 TRX without - special configuration for them.) -'hw_addr' - Hardware (MAC) address of the TRX in the form of '11:22:33:44:55:66', - only used for osmo-bts-octphy. (*TODO*: and nanobts??) -'net_device' - Local network device to reach the TRX's 'hw_addr' at, only used for - osmo-bts-octphy. Example: 'eth0'. -'nominal_power' - Nominal power to be used by the TRX. -'max_power_red' - Max power reduction to apply to the nominal power of the TRX. -'arfcn':: - List of ARFCNs to use for running BTSes, which defines the actual RF - frequency bands used. - 'arfcn'::: - ARFCN number, see e.g. - https://en.wikipedia.org/wiki/Absolute_radio-frequency_channel_number -
Change in libosmocore[master]: exec: osmo_system_nowait2: initalize *pw pointer with NULL
dexter has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17884 ) Change subject: exec: osmo_system_nowait2: initalize *pw pointer with NULL .. exec: osmo_system_nowait2: initalize *pw pointer with NULL The pointer *pw is only populated when the the parameter *user is given, otherwise it remains uninitalized while it is used later when the previleges are being dropped. Change-Id: Idec7041e9ea17a252aefbf6fa90091ae17fd4fcd Fixes: CID#209895 --- M src/exec.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/exec.c b/src/exec.c index 578e2b1..2a03ba8 100644 --- a/src/exec.c +++ b/src/exec.c @@ -211,7 +211,8 @@ */ int osmo_system_nowait2(const char *command, const char **env_whitelist, char **addl_env, const char *user) { - struct passwd _pw, *pw; + struct passwd _pw; + struct passwd *pw = NULL; int getpw_buflen = sysconf(_SC_GETPW_R_SIZE_MAX); int rc; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17884 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Idec7041e9ea17a252aefbf6fa90091ae17fd4fcd Gerrit-Change-Number: 17884 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged