Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bsc/+/35173?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: systemd,manual: set LimitNOFILE=65536
......................................................................
systemd,manual: set LimitNOFILE=65536
A typical OS imposed limit is 1024 open FD, which is too low when there
are hundreds of BTS.
In systemd service file, set a super high limit of 65536.
In osmo-bsc's user manual, add section 'Configure limits' describing
this in detail.
Related: OS#6256
Change-Id: I26c4058484b11ff1d035a919bf88824c3af14e71
---
M contrib/systemd/osmo-bsc.service
M doc/manuals/chapters/running.adoc
2 files changed, 37 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/73/35173/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/35173?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I26c4058484b11ff1d035a919bf88824c3af14e71
Gerrit-Change-Number: 35173
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/35173?usp=email )
Change subject: systemd,manual: set LimitNOFILE=65536
......................................................................
systemd,manual: set LimitNOFILE=65536
A typical OS imposed limit is 1024 open FD, which is too low when there
are hundreds of BTS.
In systemd service file, set a super high limit of 65536.
In osmo-bsc's user manual, add section 'Configure limits' describing
this in detail.
Related: OS#6256
Change-Id: I26c4058484b11ff1d035a919bf88824c3af14e71
---
M contrib/systemd/osmo-bsc.service
M doc/manuals/chapters/running.adoc
2 files changed, 37 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/73/35173/1
diff --git a/contrib/systemd/osmo-bsc.service b/contrib/systemd/osmo-bsc.service
index a345c47..c8dc877 100644
--- a/contrib/systemd/osmo-bsc.service
+++ b/contrib/systemd/osmo-bsc.service
@@ -7,6 +7,7 @@
[Service]
Type=simple
Restart=always
+LimitNOFILE=65536
StateDirectory=osmocom
WorkingDirectory=%S/osmocom
ExecStart=/usr/bin/osmo-bsc -c /etc/osmocom/osmo-bsc.cfg -s
diff --git a/doc/manuals/chapters/running.adoc b/doc/manuals/chapters/running.adoc
index 9ff546c..66d4990 100644
--- a/doc/manuals/chapters/running.adoc
+++ b/doc/manuals/chapters/running.adoc
@@ -69,6 +69,24 @@
has to configure a distinct point-code. See <<cs7_config>>.
+=== Configure limits
+
+When connecting many multi-trx BTS to OsmoBSC, it may be necessary to adjust
+the operating system's limit on file descriptors for the osmo-bsc process. A
+typical default limit imposed by operating systems is 1024 open file
+descriptors; this would be exceeded by, for example, about 205 BTS with 4 TRX
+each. (Each BTS with 4 TRX requires 5 file descriptors for Abis; 205 * 5
+already exceeds 1024, other interfaces not even considered yet.)
+
+It should be ok to set an OS limit on open file descriptors as high as 65536
+for osmo-bsc, which practically rules out failure from running out of file
+descriptors in setups with less than 50,000 TRX.
+
+When using systemd, the file descriptor limit may be adjusted in the service
+file by the `LimitNOFILE` setting ("Number of Open FILE descriptors"). OsmoBSC
+ships a systemd service file a high LimitNOFILE setting.
+
+
=== Configure primary links
==== Connect to an MSC's _A_ interface
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/35173?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I26c4058484b11ff1d035a919bf88824c3af14e71
Gerrit-Change-Number: 35173
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: fixeria.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/35171?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: soft_uart: check Rx/Tx state once in osmo_soft_uart_{rx,tx}_ubits()
......................................................................
soft_uart: check Rx/Tx state once in osmo_soft_uart_{rx,tx}_ubits()
Check it once rather than doing this in a loop. Return -EAGAIN if
Rx or Tx is not enabled when calling osmo_soft_uart_{rx,tx}_ubits().
This [theoretically] improves performance by reducing the number of
conditional statements in loops. In the Tx path, this also prevents
calling the .tx_cb() when the transmitter is disabled, so that we
don't loose the application data.
Change-Id: I70f93b3655eb21c2323e451052c40cd305c016c8
Related: OS#4396
---
M src/core/soft_uart.c
M tests/soft_uart/soft_uart_test.c
2 files changed, 32 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/71/35171/2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35171?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I70f93b3655eb21c2323e451052c40cd305c016c8
Gerrit-Change-Number: 35171
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/35171?usp=email )
Change subject: soft_uart: check Rx/Tx state once in osmo_soft_uart_{rx,tx}_ubits()
......................................................................
soft_uart: check Rx/Tx state once in osmo_soft_uart_{rx,tx}_ubits()
Check it once rather than doing this in a loop. Return -EAGAIN if
Rx or Tx is not enabled when calling osmo_soft_uart_{rx,tx}_ubits().
This [theoretically] improves performance by reducing the number of
conditional statements in loops. In the Tx path, this also prevents
calling the .tx_cb() when the transmitter is disabled, so that we
don't loose the application data.
Change-Id: I70f93b3655eb21c2323e451052c40cd305c016c8
Related: OS#4396
---
M src/core/soft_uart.c
M tests/soft_uart/soft_uart_test.c
2 files changed, 31 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/71/35171/1
diff --git a/src/core/soft_uart.c b/src/core/soft_uart.c
index 8d9142b..1d9984b 100644
--- a/src/core/soft_uart.c
+++ b/src/core/soft_uart.c
@@ -111,9 +111,6 @@
/* receive a single bit */
static inline void osmo_uart_rx_bit(struct osmo_soft_uart *suart, const ubit_t bit)
{
- if (!suart->rx.running)
- return;
-
switch (suart->rx.flow_state) {
case SUART_FLOW_ST_IDLE:
if (bit == 0) { /* start bit condition */
@@ -199,6 +196,8 @@
* \returns 0 on success; negative on error. */
int osmo_soft_uart_rx_ubits(struct osmo_soft_uart *suart, const ubit_t *ubits, size_t n_ubits)
{
+ if (!suart->rx.running)
+ return -EAGAIN;
for (size_t i = 0; i < n_ubits; i++)
osmo_uart_rx_bit(suart, ubits[i]);
return 0;
@@ -213,9 +212,6 @@
{
ubit_t tx_bit = 1;
- if (!suart->tx.running)
- return tx_bit;
-
switch (suart->tx.flow_state) {
case SUART_FLOW_ST_IDLE:
if (msg && msgb_length(msg) > 0) { /* if we have pending data */
@@ -290,6 +286,9 @@
if (OSMO_UNLIKELY(n_ubits == 0))
return -EINVAL;
+ if (!suart->tx.running)
+ return -EAGAIN;
+
/* calculate UART frame size for the effective config */
n_frame_bits = 1 + cfg->num_data_bits + cfg->num_stop_bits;
if (cfg->parity_mode != OSMO_SUART_PARITY_NONE)
diff --git a/tests/soft_uart/soft_uart_test.c b/tests/soft_uart/soft_uart_test.c
index 522739a..f1b0b25 100644
--- a/tests/soft_uart/soft_uart_test.c
+++ b/tests/soft_uart/soft_uart_test.c
@@ -256,10 +256,18 @@
{
struct osmo_soft_uart_cfg cfg;
struct osmo_soft_uart *suart;
+ int rc;
suart = osmo_soft_uart_alloc(NULL, __func__, &suart_test_default_cfg);
OSMO_ASSERT(suart != NULL);
+ /* expect -EAGAIN when the transmitter is not enabled */
+ rc = osmo_soft_uart_tx_ubits(suart, NULL, 42);
+ OSMO_ASSERT(rc == -EAGAIN);
+ /* expect -EAGAIN when the receicer is not enabled */
+ rc = osmo_soft_uart_rx_ubits(suart, NULL, 42);
+ OSMO_ASSERT(rc == -EAGAIN);
+
osmo_soft_uart_set_tx(suart, true);
osmo_soft_uart_set_rx(suart, true);
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35171?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I70f93b3655eb21c2323e451052c40cd305c016c8
Gerrit-Change-Number: 35171
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange
daniel has abandoned this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35163?usp=email )
Change subject: utils: Link with libosmoisdn to avoid undefined references
......................................................................
Abandoned
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35163?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I9e99231899b269a4ec0faf720aff4dc8d2b74323
Gerrit-Change-Number: 35163
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: abandon
Attention is currently required from: fixeria, jolly, laforge.
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35163?usp=email )
Change subject: utils: Link with libosmoisdn to avoid undefined references
......................................................................
Patch Set 1: Code-Review-2
(1 comment)
Patchset:
PS1:
> Running `make -C utils/ V=s` locally: […]
I just tested it again and it links fine now. Not sure what happened before, I'm sure I saw it even after make distclean...
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35163?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I9e99231899b269a4ec0faf720aff4dc8d2b74323
Gerrit-Change-Number: 35163
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 29 Nov 2023 22:05:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment