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 2025

  • 1 participants
  • 1175 discussions
[XS] Change in osmocom-bb[master]: trx_toolkit: print milliseconds in logging
by fixeria 15 Dec '25

15 Dec '25
Attention is currently required from: pespin. fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmocom-bb/+/41652?usp=email ) Change subject: trx_toolkit: print milliseconds in logging ...................................................................... Patch Set 1: (1 comment) File src/target/trx_toolkit/app_common.py: https://gerrit.osmocom.org/c/osmocom-bb/+/41652/comment/6bdac25e_e962e6f1?u… : PS1, Line 42: log_fmt = "%(asctime)s.%(msecs)03d " + log_fmt if log_time else log_fmt > is it easy to print usecs instead? I'd welcome usec granularity. There exists no macro for usec granularity, so this would require writing a custom logging formatter. I can work on adding it if you really-really need that. -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/41652?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I7c53149f4e678670392773bbcf9648997ba4ff1b Gerrit-Change-Number: 41652 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 15 Dec 2025 12:04:45 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-pcu[master]: pcuif: Log errno str if recv() fails
by osmith 15 Dec '25

15 Dec '25
Attention is currently required from: pespin. osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-pcu/+/41664?usp=email ) Change subject: pcuif: Log errno str if recv() fails ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/41664?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iec5233cfef5301c4bae7d69984e3138d66b6b46d Gerrit-Change-Number: 41664 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 15 Dec 2025 12:04:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in osmo-bts[master]: cosmetic: bts-trx: fix typo in comment
by pespin 15 Dec '25

