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>
Attention is currently required from: fixeria.
pespin has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-bts/+/41658?usp=email )
Change subject: bts-trx: get rid of static variables in trx_if_send_burst()
......................................................................
Patch Set 4: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/41658?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: I431964d6fe02e53771cc0514ac930348f0a86aa1
Gerrit-Change-Number: 41658
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria <vyanitskiy(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-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 15 Dec 2025 10:02:37 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes