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

October 2022

  • 2 participants
  • 2331 discussions
Change in osmo-mgw[master]: Rename and move func checking if amr mode is explicitly configured
by neels 24 Oct '22

24 Oct '22
Attention is currently required from: pespin. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29861 ) Change subject: Rename and move func checking if amr mode is explicitly configured ...................................................................... Patch Set 1: Code-Review-1 (1 comment) File include/osmocom/mgcp/mgcp_codec.h: https://gerrit.osmocom.org/c/osmo-mgw/+/29861/comment/4250393c_ba999f4d PS1, Line 20: bool mgcp_codec_amr_mode_is_indicated(const struct mgcp_rtp_codec *codec); problems: - term 'mode' in the spec refers to the AMR modes 4k75 .. 12k2. So the naming 'mode is indicated' would mean that a 'mode-set' fmtp is present, not 'octet-align'. Not sure what term is non-ambiguous for OA vs BE. Maybe 'amr_align_is_indicated'? - per spec, the lack of an 'octet-align' fmtp implies octet-align=0. So it is wrong to even look whether a parameter is present or not, we should (TM) only work with the resulting alignment value. Of course that's a problem when osmo-bsc and osmo-msc always fail to send the octet-align=1 fmtp in their MGCP even though we basically always deal with AMR OA. Is it worth changing this non-compliant code instead of replacing it with the correct behvior? If we have to do some legacy compatibility, the non-compliant behavior deserves loud code comments? - why is this function changing from static to listed in a header file? I oppose that because the function's usefulness is obscure and it should never have been written. -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29861 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I8dce3038ebccf5e1e37e2908070a67d66693a96f Gerrit-Change-Number: 29861 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 24 Oct 2022 20:23:37 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-mgw[master]: mgw: Log unexpected RTP AMR OA-vs-BE payload
by pespin 24 Oct '22

24 Oct '22
Attention is currently required from: neels. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29860 ) Change subject: mgw: Log unexpected RTP AMR OA-vs-BE payload ...................................................................... Patch Set 1: (1 comment) File src/libosmo-mgcp/mgcp_network.c: https://gerrit.osmocom.org/c/osmo-mgw/+/29860/comment/15a60eb1_a80d9aca PS1, Line 1541: " Check your config!\n", > i'd drop "Check your config!", because it is confusing. […] I prefer keeping it, since it really shows some sort of misconfiguration somewhere. The log is not saying that the user should check "osmo-mgw.cfg". -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29860 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Ib5ae82c01153398491b21191a8cec9969337bbbc Gerrit-Change-Number: 29860 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Mon, 24 Oct 2022 20:14:19 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in osmo-mgw[master]: mgw: Log unexpected RTP AMR OA-vs-BE payload
by neels 24 Oct '22

24 Oct '22
Attention is currently required from: pespin. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29860 ) Change subject: mgw: Log unexpected RTP AMR OA-vs-BE payload ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29860 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Ib5ae82c01153398491b21191a8cec9969337bbbc Gerrit-Change-Number: 29860 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 24 Oct 2022 20:02:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-pcu[master]: Rework tbf::update_ms()
by fixeria 24 Oct '22

24 Oct '22
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/29846 ) Change subject: Rework tbf::update_ms() ...................................................................... Patch Set 3: (2 comments) Commit Message: https://gerrit.osmocom.org/c/osmo-pcu/+/29846/comment/99a28336_988abcca PS3, Line 18: practive practice? (it would have been easier to read this text if there was an empty line between paragraphs) File src/gprs_ms_storage.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/29846/comment/97cec518_06c7ea83 PS3, Line 112: " No newline at end of revision file. " -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/29846 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I1b7c0fde15b9bb8a973068994dbe972285ad0aff Gerrit-Change-Number: 29846 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 24 Oct 2022 19:55:35 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in osmo-mgw[master]: mgw: Log unexpected RTP AMR OA-vs-BE payload
by neels 24 Oct '22

24 Oct '22
Attention is currently required from: pespin. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29860 ) Change subject: mgw: Log unexpected RTP AMR OA-vs-BE payload ...................................................................... Patch Set 1: (1 comment) File src/libosmo-mgcp/mgcp_network.c: https://gerrit.osmocom.org/c/osmo-mgw/+/29860/comment/504d27ec_b465ca64 PS1, Line 1541: " Check your config!\n", i'd drop "Check your config!", because it is confusing. As a user reading this i would expect that i need to adjust some osmo-mgw.cfg item to fix it, but instead OA vs BE is decided by the MGCP client, and may not originate from a particular config at all, but e.g. from SDP received from a remote entity. -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29860 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Ib5ae82c01153398491b21191a8cec9969337bbbc Gerrit-Change-Number: 29860 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-CC: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 24 Oct 2022 19:45:26 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in osmocom-bb[master]: trxcon: allow subsequent TRXCON_EV_FULL_POWER_SCAN_REQ
by fixeria 24 Oct '22