15 Dec '25
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/41661?usp=email ) Change subject: cosmetic: bts-trx: fix typo in comment ...................................................................... cosmetic: bts-trx: fix typo in comment Change-Id: Ibe589f4d26899d92560a60751f62bd5e8380835a --- M src/osmo-bts-trx/trx_provision_fsm.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved diff --git a/src/osmo-bts-trx/trx_provision_fsm.c b/src/osmo-bts-trx/trx_provision_fsm.c index 5ca23e3..7ed617a 100644 --- a/src/osmo-bts-trx/trx_provision_fsm.c +++ b/src/osmo-bts-trx/trx_provision_fsm.c @@ -400,7 +400,7 @@ switch (event) { case TRX_PROV_EV_CLOSE: /* In this state, we didn't for sure send a POWERON yet, hence we - are save directly applying the close as if we received a + are safe directly applying the close as if we received a POWEROFF RSP: */ if (pinst->num == 0) trx_prov_fsm_apply_close(pinst->phy_link, 0); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/41661?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ibe589f4d26899d92560a60751f62bd5e8380835a Gerrit-Change-Number: 41661 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-bts[master]: bts-trx: define TRXD_MSG_BUF_SIZE as a more realistic lower value
by pespin 15 Dec '25

15 Dec '25
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/41660?usp=email ) Change subject: bts-trx: define TRXD_MSG_BUF_SIZE as a more realistic lower value ...................................................................... bts-trx: define TRXD_MSG_BUF_SIZE as a more realistic lower value Change-Id: Ic725e26637f8c116cfd5e64ff54d60a1d1bf9b87 --- M src/osmo-bts-trx/trx_if.c M src/osmo-bts-trx/trx_if.h 2 files changed, 43 insertions(+), 22 deletions(-) Approvals: fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified pespin: Looks good to me, approved osmith: Looks good to me, but someone else must approve diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index 5f32360..60705fc 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -755,18 +755,11 @@ * TRX burst data socket */ -/* Uplink TRXDv0 header length: TDMA TN + FN + RSSI + ToA256 */ -#define TRX_UL_V0HDR_LEN (1 + 4 + 1 + 2) -/* Uplink TRXDv1 header length: additional MTS + C/I */ -#define TRX_UL_V1HDR_LEN (TRX_UL_V0HDR_LEN + 1 + 2) -/* Uplink TRXDv2 header length: TDMA TN + TRXN + MTS + RSSI + ToA256 + C/I */ -#define TRX_UL_V2HDR_LEN (1 + 1 + 1 + 1 + 2 + 2) - /* Minimum Uplink TRXD header length for all PDU versions */ static const uint8_t trx_data_rx_hdr_len[] = { - TRX_UL_V0HDR_LEN, /* TRXDv0 */ - TRX_UL_V1HDR_LEN, /* TRXDv1 */ - TRX_UL_V2HDR_LEN, /* TRXDv2 */ + TRXD_UL_V0HDR_LEN, /* TRXDv0 */ + TRXD_UL_V1HDR_LEN, /* TRXDv1 */ + TRXD_UL_V2HDR_LEN, /* TRXDv2 */ }; static const uint8_t trx_data_mod_val[] = { @@ -792,7 +785,7 @@ { /* Parse TRXDv0 specific header part */ trx_data_handle_hdr_v0_part(bi, buf); - buf_len -= TRX_UL_V0HDR_LEN; + buf_len -= TRXD_UL_V0HDR_LEN; /* Guess modulation and burst length by the rest octets. * NOTE: a legacy transceiver may append two garbage bytes. */ @@ -811,7 +804,7 @@ return -EINVAL; } - return TRX_UL_V0HDR_LEN; + return TRXD_UL_V0HDR_LEN; } /* Parser for MTS (Modulation and Training Sequence) */ @@ -862,7 +855,7 @@ /* Parse TRXDv0 specific header part */ trx_data_handle_hdr_v0_part(bi, buf); - buf += TRX_UL_V0HDR_LEN; + buf += TRXD_UL_V0HDR_LEN; /* MTS (Modulation and Training Sequence) */ rc = trx_data_parse_mts(phy_inst, bi, buf[0]); @@ -873,7 +866,7 @@ bi->ci_cb = (int16_t) osmo_load16be(buf + 1); bi->flags |= TRX_BI_F_CI_CB; - return TRX_UL_V1HDR_LEN; + return TRXD_UL_V1HDR_LEN; } /* TRXD header dissector for version 0x01 */ @@ -907,18 +900,18 @@ /* TDMA frame number is absent in batched PDUs */ if (bi->_num_pdus == 0) { - if (OSMO_UNLIKELY(buf_len < sizeof(bi->fn) + TRX_UL_V2HDR_LEN)) { + if (OSMO_UNLIKELY(buf_len < sizeof(bi->fn) + TRXD_UL_V2HDR_LEN)) { LOGPPHI(phy_inst, DTRX, LOGL_ERROR, "Rx malformed TRXDv2 PDU: not enough bytes " "to parse TDMA frame number\n"); return -EINVAL; } - bi->fn = osmo_load32be(buf + TRX_UL_V2HDR_LEN); - return TRX_UL_V2HDR_LEN + sizeof(bi->fn); + bi->fn = osmo_load32be(buf + TRXD_UL_V2HDR_LEN); + return TRXD_UL_V2HDR_LEN + sizeof(bi->fn); } - return TRX_UL_V2HDR_LEN; + return TRXD_UL_V2HDR_LEN; } /* TRXD burst handler (version independent) */ @@ -1132,7 +1125,7 @@ } if (l1h->data.sndbuf == NULL) { - l1h->data.sndbuf = msgb_alloc_c(l1h, TRXD_MSG_BUF_SIZE, "tx_trxd"); + l1h->data.sndbuf = msgb_alloc_c(l1h, TRXD_DL_MSG_BUF_SIZE, "tx_trxd"); OSMO_ASSERT(l1h->data.sndbuf); } sndbuf = l1h->data.sndbuf; @@ -1329,7 +1322,7 @@ close(rc); goto ret_close_trxc; } - osmo_iofd_set_alloc_info(l1h->trx_data_iofd, TRXD_MSG_BUF_SIZE, 0); + osmo_iofd_set_alloc_info(l1h->trx_data_iofd, TRXD_UL_MSG_BUF_SIZE, 0); /* register sockets */ osmo_iofd_register(l1h->trx_ctrl_iofd, -1); diff --git a/src/osmo-bts-trx/trx_if.h b/src/osmo-bts-trx/trx_if.h index 13c537d..44483b5 100644 --- a/src/osmo-bts-trx/trx_if.h +++ b/src/osmo-bts-trx/trx_if.h @@ -1,9 +1,37 @@ #pragma once +#include <osmocom/core/utils.h> +#include <osmo-bts/scheduler.h> + +/* NOTE: (2*GSM_BURST_LEN = VAMOS) + * This ends up being EGPRS_BURST_LEN, 444 */ +#define TRXD_BURST_SIZE_MAX OSMO_MAX(2 * GSM_BURST_LEN, EGPRS_BURST_LEN) + +/* Uplink TRXDv0 header length: TDMA TN + FN + RSSI + ToA256 */ +#define TRXD_UL_V0HDR_LEN (1 + 4 + 1 + 2) +/* Uplink TRXDv1 header length: additional MTS + C/I */ +#define TRXD_UL_V1HDR_LEN (TRXD_UL_V0HDR_LEN + 1 + 2) +/* Uplink TRXDv2 header length: TDMA TN + TRXN + MTS + RSSI + ToA256 + C/I */ +#define TRXD_UL_V2HDR_LEN (1 + 1 + 1 + 1 + 2 + 2) +/* NOTE: TRXDv0: a legacy transceiver may append two garbage bytes: + * NOTE: TRXDv2: 4+ to account for optional TDMA Fn field: */ +#define TRXD_UL_MAX_HDR_LEN OSMO_MAX(TRXD_UL_V0HDR_LEN + 2, OSMO_MAX(TRXD_UL_V1HDR_LEN, 4 + TRXD_UL_V2HDR_LEN)) +/* Note (OS#5827): once we support TRX batching, we miss here "* PCU_IF_NUM_TRX" */ +#define TRXD_UL_MSG_BUF_SIZE ((TRXD_UL_MAX_HDR_LEN + TRXD_BURST_SIZE_MAX) * TRX_NR_TS) + + +/* Downlink TRXDv0/1 header length: TDMA TN + FN + Att */ +#define TRXD_DL_V0HDR_LEN (1 + 4 + 1) +#define TRXD_DL_V1HDR_LEN TRXD_DL_V0HDR_LEN +/* Downlink TRXDv2 header length: TDMA TN + TRXN + MTS + Att + SCPIR + spare3 + FN (on first PDU) */ +#define TRXD_DL_V2HDR_LEN (1 + 1 + 1 + 1 + 1 + 3 + 4) +#define TRXD_DL_MAX_HDR_LEN OSMO_MAX(TRXD_DL_V0HDR_LEN, OSMO_MAX(TRXD_DL_V1HDR_LEN, TRXD_DL_V2HDR_LEN)) + +/* Note (OS#5827): once we support TRX batching, we miss here "* PCU_IF_NUM_TRX" */ +#define TRXD_DL_MSG_BUF_SIZE ((TRXD_DL_MAX_HDR_LEN + TRXD_BURST_SIZE_MAX) * TRX_NR_TS) + /* TRXC read/send buffer size */ #define TRXC_MSG_BUF_SIZE 1500 -/* TRXD read/send buffer size (max. IPv4 MTU) */ -#define TRXD_MSG_BUF_SIZE 65535U struct trx_dl_burst_req; struct trx_l1h; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/41660?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ic725e26637f8c116cfd5e64ff54d60a1d1bf9b87 Gerrit-Change-Number: 41660 Gerrit-PatchSet: 7 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(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-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-bts[master]: pcu_sock: Use osmo_io
by pespin 15 Dec '25

