pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/41666?usp=email )
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 safed 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, specially 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/1
diff --git a/src/stream_srv.c b/src/stream_srv.c
index 6f86cfd..95ddb1b 100644
--- a/src/stream_srv.c
+++ b/src/stream_srv.c
@@ -584,7 +584,7 @@
switch (link->sk_domain) {
case AF_UNIX:
- ret = osmo_sock_unix_init(link->sk_type, 0, link->addr[0], OSMO_SOCK_F_BIND);
+ ret = osmo_sock_unix_init(link->sk_type, 0, link->addr[0], OSMO_SOCK_F_BIND | OSMO_SOCK_F_NONBLOCK);
break;
case AF_UNSPEC:
case AF_INET:
@@ -594,12 +594,13 @@
case IPPROTO_SCTP:
ret = osmo_sock_init2_multiaddr2(link->sk_domain, link->sk_type, link->proto,
(const char **)link->addr, link->addrcnt, link->port,
- NULL, 0, 0, OSMO_SOCK_F_BIND, &link->ma_pars);
+ NULL, 0, 0, OSMO_SOCK_F_BIND | OSMO_SOCK_F_NONBLOCK,
+ &link->ma_pars);
break;
#endif
default:
ret = osmo_sock_init(link->sk_domain, link->sk_type, link->proto,
- link->addr[0], link->port, OSMO_SOCK_F_BIND);
+ link->addr[0], link->port, OSMO_SOCK_F_BIND | OSMO_SOCK_F_NONBLOCK);
}
break;
default:
--
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: newchange
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I98a6ef55a0a7289b9eeb7e8062e9afa4d87f51eb
Gerrit-Change-Number: 41666
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Attention is currently required from: osmith, pespin.
Hello Jenkins Builder, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bts/+/41662?usp=email
to look at the new patch set (#5).
The following approvals got outdated and were removed:
Code-Review+1 by osmith, Verified+1 by Jenkins Builder
Change subject: pcu_sock: Use osmo_io
......................................................................
pcu_sock: Use osmo_io
Related: OS#6794
Change-Id: Ib708e0790568e368554da264a08d8804c8f95583
---
M src/common/pcu_sock.c
1 file changed, 72 insertions(+), 124 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/62/41662/5
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/41662?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ib708e0790568e368554da264a08d8804c8f95583
Gerrit-Change-Number: 41662
Gerrit-PatchSet: 5
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Attention is currently required from: Hoernchen, fixeria, laforge, osmith.
Hello Hoernchen, Jenkins Builder, fixeria, laforge, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bts/+/41660?usp=email
to look at the new patch set (#5).
The following approvals got outdated and were removed:
Code-Review+1 by osmith, Code-Review-1 by fixeria, Verified+1 by Jenkins Builder
Change subject: bts-trx: define TRXD_MSG_BUF_SIZE as a more realistic lower value
......................................................................
bts-trx: define TRXD_MSG_BUF_SIZE as a more realistic lower value
Change-Id: Ic725e26637f8c116cfd5e64ff54d60a1d1bf9b87
---
M src/osmo-bts-trx/trx_if.c
M src/osmo-bts-trx/trx_if.h
2 files changed, 42 insertions(+), 22 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/60/41660/5
--
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: newpatchset
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ic725e26637f8c116cfd5e64ff54d60a1d1bf9b87
Gerrit-Change-Number: 41660
Gerrit-PatchSet: 5
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: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: Hoernchen, fixeria, laforge.
pespin 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 4:
(2 comments)
File src/osmo-bts-trx/trx_if.h:
https://gerrit.osmocom.org/c/osmo-bts/+/41660/comment/d8ca32d6_8a49027d?usp… :
PS3, Line 11: OSMO_MAX(2 * (GSM_BURST_LEN + 2), (EGPRS_BURST_LEN + 2))
> `EGPRS_BURST_LEN` is known to be 3 times greater than `GSM_BURST_LEN` (because 8-PSK fits 3 bits per […]
I know, see last comment line. Still, this code here is resolved at compile time as a constant expression by any decent compiler, and it auto-explains how the value is calculated.
https://gerrit.osmocom.org/c/osmo-bts/+/41660/comment/ff45fa7d_07f4d5c5?usp… :
PS3, Line 12: TRXD_BURST_SIZE_MAX * TRX_NR_TS
> Here you're accounting for up to 8 8-PSK bursts, you're taking into account those 2 dummy bytes (fro […]
Ack, I'll add some extra bytes for the header.
--
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: 4
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: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 12 Dec 2025 15:25:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bts/+/41662?usp=email )
Change subject: pcu_sock: Use osmo_io
......................................................................
Patch Set 3: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/41662?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: Ib708e0790568e368554da264a08d8804c8f95583
Gerrit-Change-Number: 41662
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 12 Dec 2025 15:22:16 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: Hoernchen, laforge, 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 4: Code-Review-1
(2 comments)
File src/osmo-bts-trx/trx_if.h:
https://gerrit.osmocom.org/c/osmo-bts/+/41660/comment/8761b718_36123fe3?usp… :
PS3, Line 11: OSMO_MAX(2 * (GSM_BURST_LEN + 2), (EGPRS_BURST_LEN + 2))
`EGPRS_BURST_LEN` is known to be 3 times greater than `GSM_BURST_LEN` (because 8-PSK fits 3 bits per symbol), so `OSMO_MAX` would always evaluate to `EGPRS_BURST_LEN + 2`.
https://gerrit.osmocom.org/c/osmo-bts/+/41660/comment/07e9ef3d_53325cbb?usp… :
PS3, Line 12: TRXD_BURST_SIZE_MAX * TRX_NR_TS
Here you're accounting for up to 8 8-PSK bursts, you're taking into account those 2 dummy bytes (from TRXDv0), but you're missing the TRXD header size here. This value depends on the protocol version, but AFAIR TRXDv2 header is the largest one being `8 + 4` (4 for TDMA Fn in the first PDU) bytes.
--
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: 4
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: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 12 Dec 2025 15:22:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Attention is currently required from: fixeria, osmith.
Hello Jenkins Builder, fixeria, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bts/+/41650?usp=email
to look at the new patch set (#5).
The following approvals got outdated and were removed:
Code-Review+1 by osmith, Verified+1 by Jenkins Builder
Change subject: bts-trx: Convert TRXC and TRXD sockets to iofd
......................................................................
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
---
M src/osmo-bts-trx/l1_if.h
M src/osmo-bts-trx/trx_if.c
2 files changed, 155 insertions(+), 124 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/50/41650/5
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/41650?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I239f91efad43eabd280caf9f852c3aefbc729eaf
Gerrit-Change-Number: 41650
Gerrit-PatchSet: 5
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: osmith.
Hello Jenkins Builder, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bts/+/41662?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Code-Review+1 by osmith
Change subject: pcu_sock: Use osmo_io
......................................................................
pcu_sock: Use osmo_io
Related: OS#6794
Change-Id: Ib708e0790568e368554da264a08d8804c8f95583
---
M src/common/pcu_sock.c
1 file changed, 73 insertions(+), 124 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/62/41662/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/41662?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ib708e0790568e368554da264a08d8804c8f95583
Gerrit-Change-Number: 41662
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>