24 Oct '22
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/29850 ) Change subject: trxcon: allow subsequent TRXCON_EV_FULL_POWER_SCAN_REQ ...................................................................... trxcon: allow subsequent TRXCON_EV_FULL_POWER_SCAN_REQ The remote L1CTL peer may send another L1CTL_PM_REQ message right after getting L1CTL_PM_CONF from us. Handle this properly. Change-Id: I8e5fd778467567e8ca69ed420b9815073daa7e16 --- M src/host/trxcon/src/trxcon_fsm.c 1 file changed, 9 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved laforge: Looks good to me, approved msuraev: Looks good to me, but someone else must approve diff --git a/src/host/trxcon/src/trxcon_fsm.c b/src/host/trxcon/src/trxcon_fsm.c index 4116291..59a29d9 100644 --- a/src/host/trxcon/src/trxcon_fsm.c +++ b/src/host/trxcon/src/trxcon_fsm.c @@ -175,6 +175,13 @@ l1ctl_tx_pm_conf(trxcon->l2if, res->band_arfcn, res->dbm, res->last_result); break; } + case TRXCON_EV_FULL_POWER_SCAN_REQ: + { + const struct trxcon_param_full_power_scan_req *req = data; + + trx_if_cmd_measure(trxcon->phyif, req->band_arfcn_start, req->band_arfcn_stop); + break; + } default: OSMO_ASSERT(0); } @@ -479,7 +486,8 @@ [TRXCON_ST_FULL_POWER_SCAN] = { .name = "FULL_POWER_SCAN", .out_state_mask = S(TRXCON_ST_RESET), - .in_event_mask = S(TRXCON_EV_FULL_POWER_SCAN_RES), + .in_event_mask = S(TRXCON_EV_FULL_POWER_SCAN_RES) + | S(TRXCON_EV_FULL_POWER_SCAN_REQ), .action = &trxcon_st_full_power_scan_action, }, [TRXCON_ST_FBSB_SEARCH] = { 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/29850 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I8e5fd778467567e8ca69ed420b9815073daa7e16 Gerrit-Change-Number: 29850 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmocom-bb[master]: Revert "host/trxcon/trx_ic.c: use osmo_ubit2sbit() from libosmocore"
by fixeria 24 Oct '22

24 Oct '22
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/29852 ) Change subject: Revert "host/trxcon/trx_ic.c: use osmo_ubit2sbit() from libosmocore" ...................................................................... Revert "host/trxcon/trx_ic.c: use osmo_ubit2sbit() from libosmocore" This reverts commit c5d9507b5ddd04d4ac14dc009b6df20c3098e2cc. Using osmo_ubit2sbit() was a bad idea because this function treats the input buffer as ubits (while we deal with usbits) and produces absolute sbit values: either 127 or -127. This is wrong, because all intermediate usbit values are getting converted to -127. This bug remained unnoticed so far because trxcon is mostly used in combination with fake_trx.py, a virtual Um interface which simulates ideal RF conditions by default and feeds trxcon with 'perfect' bits. Change-Id: I3a32da19c9f419d51d55b301461ce28ce11b2249 --- M src/host/trxcon/src/trx_if.c 1 file changed, 6 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/host/trxcon/src/trx_if.c b/src/host/trxcon/src/trx_if.c index 7b1ca99..6f225ee 100644 --- a/src/host/trxcon/src/trx_if.c +++ b/src/host/trxcon/src/trx_if.c @@ -621,7 +621,12 @@ toa256 = ((int16_t) (buf[6] << 8) | buf[7]); /* Copy and convert bits {254..0} to sbits {-127..127} */ - osmo_ubit2sbit(bits, buf + 8, 148); + for (unsigned int i = 0; i < 148; i++) { + if (buf[8 + i] == 255) + bits[i] = -127; + else + bits[i] = 127 - buf[8 + i]; + } if (tn >= 8) { LOGPFSMSL(trx->fi, DTRXD, LOGL_ERROR, "Illegal TS %d\n", tn); 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/29852 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I3a32da19c9f419d51d55b301461ce28ce11b2249 Gerrit-Change-Number: 29852 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> 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
Change in osmocom-bb[master]: trxcon: give L1CTL API direct access to trxcon_fsm
by fixeria 24 Oct '22

24 Oct '22
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/29849 ) Change subject: trxcon: give L1CTL API direct access to trxcon_fsm ...................................................................... trxcon: give L1CTL API direct access to trxcon_fsm The L1CTL interface logic currently gets access to the trxcon_fsm via an associated struct trxcon_inst. No other fields are used, so we can pass trxcon->fi directly. All communication shall be done via the FSM anyway. Change-Id: I5a15a676ce3917d2eddc44f1143cea8d3cd8781f --- M src/host/trxcon/src/l1ctl.c M src/host/trxcon/src/trxcon.c 2 files changed, 72 insertions(+), 72 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve laforge: Looks good to me, but someone else must approve msuraev: Looks good to me, but someone else must approve diff --git a/src/host/trxcon/src/l1ctl.c b/src/host/trxcon/src/l1ctl.c index a321e37..5f1e610 100644 --- a/src/host/trxcon/src/l1ctl.c +++ b/src/host/trxcon/src/l1ctl.c @@ -80,7 +80,7 @@ int l1ctl_tx_pm_conf(struct l1ctl_client *l1c, uint16_t band_arfcn, int dbm, int last) { - struct trxcon_inst *trxcon = l1c->priv; + struct osmo_fsm_inst *fi = l1c->priv; struct l1ctl_pm_conf *pmc; struct msgb *msg; @@ -88,7 +88,7 @@ if (!msg) return -ENOMEM; - LOGPFSMSL(trxcon->fi, DL1C, LOGL_DEBUG, + LOGPFSMSL(fi, DL1C, LOGL_DEBUG, "Send PM Conf (%s %d = %d dBm)\n", arfcn2band_name(band_arfcn), band_arfcn & ~ARFCN_FLAG_MASK, dbm); @@ -108,7 +108,7 @@ int l1ctl_tx_reset_ind(struct l1ctl_client *l1c, uint8_t type) { - struct trxcon_inst *trxcon = l1c->priv; + struct osmo_fsm_inst *fi = l1c->priv; struct msgb *msg; struct l1ctl_reset *res; @@ -116,7 +116,7 @@ if (!msg) return -ENOMEM; - LOGPFSMSL(trxcon->fi, DL1C, LOGL_DEBUG, "Send Reset Ind (%u)\n", type); + LOGPFSMSL(fi, DL1C, LOGL_DEBUG, "Send Reset Ind (%u)\n", type); res = (struct l1ctl_reset *) msgb_put(msg, sizeof(*res)); res->type = type; @@ -126,7 +126,7 @@ int l1ctl_tx_reset_conf(struct l1ctl_client *l1c, uint8_t type) { - struct trxcon_inst *trxcon = l1c->priv; + struct osmo_fsm_inst *fi = l1c->priv; struct msgb *msg; struct l1ctl_reset *res; @@ -134,7 +134,7 @@ if (!msg) return -ENOMEM; - LOGPFSMSL(trxcon->fi, DL1C, LOGL_DEBUG, "Send Reset Conf (%u)\n", type); + LOGPFSMSL(fi, DL1C, LOGL_DEBUG, "Send Reset Conf (%u)\n", type); res = (struct l1ctl_reset *) msgb_put(msg, sizeof(*res)); res->type = type; @@ -168,7 +168,7 @@ int l1ctl_tx_fbsb_fail(struct l1ctl_client *l1c, uint16_t band_arfcn) { - struct trxcon_inst *trxcon = l1c->priv; + struct osmo_fsm_inst *fi = l1c->priv; struct l1ctl_info_dl *dl; struct msgb *msg; @@ -183,14 +183,14 @@ fbsb_conf_make(msg, 255, 0); - LOGPFSMSL(trxcon->fi, DL1C, LOGL_DEBUG, "Send FBSB Conf (timeout)\n"); + LOGPFSMSL(fi, DL1C, LOGL_DEBUG, "Send FBSB Conf (timeout)\n"); return l1ctl_client_send(l1c, msg); } int l1ctl_tx_fbsb_conf(struct l1ctl_client *l1c, uint16_t band_arfcn, uint8_t bsic) { - struct trxcon_inst *trxcon = l1c->priv; + struct osmo_fsm_inst *fi = l1c->priv; struct l1ctl_fbsb_conf *conf; struct l1ctl_info_dl *dl; struct msgb *msg; @@ -209,7 +209,7 @@ /* FIXME: set proper value */ conf->initial_freq_err = 0; - LOGPFSMSL(trxcon->fi, DL1C, LOGL_DEBUG, + LOGPFSMSL(fi, DL1C, LOGL_DEBUG, "Send FBSB Conf (result=%u, bsic=%u)\n", conf->result, conf->bsic); @@ -320,13 +320,13 @@ static int l1ctl_rx_fbsb_req(struct l1ctl_client *l1c, struct msgb *msg) { - struct trxcon_inst *trxcon = l1c->priv; + struct osmo_fsm_inst *fi = l1c->priv; struct l1ctl_fbsb_req *fbsb; int rc = 0; fbsb = (struct l1ctl_fbsb_req *) msg->l1h; if (msgb_l1len(msg) < sizeof(*fbsb)) { - LOGPFSMSL(trxcon->fi, DL1C, LOGL_ERROR, + LOGPFSMSL(fi, DL1C, LOGL_ERROR, "MSG too short FBSB Req: %u\n", msgb_l1len(msg)); rc = -EINVAL; @@ -339,13 +339,13 @@ .band_arfcn = ntohs(fbsb->band_arfcn), }; - LOGPFSMSL(trxcon->fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(fi, DL1C, LOGL_NOTICE, "Received FBSB request (%s %d, timeout %u ms)\n", arfcn2band_name(req.band_arfcn), req.band_arfcn & ~ARFCN_FLAG_MASK, req.timeout_ms); - osmo_fsm_inst_dispatch(trxcon->fi, TRXCON_EV_FBSB_SEARCH_REQ, &req); + osmo_fsm_inst_dispatch(fi, TRXCON_EV_FBSB_SEARCH_REQ, &req); exit: msgb_free(msg); @@ -354,13 +354,13 @@ static int l1ctl_rx_pm_req(struct l1ctl_client *l1c, struct msgb *msg) { - struct trxcon_inst *trxcon = l1c->priv; + struct osmo_fsm_inst *fi = l1c->priv; struct l1ctl_pm_req *pmr; int rc = 0; pmr = (struct l1ctl_pm_req *) msg->l1h; if (msgb_l1len(msg) < sizeof(*pmr)) { - LOGPFSMSL(trxcon->fi, DL1C, LOGL_ERROR, + LOGPFSMSL(fi, DL1C, LOGL_ERROR, "MSG too short PM Req: %u\n", msgb_l1len(msg)); rc = -EINVAL; @@ -372,13 +372,13 @@ .band_arfcn_stop = ntohs(pmr->range.band_arfcn_to), }; - LOGPFSMSL(trxcon->fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(fi, DL1C, LOGL_NOTICE, "Received power measurement request (%s: %d -> %d)\n", arfcn2band_name(req.band_arfcn_start), req.band_arfcn_start & ~ARFCN_FLAG_MASK, req.band_arfcn_stop & ~ARFCN_FLAG_MASK); - osmo_fsm_inst_dispatch(trxcon->fi, TRXCON_EV_FULL_POWER_SCAN_REQ, &req); + osmo_fsm_inst_dispatch(fi, TRXCON_EV_FULL_POWER_SCAN_REQ, &req); exit: msgb_free(msg); @@ -387,31 +387,31 @@ static int l1ctl_rx_reset_req(struct l1ctl_client *l1c, struct msgb *msg) { - struct trxcon_inst *trxcon = l1c->priv; + struct osmo_fsm_inst *fi = l1c->priv; struct l1ctl_reset *res; int rc = 0; res = (struct l1ctl_reset *) msg->l1h; if (msgb_l1len(msg) < sizeof(*res)) { - LOGPFSMSL(trxcon->fi, DL1C, LOGL_ERROR, + LOGPFSMSL(fi, DL1C, LOGL_ERROR, "MSG too short Reset Req: %u\n", msgb_l1len(msg)); rc = -EINVAL; goto exit; } - LOGPFSMSL(trxcon->fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(fi, DL1C, LOGL_NOTICE, "Received reset request (%u)\n", res->type); switch (res->type) { case L1CTL_RES_T_FULL: - osmo_fsm_inst_dispatch(trxcon->fi, TRXCON_EV_RESET_FULL_REQ, NULL); + osmo_fsm_inst_dispatch(fi, TRXCON_EV_RESET_FULL_REQ, NULL); break; case L1CTL_RES_T_SCHED: - osmo_fsm_inst_dispatch(trxcon->fi, TRXCON_EV_RESET_SCHED_REQ, NULL); + osmo_fsm_inst_dispatch(fi, TRXCON_EV_RESET_SCHED_REQ, NULL); break; default: - LOGPFSMSL(trxcon->fi, DL1C, LOGL_ERROR, + LOGPFSMSL(fi, DL1C, LOGL_ERROR, "Unknown L1CTL_RESET_REQ type\n"); goto exit; } @@ -426,11 +426,11 @@ static int l1ctl_rx_echo_req(struct l1ctl_client *l1c, struct msgb *msg) { - struct trxcon_inst *trxcon = l1c->priv; + struct osmo_fsm_inst *fi = l1c->priv; struct l1ctl_hdr *l1h; - LOGPFSMSL(trxcon->fi, DL1C, LOGL_NOTICE, "Recv Echo Req\n"); - LOGPFSMSL(trxcon->fi, DL1C, LOGL_NOTICE, "Send Echo Conf\n"); + LOGPFSMSL(fi, DL1C, LOGL_NOTICE, "Recv Echo Req\n"); + LOGPFSMSL(fi, DL1C, LOGL_NOTICE, "Send Echo Conf\n"); /* Nothing to do, just send it back */ l1h = (struct l1ctl_hdr *) msg->l1h; @@ -442,20 +442,20 @@ static int l1ctl_rx_ccch_mode_req(struct l1ctl_client *l1c, struct msgb *msg) { - struct trxcon_inst *trxcon = l1c->priv; + struct osmo_fsm_inst *fi = l1c->priv; struct l1ctl_ccch_mode_req *mode_req; int rc; mode_req = (struct l1ctl_ccch_mode_req *)msg->l1h; if (msgb_l1len(msg) < sizeof(*mode_req)) { - LOGPFSMSL(trxcon->fi, DL1C, LOGL_ERROR, + LOGPFSMSL(fi, DL1C, LOGL_ERROR, "MSG too short Reset Req: %u\n", msgb_l1len(msg)); rc = -EINVAL; goto exit; } - LOGPFSMSL(trxcon->fi, DL1C, LOGL_NOTICE, "Received CCCH mode request (%u)\n", + LOGPFSMSL(fi, DL1C, LOGL_NOTICE, "Received CCCH mode request (%u)\n", mode_req->ccch_mode); /* TODO: add value-string for ccch_mode */ struct trxcon_param_set_ccch_tch_mode_req req = { @@ -463,7 +463,7 @@ .mode = l1ctl_ccch_mode2pchan_config(mode_req->ccch_mode), }; - rc = osmo_fsm_inst_dispatch(trxcon->fi, TRXCON_EV_SET_CCCH_MODE_REQ, &req); + rc = osmo_fsm_inst_dispatch(fi, TRXCON_EV_SET_CCCH_MODE_REQ, &req); if (rc == 0 && req.applied) l1ctl_tx_ccch_mode_conf(l1c, mode_req->ccch_mode); @@ -475,7 +475,7 @@ static int l1ctl_rx_rach_req(struct l1ctl_client *l1c, struct msgb *msg, bool is_11bit) { struct trxcon_param_tx_access_burst_req req; - struct trxcon_inst *trxcon = l1c->priv; + struct osmo_fsm_inst *fi = l1c->priv; struct l1ctl_info_ul *ul; ul = (struct l1ctl_info_ul *) msg->l1h; @@ -490,7 +490,7 @@ .is_11bit = true, }; - LOGPFSMSL(trxcon->fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(fi, DL1C, LOGL_NOTICE, "Received 11-bit RACH request " "(offset=%u, synch_seq=%u, ra11=0x%02hx)\n", req.offset, req.synch_seq, req.ra); @@ -502,7 +502,7 @@ .ra = rr->ra, }; - LOGPFSMSL(trxcon->fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(fi, DL1C, LOGL_NOTICE, "Received 8-bit RACH request " "(offset=%u, ra=0x%02x)\n", req.offset, req.ra); } @@ -510,7 +510,7 @@ /* The controlling L1CTL side always does include the UL info header, * but may leave it empty. We assume RACH is on TS0 in this case. */ if (ul->chan_nr == 0x00) { - LOGPFSMSL(trxcon->fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(fi, DL1C, LOGL_NOTICE, "The UL info header is empty, assuming RACH is on TS0\n"); req.chan_nr = RSL_CHAN_RACH; req.link_id = 0x00; @@ -519,19 +519,19 @@ req.link_id = ul->link_id; } - osmo_fsm_inst_dispatch(trxcon->fi, TRXCON_EV_TX_ACCESS_BURST_REQ, &req); + osmo_fsm_inst_dispatch(fi, TRXCON_EV_TX_ACCESS_BURST_REQ, &req); msgb_free(msg); return 0; } -static int l1ctl_proc_est_req_h0(struct trxcon_inst *trxcon, +static int l1ctl_proc_est_req_h0(struct osmo_fsm_inst *fi, struct trxcon_param_dedicated_establish_req *req, const struct l1ctl_h0 *h) { req->h0.band_arfcn = ntohs(h->band_arfcn); - LOGPFSMSL(trxcon->fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(fi, DL1C, LOGL_NOTICE, "L1CTL_DM_EST_REQ indicates single ARFCN %s %u\n", arfcn2band_name(req->h0.band_arfcn), req->h0.band_arfcn & ~ARFCN_FLAG_MASK); @@ -539,24 +539,24 @@ return 0; } -static int l1ctl_proc_est_req_h1(struct trxcon_inst *trxcon, +static int l1ctl_proc_est_req_h1(struct osmo_fsm_inst *fi, struct trxcon_param_dedicated_establish_req *req, const struct l1ctl_h1 *h) { unsigned int i; - LOGPFSMSL(trxcon->fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(fi, DL1C, LOGL_NOTICE, "L1CTL_DM_EST_REQ indicates a Frequency " "Hopping (hsn=%u, maio=%u, chans=%u) channel\n", h->hsn, h->maio, h->n); /* No channels?!? */ if (!h->n) { - LOGPFSMSL(trxcon->fi, DL1C, LOGL_ERROR, + LOGPFSMSL(fi, DL1C, LOGL_ERROR, "No channels in mobile allocation?!?\n"); return -EINVAL; } else if (h->n > ARRAY_SIZE(h->ma)) { - LOGPFSMSL(trxcon->fi, DL1C, LOGL_ERROR, + LOGPFSMSL(fi, DL1C, LOGL_ERROR, "More than 64 channels in mobile allocation?!?\n"); return -EINVAL; } @@ -573,7 +573,7 @@ static int l1ctl_rx_dm_est_req(struct l1ctl_client *l1c, struct msgb *msg) { - struct trxcon_inst *trxcon = l1c->priv; + struct osmo_fsm_inst *fi = l1c->priv; struct l1ctl_dm_est_req *est_req; struct l1ctl_info_ul *ul; int rc; @@ -588,20 +588,20 @@ .hopping = est_req->h, }; - LOGPFSMSL(trxcon->fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(fi, DL1C, LOGL_NOTICE, "Received L1CTL_DM_EST_REQ " "(tn=%u, chan_nr=0x%02x, tsc=%u, tch_mode=0x%02x)\n", req.chan_nr & 0x07, req.chan_nr, req.tsc, req.tch_mode); /* Frequency hopping? */ if (est_req->h) - rc = l1ctl_proc_est_req_h1(trxcon, &req, &est_req->h1); + rc = l1ctl_proc_est_req_h1(fi, &req, &est_req->h1); else /* Single ARFCN */ - rc = l1ctl_proc_est_req_h0(trxcon, &req, &est_req->h0); + rc = l1ctl_proc_est_req_h0(fi, &req, &est_req->h0); if (rc) goto exit; - osmo_fsm_inst_dispatch(trxcon->fi, TRXCON_EV_DEDICATED_ESTABLISH_REQ, &req); + osmo_fsm_inst_dispatch(fi, TRXCON_EV_DEDICATED_ESTABLISH_REQ, &req); exit: msgb_free(msg); @@ -610,11 +610,11 @@ static int l1ctl_rx_dm_rel_req(struct l1ctl_client *l1c, struct msgb *msg) { - struct trxcon_inst *trxcon = l1c->priv; + struct osmo_fsm_inst *fi = l1c->priv; - LOGPFSMSL(trxcon->fi, DL1C, LOGL_NOTICE, "Received L1CTL_DM_REL_REQ\n"); + LOGPFSMSL(fi, DL1C, LOGL_NOTICE, "Received L1CTL_DM_REL_REQ\n"); - osmo_fsm_inst_dispatch(trxcon->fi, TRXCON_EV_DEDICATED_RELEASE_REQ, NULL); + osmo_fsm_inst_dispatch(fi, TRXCON_EV_DEDICATED_RELEASE_REQ, NULL); msgb_free(msg); return 0; @@ -626,7 +626,7 @@ static int l1ctl_rx_dt_req(struct l1ctl_client *l1c, struct msgb *msg, bool traffic) { - struct trxcon_inst *trxcon = l1c->priv; + struct osmo_fsm_inst *fi = l1c->priv; struct l1ctl_info_ul *ul; /* Extract UL frame header */ @@ -640,20 +640,20 @@ .data = ul->payload, }; - LOGPFSMSL(trxcon->fi, DL1D, LOGL_DEBUG, + LOGPFSMSL(fi, DL1D, LOGL_DEBUG, "Recv %s Req (chan_nr=0x%02x, link_id=0x%02x, len=%zu)\n", traffic ? "TRAFFIC" : "DATA", req.chan_nr, req.link_id, req.data_len); - switch (trxcon->fi->state) { + switch (fi->state) { case TRXCON_ST_DEDICATED: if (traffic) - osmo_fsm_inst_dispatch(trxcon->fi, TRXCON_EV_TX_TRAFFIC_REQ, &req); + osmo_fsm_inst_dispatch(fi, TRXCON_EV_TX_TRAFFIC_REQ, &req); else - osmo_fsm_inst_dispatch(trxcon->fi, TRXCON_EV_TX_DATA_REQ, &req); + osmo_fsm_inst_dispatch(fi, TRXCON_EV_TX_DATA_REQ, &req); break; default: if (!traffic && req.link_id == 0x40) /* only for SACCH */ - osmo_fsm_inst_dispatch(trxcon->fi, TRXCON_EV_UPDATE_SACCH_CACHE_REQ, &req); + osmo_fsm_inst_dispatch(fi, TRXCON_EV_UPDATE_SACCH_CACHE_REQ, &req); /* TODO: log an error about uhnandled DATA.req / TRAFFIC.req */ } @@ -663,14 +663,14 @@ static int l1ctl_rx_param_req(struct l1ctl_client *l1c, struct msgb *msg) { - struct trxcon_inst *trxcon = l1c->priv; + struct osmo_fsm_inst *fi = l1c->priv; struct l1ctl_par_req *par_req; struct l1ctl_info_ul *ul; ul = (struct l1ctl_info_ul *) msg->l1h; par_req = (struct l1ctl_par_req *) ul->payload; - LOGPFSMSL(trxcon->fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(fi, DL1C, LOGL_NOTICE, "Received L1CTL_PARAM_REQ (ta=%d, tx_power=%u)\n", par_req->ta, par_req->tx_power); @@ -682,7 +682,7 @@ } }; - osmo_fsm_inst_dispatch(trxcon->fi, TRXCON_EV_SET_PHY_CONFIG_REQ, &req); + osmo_fsm_inst_dispatch(fi, TRXCON_EV_SET_PHY_CONFIG_REQ, &req); msgb_free(msg); return 0; @@ -690,13 +690,13 @@ static int l1ctl_rx_tch_mode_req(struct l1ctl_client *l1c, struct msgb *msg) { - struct trxcon_inst *trxcon = l1c->priv; + struct osmo_fsm_inst *fi = l1c->priv; struct l1ctl_tch_mode_req *mode_req; int rc; mode_req = (struct l1ctl_tch_mode_req *)msg->l1h; - LOGPFSMSL(trxcon->fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(fi, DL1C, LOGL_NOTICE, "Received L1CTL_TCH_MODE_REQ (tch_mode=%u, audio_mode=%u)\n", mode_req->tch_mode, mode_req->audio_mode); @@ -710,7 +710,7 @@ req.amr.codecs_bitmask = mode_req->amr.codecs_bitmask; } - rc = osmo_fsm_inst_dispatch(trxcon->fi, TRXCON_EV_SET_TCH_MODE_REQ, &req); + rc = osmo_fsm_inst_dispatch(fi, TRXCON_EV_SET_TCH_MODE_REQ, &req); if (rc != 0 || !req.applied) { talloc_free(msg); return rc; @@ -725,7 +725,7 @@ static int l1ctl_rx_crypto_req(struct l1ctl_client *l1c, struct msgb *msg) { - struct trxcon_inst *trxcon = l1c->priv; + struct osmo_fsm_inst *fi = l1c->priv; struct l1ctl_crypto_req *cr; struct l1ctl_info_ul *ul; @@ -739,11 +739,11 @@ .key = cr->key, }; - LOGPFSMSL(trxcon->fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(fi, DL1C, LOGL_NOTICE, "L1CTL_CRYPTO_REQ (algo=A5/%u, key_len=%u)\n", req.a5_algo, req.key_len); - osmo_fsm_inst_dispatch(trxcon->fi, TRXCON_EV_CRYPTO_REQ, &req); + osmo_fsm_inst_dispatch(fi, TRXCON_EV_CRYPTO_REQ, &req); msgb_free(msg); return 0; @@ -751,7 +751,7 @@ int l1ctl_rx_cb(struct l1ctl_client *l1c, struct msgb *msg) { - const struct trxcon_inst *trxcon = l1c->priv; + struct osmo_fsm_inst *fi = l1c->priv; struct l1ctl_hdr *l1h; l1h = (struct l1ctl_hdr *) msg->l1h; @@ -793,13 +793,13 @@ case L1CTL_TBF_CFG_REQ: case L1CTL_DM_FREQ_REQ: case L1CTL_SIM_REQ: - LOGPFSMSL(trxcon->fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(fi, DL1C, LOGL_NOTICE, "Ignoring unsupported message (type=%u)\n", l1h->msg_type); msgb_free(msg); return -ENOTSUP; default: - LOGPFSMSL(trxcon->fi, DL1C, LOGL_ERROR, "Unknown MSG type %u: %s\n", + LOGPFSMSL(fi, DL1C, LOGL_ERROR, "Unknown MSG type %u: %s\n", l1h->msg_type, osmo_hexdump(msgb_data(msg), msgb_length(msg))); msgb_free(msg); return -EINVAL; diff --git a/src/host/trxcon/src/trxcon.c b/src/host/trxcon/src/trxcon.c index 605dddd..d46cd8e 100644 --- a/src/host/trxcon/src/trxcon.c +++ b/src/host/trxcon/src/trxcon.c @@ -324,18 +324,18 @@ } l1c->log_prefix = talloc_strdup(l1c, trxcon->log_prefix); - l1c->priv = trxcon; + l1c->priv = trxcon->fi; trxcon->l2if = l1c; } static void l1ctl_conn_close_cb(struct l1ctl_client *l1c) { - struct trxcon_inst *trxcon = l1c->priv; + struct osmo_fsm_inst *fi = l1c->priv; - if (trxcon == NULL) + if (fi == NULL) return; - osmo_fsm_inst_dispatch(trxcon->fi, TRXCON_EV_L2IF_FAILURE, NULL); + osmo_fsm_inst_dispatch(fi, TRXCON_EV_L2IF_FAILURE, NULL); } static void print_usage(const char *app) -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/29849 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I5a15a676ce3917d2eddc44f1143cea8d3cd8781f Gerrit-Change-Number: 29849 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmocom-bb[master]: trxcon: gracefully exit on receipt of SIGTERM
by fixeria 24 Oct '22

24 Oct '22
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/29847 ) Change subject: trxcon: gracefully exit on receipt of SIGTERM ...................................................................... trxcon: gracefully exit on receipt of SIGTERM Change-Id: Id33e598b5c7a7a474a383f815cdbda65b29d25a0 --- M src/host/trxcon/src/trxcon.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/trxcon/src/trxcon.c b/src/host/trxcon/src/trxcon.c index 7e12e3b..605dddd 100644 --- a/src/host/trxcon/src/trxcon.c +++ b/src/host/trxcon/src/trxcon.c @@ -429,6 +429,7 @@ switch (signum) { case SIGINT: + case SIGTERM: app_data.quit++; break; case SIGABRT: @@ -469,6 +470,7 @@ /* Setup signal handlers */ signal(SIGINT, &signal_handler); + signal(SIGTERM, &signal_handler); signal(SIGABRT, &signal_handler); signal(SIGUSR1, &signal_handler); signal(SIGUSR2, &signal_handler); -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/29847 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Id33e598b5c7a7a474a383f815cdbda65b29d25a0 Gerrit-Change-Number: 29847 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
Change in osmocom-bb[master]: trxcon: give L1CTL API direct access to trxcon_fsm
by fixeria 24 Oct '22

24 Oct '22
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/29849 ) Change subject: trxcon: give L1CTL API direct access to trxcon_fsm ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/29849 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I5a15a676ce3917d2eddc44f1143cea8d3cd8781f Gerrit-Change-Number: 29849 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 24 Oct 2022 19:35:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • ...
  • 234
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.