lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

December 2023

  • 1 participants
  • 1601 discussions
[M] Change in libosmocore[master]: utils: fix OSMO_STRBUF_REMAIN to handle sb.pos == NULL correctly
by laforge 17 Dec '23

17 Dec '23
Attention is currently required from: fixeria, neels. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35312?usp=email ) Change subject: utils: fix OSMO_STRBUF_REMAIN to handle sb.pos == NULL correctly ...................................................................... Patch Set 1: (1 comment) File include/osmocom/core/utils.h: https://gerrit.osmocom.org/c/libosmocore/+/35312/comment/230870b1_dad5ec7e PS1, Line 284: /*! Get remaining space for characters and terminating nul in the given struct osmo_strbuf. > I'd expect the linker will throw out any unused functions anyway. […] Note that my comment doesn's take a position on whether or not it should be an inline function. I'm just saying repeat compilation + drop by linker if unneeded is not a problem. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35312?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I294a74a99c40995cf7fb5520d61f697d967be5a4 Gerrit-Change-Number: 35312 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sun, 17 Dec 2023 10:43:27 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmocore[master]: utils: improve readability of OSMO_STRBUF_CHAR_COUNT
by laforge 17 Dec '23

17 Dec '23
Attention is currently required from: fixeria, neels. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35313?usp=email ) Change subject: utils: improve readability of OSMO_STRBUF_CHAR_COUNT ...................................................................... Patch Set 1: Code-Review+1 (1 comment) File include/osmocom/core/utils.h: https://gerrit.osmocom.org/c/libosmocore/+/35313/comment/22efcc37_d97d3068 PS1, Line 300: /*! Get number of actual characters (without terminating nul) in the given struct osmo_strbuf. > (same as prev patch, maybe just normal function in utils. […] I'd expect the linker will throw out any unused functions anyway. So I don't seee any problem/overhead at runtime. Optimization for compile speed is not a goal. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35313?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I71f24b87c13fd83952029171a6993f8da5e32e5b Gerrit-Change-Number: 35313 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sun, 17 Dec 2023 10:42:15 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmocore[master]: utils: fix OSMO_STRBUF_REMAIN to handle sb.pos == NULL correctly
by laforge 17 Dec '23

17 Dec '23
Attention is currently required from: fixeria, neels. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35312?usp=email ) Change subject: utils: fix OSMO_STRBUF_REMAIN to handle sb.pos == NULL correctly ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35312?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I294a74a99c40995cf7fb5520d61f697d967be5a4 Gerrit-Change-Number: 35312 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sun, 17 Dec 2023 10:42:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmocore[master]: utils: fix OSMO_STRBUF_REMAIN to handle sb.pos == NULL correctly
by laforge 17 Dec '23

17 Dec '23
Attention is currently required from: fixeria, neels. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35312?usp=email ) Change subject: utils: fix OSMO_STRBUF_REMAIN to handle sb.pos == NULL correctly ...................................................................... Patch Set 1: (1 comment) File include/osmocom/core/utils.h: https://gerrit.osmocom.org/c/libosmocore/+/35312/comment/19efe077_6f56b6c6 PS1, Line 284: /*! Get remaining space for characters and terminating nul in the given struct osmo_strbuf. > i'm not sure about the inlining, I think i'd just submit a normal function in utils.c. […] I'd expect the linker will throw out any unused functions anyway. So I don't seee any problem/overhead at runtime. Optimization for compile speed is not a goal. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35312?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I294a74a99c40995cf7fb5520d61f697d967be5a4 Gerrit-Change-Number: 35312 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sun, 17 Dec 2023 10:41:39 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-bts[master]: Use polling based LAPDm with frame numbers
by laforge 17 Dec '23

