lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

December 2023

  • 1 participants
  • 1601 discussions
[S] Change in libosmocore[master]: soft_uart: osmo_soft_uart_tx_ubits(): return number of bits pulled
by fixeria 03 Dec '23

03 Dec '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/35204?usp=email ) Change subject: soft_uart: osmo_soft_uart_tx_ubits(): return number of bits pulled ...................................................................... soft_uart: osmo_soft_uart_tx_ubits(): return number of bits pulled This is a partial revert of 0887188c6b133b69142965d65e1be8a0696a6272. We actually want to return number of bits pulled, because in the upcoming commit implementing the flow control we want to be able to signal to the caller that the buffer was not completely filled, but only partly. Change-Id: I47a56f0fc36f2bc8f5a797d7fec64dfb56842388 Related: OS#4396 --- M src/core/soft_uart.c M tests/soft_uart/soft_uart_test.c 2 files changed, 20 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/04/35204/1 diff --git a/src/core/soft_uart.c b/src/core/soft_uart.c index a1888d6..5750282 100644 --- a/src/core/soft_uart.c +++ b/src/core/soft_uart.c @@ -277,7 +277,7 @@ * \param[in] suart soft-UART instance to pull the bits from. * \param[out] ubits pointer to a buffer where to store pulled bits. * \param[in] n_ubits number of unpacked bits to be pulled. - * \returns 0 on success; negative on error. + * \returns number of bits pulled; negative on error. * -EAGAIN indicates that the transmitter is disabled. */ int osmo_soft_uart_tx_ubits(struct osmo_soft_uart *suart, ubit_t *ubits, size_t n_ubits) { @@ -318,7 +318,7 @@ ubits[i] = suart_tx_bit(suart, msg); msgb_free(msg); - return 0; + return n_ubits; } /*! Set the modem status lines of the given soft-UART. diff --git a/tests/soft_uart/soft_uart_test.c b/tests/soft_uart/soft_uart_test.c index 276ffe1..ef64855 100644 --- a/tests/soft_uart/soft_uart_test.c +++ b/tests/soft_uart/soft_uart_test.c @@ -217,7 +217,7 @@ int rc; rc = osmo_soft_uart_tx_ubits(suart, &tx_buf[0], n_bits_total); - OSMO_ASSERT(rc == 0); + OSMO_ASSERT(rc == n_bits_total); rc = osmo_soft_uart_rx_ubits(suart, &tx_buf[0], n_bits_total); OSMO_ASSERT(rc == 0); @@ -332,7 +332,7 @@ printf("======== %s(): pulling %lu bits (%u at a time)\n", __func__, sizeof(tx_buf), n); for (unsigned int i = 0; i < sizeof(tx_buf); i += n) { rc = osmo_soft_uart_tx_ubits(suart, &tx_buf[i], n); - OSMO_ASSERT(rc == 0); + OSMO_ASSERT(rc == n); } printf("%s\n", osmo_ubit_dump(&tx_buf[0], sizeof(tx_buf))); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35204?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: I47a56f0fc36f2bc8f5a797d7fec64dfb56842388 Gerrit-Change-Number: 35204 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmocore[master]: soft_uart: cosmetic: do not use 'osmo_' prefix for static symbols
by fixeria 03 Dec '23

03 Dec '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/35202?usp=email ) Change subject: soft_uart: cosmetic: do not use 'osmo_' prefix for static symbols ...................................................................... soft_uart: cosmetic: do not use 'osmo_' prefix for static symbols Change-Id: I2b450b715dbfd0f8d6ddb4994ae0be3b890ed4fc Related: OS#4396 --- M src/core/soft_uart.c 1 file changed, 14 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/02/35202/1 diff --git a/src/core/soft_uart.c b/src/core/soft_uart.c index 8cf45e1..a1888d6 100644 --- a/src/core/soft_uart.c +++ b/src/core/soft_uart.c @@ -109,7 +109,7 @@ } /* receive a single bit */ -static inline void osmo_uart_rx_bit(struct osmo_soft_uart *suart, const ubit_t bit) +static inline void suart_rx_bit(struct osmo_soft_uart *suart, const ubit_t bit) { switch (suart->rx.flow_state) { case SUART_FLOW_ST_IDLE: @@ -200,7 +200,7 @@ if (!suart->rx.running) return -EAGAIN; for (size_t i = 0; i < n_ubits; i++) - osmo_uart_rx_bit(suart, ubits[i]); + suart_rx_bit(suart, ubits[i]); return 0; } @@ -209,7 +209,7 @@ *************************************************************************/ /* pull a single bit out of the UART transmitter */ -static inline ubit_t osmo_uart_tx_bit(struct osmo_soft_uart *suart, struct msgb *msg) +static inline ubit_t suart_tx_bit(struct osmo_soft_uart *suart, struct msgb *msg) { ubit_t tx_bit = 1; @@ -315,7 +315,7 @@ } for (size_t i = 0; i < n_ubits; i++) - ubits[i] = osmo_uart_tx_bit(suart, msg); + ubits[i] = suart_tx_bit(suart, msg); msgb_free(msg); return 0; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35202?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: I2b450b715dbfd0f8d6ddb4994ae0be3b890ed4fc Gerrit-Change-Number: 35202 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in libosmocore[master]: soft_uart: improve doxygen documentation
by fixeria 03 Dec '23

