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 -----
  • December
  • 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

August 2023

  • 1 participants
  • 1514 discussions
[S] Change in libosmo-netif[master]: stream_cli: Proper handling of send() socket errors
by pespin 20 Aug '23

20 Aug '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/34079 ) Change subject: stream_cli: Proper handling of send() socket errors ...................................................................... stream_cli: Proper handling of send() socket errors Upon EAGAIN, simply re-enqueue the message and return waiting for next poll. Upon any other error, force close + reconnect. Related: OS#6134 Change-Id: I462cb176ebc51f3e99ee796310e8665144c84ccc --- M src/stream_cli.c 1 file changed, 22 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/stream_cli.c b/src/stream_cli.c index 0e075b8..778ac43 100644 --- a/src/stream_cli.c +++ b/src/stream_cli.c @@ -288,9 +288,15 @@ } if (ret < 0) { - if (errno == EPIPE || errno == ENOTCONN) - osmo_stream_cli_reconnect(cli); - LOGSCLI(cli, LOGL_ERROR, "received error %d in response to send\n", errno); + int err = errno; + LOGSCLI(cli, LOGL_ERROR, "send(len=%u) error: %s\n", msgb_length(msg), strerror(err)); + if (err == EAGAIN) { + /* Re-add at the start of the queue to re-attempt: */ + llist_add(&msg->list, &cli->tx_queue); + return 0; + } + msgb_free(msg); + osmo_stream_cli_reconnect(cli); } msgb_free(msg); -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/34079 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I462cb176ebc51f3e99ee796310e8665144c84ccc Gerrit-Change-Number: 34079 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in libosmo-netif[master]: stream_srv: Log SCTP REMOTE_ERROR events
by pespin 20 Aug '23

20 Aug '23
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/34084 ) Change subject: stream_srv: Log SCTP REMOTE_ERROR events ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/34084 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I49f5a648fd474e320101424fb6873a37442339bf Gerrit-Change-Number: 34084 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sun, 20 Aug 2023 14:35:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-netif[master]: stream_srv: sctp: Log error cause of COMM_LOST event
by pespin 20 Aug '23

20 Aug '23
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/34083 ) Change subject: stream_srv: sctp: Log error cause of COMM_LOST event ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/34083 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Ie48360d22ce1e35eefb1a305dde106948dfa80e8 Gerrit-Change-Number: 34083 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sun, 20 Aug 2023 14:35:28 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-netif[master]: stream_cli: Proper handling of send() socket errors
by pespin 20 Aug '23

20 Aug '23
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/34079 ) Change subject: stream_cli: Proper handling of send() socket errors ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/34079 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I462cb176ebc51f3e99ee796310e8665144c84ccc Gerrit-Change-Number: 34079 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sun, 20 Aug 2023 14:35:20 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-netif[master]: stream_srv: Handle ESHUTDOWN and other write() errors destroying the ...
by pespin 20 Aug '23

20 Aug '23
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/34078 ) Change subject: stream_srv: Handle ESHUTDOWN and other write() errors destroying the socket ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/34078 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I84ddebabdffe47733cb529bcfebec8757e6a172b Gerrit-Change-Number: 34078 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sun, 20 Aug 2023 14:35:13 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-netif[master]: stream: Append data to current tail of message upon recv()
by pespin 20 Aug '23

20 Aug '23
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/34074 ) Change subject: stream: Append data to current tail of message upon recv() ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/34074 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I2cfcd4f61545e6a76d84495c3467999efccf22df Gerrit-Change-Number: 34074 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sun, 20 Aug 2023 14:35:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-netif[master]: stream_srv: call setsockopt(SO_NOSIGPIPE) also in srv sockets
by pespin 20 Aug '23

20 Aug '23
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/34072 ) Change subject: stream_srv: call setsockopt(SO_NOSIGPIPE) also in srv sockets ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/34072 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I867d8e244e473679abb7e7e7a9b531eeed046436 Gerrit-Change-Number: 34072 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sun, 20 Aug 2023 14:34:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmocore[master]: gsm: Introduce functions to convert between FN and RFN (Reduced FN)
by pespin 20 Aug '23