15 Dec '25
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/41662?usp=email ) ( 6 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: pcu_sock: Use osmo_io ...................................................................... pcu_sock: Use osmo_io Related: OS#6794 Change-Id: Ib708e0790568e368554da264a08d8804c8f95583 --- M src/common/pcu_sock.c 1 file changed, 72 insertions(+), 124 deletions(-) Approvals: osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index 3f1689a..319b186 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -34,6 +34,9 @@ #include <osmocom/core/write_queue.h> #include <osmocom/gsm/gsm23003.h> #include <osmocom/gsm/abis_nm.h> + +#include <osmocom/netif/stream.h> + #include <osmo-bts/logging.h> #include <osmo-bts/gsm_data.h> #include <osmo-bts/pcu_if.h> @@ -1012,18 +1015,14 @@ */ struct pcu_sock_state { - struct osmo_fd listen_bfd; /* fd for listen socket */ - struct osmo_wqueue upqueue; /* For sending messages; has fd for conn. to PCU */ + struct osmo_stream_srv_link *srv_link; /* fd for listen socket */ + struct osmo_stream_srv *conn; }; -static void pcu_sock_close(struct pcu_sock_state *state); - int pcu_sock_send(struct msgb *msg) { struct pcu_sock_state *state = g_bts_sm->gprs.pcu_state; - struct osmo_fd *conn_bfd; struct gsm_pcu_if *pcu_prim = (struct gsm_pcu_if *) msg->data; - int rc; if (!state) { if (pcu_prim->msg_type != PCU_IF_MSG_TIME_IND && @@ -1033,8 +1032,7 @@ msgb_free(msg); return -EINVAL; } - conn_bfd = &state->upqueue.bfd; - if (conn_bfd->fd <= 0) { + if (!state->conn) { if (pcu_prim->msg_type != PCU_IF_MSG_TIME_IND && pcu_prim->msg_type != PCU_IF_MSG_INTERF_IND) LOGP(DPCU, LOGL_NOTICE, "PCU socket not connected, " @@ -1043,21 +1041,12 @@ return -EIO; } - rc = osmo_wqueue_enqueue(&state->upqueue, msg); - if (rc < 0) { - if (rc == -ENOSPC) - LOGP(DPCU, LOGL_NOTICE, "PCU not reacting (more than %u messages waiting). Closing connection\n", - state->upqueue.max_length); - pcu_sock_close(state); - msgb_free(msg); - return rc; - } + osmo_stream_srv_send(state->conn, msg); return 0; } static void pcu_sock_close(struct pcu_sock_state *state) { - struct osmo_fd *bfd = &state->upqueue.bfd; struct gsm_bts *bts; struct gsm_bts_trx *trx; unsigned int tn; @@ -1071,17 +1060,13 @@ bts->pcu_version[0] = '\0'; - osmo_fd_unregister(bfd); - close(bfd->fd); - bfd->fd = -1; + osmo_stream_srv_destroy(state->conn); + state->conn = NULL; /* patch SI3 to remove GPRS indicator */ regenerate_si3_restoctets(bts); regenerate_si4_restoctets(bts); - /* re-enable the generation of ACCEPT for new connections */ - osmo_fd_read_enable(&state->listen_bfd); - #if 0 /* remove si13, ... */ bts->si_valid &= ~(1 << SYSINFO_TYPE_13); @@ -1102,28 +1087,27 @@ l1sap_chan_rel(trx, gsm_lchan2chan_nr(&ts->lchan[0])); } } - - osmo_wqueue_clear(&state->upqueue); } -static int pcu_sock_read(struct osmo_fd *bfd) +static int pcu_sock_conn_closed_cb(struct osmo_stream_srv *conn) { - struct pcu_sock_state *state = (struct pcu_sock_state *)bfd->data; + struct pcu_sock_state *state = osmo_stream_srv_get_data(conn); + LOGP(DPCU, LOGL_ERROR, "PCUIF connection closed\n"); + state->conn = NULL; + pcu_sock_close(state); + return 0; +} + +static int pcu_sock_conn_read_cb(struct osmo_stream_srv *conn, int res, struct msgb *msg) +{ + struct pcu_sock_state *state = osmo_stream_srv_get_data(conn); struct gsm_pcu_if *pcu_prim; - struct msgb *msg; int rc; - msg = msgb_alloc(sizeof(*pcu_prim) + 1000, "pcu_sock_rx"); - if (!msg) - return -ENOMEM; - - pcu_prim = (struct gsm_pcu_if *) msg->tail; - - rc = recv(bfd->fd, msg->tail, msgb_tailroom(msg), 0); - if (rc == 0) + if (res == 0) goto close; - if (rc < 0) { + if (res < 0) { if (errno == EAGAIN) { msgb_free(msg); return 0; @@ -1131,14 +1115,15 @@ goto close; } - if (rc < PCUIF_HDR_SIZE) { + if (res < PCUIF_HDR_SIZE) { LOGP(DPCU, LOGL_ERROR, "Received %d bytes on PCU Socket, but primitive hdr size " - "is %zu, discarding\n", rc, PCUIF_HDR_SIZE); + "is %zu, discarding\n", res, PCUIF_HDR_SIZE); msgb_free(msg); return 0; } - rc = pcu_rx(pcu_prim->msg_type, pcu_prim, rc); + pcu_prim = (struct gsm_pcu_if *) msgb_data(msg); + rc = pcu_rx(pcu_prim->msg_type, pcu_prim, msgb_length(msg)); /* as we always synchronously process the message in pcu_rx() and * its callbacks, we can free the message here. */ @@ -1152,61 +1137,20 @@ return -1; } -static int pcu_sock_write(struct osmo_fd *bfd, struct msgb *msg) -{ - struct pcu_sock_state *state = bfd->data; - int rc; - - /* bug hunter 8-): maybe someone forgot msgb_put(...) ? */ - OSMO_ASSERT(msgb_length(msg) > 0); - /* try to send it over the socket */ - rc = write(bfd->fd, msgb_data(msg), msgb_length(msg)); - if (OSMO_UNLIKELY(rc == 0)) - goto close; - if (OSMO_UNLIKELY(rc < 0)) { - if (errno == EAGAIN) - return -EAGAIN; - return -1; - } - return 0; - -close: - pcu_sock_close(state); - return -1; -} - /* accept connection coming from PCU */ -static int pcu_sock_accept(struct osmo_fd *bfd, unsigned int flags) +static int pcu_sock_accept(struct osmo_stream_srv_link *link, int fd) { - struct pcu_sock_state *state = (struct pcu_sock_state *)bfd->data; - struct osmo_fd *conn_bfd = &state->upqueue.bfd; - struct sockaddr_un un_addr; - socklen_t len; - int fd; + struct pcu_sock_state *state = osmo_stream_srv_link_get_data(link); - len = sizeof(un_addr); - fd = accept(bfd->fd, (struct sockaddr *)&un_addr, &len); - if (fd < 0) { - LOGP(DPCU, LOGL_ERROR, "Failed to accept a new connection\n"); - return -1; - } - - if (conn_bfd->fd >= 0) { + if (state->conn) { LOGP(DPCU, LOGL_NOTICE, "PCU connects but we already have another active connection ?!?\n"); - /* We already have one PCU connected, this is all we support */ - osmo_fd_read_disable(&state->listen_bfd); close(fd); return 0; } - osmo_fd_setup(conn_bfd, fd, OSMO_FD_READ, osmo_wqueue_bfd_cb, state, 0); - - if (osmo_fd_register(conn_bfd) != 0) { - LOGP(DPCU, LOGL_ERROR, "Failed to register new connection fd\n"); - close(conn_bfd->fd); - conn_bfd->fd = -1; - return -1; - } + state->conn = osmo_stream_srv_create2(state, link, fd, state); + osmo_stream_srv_set_read_cb(state->conn, pcu_sock_conn_read_cb); + osmo_stream_srv_set_closed_cb(state->conn, pcu_sock_conn_closed_cb); LOGP(DPCU, LOGL_NOTICE, "PCU socket connected to external PCU\n"); @@ -1216,45 +1160,58 @@ return 0; } +static struct pcu_sock_state *pcu_sock_state_alloc(struct gsm_bts_sm *bts_sm, const char *path, int qlength_max) +{ + struct pcu_sock_state *state; + state = talloc_zero(bts_sm, struct pcu_sock_state); + OSMO_ASSERT(state); + + state->srv_link = osmo_stream_srv_link_create(state); + OSMO_ASSERT(state->srv_link); + osmo_stream_srv_link_set_domain(state->srv_link, AF_UNIX); + osmo_stream_srv_link_set_type(state->srv_link, SOCK_SEQPACKET); + osmo_stream_srv_link_set_name(state->srv_link, "PCUIF"); + osmo_stream_srv_link_set_data(state->srv_link, state); + osmo_stream_srv_link_set_accept_cb(state->srv_link, pcu_sock_accept); + osmo_stream_srv_link_set_msgb_alloc_info(state->srv_link, sizeof(struct gsm_pcu_if) + 1000, 0); + osmo_stream_srv_link_set_tx_queue_max_length(state->srv_link, qlength_max); + osmo_stream_srv_link_set_addr(state->srv_link, path); + + return state; +} + +static void pcu_sock_state_free(struct pcu_sock_state *state) +{ + if (!state) + return; + + if (state->conn) + pcu_sock_close(state); + + osmo_stream_srv_link_destroy(state->srv_link); + state->srv_link = NULL; + talloc_free(state); +} + int pcu_sock_init(const char *path, int qlength_max) { struct pcu_sock_state *state; - struct osmo_fd *bfd; int rc; - state = talloc_zero(g_bts_sm, struct pcu_sock_state); + state = pcu_sock_state_alloc(g_bts_sm, path, qlength_max); if (!state) return -ENOMEM; - osmo_wqueue_init(&state->upqueue, qlength_max); - state->upqueue.read_cb = pcu_sock_read; - state->upqueue.write_cb = pcu_sock_write; - state->upqueue.bfd.fd = -1; - - bfd = &state->listen_bfd; - - rc = osmo_sock_unix_init(SOCK_SEQPACKET, 0, path, OSMO_SOCK_F_BIND); + rc = osmo_stream_srv_link_open(state->srv_link); if (rc < 0) { LOGP(DPCU, LOGL_ERROR, "Could not create %s unix socket: %s\n", path, strerror(errno)); - talloc_free(state); + pcu_sock_state_free(state); return -1; } - osmo_fd_setup(bfd, rc, OSMO_FD_READ, pcu_sock_accept, state, 0); - - rc = osmo_fd_register(bfd); - if (rc < 0) { - LOGP(DPCU, LOGL_ERROR, "Could not register listen fd: %d\n", - rc); - close(bfd->fd); - talloc_free(state); - return rc; - } - - osmo_signal_register_handler(SS_GLOBAL, pcu_if_signal_cb, NULL); - g_bts_sm->gprs.pcu_state = state; + osmo_signal_register_handler(SS_GLOBAL, pcu_if_signal_cb, NULL); LOGP(DPCU, LOGL_INFO, "Started listening on PCU socket (PCU IF v%u): %s\n", PCU_IF_VERSION, path); @@ -1263,20 +1220,11 @@ void pcu_sock_exit(void) { - struct pcu_sock_state *state = g_bts_sm->gprs.pcu_state; - struct osmo_fd *bfd, *conn_bfd; - - if (!state) + if (!g_bts_sm->gprs.pcu_state) return; osmo_signal_unregister_handler(SS_GLOBAL, pcu_if_signal_cb, NULL); - conn_bfd = &state->upqueue.bfd; - if (conn_bfd->fd > 0) - pcu_sock_close(state); - bfd = &state->listen_bfd; - close(bfd->fd); - osmo_fd_unregister(bfd); - talloc_free(state); + pcu_sock_state_free(g_bts_sm->gprs.pcu_state); g_bts_sm->gprs.pcu_state = NULL; } @@ -1285,7 +1233,7 @@ if (!state) return false; - if (state->upqueue.bfd.fd <= 0) + if (!state->conn) return false; return true; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/41662?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ib708e0790568e368554da264a08d8804c8f95583 Gerrit-Change-Number: 41662 Gerrit-PatchSet: 7 Gerrit-Owner: pespin <pespin(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>
1 0
0 0
[M] Change in osmo-bts[master]: bts-trx: define TRXD_MSG_BUF_SIZE as a more realistic lower value
by pespin 15 Dec '25

15 Dec '25
Attention is currently required from: Hoernchen, laforge. pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bts/+/41660?usp=email ) Change subject: bts-trx: define TRXD_MSG_BUF_SIZE as a more realistic lower value ...................................................................... Patch Set 7: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/41660?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ic725e26637f8c116cfd5e64ff54d60a1d1bf9b87 Gerrit-Change-Number: 41660 Gerrit-PatchSet: 7 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(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-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Mon, 15 Dec 2025 12:03:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in osmo-bts[master]: bts-trx: define TRXD_MSG_BUF_SIZE as a more realistic lower value
by osmith 15 Dec '25

15 Dec '25
Attention is currently required from: Hoernchen, laforge, pespin. osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bts/+/41660?usp=email ) Change subject: bts-trx: define TRXD_MSG_BUF_SIZE as a more realistic lower value ...................................................................... Patch Set 7: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/41660?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ic725e26637f8c116cfd5e64ff54d60a1d1bf9b87 Gerrit-Change-Number: 41660 Gerrit-PatchSet: 7 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(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: Hoernchen <ewild(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 15 Dec 2025 12:02:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in osmo-pcu[master]: pcuif: Log errno str if recv() fails
by fixeria 15 Dec '25

15 Dec '25
Attention is currently required from: pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-pcu/+/41664?usp=email ) Change subject: pcuif: Log errno str if recv() fails ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/41664?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iec5233cfef5301c4bae7d69984e3138d66b6b46d Gerrit-Change-Number: 41664 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 15 Dec 2025 11:55:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in pysim[master]: pySim.esim.saip: Fix compatibility with pytohn < 3.11
by fixeria 15 Dec '25

15 Dec '25
Attention is currently required from: dexter, laforge, lynxis lazus. fixeria has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/pysim/+/41669?usp=email ) Change subject: pySim.esim.saip: Fix compatibility with pytohn < 3.11 ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/41669?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I8ba29d42c8d7bf0a36772cc3370eff1f6afa879f Gerrit-Change-Number: 41669 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Mon, 15 Dec 2025 11:53:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in libosmocore[master]: gsm/rsl: add definition for TFO transparent container IE
by fixeria 15 Dec '25

15 Dec '25
Attention is currently required from: falconia. fixeria has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmocore/+/41668?usp=email ) Change subject: gsm/rsl: add definition for TFO transparent container IE ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41668?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ic6839827fb2bf8e401476af1d7907b577e5f094d Gerrit-Change-Number: 41668 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> 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-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Mon, 15 Dec 2025 11:51:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • ...
  • 118
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.