03 Dec '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/35203?usp=email ) Change subject: soft_uart: improve doxygen documentation ...................................................................... soft_uart: improve doxygen documentation Change-Id: I415a5e5392a7f91da4bf117d59694278779acc94 Related: OS#4396 --- M include/osmocom/core/soft_uart.h 1 file changed, 55 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/03/35203/1 diff --git a/include/osmocom/core/soft_uart.h b/include/osmocom/core/soft_uart.h index 7b7c394..17a7c67 100644 --- a/include/osmocom/core/soft_uart.h +++ b/include/osmocom/core/soft_uart.h @@ -25,19 +25,22 @@ #include <osmocom/core/bits.h> #include <osmocom/core/msgb.h> +/*! Parity mode. + * https://en.wikipedia.org/wiki/Parity_bit */ enum osmo_soft_uart_parity_mode { - OSMO_SUART_PARITY_NONE, - OSMO_SUART_PARITY_EVEN, - OSMO_SUART_PARITY_ODD, - OSMO_SUART_PARITY_MARK, /* always 1 */ - OSMO_SUART_PARITY_SPACE, /* always 0 */ + OSMO_SUART_PARITY_NONE, /*!< No parity bit */ + OSMO_SUART_PARITY_EVEN, /*!< Even parity */ + OSMO_SUART_PARITY_ODD, /*!< Odd parity */ + OSMO_SUART_PARITY_MARK, /*!< Always 1 */ + OSMO_SUART_PARITY_SPACE, /*!< Always 0 */ _OSMO_SUART_PARITY_NUM }; +/*! Flags passed to the application. */ enum osmo_soft_uart_flags { - OSMO_SUART_F_FRAMING_ERROR = (1 << 0), - OSMO_SUART_F_PARITY_ERROR = (1 << 1), - OSMO_SUART_F_BREAK = (1 << 2), + OSMO_SUART_F_FRAMING_ERROR = (1 << 0), /*!< Framing error occurred */ + OSMO_SUART_F_PARITY_ERROR = (1 << 1), /*!< Parity error occurred */ + OSMO_SUART_F_BREAK = (1 << 2), /*!< Break condition (not implemented) */ }; #if 0 @@ -47,35 +50,53 @@ }; #endif -/* configuration for a soft-uart */ +/*! Configuration for a soft-UART. */ struct osmo_soft_uart_cfg { - /*! number of data bits (typically 5, 6, 7 or 8) */ + /*! Number of data bits (typically 5, 6, 7 or 8). */ uint8_t num_data_bits; - /*! number of stop bits (typically 1 or 2) */ + /*! Number of stop bits (typically 1 or 2). */ uint8_t num_stop_bits; - /*! parity mode (none, even, odd) */ + /*! Parity mode (none, even, odd, space, mark). */ enum osmo_soft_uart_parity_mode parity_mode; - /*! size of receive buffer; UART will buffer up to that number of characters - * before calling the receive call-back */ + /*! Size of the receive buffer; UART will buffer up to that number + * of characters before calling the receive call-back. */ unsigned int rx_buf_size; - /*! receive timeout; UART will flush receive buffer via the receive call-back - * after indicated number of milliseconds even if it is not full yet */ + /*! Receive timeout; UART will flush the receive buffer via the receive call-back + * after indicated number of milliseconds, even if it is not full yet. */ unsigned int rx_timeout_ms; - /*! opaque application-private data; passed to call-backs */ + /*! Opaque application-private data; passed to call-backs. */ void *priv; - /*! receive call-back. Either rx_buf_size characters were received or rx_timeout_ms - * expired, or an error flag was detected (related to last byte received). - * 'flags' is a bit-mask of osmo_soft_uart_flags, */ + /*! Receive call-back of the application. + * + * Called if at least one of the following conditions is met: + * a) rx_buf_size characters were received (Rx buffer is full); + * b) rx_timeout_ms expired and Rx buffer is not empty; + * c) a parity or framing error is occurred. + * + * \param[in] priv opaque application-private data. + * \param[in] rx_data msgb holding the received data. + * Must be free()ed by the application. + * \param[in] flags bit-mask of OSMO_SUART_F_*. */ void (*rx_cb)(void *priv, struct msgb *rx_data, unsigned int flags); - /*! transmit call-back. The implementation is expected to provide at most - * tx_data->data_len characters (the actual amount is determined by the - * number of requested bits and the effective UART configuration). */ + /*! Transmit call-back of the application. + * + * The implementation is expected to provide at most tx_data->data_len + * characters (the actual amount is determined by the number of requested + * bits and the effective UART configuration). + * + * \param[in] priv opaque application-private data. + * \param[inout] tx_data msgb for writing to be transmitted data. */ void (*tx_cb)(void *priv, struct msgb *tx_data); - /*! modem status line change call-back. gets bitmask of osmo_soft_uart_status */ + /*! Modem status line change call-back. + * + * FIXME: flow control is not implemented, so it's never called. + * + * \param[in] priv opaque application-private data. + * \param[in] status bit-mask of osmo_soft_uart_status. */ void (*status_change_cb)(void *priv, unsigned int status); }; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35203?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: I415a5e5392a7f91da4bf117d59694278779acc94 Gerrit-Change-Number: 35203 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[L] Change in libosmocore[master]: soft_uart: implement modem status lines and flow control
by fixeria 03 Dec '23

