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

November 2022

  • 2 participants
  • 2503 discussions
Change in osmo-iuh[master]: tests/test-hnbap: add missing include
by osmith 14 Nov '22

14 Nov '22
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/30083 ) Change subject: tests/test-hnbap: add missing include ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/30083 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: I57fe460b511bccd14e0d0d110104511292963525 Gerrit-Change-Number: 30083 Gerrit-PatchSet: 3 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 14 Nov 2022 12:22:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-iuh[master]: tests/hnb-test-rua: fix incompat pointer type
by pespin 14 Nov '22

14 Nov '22
Attention is currently required from: osmith, laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/30085 ) Change subject: tests/hnb-test-rua: fix incompat pointer type ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/30085 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: Id930a7f0d3d05cfcc8ba9734dd922de885853c8c Gerrit-Change-Number: 30085 Gerrit-PatchSet: 3 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Mon, 14 Nov 2022 12:22:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-iuh[master]: tests/hnb-test-rua: add missing include
by osmith 14 Nov '22

14 Nov '22
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/30082 ) Change subject: tests/hnb-test-rua: add missing include ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/30082 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: I3dbadb63058edc990b49ec803a123292e5eea10f Gerrit-Change-Number: 30082 Gerrit-PatchSet: 3 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 14 Nov 2022 12:21:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-iuh[master]: asn1: fix visibility warnings from generated code
by pespin 14 Nov '22

14 Nov '22
Attention is currently required from: osmith. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/30081 ) Change subject: asn1: fix visibility warnings from generated code ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/30081 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: If84445ed2e0df604b581684dcf83f8520b7da84c Gerrit-Change-Number: 30081 Gerrit-PatchSet: 3 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Mon, 14 Nov 2022 12:20:51 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmocom-bb[master]: trxcon: turn libtrxcon into shared library libosmo-trxcon
by pespin 14 Nov '22

14 Nov '22
Attention is currently required from: laforge, fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30105 ) Change subject: trxcon: turn libtrxcon into shared library libosmo-trxcon ...................................................................... Patch Set 3: (1 comment) Patchset: PS3: > I thought during an earlier call we discussed it would be a static library imported as submodule? isn't this to be used by trxcon and by osmo-ms-trx (which AFAIK is in another repo?) -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30105 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I508292e76c81ba7bc0c35db391a8622c46bdbe41 Gerrit-Change-Number: 30105 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Mon, 14 Nov 2022 12:19:06 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ttcn3-hacks[arehbein/wip]: WIP: ttcn3-dumpcap*.sh: Don't use lsof
by pespin 14 Nov '22

14 Nov '22
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30134 ) Change subject: WIP: ttcn3-dumpcap*.sh: Don't use lsof ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: why has this been merged with a self +2 and having "WIP" in the commit log?! -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30134 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: arehbein/wip Gerrit-Change-Id: Ie34eaa778f78b9685dd601d5e9898829caf0c7ca Gerrit-Change-Number: 30134 Gerrit-PatchSet: 1 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 14 Nov 2022 12:16:51 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ttcn3-hacks[arehbein/ttcn3-dumpcap-changes]: WIP: dumpcap-start/stop: Make script fail, not hang on sudo prompt
by pespin 14 Nov '22

14 Nov '22
Attention is currently required from: arehbein. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30127 ) Change subject: WIP: dumpcap-start/stop: Make script fail, not hang on sudo prompt ...................................................................... Patch Set 1: Code-Review-1 (2 comments) Patchset: PS1: You are doing up to 3 different things here, please split aproppiately and describe better. - "-e" option output stuff - Using "sudo" for whatever reason - Not hang when using sudo File ttcn3-dumpcap-start.sh: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30127/comment/1ac1af2b_1883… PS1, Line 19: sudo -k this is dropping the sudo password from my currently active shell? Meanng each time after running any testsuite I need to retype my password? no thanks ;) Better remove it. BTW, why do you need sudo here? isn't dumpcap getting cap_net_admin,cap_net_raw below? -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30127 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: arehbein/ttcn3-dumpcap-changes Gerrit-Change-Id: Id160384bf624a4eb0f419cb8ba07d8b69bb693f3 Gerrit-Change-Number: 30127 Gerrit-PatchSet: 1 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: arehbein <arehbein(a)sysmocom.de> Gerrit-Comment-Date: Mon, 14 Nov 2022 12:15:21 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ci[master]: master-pysim: use specific node for docs upload
by osmith 14 Nov '22

