This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/23826 ) Change subject: osmo-bts-trx: define TRXC/TRXD message buffer size ...................................................................... osmo-bts-trx: define TRXC/TRXD message buffer size Change-Id: I4cb05600fa8af33e1c92e93cc1a86c14f21b9fb2 Related: SYS#4895, OS#4941, OS#4006 --- M src/osmo-bts-trx/trx_if.c M src/osmo-bts-trx/trx_if.h 2 files changed, 10 insertions(+), 8 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index 495de92..905d3da 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -95,7 +95,7 @@ { struct phy_link *plink = ofd->data; struct phy_instance *pinst = phy_instance_by_num(plink, 0); - char buf[1500]; + char buf[TRXC_MSG_BUF_SIZE]; ssize_t len; uint32_t fn; @@ -148,7 +148,7 @@ static void trx_ctrl_send(struct trx_l1h *l1h) { struct trx_ctrl_msg *tcm; - char buf[1500]; + char buf[TRXC_MSG_BUF_SIZE]; int len; ssize_t snd_len; @@ -634,7 +634,7 @@ { struct trx_l1h *l1h = ofd->data; struct phy_instance *pinst = l1h->phy_inst; - char buf[1500]; + char buf[TRXC_MSG_BUF_SIZE]; struct trx_ctrl_rsp rsp; int len, rc; struct trx_ctrl_msg *tcm; @@ -718,9 +718,6 @@ * TRX burst data socket */ -/* Maximum DATA message length (header + burst) */ -#define TRX_DATA_MSG_MAX_LEN 512 - /* Common header length: 1/2 VER + 1/2 TDMA TN + 4 TDMA FN */ #define TRX_CHDR_LEN (1 + 4) /* Uplink v0 header length: 1 RSSI + 2 ToA256 */ @@ -920,7 +917,7 @@ static int trx_data_read_cb(struct osmo_fd *ofd, unsigned int what) { struct trx_l1h *l1h = ofd->data; - uint8_t buf[TRX_DATA_MSG_MAX_LEN]; + uint8_t buf[TRXD_MSG_BUF_SIZE]; struct trx_ul_burst_ind bi; ssize_t hdr_len, buf_len; uint8_t pdu_ver; @@ -1002,7 +999,7 @@ { ssize_t snd_len; uint8_t pdu_ver = l1h->config.trxd_pdu_ver_use; - uint8_t buf[TRX_DATA_MSG_MAX_LEN]; + uint8_t buf[TRXD_MSG_BUF_SIZE]; if ((br->burst_len != GSM_BURST_LEN) && (br->burst_len != EGPRS_BURST_LEN)) { LOGPPHI(l1h->phy_inst, DTRX, LOGL_ERROR, "Tx burst length %zu invalid\n", diff --git a/src/osmo-bts-trx/trx_if.h b/src/osmo-bts-trx/trx_if.h index 18ba74f..ca3d51b 100644 --- a/src/osmo-bts-trx/trx_if.h +++ b/src/osmo-bts-trx/trx_if.h @@ -1,5 +1,10 @@ #pragma once +/* TRXC read/send buffer size */ +#define TRXC_MSG_BUF_SIZE 1500 +/* TRXD read/send buffer size */ +#define TRXD_MSG_BUF_SIZE 512 + struct trx_dl_burst_req; struct trx_l1h; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/23826 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4cb05600fa8af33e1c92e93cc1a86c14f21b9fb2 Gerrit-Change-Number: 23826 Gerrit-PatchSet: 5 Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210424/b25081a1/attachment.htm>