03 Dec '23
Attention is currently required from: jolly, laforge, neels, osmith. Hello Jenkins Builder, laforge, osmith, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/35172?usp=email to look at the new patch set (#4). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: soft_uart: implement modem status lines and flow control ...................................................................... soft_uart: implement modem status lines and flow control Change-Id: I26b93ce76f2f6b6fbf017f2684312007db3c6d48 Related: OS#4396 --- M include/osmocom/core/soft_uart.h M src/core/libosmocore.map M src/core/soft_uart.c M tests/soft_uart/soft_uart_test.c M tests/soft_uart/soft_uart_test.ok 5 files changed, 373 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/72/35172/4 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35172?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: I26b93ce76f2f6b6fbf017f2684312007db3c6d48 Gerrit-Change-Number: 35172 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-CC: jolly <andreas(a)eversberg.eu> Gerrit-CC: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newpatchset
1 0
0 0
[L] Change in libosmocore[master]: soft_uart: implement modem status lines and flow control
by fixeria 03 Dec '23

03 Dec '23
Attention is currently required from: jolly, laforge, neels, osmith. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35172?usp=email ) Change subject: soft_uart: implement modem status lines and flow control ...................................................................... Patch Set 3: (5 comments) File include/osmocom/core/soft_uart.h: https://gerrit.osmocom.org/c/libosmocore/+/35172/comment/7f695941_4b5a2352 PS3, Line 100: gets > "gets passed" or "gets as an argument" -- I will clarify this. Done File src/core/soft_uart.c: https://gerrit.osmocom.org/c/libosmocore/+/35172/comment/2079f190_aa7eae88 PS2, Line 398: if (active) /* assert the given line */ > re: if assert and de-assert is terminology from the matching spec, then of course keep using those t […] @andreas@eversberg.eu just to confirm, am I using the terminology correctly in this patch? As we agreed in Jabber, in the example case of the RI (Ring Indicator), the modem asserts this line when it's ringing and de-asserts it when it's no more ringing. File src/core/soft_uart.c: https://gerrit.osmocom.org/c/libosmocore/+/35172/comment/4e00c693_ca74a4f5 PS3, Line 214: OSMO_SUART_STATUS_F_RTS_RTR > RX must continue. […] Done https://gerrit.osmocom.org/c/libosmocore/+/35172/comment/dd6fda1d_5deb226e PS3, Line 324: OSMO_SUART_STATUS_F_CTS > The current character needs to be finished before the transmitter can stop transmitting. Ack. Implemented in the new patchset, verified by unit tests. https://gerrit.osmocom.org/c/libosmocore/+/35172/comment/97d7cd7f_b60397f3 PS3, Line 399: else > If you de-assert DTR, you should reset the transmitter state. […] What you suggest looks as follows to me: * "If you de-assert DTR, you should reset the transmitter state" - if we can no longer receive, we de-assert the DTR (Data Terminal Ready) and for some reason reset the transmitter state (`suart->tx.flow_state`)? * "If you de-assert DSR, you should reset the receiver state" - if we can no longer transmit, we de-assert the DSR (Data Set Ready) and for some reason reset the receiver state (`suart->rx.flow_state`)? Could you elaborate on this please? I am trying to understand the idea here. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35172?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: I26b93ce76f2f6b6fbf017f2684312007db3c6d48 Gerrit-Change-Number: 35172 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-CC: jolly <andreas(a)eversberg.eu> Gerrit-CC: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Sun, 03 Dec 2023 21:39:08 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: osmith <osmith(a)sysmocom.de> Comment-In-Reply-To: jolly <andreas(a)eversberg.eu> Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[L] Change in libosmocore[master]: soft_uart: implement modem status lines and flow control
by fixeria 03 Dec '23