14 Nov '22
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/30145 ) Change subject: master-pysim: use specific node for docs upload ...................................................................... master-pysim: use specific node for docs upload Related: OS#5767 Change-Id: I25d799ccd0609732f7f82034f97881f1c75dcdf8 --- M jobs/master-builds.yml 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/45/30145/1 diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index adf5cea..3ef3f03 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -418,13 +418,14 @@ - pysim: concurrent: false - slave_axis: !!python/tuple [simtester,osmocom-master] + # OS#5767: only build2-deb9build-ansible is able to upload docs + slave_axis: !!python/tuple [simtester,osmocom-master,build2-deb9build-ansible] a2_name: JOB_TYPE a2: !!python/tuple ["test", "pylint", "docs"] combination_filter: > (JOB_TYPE == "test" && label == "simtester") || (JOB_TYPE == "pylint" && label == "osmocom-master") || - (JOB_TYPE == "docs" && label == "osmocom-master") + (JOB_TYPE == "docs" && label == "build2-deb9build-ansible") cmd: | case "$JOB_TYPE" in "test") -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/30145 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I25d799ccd0609732f7f82034f97881f1c75dcdf8 Gerrit-Change-Number: 30145 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmocom-bb[master]: trxcon: abstract L1CTL codec from the l1ctl_server API
by fixeria 14 Nov '22

