Skip to content
Success

Changes

Summary

  1. bts-trx: Set max TRXD buf size to UINT16_MAX (details)
  2. bts-trx: Convert trx clk socket to iofd (details)
  3. bts-trx: Convert TRXC and TRXD sockets to iofd (details)
  4. bts-trx: get rid of static variables in trx_if_send_burst() (details)
Commit b7d2fd08efa987e13f9c4ef2c9b70bcd70d9fe66 by Pau Espin Pedrol
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
The file was modifiedsrc/osmo-bts-trx/trx_if.h
Commit 469c6075b33248e6d9c61c315b9cb1433a3b568c by Pau Espin Pedrol
bts-trx: Convert trx clk socket to iofd

Since now the Tx side is driven by the event loop, we can use (and
should) OSMO_SOCK_F_NONBLOCK on the socket, avoiding potential
blocking of the entire process.

Related: OS#1579
Change-Id: Ia33028a657e7d5dee1a4994b8d6ba33ddea892ec
The file was modifiedsrc/osmo-bts-trx/trx_if.c
The file was modifiedinclude/osmo-bts/phy_link.h
The file was modifiedsrc/osmo-bts-trx/trx_vty.c
Commit 42b89532effddbe5d02c203ced8176211f4b3e57 by Pau Espin Pedrol
bts-trx: Convert TRXC and TRXD sockets to iofd

Since now the Tx side is driven by the event loop, we can use (and
should) OSMO_SOCK_F_NONBLOCK on the socket, avoiding potential
blocking of the entire process.

We also gain io_uring support for free, which is a really nice feature
to have in TRXD.

Related: OS#1579
Change-Id: I239f91efad43eabd280caf9f852c3aefbc729eaf
The file was modifiedsrc/osmo-bts-trx/trx_if.c
The file was modifiedsrc/osmo-bts-trx/l1_if.h
Commit ee01aa0640469dcea72e4c8b80f2a88ef660cbb8 by Pau Espin Pedrol
bts-trx: get rid of static variables in trx_if_send_burst()

Change-Id: I431964d6fe02e53771cc0514ac930348f0a86aa1
Related: OS#1579
The file was modifiedsrc/osmo-bts-trx/trx_if.c
The file was modifiedsrc/osmo-bts-trx/l1_if.h