03 Dec '23
Attention is currently required from: jolly, laforge, neels, osmith. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35172?usp=email ) Change subject: soft_uart: implement modem status lines and flow control ...................................................................... Patch Set 3: (3 comments) File include/osmocom/core/soft_uart.h: https://gerrit.osmocom.org/c/libosmocore/+/35172/comment/fd7a3d0e_d3e2e209 PS3, Line 54: OSMO_SUART_STATUS_F_CTS = (1 << 5), /*!< Clear To Send */ > (personally i prefer an enum storing just 0, 1, 2, 3, 4, 5, because it is easy to get from 5 to 1<<5 […] Yes, you already commented on this in another patch (already merged). As I said, I don't see a practical situation in which I would need to get the `x` value back from `(1 << x)`. If you have examples, let me know. https://gerrit.osmocom.org/c/libosmocore/+/35172/comment/d8e7e32d_f89679e9 PS3, Line 61: OSMO_SUART_FLOW_CTRL_M_NONE, > (apparently it's good practice to set the first item = 0 explicitly) It's the first time I am hearing about such a good practice :P If this was a protocol definition, I would go further and set each item explicitly. In the particular case we're discussing here, I can't see the practical benefits. https://gerrit.osmocom.org/c/libosmocore/+/35172/comment/396a5a8c_71906e06 PS3, Line 100: gets > wdym, "gets". […] "gets passed" or "gets as an argument" -- I will clarify this. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35172?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: I26b93ce76f2f6b6fbf017f2684312007db3c6d48 Gerrit-Change-Number: 35172 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-CC: jolly <andreas(a)eversberg.eu> Gerrit-CC: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Sun, 03 Dec 2023 17:59:28 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-e1d[master]: [cosmetic] e1oip.h: Update TODO comment (we have RTT, frame loss stats)
by laforge 03 Dec '23

03 Dec '23
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1d/+/35201?usp=email ) Change subject: [cosmetic] e1oip.h: Update TODO comment (we have RTT, frame loss stats) ...................................................................... [cosmetic] e1oip.h: Update TODO comment (we have RTT, frame loss stats) Change-Id: I837676cb3905c0113307ebc400974c3d8cf3a3c7 --- M src/octoi/e1oip.h 1 file changed, 10 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/01/35201/1 diff --git a/src/octoi/e1oip.h b/src/octoi/e1oip.h index 9357d48..a17c257 100644 --- a/src/octoi/e1oip.h +++ b/src/octoi/e1oip.h @@ -48,6 +48,7 @@ struct rate_ctr_group *ctrs; struct osmo_stat_item_group *stats; + /* TODO: statistics (std deviation, alarms) */ /* configuration data */ struct { @@ -70,8 +71,6 @@ uint32_t next_fn32; /* next expected frame number */ bool primed_rx_tdm; /* Was RX RIFO primed */ } e1t; - - /* TODO: statistics (RTT, frame loss, std deviation, alarms */ }; /* get the rate of the given counter during the last second */ -- To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/35201?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1d Gerrit-Branch: master Gerrit-Change-Id: I837676cb3905c0113307ebc400974c3d8cf3a3c7 Gerrit-Change-Number: 35201 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-hnbgw[master]: systemd,manual: set LimitNOFILE=65536
by laforge 03 Dec '23