20 Aug '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34145 ) Change subject: gsm: Introduce functions to convert between FN and RFN (Reduced FN) ...................................................................... gsm: Introduce functions to convert between FN and RFN (Reduced FN) Implementation ported from osmo-pcu.git e98b315d12fb009359410809f4169f9380f3d933, function bts_rfn_to_fn(). This functionality can be used by osmo-pcu, libosmo-gprs or any other related code which needs to handle RFNs. Change-Id: Ib71e8da976f6cc84c3a4ab17b0a8c2101492e243 --- M include/osmocom/gsm/gsm_utils.h M src/gsm/gsm_utils.c M src/gsm/libosmogsm.map M tests/gsm0408/gsm0408_test.c 4 files changed, 90 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, approved diff --git a/include/osmocom/gsm/gsm_utils.h b/include/osmocom/gsm/gsm_utils.h index 721456d..b250c59 100644 --- a/include/osmocom/gsm/gsm_utils.h +++ b/include/osmocom/gsm/gsm_utils.h @@ -188,6 +188,14 @@ char *osmo_dump_gsmtime_buf(char *buf, size_t buf_len, const struct gsm_time *tm); char *osmo_dump_gsmtime_c(const void *ctx, const struct gsm_time *tm); +/* Reduced Frame Number (3GPP TS 44.018 ยง10.5.2.38) */ +#define GSM_RFN_MODULUS 42432 +uint32_t gsm_rfn2fn(uint16_t rfn, uint32_t curr_fn); +static inline uint16_t gsm_fn2rfn(uint32_t fn) +{ + return fn % GSM_RFN_MODULUS; +} + /* GSM TS 03.03 Chapter 2.6 */ enum gprs_tlli_type { TLLI_LOCAL, diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c index 06b2406..bb40339 100644 --- a/src/gsm/gsm_utils.c +++ b/src/gsm/gsm_utils.c @@ -80,6 +80,7 @@ #include <osmocom/gsm/gsm_utils.h> #include <osmocom/gsm/meas_rep.h> #include <osmocom/gsm/protocol/gsm_04_08.h> +#include <osmocom/gsm/gsm0502.h> #include <stdlib.h> #include <stdint.h> @@ -924,6 +925,45 @@ return osmo_dump_gsmtime_buf(buf, 64, tm); } +#define GSM_RFN_THRESHOLD (GSM_RFN_MODULUS / 2) +uint32_t gsm_rfn2fn(uint16_t rfn, uint32_t curr_fn) +{ + uint32_t curr_rfn; + uint32_t fn_rounded; + const uint32_t rfn32 = rfn; /* used as 32bit for calculations */ + + /* Ensure that all following calculations are performed with the + * relative frame number */ + OSMO_ASSERT(rfn32 < GSM_RFN_MODULUS); + + /* Compute an internal relative frame number from the full internal + frame number */ + curr_rfn = gsm_fn2rfn(curr_fn); + + /* Compute a "rounded" version of the internal frame number, which + * exactly fits in the RFN_MODULUS raster */ + fn_rounded = GSM_TDMA_FN_SUB(curr_fn, curr_rfn); + + /* If the delta between the internal and the external relative frame + * number exceeds a certain limit, we need to assume that the incoming + * request belongs to a the previous rfn period. To correct this, + * we roll back the rounded frame number by one RFN_MODULUS */ + if (GSM_TDMA_FN_DIFF(rfn32, curr_rfn) > GSM_RFN_THRESHOLD) { + /* Race condition between rfn and curr_fn detected: rfn belongs + to the previous RFN_MODULUS cycle, wrapping... */ + if (fn_rounded < GSM_RFN_MODULUS) { + /* Corner case detected: wrapping crosses GSM_MAX_FN border */ + fn_rounded = GSM_TDMA_FN_SUB(GSM_MAX_FN, (GSM_TDMA_FN_SUB(GSM_RFN_MODULUS, fn_rounded))); + } else { + fn_rounded = GSM_TDMA_FN_SUB(fn_rounded, GSM_RFN_MODULUS); + } + } + + /* The real frame number is the sum of the rounded frame number and the + * relative framenumber computed via RACH */ + return GSM_TDMA_FN_SUM(fn_rounded, rfn32); +} + /*! append range1024 encoded data to bit vector * \param[out] bv Caller-provided output bit-vector * \param[in] r Input Range1024 sructure */ diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 951cbcb..49db282 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -544,6 +544,7 @@ osmo_dump_gsmtime; osmo_dump_gsmtime_buf; osmo_dump_gsmtime_c; +gsm_rfn2fn; gsm_milenage; gsm_septet_encode; diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index f4353e2..5b3f5cd 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -1946,6 +1946,31 @@ } } +static void test_gsm_rfn2fn(void) +{ + unsigned int i; + struct { + uint32_t curr_fn; + uint16_t rfn; + uint32_t exp_fn; + } input[] = { + { .curr_fn = 0, .rfn = 0, .exp_fn = 0 }, + { .curr_fn = 0, .rfn = 4, .exp_fn = 4 }, + { .curr_fn = 2229729, .rfn = 23322, .exp_fn = 2229786 }, + { .curr_fn = 2229777, .rfn = 23322, .exp_fn = 2229786 }, + { .curr_fn = 1320458, .rfn = 5070, .exp_fn = 1320462 }, + }; + + for (i = 0; i < ARRAY_SIZE(input); i++) { + uint32_t fn = gsm_rfn2fn(input[i].rfn, input[i].curr_fn); + if (fn != input[i].exp_fn) { + printf("Wrong frame number computed! curr_fn=%u, rfn=%u ==> fn=%u, expected fn=%u\n", + input[i].curr_fn, input[i].rfn, fn, input[i].exp_fn); + OSMO_ASSERT(false); + } + } +} + int main(int argc, char **argv) { test_bearer_cap(); @@ -1967,6 +1992,7 @@ test_power_ctrl(); test_rach_tx_integer_raw2val(); test_gsm_gsmtime2fn(); + test_gsm_rfn2fn(); return EXIT_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34145 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib71e8da976f6cc84c3a4ab17b0a8c2101492e243 Gerrit-Change-Number: 34145 Gerrit-PatchSet: 1 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-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: hnbgw: add role and sctp-role in osmo-stp.cfg
by neels 19 Aug '23

