Change in osmo-bts[master]: osmo-bts-trx: reduce and share TRXC message buffer size

fixeria gerrit-no-reply at lists.osmocom.org
Tue Apr 20 23:05:18 UTC 2021


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/23825 )


Change subject: osmo-bts-trx: reduce and share TRXC message buffer size
......................................................................

osmo-bts-trx: reduce and share TRXC message buffer size

struct 'trx_ctrl_msg' limits the length of the command and its
parameters to 28 and 100 characters respectively.  And this is
generally enough for TRXC messages, no need to allocate 1500
bytes for that.  Define the macro in the header file.

Change-Id: I21c9ef37954c73ab74f07a3d226707744cbb2f01
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, 6 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/25/23825/1

diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c
index 495de92..0041b76 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;
diff --git a/src/osmo-bts-trx/trx_if.h b/src/osmo-bts-trx/trx_if.h
index 8adb22f..76dfbc4 100644
--- a/src/osmo-bts-trx/trx_if.h
+++ b/src/osmo-bts-trx/trx_if.h
@@ -1,5 +1,8 @@
 #pragma once
 
+/* TRXC read/send buffer size */
+#define TRXC_MSG_BUF_SIZE	128
+
 struct trx_dl_burst_req;
 struct trx_l1h;
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/23825
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I21c9ef37954c73ab74f07a3d226707744cbb2f01
Gerrit-Change-Number: 23825
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210420/bb6eefee/attachment.htm>


More information about the gerrit-log mailing list