03 Dec '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/35177?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 thousands of HNB. In systemd service file, set a super high limit of 65536. In osmo-hnbgw's user manual, add section 'Configure limits' describing this in detail. Related: OS#6256 Related: osmo-bsc I26c4058484b11ff1d035a919bf88824c3af14e71 Change-Id: I5333765199cf9e3e5a570f85b85d2b7423d34a4d --- M contrib/systemd/osmo-hnbgw.service M doc/manuals/chapters/running.adoc 2 files changed, 37 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve diff --git a/contrib/systemd/osmo-hnbgw.service b/contrib/systemd/osmo-hnbgw.service index ba41e24..2307bcc 100644 --- a/contrib/systemd/osmo-hnbgw.service +++ b/contrib/systemd/osmo-hnbgw.service @@ -6,6 +6,7 @@ [Service] Type=simple Restart=always +LimitNOFILE=65536 StateDirectory=osmocom WorkingDirectory=%S/osmocom ExecStart=/usr/bin/osmo-hnbgw -c /etc/osmocom/osmo-hnbgw.cfg diff --git a/doc/manuals/chapters/running.adoc b/doc/manuals/chapters/running.adoc index 45d9b2f..08e1b87 100644 --- a/doc/manuals/chapters/running.adoc +++ b/doc/manuals/chapters/running.adoc @@ -76,6 +76,23 @@ configure a distinct point-code, see <<configure_iucs_iups>>. +=== Configure limits + +When connecting hundreds of HNB to OsmoHNBGW, it may be necessary to adjust the +operating system's limit on open file descriptors for the osmo-hnbgw process. A +typical default limit imposed by operating systems is 1024; this would be +exceeded by, for example, about 1024 HNB on Iuh, sockets for other interfaces +not considered yet. + +It should be ok to set an OS limit on open file descriptors as high as 65536 +for osmo-hnbgw, which practically rules out failure from running out of file +descriptors anywhere (<50,000 HNB). + +When using systemd, the file descriptor limit may be adjusted in the service +file by the `LimitNOFILE` setting ("Number of Open FILE descriptors"). +OsmoHNBGW ships a systemd service file with a high LimitNOFILE setting. + + === Configuring Primary Links [[configure_iucs_iups]] -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/35177?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: I5333765199cf9e3e5a570f85b85d2b7423d34a4d Gerrit-Change-Number: 35177 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-hnbgw[master]: systemd,manual: set LimitNOFILE=65536
by laforge 03 Dec '23

03 Dec '23
Attention is currently required from: neels. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/35177?usp=email ) Change subject: systemd,manual: set LimitNOFILE=65536 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/35177?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: I5333765199cf9e3e5a570f85b85d2b7423d34a4d Gerrit-Change-Number: 35177 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Sun, 03 Dec 2023 02:20:58 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-mgw[master]: systemd,manual: set LimitNOFILE=65536
by laforge 03 Dec '23

03 Dec '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35178?usp=email ) Change subject: systemd,manual: set LimitNOFILE=65536 ...................................................................... systemd,manual: set LimitNOFILE=65536 A typical OS imposed limit is 1024 open FD, which can bee too low when there are hundreds of concurrent voice calls. In systemd service file, set a super high limit of 65536. In osmo-mgw's user manual, add section 'Configure limits' describing this in detail. Related: OS#6256 Related: osmo-bsc I26c4058484b11ff1d035a919bf88824c3af14e71 Change-Id: I46512517bc3b5bb90cac7643e7ac73afba398d36 --- M contrib/systemd/osmo-mgw.service M doc/manuals/chapters/running.adoc 2 files changed, 37 insertions(+), 0 deletions(-) Approvals: fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/contrib/systemd/osmo-mgw.service b/contrib/systemd/osmo-mgw.service index b187e1a..03f40ff 100644 --- a/contrib/systemd/osmo-mgw.service +++ b/contrib/systemd/osmo-mgw.service @@ -5,6 +5,7 @@ [Service] Type=simple +LimitNOFILE=65536 StateDirectory=osmocom WorkingDirectory=%S/osmocom Restart=always diff --git a/doc/manuals/chapters/running.adoc b/doc/manuals/chapters/running.adoc index c178e31..e3bab4d 100644 --- a/doc/manuals/chapters/running.adoc +++ b/doc/manuals/chapters/running.adoc @@ -23,3 +23,20 @@ Disable colors for logging to stderr. This has mostly been deprecated by VTY based logging configuration, see <<logging>> for more information. + + +=== Configure limits + +When servicing hundreds of media endpoints, it may be necessary to adjust the +operating system's limit on open file descriptors for the osmo-mgw process. A +typical default limit imposed by operating systems is 1024; this would be +exceeded by, for example, about 256 active voice calls with 4 RTP/RTPC ports +each, sockets for other interfaces not considered yet. + +It should be ok to set an OS limit on open file descriptors as high as 65536 +for osmo-mgw, which practically rules out failure from running out of file +descriptors anywhere (<16,000 active calls). + +When using systemd, the file descriptor limit may be adjusted in the service +file by the `LimitNOFILE` setting ("Number of Open FILE descriptors"). OsmoMGW +ships a systemd service file with a high LimitNOFILE setting. -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35178?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I46512517bc3b5bb90cac7643e7ac73afba398d36 Gerrit-Change-Number: 35178 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • ...
  • 161
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.