19 Aug '23
neels has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33669 ) Change subject: hnbgw: add role and sctp-role in osmo-stp.cfg ...................................................................... Abandoned already applied elsewhere -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33669 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I1019c1d4ebb6183a389c655ea6716bfb0255721a Gerrit-Change-Number: 33669 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: abandon
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: rua: RUA_Disc_Ind only when CLIENT is connected
by neels 19 Aug '23

19 Aug '23
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33489 ) ( 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: rua: RUA_Disc_Ind only when CLIENT is connected ...................................................................... rua: RUA_Disc_Ind only when CLIENT is connected Only dispatch RUA_Disc_Ind to CLIENT when CLIENT is connected. Reason: If a test does not care much about conn cleanup, it may cause a situation where the CLIENT has already disconnected when osmo-hnbgw sends a RUA Disconnect. A disconnected CLIENT port will cause the final verdict to become 'error'. Instead, if the CLIENT is already disconnected, just don't bother, and allow tests to still pass. This will become necessary, because: So far a RUA Disconnect without any RANAP payload is not detected by the RUA emulation. But patch Ia0b89e9198794d196a88040ee89bdf24f3b08ae0 will fix it, so that *every* RUA Disconnect causes a RUA_Disc_Ind sent to the CLIENT. From then on, we will see a bunch more RUA_Disc_Ind at the end of tests. Some of those happen *after* the client already disconnected, causing tests to error that have been passing for a long time. Change-Id: Ia1403f39cfdc75139922292a3eace7a69a64a576 --- M library/rua/RUA_Emulation.ttcn 1 file changed, 31 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/rua/RUA_Emulation.ttcn b/library/rua/RUA_Emulation.ttcn index 40eb3b7..af4b8b3 100644 --- a/library/rua/RUA_Emulation.ttcn +++ b/library/rua/RUA_Emulation.ttcn @@ -309,7 +309,9 @@ ranap_enc := rua.initiatingMessage.value_.disconnect_.protocolIEs[3].value_.rANAP_Message; f_handle_userData_RANAP(vc_conn, dec_RANAP_PDU(ranap_enc)); /* notify user of disconnect */ - CLIENT.send(RUA_Disc_Ind:{cause}); + if (CLIENT.checkstate("Connected")) { + CLIENT.send(RUA_Disc_Ind:{cause}); + } f_conn_table_del(context_id); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33489 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ia1403f39cfdc75139922292a3eace7a69a64a576 Gerrit-Change-Number: 33489 Gerrit-PatchSet: 4 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • ...
  • 152
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.