Attention is currently required from: Hoernchen, laforge, osmith, pespin.
fixeria 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 6:
(4 comments)
File src/osmo-bts-trx/trx_if.h:
https://gerrit.osmocom.org/c/osmo-bts/+/41660/comment/18526a80_411107bd?usp… :
PS6, Line 7: NOTE: a legacy transceiver may append two garbage bytes.
This is only relevant for Uplink TRXDv0 PDUs, see my suggestion `a)` below.
https://gerrit.osmocom.org/c/osmo-bts/+/41660/comment/118684d6_82aa9305?usp… :
PS6, Line 16: TRXD_UL_V2HDR_LEN
Note that size of optional TDMA Fn is not included here (it is also not included in the original `TRX_UL_V2HDR_LEN` because it's the minimum length). See how `trx_data_handle_pdu_v2()` is returning `TRX_UL_V2HDR_LEN + sizeof(bi->fn)`. See my suggestion `b)` below.
https://gerrit.osmocom.org/c/osmo-bts/+/41660/comment/90ef670d_5ce13794?usp… :
PS6, Line 17: TRXD_UL_V0HDR_LEN
Suggestion `a)`: `TRXD_UL_V0HDR_LEN + 2` to account for two garbage bytes.
Suggestion `b)`: `TRXD_UL_V2HDR_LEN + 4` to account for optional TDMA Fn field.
File src/osmo-bts-trx/trx_if.h:
https://gerrit.osmocom.org/c/osmo-bts/+/41660/comment/5ad31265_0d2f76c5?usp… :
PS3, Line 12: TRXD_BURST_SIZE_MAX * TRX_NR_TS
> Ack, I'll add some extra bytes for the header.
Done
--
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: 6
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: 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 10:45:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: laforge.
Hello Jenkins Builder, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-netif/+/41666?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Code-Review+1 by laforge
Change subject: stream_srv: srv_link: Set OSMO_SOCK_F_NONBLOCK during socket creation
......................................................................
stream_srv: srv_link: Set OSMO_SOCK_F_NONBLOCK during socket creation
This should be needed to potentially avoid blocking during accept()
call.
In practice right now is not needed because osmo_fd/osmo_iofd takes care
of setting to non-blocking during registering:
* osmo_fd: osmo_fd_register() sets the fd to non-bloking.
* osmo_iofd:
** osmo_io_poll: it uses osmo_fd_register() internally, see above
** osmo_io_uring: only set to non-blocking as a side-effect of calling
osmo_fd_register() if IOFD_FLAG_NOTIFY_CONNECTED was passed.
Since for the srv_link so far always uses an osmo_fd regardless of
whether OSMO_STREAM_MODE_* is used, in practice we are saved by
osmo_fd_register().
In any case, better pass the flag at socket creation time so it's
already applied then, instead of relying on osmo_fd_register() as a
side-effect, particularly if in the future we switch the listen socket
to be operated over osmo_io_uring.
Change-Id: I98a6ef55a0a7289b9eeb7e8062e9afa4d87f51eb
---
M src/stream_srv.c
1 file changed, 4 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/66/41666/2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/41666?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I98a6ef55a0a7289b9eeb7e8062e9afa4d87f51eb
Gerrit-Change-Number: 41666
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/41648?usp=email )
Change subject: bts-trx: Set max TRXD buf size to UINT16_MAX
......................................................................
bts-trx: Set max TRXD buf size to UINT16_MAX
Otherwise trying to allocate a msgb from it fails:
"""
In file included from /git/osmo-bts/src/osmo-bts-trx/l1_if.h:9,
from /git/osmo-bts/src/osmo-bts-trx/trx_if.c:50:
/git/osmo-bts/src/osmo-bts-trx/trx_if.c: In function ‘trx_if_send_burst’:
/git/osmo-bts/src/osmo-bts-trx/trx_if.h:6:33: error: unsigned conversion from ‘int’ to ‘uint16_t’ {aka ‘short unsigned int’} changes value from
65536’ to ‘0’ [-Werror=overflow]
6 | #define TRXD_MSG_BUF_SIZE 65536
| ^~~~~
/git/osmo-bts/src/osmo-bts-trx/trx_if.c:1126:48: note: in expansion of macro ‘TRXD_MSG_BUF_SIZE’
1126 | trx_data_last_msg = msgb_alloc(TRXD_MSG_BUF_SIZE, "tx_trxd");
| ^~~~~~~~~~~~~~~~~
"""
Simply set it to be within uint16_t range, since anyway IPv4 MTU (IP
Total Length field) is 16 bit (value including the IP header length too).
In any case, this will need to be trimmed further.
Change-Id: I980faea05dee405c974636f41ee723659d9c5229
---
M src/osmo-bts-trx/trx_if.h
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
pespin: Looks good to me, approved
osmith: Looks good to me, but someone else must approve
laforge: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/src/osmo-bts-trx/trx_if.h b/src/osmo-bts-trx/trx_if.h
index 3a22a1b..13c537d 100644
--- a/src/osmo-bts-trx/trx_if.h
+++ b/src/osmo-bts-trx/trx_if.h
@@ -2,8 +2,8 @@
/* TRXC read/send buffer size */
#define TRXC_MSG_BUF_SIZE 1500
-/* TRXD read/send buffer size (max. lo MTU) */
-#define TRXD_MSG_BUF_SIZE 65536
+/* 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/+/41648?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: I980faea05dee405c974636f41ee723659d9c5229
Gerrit-Change-Number: 41648
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>