14 Nov '22
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30100 ) Change subject: trxcon: abstract L1CTL codec from the l1ctl_server API ...................................................................... trxcon: abstract L1CTL codec from the l1ctl_server API The L1CTL codec (implemented in l1ctl.c) is going to be part of the upcoming libtrxcon, so let's uncouple it from the l1ctl_server API. Change-Id: I8d80af240b0e57f76263907c552288d4184876c0 Related: OS#5599 --- M src/host/trxcon/include/osmocom/bb/trxcon/l1ctl.h M src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h M src/host/trxcon/src/l1ctl.c M src/host/trxcon/src/trxcon_fsm.c M src/host/trxcon/src/trxcon_main.c 5 files changed, 128 insertions(+), 110 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/host/trxcon/include/osmocom/bb/trxcon/l1ctl.h b/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl.h index 1a8d775..949960c 100644 --- a/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl.h +++ b/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl.h @@ -1,24 +1,22 @@ #pragma once #include <stdint.h> -#include <osmocom/core/msgb.h> -#include <osmocom/bb/trxcon/l1ctl_server.h> +struct msgb; +struct trxcon_param_rx_data_ind; +struct trxcon_param_tx_data_cnf; +struct trxcon_param_tx_access_burst_cnf; -/* Event handlers */ -int l1ctl_rx_cb(struct l1ctl_client *l1c, struct msgb *msg); +int l1ctl_tx_fbsb_conf(struct trxcon_inst *trxcon, uint16_t band_arfcn, uint8_t bsic); +int l1ctl_tx_fbsb_fail(struct trxcon_inst *trxcon, uint16_t band_arfcn); +int l1ctl_tx_ccch_mode_conf(struct trxcon_inst *trxcon, uint8_t mode); +int l1ctl_tx_pm_conf(struct trxcon_inst *trxcon, uint16_t band_arfcn, int dbm, int last); +int l1ctl_tx_reset_conf(struct trxcon_inst *trxcon, uint8_t type); +int l1ctl_tx_reset_ind(struct trxcon_inst *trxcon, uint8_t type); -int l1ctl_tx_fbsb_conf(struct l1ctl_client *l1c, uint16_t band_arfcn, uint8_t bsic); -int l1ctl_tx_fbsb_fail(struct l1ctl_client *l1c, uint16_t band_arfcn); -int l1ctl_tx_ccch_mode_conf(struct l1ctl_client *l1c, uint8_t mode); -int l1ctl_tx_pm_conf(struct l1ctl_client *l1c, uint16_t band_arfcn, - int dbm, int last); -int l1ctl_tx_reset_conf(struct l1ctl_client *l1c, uint8_t type); -int l1ctl_tx_reset_ind(struct l1ctl_client *l1c, uint8_t type); - -int l1ctl_tx_dt_ind(struct l1ctl_client *l1c, +int l1ctl_tx_dt_ind(struct trxcon_inst *trxcon, const struct trxcon_param_rx_data_ind *ind); -int l1ctl_tx_dt_conf(struct l1ctl_client *l1c, +int l1ctl_tx_dt_conf(struct trxcon_inst *trxcon, const struct trxcon_param_tx_data_cnf *cnf); -int l1ctl_tx_rach_conf(struct l1ctl_client *l1c, +int l1ctl_tx_rach_conf(struct trxcon_inst *trxcon, const struct trxcon_param_tx_access_burst_cnf *cnf); diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h b/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h index b8d3150..e5ba5ec 100644 --- a/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h +++ b/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h @@ -4,6 +4,7 @@ struct osmo_fsm_inst; struct l1sched_state; +struct msgb; struct trxcon_inst { struct osmo_fsm_inst *fi; @@ -32,3 +33,7 @@ struct trxcon_inst *trxcon_inst_alloc(void *ctx, unsigned int id, uint32_t fn_advance); void trxcon_inst_free(struct trxcon_inst *trxcon); + +int trxcon_l1ctl_receive(struct trxcon_inst *trxcon, struct msgb *msg); +int trxcon_l1ctl_send(struct trxcon_inst *trxcon, struct msgb *msg); +void trxcon_l1ctl_close(struct trxcon_inst *trxcon); diff --git a/src/host/trxcon/src/l1ctl.c b/src/host/trxcon/src/l1ctl.c index 0075fcc..17c136a 100644 --- a/src/host/trxcon/src/l1ctl.c +++ b/src/host/trxcon/src/l1ctl.c @@ -38,11 +38,13 @@ #include <osmocom/gsm/protocol/gsm_08_58.h> #include <osmocom/bb/trxcon/logging.h> -#include <osmocom/bb/trxcon/l1ctl_server.h> #include <osmocom/bb/trxcon/l1ctl_proto.h> #include <osmocom/bb/trxcon/trxcon.h> #include <osmocom/bb/trxcon/trxcon_fsm.h> +#define L1CTL_LENGTH 256 +#define L1CTL_HEADROOM 32 + static const char *arfcn2band_name(uint16_t arfcn) { enum gsm_band band; @@ -76,10 +78,9 @@ return msg; } -int l1ctl_tx_pm_conf(struct l1ctl_client *l1c, uint16_t band_arfcn, - int dbm, int last) +int l1ctl_tx_pm_conf(struct trxcon_inst *trxcon, uint16_t band_arfcn, int dbm, int last) { - struct osmo_fsm_inst *fi = l1c->priv; + struct osmo_fsm_inst *fi = trxcon->fi; struct l1ctl_pm_conf *pmc; struct msgb *msg; @@ -102,12 +103,12 @@ l1h->flags |= L1CTL_F_DONE; } - return l1ctl_client_send(l1c, msg); + return trxcon_l1ctl_send(trxcon, msg); } -int l1ctl_tx_reset_ind(struct l1ctl_client *l1c, uint8_t type) +int l1ctl_tx_reset_ind(struct trxcon_inst *trxcon, uint8_t type) { - struct osmo_fsm_inst *fi = l1c->priv; + struct osmo_fsm_inst *fi = trxcon->fi; struct msgb *msg; struct l1ctl_reset *res; @@ -120,12 +121,12 @@ res = (struct l1ctl_reset *) msgb_put(msg, sizeof(*res)); res->type = type; - return l1ctl_client_send(l1c, msg); + return trxcon_l1ctl_send(trxcon, msg); } -int l1ctl_tx_reset_conf(struct l1ctl_client *l1c, uint8_t type) +int l1ctl_tx_reset_conf(struct trxcon_inst *trxcon, uint8_t type) { - struct osmo_fsm_inst *fi = l1c->priv; + struct osmo_fsm_inst *fi = trxcon->fi; struct msgb *msg; struct l1ctl_reset *res; @@ -137,7 +138,7 @@ res = (struct l1ctl_reset *) msgb_put(msg, sizeof(*res)); res->type = type; - return l1ctl_client_send(l1c, msg); + return trxcon_l1ctl_send(trxcon, msg); } static struct l1ctl_info_dl *put_dl_info_hdr(struct msgb *msg, @@ -165,9 +166,9 @@ return conf; } -int l1ctl_tx_fbsb_fail(struct l1ctl_client *l1c, uint16_t band_arfcn) +int l1ctl_tx_fbsb_fail(struct trxcon_inst *trxcon, uint16_t band_arfcn) { - struct osmo_fsm_inst *fi = l1c->priv; + struct osmo_fsm_inst *fi = trxcon->fi; struct l1ctl_info_dl *dl; struct msgb *msg; @@ -184,12 +185,12 @@ LOGPFSMSL(fi, DL1C, LOGL_DEBUG, "Send FBSB Conf (timeout)\n"); - return l1ctl_client_send(l1c, msg); + return trxcon_l1ctl_send(trxcon, msg); } -int l1ctl_tx_fbsb_conf(struct l1ctl_client *l1c, uint16_t band_arfcn, uint8_t bsic) +int l1ctl_tx_fbsb_conf(struct trxcon_inst *trxcon, uint16_t band_arfcn, uint8_t bsic) { - struct osmo_fsm_inst *fi = l1c->priv; + struct osmo_fsm_inst *fi = trxcon->fi; struct l1ctl_fbsb_conf *conf; struct l1ctl_info_dl *dl; struct msgb *msg; @@ -212,10 +213,10 @@ "Send FBSB Conf (result=%u, bsic=%u)\n", conf->result, conf->bsic); - return l1ctl_client_send(l1c, msg); + return trxcon_l1ctl_send(trxcon, msg); } -int l1ctl_tx_ccch_mode_conf(struct l1ctl_client *l1c, uint8_t mode) +int l1ctl_tx_ccch_mode_conf(struct trxcon_inst *trxcon, uint8_t mode) { struct l1ctl_ccch_mode_conf *conf; struct msgb *msg; @@ -227,13 +228,13 @@ conf = (struct l1ctl_ccch_mode_conf *) msgb_put(msg, sizeof(*conf)); conf->ccch_mode = mode; - return l1ctl_client_send(l1c, msg); + return trxcon_l1ctl_send(trxcon, msg); } /** * Handles both L1CTL_DATA_IND and L1CTL_TRAFFIC_IND. */ -int l1ctl_tx_dt_ind(struct l1ctl_client *l1c, +int l1ctl_tx_dt_ind(struct trxcon_inst *trxcon, const struct trxcon_param_rx_data_ind *ind) { struct msgb *msg; @@ -260,10 +261,10 @@ memcpy(msgb_put(msg, ind->data_len), ind->data, ind->data_len); /* Put message to upper layers */ - return l1ctl_client_send(l1c, msg); + return trxcon_l1ctl_send(trxcon, msg); } -int l1ctl_tx_rach_conf(struct l1ctl_client *l1c, +int l1ctl_tx_rach_conf(struct trxcon_inst *trxcon, const struct trxcon_param_tx_access_burst_cnf *cnf) { struct msgb *msg; @@ -279,14 +280,14 @@ put_dl_info_hdr(msg, &dl_hdr); - return l1ctl_client_send(l1c, msg); + return trxcon_l1ctl_send(trxcon, msg); } /** * Handles both L1CTL_DATA_CONF and L1CTL_TRAFFIC_CONF. */ -int l1ctl_tx_dt_conf(struct l1ctl_client *l1c, +int l1ctl_tx_dt_conf(struct trxcon_inst *trxcon, struct trxcon_param_tx_data_cnf *cnf) { struct msgb *msg; @@ -305,7 +306,7 @@ /* Copy DL frame header from source message */ put_dl_info_hdr(msg, &dl_hdr); - return l1ctl_client_send(l1c, msg); + return trxcon_l1ctl_send(trxcon, msg); } static enum gsm_phys_chan_config l1ctl_ccch_mode2pchan_config(enum ccch_mode mode) @@ -328,9 +329,9 @@ } } -static int l1ctl_rx_fbsb_req(struct l1ctl_client *l1c, struct msgb *msg) +static int l1ctl_rx_fbsb_req(struct trxcon_inst *trxcon, struct msgb *msg) { - struct osmo_fsm_inst *fi = l1c->priv; + struct osmo_fsm_inst *fi = trxcon->fi; struct l1ctl_fbsb_req *fbsb; int rc = 0; @@ -362,9 +363,9 @@ return rc; } -static int l1ctl_rx_pm_req(struct l1ctl_client *l1c, struct msgb *msg) +static int l1ctl_rx_pm_req(struct trxcon_inst *trxcon, struct msgb *msg) { - struct osmo_fsm_inst *fi = l1c->priv; + struct osmo_fsm_inst *fi = trxcon->fi; struct l1ctl_pm_req *pmr; int rc = 0; @@ -395,9 +396,9 @@ return rc; } -static int l1ctl_rx_reset_req(struct l1ctl_client *l1c, struct msgb *msg) +static int l1ctl_rx_reset_req(struct trxcon_inst *trxcon, struct msgb *msg) { - struct osmo_fsm_inst *fi = l1c->priv; + struct osmo_fsm_inst *fi = trxcon->fi; struct l1ctl_reset *res; int rc = 0; @@ -427,16 +428,16 @@ } /* Confirm */ - rc = l1ctl_tx_reset_conf(l1c, res->type); + rc = l1ctl_tx_reset_conf(trxcon, res->type); exit: msgb_free(msg); return rc; } -static int l1ctl_rx_echo_req(struct l1ctl_client *l1c, struct msgb *msg) +static int l1ctl_rx_echo_req(struct trxcon_inst *trxcon, struct msgb *msg) { - struct osmo_fsm_inst *fi = l1c->priv; + struct osmo_fsm_inst *fi = trxcon->fi; struct l1ctl_hdr *l1h; LOGPFSMSL(fi, DL1C, LOGL_NOTICE, "Recv Echo Req\n"); @@ -447,12 +448,12 @@ l1h->msg_type = L1CTL_ECHO_CONF; msg->data = msg->l1h; - return l1ctl_client_send(l1c, msg); + return trxcon_l1ctl_send(trxcon, msg); } -static int l1ctl_rx_ccch_mode_req(struct l1ctl_client *l1c, struct msgb *msg) +static int l1ctl_rx_ccch_mode_req(struct trxcon_inst *trxcon, struct msgb *msg) { - struct osmo_fsm_inst *fi = l1c->priv; + struct osmo_fsm_inst *fi = trxcon->fi; struct l1ctl_ccch_mode_req *mode_req; int rc; @@ -475,17 +476,17 @@ 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); + l1ctl_tx_ccch_mode_conf(trxcon, mode_req->ccch_mode); exit: msgb_free(msg); return rc; } -static int l1ctl_rx_rach_req(struct l1ctl_client *l1c, struct msgb *msg, bool is_11bit) +static int l1ctl_rx_rach_req(struct trxcon_inst *trxcon, struct msgb *msg, bool is_11bit) { struct trxcon_param_tx_access_burst_req req; - struct osmo_fsm_inst *fi = l1c->priv; + struct osmo_fsm_inst *fi = trxcon->fi; struct l1ctl_info_ul *ul; ul = (struct l1ctl_info_ul *) msg->l1h; @@ -581,9 +582,9 @@ return 0; } -static int l1ctl_rx_dm_est_req(struct l1ctl_client *l1c, struct msgb *msg) +static int l1ctl_rx_dm_est_req(struct trxcon_inst *trxcon, struct msgb *msg) { - struct osmo_fsm_inst *fi = l1c->priv; + struct osmo_fsm_inst *fi = trxcon->fi; struct l1ctl_dm_est_req *est_req; struct l1ctl_info_ul *ul; int rc; @@ -618,9 +619,9 @@ return rc; } -static int l1ctl_rx_dm_rel_req(struct l1ctl_client *l1c, struct msgb *msg) +static int l1ctl_rx_dm_rel_req(struct trxcon_inst *trxcon, struct msgb *msg) { - struct osmo_fsm_inst *fi = l1c->priv; + struct osmo_fsm_inst *fi = trxcon->fi; LOGPFSMSL(fi, DL1C, LOGL_NOTICE, "Received L1CTL_DM_REL_REQ\n"); @@ -633,10 +634,9 @@ /** * Handles both L1CTL_DATA_REQ and L1CTL_TRAFFIC_REQ. */ -static int l1ctl_rx_dt_req(struct l1ctl_client *l1c, - struct msgb *msg, bool traffic) +static int l1ctl_rx_dt_req(struct trxcon_inst *trxcon, struct msgb *msg, bool traffic) { - struct osmo_fsm_inst *fi = l1c->priv; + struct osmo_fsm_inst *fi = trxcon->fi; struct l1ctl_info_ul *ul; /* Extract UL frame header */ @@ -669,9 +669,9 @@ return 0; } -static int l1ctl_rx_param_req(struct l1ctl_client *l1c, struct msgb *msg) +static int l1ctl_rx_param_req(struct trxcon_inst *trxcon, struct msgb *msg) { - struct osmo_fsm_inst *fi = l1c->priv; + struct osmo_fsm_inst *fi = trxcon->fi; struct l1ctl_par_req *par_req; struct l1ctl_info_ul *ul; @@ -696,9 +696,9 @@ return 0; } -static int l1ctl_rx_tch_mode_req(struct l1ctl_client *l1c, struct msgb *msg) +static int l1ctl_rx_tch_mode_req(struct trxcon_inst *trxcon, struct msgb *msg) { - struct osmo_fsm_inst *fi = l1c->priv; + struct osmo_fsm_inst *fi = trxcon->fi; struct l1ctl_tch_mode_req *mode_req; int rc; @@ -728,12 +728,12 @@ struct l1ctl_hdr *l1h = (struct l1ctl_hdr *) msg->data; l1h->msg_type = L1CTL_TCH_MODE_CONF; - return l1ctl_client_send(l1c, msg); + return trxcon_l1ctl_send(trxcon, msg); } -static int l1ctl_rx_crypto_req(struct l1ctl_client *l1c, struct msgb *msg) +static int l1ctl_rx_crypto_req(struct trxcon_inst *trxcon, struct msgb *msg) { - struct osmo_fsm_inst *fi = l1c->priv; + struct osmo_fsm_inst *fi = trxcon->fi; struct l1ctl_crypto_req *cr; struct l1ctl_info_ul *ul; @@ -757,9 +757,8 @@ return 0; } -int l1ctl_rx_cb(struct l1ctl_client *l1c, struct msgb *msg) +int trxcon_l1ctl_receive(struct trxcon_inst *trxcon, struct msgb *msg) { - struct osmo_fsm_inst *fi = l1c->priv; struct l1ctl_hdr *l1h; l1h = (struct l1ctl_hdr *) msg->l1h; @@ -767,33 +766,33 @@ switch (l1h->msg_type) { case L1CTL_FBSB_REQ: - return l1ctl_rx_fbsb_req(l1c, msg); + return l1ctl_rx_fbsb_req(trxcon, msg); case L1CTL_PM_REQ: - return l1ctl_rx_pm_req(l1c, msg); + return l1ctl_rx_pm_req(trxcon, msg); case L1CTL_RESET_REQ: - return l1ctl_rx_reset_req(l1c, msg); + return l1ctl_rx_reset_req(trxcon, msg); case L1CTL_ECHO_REQ: - return l1ctl_rx_echo_req(l1c, msg); + return l1ctl_rx_echo_req(trxcon, msg); case L1CTL_CCCH_MODE_REQ: - return l1ctl_rx_ccch_mode_req(l1c, msg); + return l1ctl_rx_ccch_mode_req(trxcon, msg); case L1CTL_RACH_REQ: - return l1ctl_rx_rach_req(l1c, msg, false); + return l1ctl_rx_rach_req(trxcon, msg, false); case L1CTL_EXT_RACH_REQ: - return l1ctl_rx_rach_req(l1c, msg, true); + return l1ctl_rx_rach_req(trxcon, msg, true); case L1CTL_DM_EST_REQ: - return l1ctl_rx_dm_est_req(l1c, msg); + return l1ctl_rx_dm_est_req(trxcon, msg); case L1CTL_DM_REL_REQ: - return l1ctl_rx_dm_rel_req(l1c, msg); + return l1ctl_rx_dm_rel_req(trxcon, msg); case L1CTL_DATA_REQ: - return l1ctl_rx_dt_req(l1c, msg, false); + return l1ctl_rx_dt_req(trxcon, msg, false); case L1CTL_TRAFFIC_REQ: - return l1ctl_rx_dt_req(l1c, msg, true); + return l1ctl_rx_dt_req(trxcon, msg, true); case L1CTL_PARAM_REQ: - return l1ctl_rx_param_req(l1c, msg); + return l1ctl_rx_param_req(trxcon, msg); case L1CTL_TCH_MODE_REQ: - return l1ctl_rx_tch_mode_req(l1c, msg); + return l1ctl_rx_tch_mode_req(trxcon, msg); case L1CTL_CRYPTO_REQ: - return l1ctl_rx_crypto_req(l1c, msg); + return l1ctl_rx_crypto_req(trxcon, msg); /* Not (yet) handled messages */ case L1CTL_NEIGH_PM_REQ: @@ -801,13 +800,13 @@ case L1CTL_TBF_CFG_REQ: case L1CTL_DM_FREQ_REQ: case L1CTL_SIM_REQ: - LOGPFSMSL(fi, DL1C, LOGL_NOTICE, + LOGPFSMSL(trxcon->fi, DL1C, LOGL_NOTICE, "Ignoring unsupported message (type=%u)\n", l1h->msg_type); msgb_free(msg); return -ENOTSUP; default: - LOGPFSMSL(fi, DL1C, LOGL_ERROR, "Unknown MSG type %u: %s\n", + LOGPFSMSL(trxcon->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_fsm.c b/src/host/trxcon/src/trxcon_fsm.c index 0919315..28a4ecb 100644 --- a/src/host/trxcon/src/trxcon_fsm.c +++ b/src/host/trxcon/src/trxcon_fsm.c @@ -114,7 +114,7 @@ switch (fi->state) { case TRXCON_ST_FBSB_SEARCH: - l1ctl_tx_fbsb_fail(trxcon->l2if, trxcon->l1p.band_arfcn); + l1ctl_tx_fbsb_fail(trxcon, trxcon->l1p.band_arfcn); osmo_fsm_inst_state_chg(fi, TRXCON_ST_RESET, 0, 0); return 0; default: @@ -233,12 +233,12 @@ } if (res->band_arfcn < req->band_arfcn_stop) { - l1ctl_tx_pm_conf(trxcon->l2if, res->band_arfcn, res->dbm, false); + l1ctl_tx_pm_conf(trxcon, res->band_arfcn, res->dbm, false); /* trxcon_st_full_power_scan_onenter() sends the next PHYIF_CMDT_MEASURE */ req->band_arfcn_start = res->band_arfcn + 1; osmo_fsm_inst_state_chg(fi, TRXCON_ST_FULL_POWER_SCAN, 0, 0); /* TODO: timeout */ } else { - l1ctl_tx_pm_conf(trxcon->l2if, res->band_arfcn, res->dbm, true); + l1ctl_tx_pm_conf(trxcon, res->band_arfcn, res->dbm, true); LOGPFSML(fi, LOGL_INFO, "Full power scan completed\n"); TALLOC_FREE(trxcon->fi_data); } @@ -260,9 +260,7 @@ switch (event) { case TRXCON_EV_FBSB_SEARCH_RES: osmo_fsm_inst_state_chg(fi, TRXCON_ST_BCCH_CCCH, 0, 0); - l1ctl_tx_fbsb_conf(trxcon->l2if, - trxcon->l1p.band_arfcn, - trxcon->sched->bsic); + l1ctl_tx_fbsb_conf(trxcon, trxcon->l1p.band_arfcn, trxcon->sched->bsic); break; default: OSMO_ASSERT(0); @@ -302,7 +300,7 @@ handle_tx_access_burst_req(fi, data); break; case TRXCON_EV_TX_ACCESS_BURST_CNF: - l1ctl_tx_rach_conf(trxcon->l2if, (const struct trxcon_param_tx_access_burst_cnf *)data); + l1ctl_tx_rach_conf(trxcon, (const struct trxcon_param_tx_access_burst_cnf *)data); break; case TRXCON_EV_SET_CCCH_MODE_REQ: { @@ -388,7 +386,7 @@ break; } case TRXCON_EV_RX_DATA_IND: - l1ctl_tx_dt_ind(trxcon->l2if, (const struct trxcon_param_rx_data_ind *)data); + l1ctl_tx_dt_ind(trxcon, (const struct trxcon_param_rx_data_ind *)data); break; default: OSMO_ASSERT(0); @@ -405,7 +403,7 @@ handle_tx_access_burst_req(fi, data); break; case TRXCON_EV_TX_ACCESS_BURST_CNF: - l1ctl_tx_rach_conf(trxcon->l2if, (const struct trxcon_param_tx_access_burst_cnf *)data); + l1ctl_tx_rach_conf(trxcon, (const struct trxcon_param_tx_access_burst_cnf *)data); break; case TRXCON_EV_DEDICATED_RELEASE_REQ: l1sched_reset(trxcon->sched, false); @@ -495,10 +493,10 @@ break; } case TRXCON_EV_TX_DATA_CNF: - l1ctl_tx_dt_conf(trxcon->l2if, (const struct trxcon_param_tx_data_cnf *)data); + l1ctl_tx_dt_conf(trxcon, (const struct trxcon_param_tx_data_cnf *)data); break; case TRXCON_EV_RX_DATA_IND: - l1ctl_tx_dt_ind(trxcon->l2if, (const struct trxcon_param_rx_data_ind *)data); + l1ctl_tx_dt_ind(trxcon, (const struct trxcon_param_rx_data_ind *)data); break; default: OSMO_ASSERT(0); @@ -515,7 +513,7 @@ handle_tx_access_burst_req(fi, data); break; case TRXCON_EV_TX_ACCESS_BURST_CNF: - l1ctl_tx_rach_conf(trxcon->l2if, (const struct trxcon_param_tx_access_burst_cnf *)data); + l1ctl_tx_rach_conf(trxcon, (const struct trxcon_param_tx_access_burst_cnf *)data); break; case TRXCON_EV_RX_DATA_IND: { @@ -548,13 +546,8 @@ if (trxcon->sched != NULL) l1sched_free(trxcon->sched); /* Close active connections */ - if (trxcon->l2if != NULL) { - /* Avoid use-after-free: both *fi and *trxcon are children of - * the L2IF (L1CTL connection), so we need to re-parent *fi - * to NULL before calling l1ctl_client_conn_close(). */ - talloc_steal(NULL, fi); - l1ctl_client_conn_close(trxcon->l2if); - } + if (trxcon->l2if != NULL) + trxcon_l1ctl_close(trxcon); if (trxcon->phyif != NULL) phyif_close(trxcon->phyif); diff --git a/src/host/trxcon/src/trxcon_main.c b/src/host/trxcon/src/trxcon_main.c index 6b0e1fb..1ed2f89 100644 --- a/src/host/trxcon/src/trxcon_main.c +++ b/src/host/trxcon/src/trxcon_main.c @@ -336,6 +336,29 @@ return rc; } +void trxcon_l1ctl_close(struct trxcon_inst *trxcon) +{ + /* Avoid use-after-free: both *fi and *trxcon are children of + * the L2IF (L1CTL connection), so we need to re-parent *fi + * to NULL before calling l1ctl_client_conn_close(). */ + talloc_steal(NULL, trxcon->fi); + l1ctl_client_conn_close(trxcon->l2if); +} + +int trxcon_l1ctl_send(struct trxcon_inst *trxcon, struct msgb *msg) +{ + struct l1ctl_client *l1c = trxcon->l2if; + + return l1ctl_client_send(l1c, msg); +} + +static int l1ctl_rx_cb(struct l1ctl_client *l1c, struct msgb *msg) +{ + struct trxcon_inst *trxcon = l1c->priv; + + return trxcon_l1ctl_receive(trxcon, msg); +} + static void l1ctl_conn_accept_cb(struct l1ctl_client *l1c) { struct trxcon_inst *trxcon; @@ -347,7 +370,7 @@ } l1c->log_prefix = talloc_strdup(l1c, trxcon->log_prefix); - l1c->priv = trxcon->fi; + l1c->priv = trxcon; trxcon->l2if = l1c; const struct trx_if_params phyif_params = { @@ -372,12 +395,12 @@ static void l1ctl_conn_close_cb(struct l1ctl_client *l1c) { - struct osmo_fsm_inst *fi = l1c->priv; + struct trxcon_inst *trxcon = l1c->priv; - if (fi == NULL) + if (trxcon == NULL || trxcon->fi == NULL) return; - osmo_fsm_inst_dispatch(fi, TRXCON_EV_L2IF_FAILURE, NULL); + osmo_fsm_inst_dispatch(trxcon->fi, TRXCON_EV_L2IF_FAILURE, NULL); } static void print_usage(const char *app) -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30100 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I8d80af240b0e57f76263907c552288d4184876c0 Gerrit-Change-Number: 30100 Gerrit-PatchSet: 1 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: use L1CTL_HEADROOM in l1ctl_alloc_msg()
by fixeria 14 Nov '22