17 Dec '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/35007?usp=email ) Change subject: Use polling based LAPDm with frame numbers ...................................................................... Use polling based LAPDm with frame numbers Osmo-bts uses the new polling based LAPDm implementation. The OML message NM_ATT_T200 is ignored, because T200 timeouts are set to the minimal response time. Longer timeouts would cause lower throughput in case of lost frames. Shorter timeouts would cause LAPDm to fail. Related: OS#4074 Depends: libosmocore.git I6ebe83f829d7751ea9de1d90eb478c7a628db64c Change-Id: Ic6d7902b13cf491daaa8752db78f9875387aeffd --- M include/osmo-bts/bts.h M include/osmo-bts/oml.h M src/common/bts.c M src/common/l1sap.c M src/common/lchan.c M src/common/oml.c 6 files changed, 108 insertions(+), 73 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/osmo-bts/bts.h b/include/osmo-bts/bts.h index 985f4ed..60e308c 100644 --- a/include/osmo-bts/bts.h +++ b/include/osmo-bts/bts.h @@ -241,7 +241,7 @@ int16_t boundary[6]; uint8_t intave; } interference; - unsigned int t200_ms[7]; + uint32_t t200_fn[7]; unsigned int t3105_ms; unsigned int t3115_ms; /* VGCS UPLINK GRANT repeat timer */ struct { diff --git a/include/osmo-bts/oml.h b/include/osmo-bts/oml.h index c35122e..41cdaf5 100644 --- a/include/osmo-bts/oml.h +++ b/include/osmo-bts/oml.h @@ -68,7 +68,7 @@ int oml_mo_fom_ack_nack(const struct gsm_abis_mo *mo, uint8_t orig_msg_type, uint8_t cause); -extern const unsigned int oml_default_t200_ms[7]; +extern const uint32_t oml_default_t200_fn[7]; /* Transmit failure event report */ int oml_tx_failure_event_rep(const struct gsm_abis_mo *mo, enum abis_nm_severity severity, diff --git a/src/common/bts.c b/src/common/bts.c index 7e7d8f0..12d3742 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -355,8 +355,8 @@ bts->max_ber10k_rach = 1707; /* 7 of 41 bits is Eb/N0 of 0 dB = 0.1707 */ bts->pcu.sock_path = talloc_strdup(bts, PCU_SOCK_DEFAULT); bts->pcu.sock_wqueue_len_max = BTS_PCU_SOCK_WQUEUE_LEN_DEFAULT; - for (i = 0; i < ARRAY_SIZE(bts->t200_ms); i++) - bts->t200_ms[i] = oml_default_t200_ms[i]; + for (i = 0; i < ARRAY_SIZE(bts->t200_fn); i++) + bts->t200_fn[i] = oml_default_t200_fn[i]; /* default RADIO_LINK_TIMEOUT */ bts->radio_link_timeout.oml = 32; diff --git a/src/common/l1sap.c b/src/common/l1sap.c index c599726..90a61e2 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -957,10 +957,10 @@ } /* Common dequeueing function */ -static inline struct msgb *lapdm_phsap_dequeue_msg(struct lapdm_entity *le) +static inline struct msgb *lapdm_phsap_dequeue_msg(struct lapdm_entity *le, uint32_t fn) { struct osmo_phsap_prim pp; - if (lapdm_phsap_dequeue_prim(le, &pp) < 0) + if (lapdm_phsap_dequeue_prim_fn(le, &pp, fn) < 0) return NULL; return pp.oph.msg; } @@ -983,7 +983,7 @@ lchan->rep_acch.dl_facch[1].msg = NULL; } else { /* Fetch new FACCH from queue ... */ - if (lapdm_phsap_dequeue_prim(le, &pp) < 0) + if (lapdm_phsap_dequeue_prim_fn(le, &pp, fn) < 0) return NULL; msg = pp.oph.msg; @@ -1013,7 +1013,7 @@ } /* Special dequeueing function with SACCH repetition (3GPP TS 44.006, section 11) */ -static inline struct msgb *lapdm_phsap_dequeue_msg_sacch(struct gsm_lchan *lchan, struct lapdm_entity *le) +static inline struct msgb *lapdm_phsap_dequeue_msg_sacch(struct gsm_lchan *lchan, struct lapdm_entity *le, uint32_t fn) { struct osmo_phsap_prim pp; struct msgb *msg; @@ -1037,7 +1037,7 @@ } /* Fetch new repetition candidate from queue */ - if (lapdm_phsap_dequeue_prim(le, &pp) < 0) + if (lapdm_phsap_dequeue_prim_fn(le, &pp, fn) < 0) return NULL; msg = pp.oph.msg; sapi = (msg->data[0] >> 2) & 0x07; @@ -1148,9 +1148,9 @@ LOGPLCHAN(lchan, DL1P, LOGL_DEBUG, "DL-SACCH repetition: active => inactive\n"); lchan->rep_acch.dl_sacch_active = false; } - pp_msg = lapdm_phsap_dequeue_msg_sacch(lchan, le); + pp_msg = lapdm_phsap_dequeue_msg_sacch(lchan, le, fn); } else { - pp_msg = lapdm_phsap_dequeue_msg(le); + pp_msg = lapdm_phsap_dequeue_msg(le, fn); } } else { if (lchan->ts->trx->bts->dtxd) @@ -1159,7 +1159,7 @@ if (lchan->rep_acch.dl_facch_active && lchan->rsl_cmode != RSL_CMOD_SPD_SIGN) pp_msg = lapdm_phsap_dequeue_msg_facch(lchan, le, fn); else - pp_msg = lapdm_phsap_dequeue_msg(le); + pp_msg = lapdm_phsap_dequeue_msg(le, fn); lchan->tch.dtx_fr_hr_efr.dl_facch_stealing = (pp_msg != NULL); } if (!pp_msg) { @@ -1802,9 +1802,18 @@ lchan_meas_handle_sacch(lchan, msg); } + if (L1SAP_IS_LINK_SACCH(link_id)) + le = &lchan->lapdm_ch.lapdm_acch; + else + le = &lchan->lapdm_ch.lapdm_dcch; + /* bad frame */ - if (len == 0) + if (len == 0) { + /* Notify current receive FN to lapdm. */ + lapdm_t200_fn(le, fn); + return -EINVAL; + } /* report first valid received frame to handover process */ if (lchan->ho.active == HANDOVER_WAIT_FRAME) @@ -1825,11 +1834,6 @@ return 0; } - if (L1SAP_IS_LINK_SACCH(link_id)) - le = &lchan->lapdm_ch.lapdm_acch; - else - le = &lchan->lapdm_ch.lapdm_dcch; - if (check_for_first_ciphrd(lchan, data, len)) l1sap_tx_ciph_req(lchan->ts->trx, chan_nr, 1, 0); @@ -1837,6 +1841,9 @@ msgb_pull_to_l2(msg); lapdm_phsap_up(&l1sap->oph, le); + /* Notify current receive FN to lapdm. */ + lapdm_t200_fn(le, fn); + /* don't free, because we forwarded data */ return 1; } @@ -1961,6 +1968,12 @@ LOGPLCGT(lchan, &g_time, DL1P, LOGL_DEBUG, "Rx TCH.ind\n"); } + /* Notify current receive FN to lapdm. + * TCH frames may be indicated before FACCH frames are indicated. To prevent T200 timeout before FACCH is + * received, subtract one frame number, so that timeout is processed next time after FACCH is received. + */ + lapdm_t200_fn(&lchan->lapdm_ch.lapdm_dcch, GSM_TDMA_FN_SUB(fn, 1)); + /* The ph_tch_param contained in the l1sap primitive may contain * measurement data. If this data is present, forward it for * processing */ diff --git a/src/common/lchan.c b/src/common/lchan.c index 6178200..72ddc2f 100644 --- a/src/common/lchan.c +++ b/src/common/lchan.c @@ -57,41 +57,40 @@ }; /* prepare the per-SAPI T200 arrays for a given lchan */ -static int t200_by_lchan(int *t200_ms_dcch, int *t200_ms_acch, struct gsm_lchan *lchan) +static int t200_by_lchan(uint32_t *t200_fn_dcch, uint32_t *t200_fn_acch, struct gsm_lchan *lchan) { struct gsm_bts *bts = lchan->ts->trx->bts; - /* we have to compensate for the "RTS advance" due to the asynchronous interface between - * the BTS (LAPDm) and the PHY/L1 (OsmoTRX or DSP in case of osmo-bts-{sysmo,lc15,oc2g,octphy} */ - int32_t fn_advance = bts_get_avg_fn_advance(bts); - int32_t fn_advance_us = fn_advance * 4615; - int fn_advance_ms = fn_advance_us / 1000; - - t200_ms_acch[DL_SAPI0] = bts->t200_ms[T200_SACCH_SDCCH] + fn_advance_ms; - t200_ms_acch[DL_SAPI3] = bts->t200_ms[T200_SACCH_SDCCH] + fn_advance_ms; - - if (lchan->rep_acch_cap.dl_facch_all && lchan_is_tch(lchan)) { - t200_ms_acch[DL_SAPI0] *= 2; - t200_ms_acch[DL_SAPI3] *= 2; - } - switch (lchan->type) { case GSM_LCHAN_SDCCH: - t200_ms_dcch[DL_SAPI0] = bts->t200_ms[T200_SDCCH] + fn_advance_ms; - t200_ms_dcch[DL_SAPI3] = bts->t200_ms[T200_SDCCH_SAPI3] + fn_advance_ms; + t200_fn_dcch[DL_SAPI0] = bts->t200_fn[T200_SDCCH]; + t200_fn_dcch[DL_SAPI3] = bts->t200_fn[T200_SDCCH_SAPI3]; + t200_fn_acch[DL_SAPI0] = bts->t200_fn[T200_SACCH_SDCCH]; + t200_fn_acch[DL_SAPI3] = bts->t200_fn[T200_SACCH_SDCCH]; break; case GSM_LCHAN_TCH_F: - t200_ms_dcch[DL_SAPI0] = bts->t200_ms[T200_FACCH_F] + fn_advance_ms; - t200_ms_dcch[DL_SAPI3] = bts->t200_ms[T200_FACCH_F] + fn_advance_ms; + t200_fn_dcch[DL_SAPI0] = bts->t200_fn[T200_FACCH_F]; + t200_fn_dcch[DL_SAPI3] = bts->t200_fn[T200_FACCH_F]; + t200_fn_acch[DL_SAPI0] = bts->t200_fn[T200_SACCH_TCH_SAPI0]; + t200_fn_acch[DL_SAPI3] = bts->t200_fn[T200_SACCH_TCH_SAPI3]; break; case GSM_LCHAN_TCH_H: - t200_ms_dcch[DL_SAPI0] = bts->t200_ms[T200_FACCH_H] + fn_advance_ms; - t200_ms_dcch[DL_SAPI3] = bts->t200_ms[T200_FACCH_H] + fn_advance_ms; + t200_fn_dcch[DL_SAPI0] = bts->t200_fn[T200_FACCH_H]; + t200_fn_dcch[DL_SAPI3] = bts->t200_fn[T200_FACCH_H]; + t200_fn_acch[DL_SAPI0] = bts->t200_fn[T200_SACCH_TCH_SAPI0]; + t200_fn_acch[DL_SAPI3] = bts->t200_fn[T200_SACCH_TCH_SAPI3]; break; default: /* Channels such as CCCH don't use lapdm DL, and hence no T200 is needed */ return -1; } + + /* Add time of two extra messages frames. */ + if (lchan->rep_acch_cap.dl_facch_all && lchan_is_tch(lchan)) { + t200_fn_acch[DL_SAPI0] += 104 * 2; + t200_fn_acch[DL_SAPI3] += 104 * 2; + } + return 0; } @@ -152,17 +151,17 @@ int lchan_init_lapdm(struct gsm_lchan *lchan) { struct lapdm_channel *lc = &lchan->lapdm_ch; - int t200_ms_dcch[_NR_DL_SAPI], t200_ms_acch[_NR_DL_SAPI]; + uint32_t t200_fn_dcch[_NR_DL_SAPI], t200_fn_acch[_NR_DL_SAPI]; - if (t200_by_lchan(t200_ms_dcch, t200_ms_acch, lchan) == 0) { + if (t200_by_lchan(t200_fn_dcch, t200_fn_acch, lchan) == 0) { LOGPLCHAN(lchan, DLLAPD, LOGL_DEBUG, - "Setting T200 D0=%u, D3=%u, S0=%u, S3=%u (all in ms)\n", - t200_ms_dcch[DL_SAPI0], t200_ms_dcch[DL_SAPI3], - t200_ms_acch[DL_SAPI0], t200_ms_acch[DL_SAPI3]); - lapdm_channel_init3(lc, LAPDM_MODE_BTS, t200_ms_dcch, t200_ms_acch, lchan->type, - gsm_lchan_name(lchan)); - lapdm_channel_set_flags(lc, LAPDM_ENT_F_POLLING_ONLY); + "Setting T200 D0=%u, D3=%u, S0=%u, S3=%u (all in frames)\n", + t200_fn_dcch[DL_SAPI0], t200_fn_dcch[DL_SAPI3], + t200_fn_acch[DL_SAPI0], t200_fn_acch[DL_SAPI3]); + lapdm_channel_init3(lc, LAPDM_MODE_BTS, NULL, NULL, lchan->type, gsm_lchan_name(lchan)); + lapdm_channel_set_flags(lc, LAPDM_ENT_F_POLLING_ONLY | LAPDM_ENT_F_RTS); lapdm_channel_set_l1(lc, NULL, lchan); + lapdm_channel_set_t200_fn(lc, t200_fn_dcch, t200_fn_acch); } /* We still need to set Rx callback to receive RACH requests: */ lapdm_channel_set_l3(lc, lapdm_rll_tx_cb, lchan); diff --git a/src/common/oml.c b/src/common/oml.c index 701f5f3..2c922eb 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -525,16 +525,21 @@ return oml_mo_send_msg(mo, nmsg, NM_MT_SW_ACTIVATED_REP); } -/* The defaults below correspond to various sources/recommendations that could be found online. - * The BSC should override this via OML anyway. */ -const unsigned int oml_default_t200_ms[7] = { - [T200_SDCCH] = 1000, - [T200_FACCH_F] = 1000, - [T200_FACCH_H] = 1000, - [T200_SACCH_TCH_SAPI0] = 2000, - [T200_SACCH_SDCCH] = 2000, - [T200_SDCCH_SAPI3] = 1000, - [T200_SACCH_TCH_SAPI3] = 2000, +/* The defaults below correspond to the number of frames until a response from the MS is expected. + * It defines the FN distance between the frame number when a message is sent (first frame) and when the response is + * received (first frame). On SACCH the duration is two frames, because SAPI0 and SAPI3 are are transmitted in + * alternating order. On DCCH with SAPI3 the duration is two seconds, because SAPI0 has priority over SAPI3. + * + * See Table 8 if 3GPP TS 44.006. Note that the table only shows the FN distance between frames. + */ +const uint32_t oml_default_t200_fn[7] = { + [T200_SDCCH] = 4+32, + [T200_FACCH_F] = 8+9, + [T200_FACCH_H] = 6+10, + [T200_SACCH_TCH_SAPI0] = 79+25+104, + [T200_SACCH_SDCCH] = 4+32+51, + [T200_SDCCH_SAPI3] = 4+32+408, /* two seconds */ + [T200_SACCH_TCH_SAPI3] = 79+25+104, }; /* 3GPP TS 52.021 §8.11.1 Get Attributes has been received */ @@ -677,25 +682,26 @@ } /* 9.4.53 T200 */ - if (TLVP_PRES_LEN(&tp, NM_ATT_T200, ARRAY_SIZE(bts->t200_ms))) { - payload = TLVP_VAL(&tp, NM_ATT_T200); - for (i = 0; i < ARRAY_SIZE(bts->t200_ms); i++) { - uint32_t t200_ms = payload[i] * abis_nm_t200_ms[i]; + if (TLVP_PRES_LEN(&tp, NM_ATT_T200, ARRAY_SIZE(bts->t200_fn))) { + /* The OML message NM_ATT_T200 is ignored, because T200 timeouts are set to + * the minimal response time. Longer timeouts would cause lower throughput + * in case of lost frames. Shorter timeouts would cause LAPDm to fail. */ + DEBUGPFOH(DOML, foh, "Ignoring T200 BTS attribute.\n"); #if 0 - bts->t200_ms[i] = t200_ms; - DEBUGPFOH(DOML, foh, "T200[%u]: OML=%u, mult=%u => %u ms\n", + payload = TLVP_VAL(&tp, NM_ATT_T200); + for (i = 0; i < ARRAY_SIZE(bts->t200_fn); i++) { + uint32_t t200_ms = payload[i] * abis_nm_t200_ms[i]; + uint32_t t200_fn = t200_ms * 1000 + (GSM_TDMA_FN_DURATION_uS - 1) / GSM_TDMA_FN_DURATION_uS; + /* Values must not be less than absolute minimum. */ + if (oml_default_t200_fn[i] <= t200_fn) + bts->t200_fn[i] = t200_fn; + else + bts->t200_fn[i] = oml_default_t200_fn[i]; + DEBUGPFOH(DOML, foh, "T200[%u]: OML=%u, mult=%u => %u ms -> %u fn\n", i, payload[i], abis_nm_t200_ms[i], - bts->t200_ms[i]); -#else - /* we'd rather use the 1s/2s (long) defaults by - * libosmocore, as we appear to have some bug(s) - * related to handling T200 expiration in - * libosmogsm lapd(m) code? */ - LOGPFOH(DOML, LOGL_NOTICE, foh, "Ignoring T200[%u] (%u ms) " - "as sent by BSC due to suspected LAPDm bug!\n", - i, t200_ms); -#endif + t200_ms, bts->t200_fn[i]); } +#endif } /* 9.4.31 Maximum Timing Advance */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/35007?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ic6d7902b13cf491daaa8752db78f9875387aeffd Gerrit-Change-Number: 35007 Gerrit-PatchSet: 9 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-mgw[master]: mgcp: reserve once byte for '\0' in mgcp_do_read()
by laforge 17 Dec '23

17 Dec '23
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35322?usp=email ) Change subject: mgcp: reserve once byte for '\0' in mgcp_do_read() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35322?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Icc878af7f671213bb516af62cb601914d86ff808 Gerrit-Change-Number: 35322 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sun, 17 Dec 2023 10:39:31 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: hnbgw: on latest, skip TC_rab_assign_mgw_iuup_addr_chg
by laforge 17 Dec '23

17 Dec '23
Attention is currently required from: neels. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35350?usp=email ) Change subject: hnbgw: on latest, skip TC_rab_assign_mgw_iuup_addr_chg ...................................................................... Patch Set 1: Code-Review-1 (1 comment) Patchset: PS1: This is clearly the wrong approach, IMHO. No matter what we send to osmo-* of any version, it should never crash. If there is such a bug in latest, a patch release is required. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35350?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I53f3c67e0cf71cbc6bcc8a8e691b16c871df9d33 Gerrit-Change-Number: 35350 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Sun, 17 Dec 2023 10:38:55 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in pysim[master]: construct/tlv: Pass optional 'context' into construct decoder/encoder
by laforge 17 Dec '23

17 Dec '23
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/35380?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: construct/tlv: Pass optional 'context' into construct decoder/encoder ...................................................................... construct/tlv: Pass optional 'context' into construct decoder/encoder The context is some opaque dictionary that can be used by the constructs; let's allow the caller of parse_construct, from_bytes, from_tlv to specify it. Also, when decoding a TLV_IE_Collection, pass the decode results of existing siblings via the construct. Change-Id: I021016aaa09cddf9d36521c1a54b468ec49ff54d --- M pySim/construct.py M pySim/tlv.py 2 files changed, 52 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/80/35380/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35380?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I021016aaa09cddf9d36521c1a54b468ec49ff54d Gerrit-Change-Number: 35380 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in pysim[master]: decode security attributes compact field in FCP
by laforge 17 Dec '23

17 Dec '23
Attention is currently required from: dexter, fixeria. laforge has uploaded a new patch set (#2) to the change originally created by dexter. ( https://gerrit.osmocom.org/c/pysim/+/35363?usp=email ) The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: decode security attributes compact field in FCP ...................................................................... decode security attributes compact field in FCP When we select files, we currently display the security attributes compact field as raw bytes only. Let's decode this field using construct so that it gets displayed in human readable form. Change-Id: Iaa1167349027222e69a561d20a4c595fba2fdd2b Related: OS#6211 --- M pySim/ts_102_221.py 1 file changed, 45 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/63/35363/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35363?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Iaa1167349027222e69a561d20a4c595fba2fdd2b Gerrit-Change-Number: 35363 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in pysim[master]: construct/tlv: Pass optional 'context' into construct decoder
by laforge 17 Dec '23

17 Dec '23
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35380?usp=email ) Change subject: construct/tlv: Pass optional 'context' into construct decoder ...................................................................... construct/tlv: Pass optional 'context' into construct decoder The context is some opaque dictionary that can be used by the constructs; let's allow the caller of parse_construct, from_bytes, from_tlv to specify it. Also, when decoding a TLV_IE_Collection, pass the decode results of existing siblings via the construct. Change-Id: I021016aaa09cddf9d36521c1a54b468ec49ff54d --- M pySim/construct.py M pySim/tlv.py 2 files changed, 32 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/80/35380/1 diff --git a/pySim/construct.py b/pySim/construct.py index af96b49..3872c2c 100644 --- a/pySim/construct.py +++ b/pySim/construct.py @@ -173,11 +173,11 @@ return r -def parse_construct(c, raw_bin_data: bytes, length: typing.Optional[int] = None, exclude_prefix: str = '_'): +def parse_construct(c, raw_bin_data: bytes, length: typing.Optional[int] = None, exclude_prefix: str = '_', context: dict = {}): """Helper function to wrap around normalize_construct() and filter_dict().""" if not length: length = len(raw_bin_data) - parsed = c.parse(raw_bin_data, total_len=length) + parsed = c.parse(raw_bin_data, total_len=length, **context) return normalize_construct(parsed) diff --git a/pySim/tlv.py b/pySim/tlv.py index c85d92b..f1dc268 100644 --- a/pySim/tlv.py +++ b/pySim/tlv.py @@ -102,16 +102,16 @@ def _to_bytes(self): raise NotImplementedError('%s._to_bytes' % type(self).__name__) - def from_bytes(self, do: bytes): + def from_bytes(self, do: bytes, context: dict = {}): """Convert from binary bytes to internal representation. Store the decoded result in the internal state and return it.""" self.encoded = do if self.encoded == b'': self.decoded = None elif self._construct: - self.decoded = parse_construct(self._construct, do) + self.decoded = parse_construct(self._construct, do, context=context) elif self.__class__._construct: - self.decoded = parse_construct(self.__class__._construct, do) + self.decoded = parse_construct(self.__class__._construct, do, context=context) else: self.decoded = self._from_bytes(do) return self.decoded @@ -188,13 +188,13 @@ else: return super().to_bytes() - def from_bytes(self, do: bytes): + def from_bytes(self, do: bytes, context: dict = {}): """Parse *the value part* from binary bytes to internal representation.""" if self.nested_collection: - self.children = self.nested_collection.from_bytes(do) + self.children = self.nested_collection.from_bytes(do, context=context) else: self.children = [] - return super().from_bytes(do) + return super().from_bytes(do, context=context) class TLV_IE(IE): @@ -234,7 +234,7 @@ val = self.to_bytes() return self._encode_tag() + self._encode_len(val) + val - def from_tlv(self, do: bytes): + def from_tlv(self, do: bytes, context: dict = {}): if len(do) == 0: return {}, b'' (rawtag, remainder) = self.__class__._parse_tag_raw(do) @@ -248,7 +248,7 @@ else: value = do remainder = b'' - dec = self.from_bytes(value) + dec = self.from_bytes(value, context=context) return dec, remainder @@ -343,7 +343,7 @@ else: raise TypeError - def from_bytes(self, binary: bytes) -> List[TLV_IE]: + def from_bytes(self, binary: bytes, context: dict = {}) -> List[TLV_IE]: """Create a list of TLV_IEs from the collection based on binary input data. Args: binary : binary bytes of encoded data @@ -357,6 +357,7 @@ first = next(iter(self.members_by_tag.values())) # iterate until no binary trailer is left while len(remainder): + context['siblings'] = res # obtain the tag at the start of the remainder tag, r = first._parse_tag_raw(remainder) if tag == None: @@ -365,7 +366,7 @@ cls = self.members_by_tag[tag] # create an instance and parse accordingly inst = cls() - dec, remainder = inst.from_tlv(remainder) + dec, remainder = inst.from_tlv(remainder, context=context) res.append(inst) else: # unknown tag; create the related class on-the-fly using the same base class @@ -376,7 +377,7 @@ cls._to_bytes = lambda s: bytes.fromhex(s.decoded['raw']) # create an instance and parse accordingly inst = cls() - dec, remainder = inst.from_tlv(remainder) + dec, remainder = inst.from_tlv(remainder, context=context) res.append(inst) self.children = res return res @@ -419,8 +420,8 @@ out += c.to_tlv() return out - def from_tlv(self, do): - return self.from_bytes(do) + def from_tlv(self, do, context: dict = {}): + return self.from_bytes(do, context=context) def to_tlv(self): return self.to_bytes() -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35380?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I021016aaa09cddf9d36521c1a54b468ec49ff54d Gerrit-Change-Number: 35380 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • ...
  • 161
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.