14 Nov '22
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30099 ) Change subject: trxcon: use L1CTL_HEADROOM in l1ctl_alloc_msg() ...................................................................... trxcon: use L1CTL_HEADROOM in l1ctl_alloc_msg() The l1ctl_client_read_cb() is using L1CTL_HEADROOM, so let's avoid inconsistency and use L1CTL_HEADROOM in the l1ctl_alloc_msg() too. Change-Id: I248f8c662ae0836cba61fb708a5dc73c57131f4c Related: OS#5599 --- M src/host/trxcon/src/l1ctl.c 1 file changed, 2 insertions(+), 2 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/host/trxcon/src/l1ctl.c b/src/host/trxcon/src/l1ctl.c index 4923899..0075fcc 100644 --- a/src/host/trxcon/src/l1ctl.c +++ b/src/host/trxcon/src/l1ctl.c @@ -62,8 +62,8 @@ * Each L1CTL message gets its own length pushed in front * before sending. This is why we need this small headroom. */ - msg = msgb_alloc_headroom(L1CTL_LENGTH + L1CTL_MSG_LEN_FIELD, - L1CTL_MSG_LEN_FIELD, "l1ctl_tx_msg"); + msg = msgb_alloc_headroom(L1CTL_LENGTH + L1CTL_HEADROOM, + L1CTL_HEADROOM, "l1ctl_tx_msg"); if (!msg) { LOGP(DL1C, LOGL_ERROR, "Failed to allocate memory\n"); return NULL; -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30099 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I248f8c662ae0836cba61fb708a5dc73c57131f4c Gerrit-Change-Number: 30099 Gerrit-PatchSet: 1 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
  • ← Newer
  • 1
  • ...
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • ...
  • 251
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.