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

September 2026

  • 1 participants
  • 1894 discussions
[M] Change in osmo-e1d[master]: octoi: rework frame_rifo logic to decompress frames on the output side
by manawyrm 15 Sep '26

15 Sep '26
Attention is currently required from: manawyrm. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-e1d/+/43643?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: octoi: rework frame_rifo logic to decompress frames on the output side ...................................................................... octoi: rework frame_rifo logic to decompress frames on the output side The previous code tried to decompress frames against the last received frame regardless of the ordering (even when the frames got re-ordered by the network) and also when a frame didn't even arrive yet (rendering the jitter buffer almost useless). This commit stores the compressed frame and the timeslot mask in the RIFO and only tries to decompress the frames in the RIFO pop logic (when we had time to receive the other frames before it). The rifo->last_in_fn logic would also reset the counter back to an older frame even when a frame with a higher number was already received (fixed now). Change-Id: I66af4f01ebb38ca1bdd8ffbc8135776322941230 --- M src/octoi/e1oip.c M src/octoi/e1oip.h M src/octoi/frame_rifo.c M src/octoi/frame_rifo.h M src/octoi/octoi.c M tests/rifo/rifo_test.c M tests/rifo/rifo_test.ok 7 files changed, 194 insertions(+), 39 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/43/43643/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/43643?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-e1d Gerrit-Branch: master Gerrit-Change-Id: I66af4f01ebb38ca1bdd8ffbc8135776322941230 Gerrit-Change-Number: 43643 Gerrit-PatchSet: 3 Gerrit-Owner: manawyrm <osmocom.account(a)tbspace.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: manawyrm <osmocom.account(a)tbspace.de>
1 0
0 0
[M] Change in osmo-e1d[master]: octoi: rework frame_rifo logic to decompress frames on the output side
by manawyrm 15 Sep '26

15 Sep '26
manawyrm has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-e1d/+/43643?usp=email ) Change subject: octoi: rework frame_rifo logic to decompress frames on the output side ...................................................................... octoi: rework frame_rifo logic to decompress frames on the output side The previous code tried to decompress frames against the last received frame regardless of the ordering (even when the frames got re-ordered by the network) and also when a frame didn't even arrive yet (rendering the jitter buffer almost useless). This commit stores the compressed frame and the timeslot mask in the RIFO and only tries to decompress the frames in the RIFO pop logic (when we had time to receive the other frames before it). The rifo->last_in_fn logic would also reset the counter back to an older frame even when a frame with a higher number was already received (fixed now). Change-Id: I66af4f01ebb38ca1bdd8ffbc8135776322941230 --- M src/octoi/e1oip.c M src/octoi/e1oip.h M src/octoi/frame_rifo.c M src/octoi/frame_rifo.h M src/octoi/octoi.c M tests/rifo/rifo_test.c M tests/rifo/rifo_test.ok 7 files changed, 195 insertions(+), 39 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/43/43643/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/43643?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-e1d Gerrit-Branch: master Gerrit-Change-Id: I66af4f01ebb38ca1bdd8ffbc8135776322941230 Gerrit-Change-Number: 43643 Gerrit-PatchSet: 2 Gerrit-Owner: manawyrm <osmocom.account(a)tbspace.de> Gerrit-CC: Jenkins Builder
1 0
0 0
[M] Change in osmo-e1d[master]: octoi: rework frame_rifo logic to decompress frames on the output side
by Jenkins Builder 15 Sep '26

15 Sep '26
Jenkins Builder has posted comments on this change by manawyrm. ( https://gerrit.osmocom.org/c/osmo-e1d/+/43643?usp=email ) Change subject: octoi: rework frame_rifo logic to decompress frames on the output side ...................................................................... Patch Set 1: (1 comment) File src/octoi/frame_rifo.c: Robot Comment from checkpatch (run ID ): https://gerrit.osmocom.org/c/osmo-e1d/+/43643/comment/80635d00_416a4199?usp… : PS1, Line 161: if (ts_mask & (1U << ts)) { braces {} are not necessary for single statement blocks -- To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/43643?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-e1d Gerrit-Branch: master Gerrit-Change-Id: I66af4f01ebb38ca1bdd8ffbc8135776322941230 Gerrit-Change-Number: 43643 Gerrit-PatchSet: 1 Gerrit-Owner: manawyrm <osmocom.account(a)tbspace.de> Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Tue, 15 Sep 2026 13:54:13 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
[M] Change in osmo-e1d[master]: octoi: rework frame_rifo logic to decompress frames on the output side
by manawyrm 15 Sep '26

15 Sep '26
manawyrm has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1d/+/43643?usp=email ) Change subject: octoi: rework frame_rifo logic to decompress frames on the output side ...................................................................... octoi: rework frame_rifo logic to decompress frames on the output side The previous code tried to decompress frames against the last received frame regardless of the ordering (even when the frames got re-ordered by the network) and also when a frame didn't even arrive yet (rendering the jitter buffer almost useless). This commit stores the compressed frame and the timeslot mask in the RIFO and only tries to decompress the frames in the RIFO pop logic (when we had time to receive the other frames before it). The rifo->last_in_fn logic would also reset the counter back to an older frame even when a frame with a higher number was already received (fixed now). Change-Id: I66af4f01ebb38ca1bdd8ffbc8135776322941230 --- M src/octoi/e1oip.c M src/octoi/e1oip.h M src/octoi/frame_rifo.c M src/octoi/frame_rifo.h M src/octoi/octoi.c M tests/rifo/rifo_test.c M tests/rifo/rifo_test.ok 7 files changed, 195 insertions(+), 39 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/43/43643/1 diff --git a/src/octoi/e1oip.c b/src/octoi/e1oip.c index e2aad34..345d76b 100644 --- a/src/octoi/e1oip.c +++ b/src/octoi/e1oip.c @@ -194,7 +194,7 @@ uint32_t ts_mask; uint8_t idx2ts[BYTES_PER_FRAME]; unsigned int n_frames; - uint8_t frame_buf[BYTES_PER_FRAME]; + uint8_t frame_buf[BYTES_PER_FRAME] = { 0 }; unsigned int num_ts; uint16_t exp_next_seq = iline->e1t.next_fn32 & 0xffff; struct timespec ts; @@ -260,7 +260,6 @@ n_frames = msg->l3h[0]; } - memcpy(frame_buf, iline->e1t.last_frame, BYTES_PER_FRAME); for (unsigned int i = 0; i < n_frames; i++) { int rc; for (unsigned int j = 0; j < num_ts; j++) { @@ -268,7 +267,7 @@ frame_buf[ts_nr] = e1th->data[i*num_ts + j]; } /* FIXME: what to do about TS0? */ - rc = frame_rifo_in(&iline->e1t.rifo, frame_buf, fn32+i); + rc = frame_rifo_in(&iline->e1t.rifo, frame_buf, ts_mask, fn32+i); if (rc < 0) iline_ctr_add(iline, LINE_CTR_E1oIP_E1T_OVERFLOW, 1); /* Continue the for loop, if buffer reset is not configured. */ @@ -292,7 +291,6 @@ } /* update local state */ - memcpy(iline->e1t.last_frame, frame_buf, BYTES_PER_FRAME); if (update_next) iline->e1t.next_fn32 = fn32 + n_frames; @@ -352,7 +350,6 @@ iline->e1o.next_seq = 0; frame_rifo_init(&iline->e1t.rifo, 0); - memset(&iline->e1t.last_frame, 0xff, sizeof(iline->e1t.last_frame)); iline->e1t.next_fn32 = 0; iline->e1t.primed_rx_tdm = false; iline->e1t.delay = 0; diff --git a/src/octoi/e1oip.h b/src/octoi/e1oip.h index 8aaa420..f21cfbf 100644 --- a/src/octoi/e1oip.h +++ b/src/octoi/e1oip.h @@ -70,7 +70,6 @@ /* E1 terminated side (E1<-IP) */ struct { struct frame_rifo rifo; - uint8_t last_frame[BYTES_PER_FRAME]; /* last frame on the E1 side */ uint32_t next_fn32; /* next expected frame number */ bool primed_rx_tdm; /* Was RX RIFO primed */ int32_t delay, delay_cnt; /* Delay counter to calculate average delay */ diff --git a/src/octoi/frame_rifo.c b/src/octoi/frame_rifo.c index 00fb6a5..cffd0e1 100644 --- a/src/octoi/frame_rifo.c +++ b/src/octoi/frame_rifo.c @@ -89,6 +89,8 @@ void frame_rifo_init(struct frame_rifo *rifo, uint32_t fn) { memset(rifo->buf, 0xff, sizeof(rifo->buf)); + memset(rifo->rx_mask, 0, sizeof(rifo->rx_mask)); + memset(rifo->last_out, 0xff, sizeof(rifo->last_out)); rifo->next_out = rifo->buf; rifo->next_out_fn = fn; rifo->last_in_fn = fn - 1; @@ -99,10 +101,11 @@ /*! put one received frame into the RIFO at a given specified frame number. * \param rifo The RIFO to which we want to put (append) multiple frames - * \param frame Pointer to memory containing the frame data + * \param frame Pointer to memory containing partial/compressed frame data + * \param ts_mask Bit-mask of timeslots that carry data * \param fn Absolute frame number at which to insert the frame. * \returns 0 on success; -1 on error (overflow) */ -int frame_rifo_in(struct frame_rifo *rifo, const uint8_t *frame, uint32_t fn) +int frame_rifo_in(struct frame_rifo *rifo, const uint8_t *frame, uint32_t ts_mask, uint32_t fn) { uint32_t bucket; uint8_t *dst; @@ -116,14 +119,18 @@ dst = rifo->buf + bucket * BYTES_PER_FRAME; OSMO_ASSERT(dst + BYTES_PER_FRAME <= RIFO_BUF_END(rifo)); memcpy(dst, frame, BYTES_PER_FRAME); + rifo->rx_mask[bucket] = ts_mask; bucket_bit_set(rifo, bucket); - rifo->last_in_fn = fn; + + if ((int32_t)(fn - rifo->last_in_fn) > 0) + rifo->last_in_fn = fn; return 0; } -/*! pull one frames out of the RIFO. +/*! pull one frame out of the RIFO. + * * \param rifo The RIFO from which we want to pull frames * \param out Caller-allocated output buffer * \returns 0 on success; -1 if no frame available; -2 if RIFO depth == 0 */ @@ -137,12 +144,25 @@ /* if we don't have any RIFO depth at all, our jitter buffer has * run empty and most likely there is some fundamental clock sync problem * somewhere. */ + memcpy(out, rifo->last_out, BYTES_PER_FRAME); rc = -2; } else if (!bucket_bit) { - /* caller is supposed to copy/duplicate previous frame */ + /* frame was lost / has not arrived: repeat the last full frame */ rc = -1; + memcpy(out, rifo->last_out, BYTES_PER_FRAME); } else { - memcpy(out, rifo->next_out, BYTES_PER_FRAME); + /* unpack, take the new timeslots from this frame, + * keep all others from the last_out frame. */ + const uint8_t *raw = rifo->next_out; + uint32_t ts_mask = rifo->rx_mask[next_out_bucket]; + unsigned int ts; + + for (ts = 0; ts < BYTES_PER_FRAME; ts++) { + if (ts_mask & (1U << ts)) { + rifo->last_out[ts] = raw[ts]; + } + } + memcpy(out, rifo->last_out, BYTES_PER_FRAME); bucket_bit_clear(rifo, next_out_bucket); } diff --git a/src/octoi/frame_rifo.h b/src/octoi/frame_rifo.h index 19a9acb..3f1fc38 100644 --- a/src/octoi/frame_rifo.h +++ b/src/octoi/frame_rifo.h @@ -6,6 +6,15 @@ uint8_t *next_out; /* where to read next output from FIFO */ uint8_t buf[BYTES_PER_FRAME * FRAMES_PER_FIFO]; + /* compressed timeslot values per frame. Only the + timeslots in rx_mask[] carry data. */ + + uint32_t rx_mask[FRAMES_PER_FIFO]; + /* bit-mask of timeslots for this frame. Timeslots not + set here are unchanged from the last frame. */ + + uint8_t last_out[BYTES_PER_FRAME]; + /* last full output frame. serves as the base for the next frame. */ uint32_t last_in_fn; /* frame number of most recently inserted frame */ uint32_t next_out_fn; /* frame number of next output frame */ @@ -45,7 +54,7 @@ } /* put a received frame into the FIFO */ -int frame_rifo_in(struct frame_rifo *rifo, const uint8_t *frame, uint32_t fn); +int frame_rifo_in(struct frame_rifo *rifo, const uint8_t *frame, uint32_t ts_mask, uint32_t fn); /* pull one frame out of the FIFO */ int frame_rifo_out(struct frame_rifo *rifo, uint8_t *out); diff --git a/src/octoi/octoi.c b/src/octoi/octoi.c index 1c0a6e7..aaf3018 100644 --- a/src/octoi/octoi.c +++ b/src/octoi/octoi.c @@ -137,9 +137,8 @@ uint8_t *cur = buf + BYTES_PER_FRAME*i; rc = frame_rifo_out(&iline->e1t.rifo, cur); if (rc == -1) { - iline_ctr_add(iline, LINE_CTR_E1oIP_SUBSTITUTED, 1); /* substitute with last received frame */ - memcpy(cur, iline->e1t.last_frame, BYTES_PER_FRAME); + iline_ctr_add(iline, LINE_CTR_E1oIP_SUBSTITUTED, 1); } else if (rc == -2) { iline_ctr_add(iline, LINE_CTR_E1oIP_UNDERRUN, 1); /* substitute with all-FF frame */ diff --git a/tests/rifo/rifo_test.c b/tests/rifo/rifo_test.c index 381ca49..e0b685a 100644 --- a/tests/rifo/rifo_test.c +++ b/tests/rifo/rifo_test.c @@ -28,9 +28,18 @@ rifo->last_in_fn = init_next_out_fn - 1; } +static void rifo_in_mask(struct frame_rifo *rifo, uint8_t *frame, uint32_t ts_mask, uint32_t fn) +{ + int rc = frame_rifo_in(rifo, frame, ts_mask, fn); + unsigned int depth = frame_rifo_depth(rifo); + printf("RIFO_IN(%s, mask=0x%08x, start fn + %s%d)=%d [depth=%s%d, frames=%u]\n", + osmo_hexdump_nospc(frame, BYTES_PER_FRAME), ts_mask, FN_PRINT(fn), rc, + ABS_DEPTH_PRINT(depth), frame_rifo_frames(rifo)); +} + static void rifo_in(struct frame_rifo *rifo, uint8_t *frame, uint32_t fn) { - int rc = frame_rifo_in(rifo, frame, fn); + int rc = frame_rifo_in(rifo, frame, 0xffffffff, fn); unsigned int depth = frame_rifo_depth(rifo); printf("RIFO_IN(%s, start fn + %s%d)=%d [depth=%s%d, frames=%u]\n", osmo_hexdump_nospc(frame, BYTES_PER_FRAME), FN_PRINT(fn), rc, @@ -91,6 +100,59 @@ } } +static void tail_reordered_in(void) +{ + struct frame_rifo rifo; + rifo_init(&rifo); + + printf("\nTEST: %s, starting at FN: %u\n", __func__, init_next_out_fn); + + const uint8_t in[] = { 0, 1, 2, 3, 4, 5, 6, 7, 9, 8 }; + for (int i = 0; i < sizeof(in); i++) { + uint8_t frame[32]; + memset(frame, in[i], sizeof(frame)); + rifo_in(&rifo, frame, init_next_out_fn + in[i]); + } + + for (int i = 0; i < 10; i++) { + uint8_t frame[32]; + memset(frame, 0xff, sizeof(frame)); + rifo_out(&rifo, frame); + } +} + +static void reordered_delta_in(void) +{ + struct frame_rifo rifo; + uint8_t frame[32]; + rifo_init(&rifo); + + printf("\nTEST: %s, starting at FN: %u\n", __func__, init_next_out_fn); + + /* Packet A: frame 0, all timeslots */ + memset(frame, 0, sizeof(frame)); + frame[1] = 0x11; + frame[2] = 0x22; + rifo_in_mask(&rifo, frame, 0xffffffff, init_next_out_fn + 0); + + /* Packet C (frame 3 and 4): only ts2 present -- delivered early */ + memset(frame, 0, sizeof(frame)); + frame[2] = 0x44; + rifo_in_mask(&rifo, frame, 1U << 2, init_next_out_fn + 3); + rifo_in_mask(&rifo, frame, 1U << 2, init_next_out_fn + 4); + + /* Packet B (frame 1 and 2): only ts1 present -- delivered late */ + memset(frame, 0, sizeof(frame)); + frame[1] = 0x33; + rifo_in_mask(&rifo, frame, 1U << 1, init_next_out_fn + 1); + rifo_in_mask(&rifo, frame, 1U << 1, init_next_out_fn + 2); + + for (int i = 0; i < 5; i++) { + memset(frame, 0xff, sizeof(frame)); + rifo_out(&rifo, frame); + } +} + static void correct_order(void) { struct frame_rifo rifo; @@ -156,7 +218,7 @@ // Put 1 frame and get it memset(frame, 0xa5, sizeof(frame)); - frame_rifo_in(&rifo, frame, init_next_out_fn); + frame_rifo_in(&rifo, frame, 0xffffffff, init_next_out_fn); frame_rifo_out(&rifo, frame); // Put 11 frames at absolute frame numbers FRAMES_PER_FIFO - @@ -191,6 +253,8 @@ missing_frames(0); missing_frames(1); reordered_in(); + tail_reordered_in(); + reordered_delta_in(); correct_order(); too_old_frames(); bound_check(); diff --git a/tests/rifo/rifo_test.ok b/tests/rifo/rifo_test.ok index 564acf3..1b11f3c 100644 --- a/tests/rifo/rifo_test.ok +++ b/tests/rifo/rifo_test.ok @@ -6,15 +6,15 @@ RIFO_IN(0606060606060606060606060606060606060606060606060606060606060606, start fn + 6)=0 [depth=7, frames=4] RIFO_IN(0808080808080808080808080808080808080808080808080808080808080808, start fn + 8)=0 [depth=9, frames=5] RIFO_OUT(0000000000000000000000000000000000000000000000000000000000000000)=0 [depth=8, frames=4] -RIFO_OUT(ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)=-1 [depth=7, frames=4] +RIFO_OUT(0000000000000000000000000000000000000000000000000000000000000000)=-1 [depth=7, frames=4] RIFO_OUT(0202020202020202020202020202020202020202020202020202020202020202)=0 [depth=6, frames=3] -RIFO_OUT(ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)=-1 [depth=5, frames=3] +RIFO_OUT(0202020202020202020202020202020202020202020202020202020202020202)=-1 [depth=5, frames=3] RIFO_OUT(0404040404040404040404040404040404040404040404040404040404040404)=0 [depth=4, frames=2] -RIFO_OUT(ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)=-1 [depth=3, frames=2] +RIFO_OUT(0404040404040404040404040404040404040404040404040404040404040404)=-1 [depth=3, frames=2] RIFO_OUT(0606060606060606060606060606060606060606060606060606060606060606)=0 [depth=2, frames=1] -RIFO_OUT(ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)=-1 [depth=1, frames=1] +RIFO_OUT(0606060606060606060606060606060606060606060606060606060606060606)=-1 [depth=1, frames=1] RIFO_OUT(0808080808080808080808080808080808080808080808080808080808080808)=0 [depth=0, frames=0] -RIFO_OUT(ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)=-2 [depth=0, frames=0] +RIFO_OUT(0808080808080808080808080808080808080808080808080808080808080808)=-2 [depth=0, frames=0] TEST: missing_frames, starting at FN: 0 RIFO_IN(0101010101010101010101010101010101010101010101010101010101010101, start fn + 1)=0 [depth=2, frames=1] @@ -24,22 +24,22 @@ RIFO_IN(0909090909090909090909090909090909090909090909090909090909090909, start fn + 9)=0 [depth=10, frames=5] RIFO_OUT(ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)=-1 [depth=9, frames=5] RIFO_OUT(0101010101010101010101010101010101010101010101010101010101010101)=0 [depth=8, frames=4] -RIFO_OUT(ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)=-1 [depth=7, frames=4] +RIFO_OUT(0101010101010101010101010101010101010101010101010101010101010101)=-1 [depth=7, frames=4] RIFO_OUT(0303030303030303030303030303030303030303030303030303030303030303)=0 [depth=6, frames=3] -RIFO_OUT(ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)=-1 [depth=5, frames=3] +RIFO_OUT(0303030303030303030303030303030303030303030303030303030303030303)=-1 [depth=5, frames=3] RIFO_OUT(0505050505050505050505050505050505050505050505050505050505050505)=0 [depth=4, frames=2] -RIFO_OUT(ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)=-1 [depth=3, frames=2] +RIFO_OUT(0505050505050505050505050505050505050505050505050505050505050505)=-1 [depth=3, frames=2] RIFO_OUT(0707070707070707070707070707070707070707070707070707070707070707)=0 [depth=2, frames=1] -RIFO_OUT(ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)=-1 [depth=1, frames=1] +RIFO_OUT(0707070707070707070707070707070707070707070707070707070707070707)=-1 [depth=1, frames=1] RIFO_OUT(0909090909090909090909090909090909090909090909090909090909090909)=0 [depth=0, frames=0] TEST: reordered_in, starting at FN: 0 RIFO_IN(0000000000000000000000000000000000000000000000000000000000000000, start fn + 0)=0 [depth=1, frames=1] RIFO_IN(0101010101010101010101010101010101010101010101010101010101010101, start fn + 1)=0 [depth=2, frames=2] RIFO_IN(0404040404040404040404040404040404040404040404040404040404040404, start fn + 4)=0 [depth=5, frames=3] -RIFO_IN(0303030303030303030303030303030303030303030303030303030303030303, start fn + 3)=0 [depth=4, frames=4] +RIFO_IN(0303030303030303030303030303030303030303030303030303030303030303, start fn + 3)=0 [depth=5, frames=4] RIFO_IN(0505050505050505050505050505050505050505050505050505050505050505, start fn + 5)=0 [depth=6, frames=5] -RIFO_IN(0202020202020202020202020202020202020202020202020202020202020202, start fn + 2)=0 [depth=3, frames=6] +RIFO_IN(0202020202020202020202020202020202020202020202020202020202020202, start fn + 2)=0 [depth=6, frames=6] RIFO_IN(0606060606060606060606060606060606060606060606060606060606060606, start fn + 6)=0 [depth=7, frames=7] RIFO_IN(0707070707070707070707070707070707070707070707070707070707070707, start fn + 7)=0 [depth=8, frames=8] RIFO_IN(0808080808080808080808080808080808080808080808080808080808080808, start fn + 8)=0 [depth=9, frames=9] @@ -55,6 +55,40 @@ RIFO_OUT(0808080808080808080808080808080808080808080808080808080808080808)=0 [depth=1, frames=1] RIFO_OUT(0909090909090909090909090909090909090909090909090909090909090909)=0 [depth=0, frames=0] +TEST: tail_reordered_in, starting at FN: 0 +RIFO_IN(0000000000000000000000000000000000000000000000000000000000000000, start fn + 0)=0 [depth=1, frames=1] +RIFO_IN(0101010101010101010101010101010101010101010101010101010101010101, start fn + 1)=0 [depth=2, frames=2] +RIFO_IN(0202020202020202020202020202020202020202020202020202020202020202, start fn + 2)=0 [depth=3, frames=3] +RIFO_IN(0303030303030303030303030303030303030303030303030303030303030303, start fn + 3)=0 [depth=4, frames=4] +RIFO_IN(0404040404040404040404040404040404040404040404040404040404040404, start fn + 4)=0 [depth=5, frames=5] +RIFO_IN(0505050505050505050505050505050505050505050505050505050505050505, start fn + 5)=0 [depth=6, frames=6] +RIFO_IN(0606060606060606060606060606060606060606060606060606060606060606, start fn + 6)=0 [depth=7, frames=7] +RIFO_IN(0707070707070707070707070707070707070707070707070707070707070707, start fn + 7)=0 [depth=8, frames=8] +RIFO_IN(0909090909090909090909090909090909090909090909090909090909090909, start fn + 9)=0 [depth=10, frames=9] +RIFO_IN(0808080808080808080808080808080808080808080808080808080808080808, start fn + 8)=0 [depth=10, frames=10] +RIFO_OUT(0000000000000000000000000000000000000000000000000000000000000000)=0 [depth=9, frames=9] +RIFO_OUT(0101010101010101010101010101010101010101010101010101010101010101)=0 [depth=8, frames=8] +RIFO_OUT(0202020202020202020202020202020202020202020202020202020202020202)=0 [depth=7, frames=7] +RIFO_OUT(0303030303030303030303030303030303030303030303030303030303030303)=0 [depth=6, frames=6] +RIFO_OUT(0404040404040404040404040404040404040404040404040404040404040404)=0 [depth=5, frames=5] +RIFO_OUT(0505050505050505050505050505050505050505050505050505050505050505)=0 [depth=4, frames=4] +RIFO_OUT(0606060606060606060606060606060606060606060606060606060606060606)=0 [depth=3, frames=3] +RIFO_OUT(0707070707070707070707070707070707070707070707070707070707070707)=0 [depth=2, frames=2] +RIFO_OUT(0808080808080808080808080808080808080808080808080808080808080808)=0 [depth=1, frames=1] +RIFO_OUT(0909090909090909090909090909090909090909090909090909090909090909)=0 [depth=0, frames=0] + +TEST: reordered_delta_in, starting at FN: 0 +RIFO_IN(0011220000000000000000000000000000000000000000000000000000000000, mask=0xffffffff, start fn + 0)=0 [depth=1, frames=1] +RIFO_IN(0000440000000000000000000000000000000000000000000000000000000000, mask=0x00000004, start fn + 3)=0 [depth=4, frames=2] +RIFO_IN(0000440000000000000000000000000000000000000000000000000000000000, mask=0x00000004, start fn + 4)=0 [depth=5, frames=3] +RIFO_IN(0033000000000000000000000000000000000000000000000000000000000000, mask=0x00000002, start fn + 1)=0 [depth=5, frames=4] +RIFO_IN(0033000000000000000000000000000000000000000000000000000000000000, mask=0x00000002, start fn + 2)=0 [depth=5, frames=5] +RIFO_OUT(0011220000000000000000000000000000000000000000000000000000000000)=0 [depth=4, frames=4] +RIFO_OUT(0033220000000000000000000000000000000000000000000000000000000000)=0 [depth=3, frames=3] +RIFO_OUT(0033220000000000000000000000000000000000000000000000000000000000)=0 [depth=2, frames=2] +RIFO_OUT(0033440000000000000000000000000000000000000000000000000000000000)=0 [depth=1, frames=1] +RIFO_OUT(0033440000000000000000000000000000000000000000000000000000000000)=0 [depth=0, frames=0] + TEST: correct_order, starting at FN: 0 RIFO_IN(0000000000000000000000000000000000000000000000000000000000000000, start fn + 0)=0 [depth=1, frames=1] RIFO_IN(0101010101010101010101010101010101010101010101010101010101010101, start fn + 1)=0 [depth=2, frames=2] @@ -130,15 +164,15 @@ RIFO_IN(0606060606060606060606060606060606060606060606060606060606060606, start fn + 6)=0 [depth=7, frames=4] RIFO_IN(0808080808080808080808080808080808080808080808080808080808080808, start fn + 8)=0 [depth=9, frames=5] RIFO_OUT(0000000000000000000000000000000000000000000000000000000000000000)=0 [depth=8, frames=4] -RIFO_OUT(ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)=-1 [depth=7, frames=4] +RIFO_OUT(0000000000000000000000000000000000000000000000000000000000000000)=-1 [depth=7, frames=4] RIFO_OUT(0202020202020202020202020202020202020202020202020202020202020202)=0 [depth=6, frames=3] -RIFO_OUT(ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)=-1 [depth=5, frames=3] +RIFO_OUT(0202020202020202020202020202020202020202020202020202020202020202)=-1 [depth=5, frames=3] RIFO_OUT(0404040404040404040404040404040404040404040404040404040404040404)=0 [depth=4, frames=2] -RIFO_OUT(ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)=-1 [depth=3, frames=2] +RIFO_OUT(0404040404040404040404040404040404040404040404040404040404040404)=-1 [depth=3, frames=2] RIFO_OUT(0606060606060606060606060606060606060606060606060606060606060606)=0 [depth=2, frames=1] -RIFO_OUT(ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)=-1 [depth=1, frames=1] +RIFO_OUT(0606060606060606060606060606060606060606060606060606060606060606)=-1 [depth=1, frames=1] RIFO_OUT(0808080808080808080808080808080808080808080808080808080808080808)=0 [depth=0, frames=0] -RIFO_OUT(ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)=-2 [depth=0, frames=0] +RIFO_OUT(0808080808080808080808080808080808080808080808080808080808080808)=-2 [depth=0, frames=0] TEST: missing_frames, starting at FN: 4294967290 RIFO_IN(0101010101010101010101010101010101010101010101010101010101010101, start fn + 1)=0 [depth=2, frames=1] @@ -148,22 +182,22 @@ RIFO_IN(0909090909090909090909090909090909090909090909090909090909090909, start fn + 9)=0 [depth=10, frames=5] RIFO_OUT(ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)=-1 [depth=9, frames=5] RIFO_OUT(0101010101010101010101010101010101010101010101010101010101010101)=0 [depth=8, frames=4] -RIFO_OUT(ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)=-1 [depth=7, frames=4] +RIFO_OUT(0101010101010101010101010101010101010101010101010101010101010101)=-1 [depth=7, frames=4] RIFO_OUT(0303030303030303030303030303030303030303030303030303030303030303)=0 [depth=6, frames=3] -RIFO_OUT(ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)=-1 [depth=5, frames=3] +RIFO_OUT(0303030303030303030303030303030303030303030303030303030303030303)=-1 [depth=5, frames=3] RIFO_OUT(0505050505050505050505050505050505050505050505050505050505050505)=0 [depth=4, frames=2] -RIFO_OUT(ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)=-1 [depth=3, frames=2] +RIFO_OUT(0505050505050505050505050505050505050505050505050505050505050505)=-1 [depth=3, frames=2] RIFO_OUT(0707070707070707070707070707070707070707070707070707070707070707)=0 [depth=2, frames=1] -RIFO_OUT(ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)=-1 [depth=1, frames=1] +RIFO_OUT(0707070707070707070707070707070707070707070707070707070707070707)=-1 [depth=1, frames=1] RIFO_OUT(0909090909090909090909090909090909090909090909090909090909090909)=0 [depth=0, frames=0] TEST: reordered_in, starting at FN: 4294967290 RIFO_IN(0000000000000000000000000000000000000000000000000000000000000000, start fn + 0)=0 [depth=1, frames=1] RIFO_IN(0101010101010101010101010101010101010101010101010101010101010101, start fn + 1)=0 [depth=2, frames=2] RIFO_IN(0404040404040404040404040404040404040404040404040404040404040404, start fn + 4)=0 [depth=5, frames=3] -RIFO_IN(0303030303030303030303030303030303030303030303030303030303030303, start fn + 3)=0 [depth=4, frames=4] +RIFO_IN(0303030303030303030303030303030303030303030303030303030303030303, start fn + 3)=0 [depth=5, frames=4] RIFO_IN(0505050505050505050505050505050505050505050505050505050505050505, start fn + 5)=0 [depth=6, frames=5] -RIFO_IN(0202020202020202020202020202020202020202020202020202020202020202, start fn + 2)=0 [depth=3, frames=6] +RIFO_IN(0202020202020202020202020202020202020202020202020202020202020202, start fn + 2)=0 [depth=6, frames=6] RIFO_IN(0606060606060606060606060606060606060606060606060606060606060606, start fn + 6)=0 [depth=7, frames=7] RIFO_IN(0707070707070707070707070707070707070707070707070707070707070707, start fn + 7)=0 [depth=8, frames=8] RIFO_IN(0808080808080808080808080808080808080808080808080808080808080808, start fn + 8)=0 [depth=9, frames=9] @@ -179,6 +213,40 @@ RIFO_OUT(0808080808080808080808080808080808080808080808080808080808080808)=0 [depth=1, frames=1] RIFO_OUT(0909090909090909090909090909090909090909090909090909090909090909)=0 [depth=0, frames=0] +TEST: tail_reordered_in, starting at FN: 4294967290 +RIFO_IN(0000000000000000000000000000000000000000000000000000000000000000, start fn + 0)=0 [depth=1, frames=1] +RIFO_IN(0101010101010101010101010101010101010101010101010101010101010101, start fn + 1)=0 [depth=2, frames=2] +RIFO_IN(0202020202020202020202020202020202020202020202020202020202020202, start fn + 2)=0 [depth=3, frames=3] +RIFO_IN(0303030303030303030303030303030303030303030303030303030303030303, start fn + 3)=0 [depth=4, frames=4] +RIFO_IN(0404040404040404040404040404040404040404040404040404040404040404, start fn + 4)=0 [depth=5, frames=5] +RIFO_IN(0505050505050505050505050505050505050505050505050505050505050505, start fn + 5)=0 [depth=6, frames=6] +RIFO_IN(0606060606060606060606060606060606060606060606060606060606060606, start fn + 6)=0 [depth=7, frames=7] +RIFO_IN(0707070707070707070707070707070707070707070707070707070707070707, start fn + 7)=0 [depth=8, frames=8] +RIFO_IN(0909090909090909090909090909090909090909090909090909090909090909, start fn + 9)=0 [depth=10, frames=9] +RIFO_IN(0808080808080808080808080808080808080808080808080808080808080808, start fn + 8)=0 [depth=10, frames=10] +RIFO_OUT(0000000000000000000000000000000000000000000000000000000000000000)=0 [depth=9, frames=9] +RIFO_OUT(0101010101010101010101010101010101010101010101010101010101010101)=0 [depth=8, frames=8] +RIFO_OUT(0202020202020202020202020202020202020202020202020202020202020202)=0 [depth=7, frames=7] +RIFO_OUT(0303030303030303030303030303030303030303030303030303030303030303)=0 [depth=6, frames=6] +RIFO_OUT(0404040404040404040404040404040404040404040404040404040404040404)=0 [depth=5, frames=5] +RIFO_OUT(0505050505050505050505050505050505050505050505050505050505050505)=0 [depth=4, frames=4] +RIFO_OUT(0606060606060606060606060606060606060606060606060606060606060606)=0 [depth=3, frames=3] +RIFO_OUT(0707070707070707070707070707070707070707070707070707070707070707)=0 [depth=2, frames=2] +RIFO_OUT(0808080808080808080808080808080808080808080808080808080808080808)=0 [depth=1, frames=1] +RIFO_OUT(0909090909090909090909090909090909090909090909090909090909090909)=0 [depth=0, frames=0] + +TEST: reordered_delta_in, starting at FN: 4294967290 +RIFO_IN(0011220000000000000000000000000000000000000000000000000000000000, mask=0xffffffff, start fn + 0)=0 [depth=1, frames=1] +RIFO_IN(0000440000000000000000000000000000000000000000000000000000000000, mask=0x00000004, start fn + 3)=0 [depth=4, frames=2] +RIFO_IN(0000440000000000000000000000000000000000000000000000000000000000, mask=0x00000004, start fn + 4)=0 [depth=5, frames=3] +RIFO_IN(0033000000000000000000000000000000000000000000000000000000000000, mask=0x00000002, start fn + 1)=0 [depth=5, frames=4] +RIFO_IN(0033000000000000000000000000000000000000000000000000000000000000, mask=0x00000002, start fn + 2)=0 [depth=5, frames=5] +RIFO_OUT(0011220000000000000000000000000000000000000000000000000000000000)=0 [depth=4, frames=4] +RIFO_OUT(0033220000000000000000000000000000000000000000000000000000000000)=0 [depth=3, frames=3] +RIFO_OUT(0033220000000000000000000000000000000000000000000000000000000000)=0 [depth=2, frames=2] +RIFO_OUT(0033440000000000000000000000000000000000000000000000000000000000)=0 [depth=1, frames=1] +RIFO_OUT(0033440000000000000000000000000000000000000000000000000000000000)=0 [depth=0, frames=0] + TEST: correct_order, starting at FN: 4294967290 RIFO_IN(0000000000000000000000000000000000000000000000000000000000000000, start fn + 0)=0 [depth=1, frames=1] RIFO_IN(0101010101010101010101010101010101010101010101010101010101010101, start fn + 1)=0 [depth=2, frames=2] -- To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/43643?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-e1d Gerrit-Branch: master Gerrit-Change-Id: I66af4f01ebb38ca1bdd8ffbc8135776322941230 Gerrit-Change-Number: 43643 Gerrit-PatchSet: 1 Gerrit-Owner: manawyrm <osmocom.account(a)tbspace.de>
1 0
0 0
[S] Change in dahdi-linux[master]: drivers/dahdi/icE1usb: defer USB transfer when setting loopback mode
by manawyrm 15 Sep '26

15 Sep '26
manawyrm has posted comments on this change by manawyrm. ( https://gerrit.osmocom.org/c/dahdi-linux/+/43642?usp=email ) Change subject: drivers/dahdi/icE1usb: defer USB transfer when setting loopback mode ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: Enabling loopback now works on my machine: root@isdnpi ~ # dahdi_maint -s 1 --loopback networkline Span 1: network line loopback ON root@isdnpi ~ # dmesg [..] Sep 15 15:06:02 isdnpi kernel: icE1usb 3-2:1.0: entering e1u_d_maint(2) Sep 15 15:06:02 isdnpi kernel: icE1usb 3-2:1.0: Turning on network line loopback Sep 15 15:06:02 isdnpi kernel: icE1usb 3-2:1.0: TX-CONFIG (crc4=TS0_CRC4_E, timing=LOCAL, ext_loopback=SAME, tx_yellow_alarm=0) This fixes https://osmocom.org/issues/7089 -- To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/43642?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: dahdi-linux Gerrit-Branch: master Gerrit-Change-Id: Iba99fc5261059c77cc89d867b21c70a34c9b4ea6 Gerrit-Change-Number: 43642 Gerrit-PatchSet: 1 Gerrit-Owner: manawyrm <osmocom.account(a)tbspace.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Comment-Date: Tue, 15 Sep 2026 13:43:18 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
[S] Change in dahdi-linux[master]: drivers/dahdi/icE1usb: defer USB transfer when setting loopback mode
by manawyrm 15 Sep '26

15 Sep '26
manawyrm has uploaded this change for review. ( https://gerrit.osmocom.org/c/dahdi-linux/+/43642?usp=email ) Change subject: drivers/dahdi/icE1usb: defer USB transfer when setting loopback mode ...................................................................... drivers/dahdi/icE1usb: defer USB transfer when setting loopback mode The icE1usb driver would deadlock/hang the kernel when trying to configure a internal loopback mode via the "dahdi_maint" utility. Previously, it tried to do a USB transfer without enabled interrupts inside a spinlock, which caused the infinite hang. This change moves the ice1usb_tx_config() call to a workqueue. Change-Id: Iba99fc5261059c77cc89d867b21c70a34c9b4ea6 --- M drivers/dahdi/icE1usb/icE1usb.c 1 file changed, 26 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/dahdi-linux refs/changes/42/43642/1 diff --git a/drivers/dahdi/icE1usb/icE1usb.c b/drivers/dahdi/icE1usb/icE1usb.c index a861515..ebeaee6 100644 --- a/drivers/dahdi/icE1usb/icE1usb.c +++ b/drivers/dahdi/icE1usb/icE1usb.c @@ -29,6 +29,7 @@ #include <linux/slab.h> #include <linux/kernel.h> #include <linux/spinlock.h> +#include <linux/workqueue.h> #include <linux/pm_runtime.h> #include <dahdi/kernel.h> @@ -135,6 +136,8 @@ } dahdi; /* is the device still present (true) or already absent/unplugged (false) */ bool present; + /* deferred ice1usb_tx_config(), scheduled from the atomic .maint callback */ + struct work_struct tx_config_work; /* spinlock protecting concurrent access to fc, {read,write}chunk_idx, ... */ spinlock_t lock; /* maximum number of 32-byte E1 frames to send in one ISO OUT packet */ @@ -880,11 +883,26 @@ return 0; } -/* set some maintenance mode according to 'cmd' */ +static void ice1usb_deferred_tx_config(struct work_struct *work) +{ + struct ice1usb *ieu = container_of(work, struct ice1usb, tx_config_work); + int rc; + + if (!ieu->present) + return; + + rc = ice1usb_tx_config(ieu); + if (rc < 0) + ieu_err(ieu, "Failed to apply maint TX config: %d\n", rc); +} + +/* set some maintenance mode according to 'cmd' + * + * Called by the DAHDI core with span->lock held and IRQs disabled, so the + * blocking USB I/O is deferred to ice1usb_deferred_tx_config(). */ static int e1u_d_maint(struct dahdi_span *span, int cmd) { struct ice1usb *ieu = container_of(span, struct ice1usb, dahdi.span); - int rc = 0; ieu_dbg(ieu, "entering %s(%d)", __FUNCTION__, cmd); @@ -892,12 +910,12 @@ case DAHDI_MAINT_NONE: ieu_info(ieu, "Clearing all maint modes\n"); ieu->cfg.tx.ext_loopback = ICE1USB_TX_EXT_LOOPBACK_OFF; - rc = ice1usb_tx_config(ieu); + schedule_work(&ieu->tx_config_work); break; case DAHDI_MAINT_NETWORKLINELOOP: ieu_info(ieu, "Turning on network line loopback\n"); ieu->cfg.tx.ext_loopback = ICE1USB_TX_EXT_LOOPBACK_SAME; - rc = ice1usb_tx_config(ieu); + schedule_work(&ieu->tx_config_work); break; /* TODO: DAHDI_MAINT_*_DEFECT */ /* TODO: DAHDI_MAINT_ALARM_SIM */ @@ -910,7 +928,7 @@ return -ENOSYS; } - return rc; + return 0; } static const struct dahdi_span_ops ice1usb_span_ops = { @@ -1413,6 +1431,7 @@ ieu->fc.r_sw = 8192; ieu->present = true; spin_lock_init(&ieu->lock); + INIT_WORK(&ieu->tx_config_work, ice1usb_deferred_tx_config); /* locate ON / OFF altsettings */ ieu->alt_off = find_altsetting_off(ieu->usb_intf); @@ -1514,6 +1533,8 @@ /* will in turn call e1u_d_shutdown() which stops all transfers */ dahdi_unregister_device(ieu->dahdi.dev); + cancel_work_sync(&ieu->tx_config_work); + ice1usb_free(ieu); } -- To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/43642?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: dahdi-linux Gerrit-Branch: master Gerrit-Change-Id: Iba99fc5261059c77cc89d867b21c70a34c9b4ea6 Gerrit-Change-Number: 43642 Gerrit-PatchSet: 1 Gerrit-Owner: manawyrm <osmocom.account(a)tbspace.de>
1 0
0 0
[L] Change in osmo-dev[master]: README: modernize
by pespin 15 Sep '26

15 Sep '26
Attention is currently required from: fixeria, osmith. pespin has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-dev/+/43641?usp=email ) Change subject: README: modernize ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/43641?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-dev Gerrit-Branch: master Gerrit-Change-Id: Ie653062d43c486ce977ed772f0d06f0199952188 Gerrit-Change-Number: 43641 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 15 Sep 2026 10:56:51 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[L] Change in osmo-dev[master]: README: modernize
by osmith 15 Sep '26

15 Sep '26
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-dev/+/43641?usp=email ) Change subject: README: modernize ...................................................................... README: modernize Change-Id: Ie653062d43c486ce977ed772f0d06f0199952188 --- D README A README.md A ttcn3/tmux/README.md 3 files changed, 191 insertions(+), 156 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/41/43641/1 diff --git a/README b/README deleted file mode 100644 index e425c8e..0000000 --- a/README +++ /dev/null @@ -1,156 +0,0 @@ -=== WHAT IS THIS? - -* quickly build the entire Osmocom core network stack from source, with a - generated top-level makefile (see the rest of this README file below). - -* quickly configure, launch and tear down an entire Osmocom core network on - your box (see net/README). - - -=== Quick Start - -sudo apt install \ - build-essential gcc g++ make automake autoconf libtool pkg-config \ - libtalloc-dev libpcsclite-dev libortp-dev libsctp-dev libssl-dev libdbi-dev \ - libdbd-sqlite3 libsqlite3-dev libpcap-dev libc-ares-dev libgnutls28-dev \ - libsctp-dev sqlite3 libusb-1.0-0-dev libmnl-dev libsofia-sip-ua-glib-dev - -./gen_makefile.py default.opts iu.opts no_dahdi.opts -I -m make - -cd make -make - -- 'make' will ask for sudo password to run 'make install' and 'ldconfig'. - To run non-interactively: - - - 'make install': - chown $USER: /usr/local - Then call gen_makefile.py once without the -I option - - - 'ldconfig': - echo "$USER ALL= NOPASSWD: /sbin/ldconfig" > /etc/sudoers.d/ldconfig - - -=== gen_makefile.py - -This provides a set of top-level makefiles to build variants of the Osmocom -source trees. It is inteded for the core network components and related -projects, but works generically. - -The idea is to have all your Osmocom git clones in ./src, while keeping one or -more separate build trees in ./make-*. - -Run ./gen_makefile.py with a choice of choice of configure options. - - -Examples: - -CN with full 2G and 3G support: - - ./gen_makefile.py default.opts iu.opts -m make - cd make - make cn - -Other make targets exist for specific use cases: - - - 'usrp': - Build the CN, OsmoBSC, OsmoBTS and OsmoTRX (default, e.g. when connecting - to an USRP) - - - 'cn-bsc': - Build the CN and OsmoBSC (e.g. when connecting to an external sysmoBTS) - - - 'osmo-msc': - Build only the OsmoMSC project and its dependencies (this can be used for - any project in all.deps). - - - '.make.osmo-ttcn3-hacks.clone' - Clone the osmo-ttcn3-hacks git repository (it cannot be built by osmo-dev, - but cloning it is still useful.) - -If you make modifications in one of the source trees, this Makefile will pick -it up, rebuild the project and also rebuild all dependencies (according to -all.deps). - -If you modify the all.deps or *.opts file, you can easily run 'make regen' in a -make-* subdir to regenerate the Makefile from the same files. - -In your make-* subdir there are empty status files that are touched for every -completed make target. From these, 'make' can detect what needs to be rebuilt. -You can manually remove them to force a rebuild of a specific target. - -For example, if you 'rm .make.libosmocore.autoconf', libosmocore and all -projects depending on libosmocore will be rebuilt from scratch. - -For more details on the *.opts and all.deps syntax, read the docs at the top of -./gen_makefile.py. - -It is also easily possible to keep sources and build trees in various -configurations, see the command line options of ./gen_makefile.py. - - -=== Install in /usr - -By default, the Osmocom install prefix is /usr/local, while (currently) the -default systemd *.service files expect binaries installed in /usr/bin. To -install in /usr instead, use prefix_usr.opts, which sets --prefix=/usr. - - -=== Systemd Service Files - -If you encounter problems installing *.service files, no_systemd.opts may help: - -Systemd recommends installing service files in the distribution's single -service file location; that may sound sane, but if that location is -/lib/systemd/system, that means even a --prefix=/home/private/prefix ends up -trying to install service files system-wide in /lib/systemd/system, making all -attempts to install to a user-writable location fail. - -no_systemd.opts disables installing *.service files. - - -=== Build Environment - -For dependencies, see the "External dependencies" on: - - https://osmocom.org/projects/cellular-infrastructure/wiki/Build_from_Source - -If /usr/local/ is not writable by your user, pass the --sudo-make-install -option to gen_makefile.py above (a custom --prefix is not yet supported). - -If your system doesn't have this by default, you will need: - - export LD_LIBRARY_PATH="/usr/local/lib" - -and - - export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" - -to your environment. To use the installed binaries after installation, also - - export PATH="$PATH:/usr/local/bin" - - -=== osmo-uninstall.sh - -Remove osmocom built binaries and headers from given prefix, -default is /usr/local. - - -=== src/* - -Find other useful scripts in src/, see src/README. - -=== ttcn3/tmux - -It's possible to run TTCN-3 test cases without using Docker. This directory -contains scripts for starting a testsuite and the related binaries in a tmux -session. For example, ttcn3-bsc-test.sh does the following: - -* Starts osmo-bsc, osmo-stp, and three instances of osmo-bts-omldummy. -* Prepares a command for execuring the test suite. - -=== Troubleshooting - -When using sanitize.opts, osmo-trx is not built with the address sanitizer -enabled. Linking a sanitizer-enabled libosmocore will not work. diff --git a/README.md b/README.md new file mode 100644 index 0000000..af26d84 --- /dev/null +++ b/README.md @@ -0,0 +1,185 @@ +# osmo-dev + +## Overview + +The main purpose of this project is building the Osmocom stack (and related +projects such as Open5GS) from source with `gen_makefile.py`. This is described +in more detail below. + +### Additional scripts + +* `net`: quickly configure, launch and tear down an entire Osmocom core network + on your box (see `net/README`). + +* `ttcn3/tmux`: start a tmux session with a TTCN-3 testsuite and related + binaries (see `ttcn3/tmux/README.md`). + +* `src`: other useful scripts related to git and gerrit (see `src/README`). + +* `osmo-uninstall.sh`: remove installed binaries, libraries and headers from a + given prefix, the default is `/usr/local`. + +## `gen_makefile.py` + +This script generates a `Makefile` that was originally intended to build the +Osmocom core network components, but has since been extended to also build +Open5GS, PyHSS and more. See `all.deps` for a list of supported projects. + +The idea is to have all your git clones in `./src`, while keeping one or more +separate build trees in `./make*` dirs. + +`gen_makefile.py` gets used by +[`testenv.py`](https://gitea.osmocom.org/ttcn3/osmo-ttcn3-hacks/src/branch/master/_testenv/README.md) +in `osmo-ttcn3-hacks.git` to build projects from source when running without +the `--binary-repo` argument. + +### Dependencies + +Install required packages first. To have enough dependencies for building and +installing most Osmocom programs, you can run this on Debian-based systems: + +``` +$ sudo apt install \ + build-essential gcc g++ make automake autoconf libtool pkg-config \ + libtalloc-dev libpcsclite-dev libortp-dev libsctp-dev libssl-dev libdbi-dev \ + libdbd-sqlite3 libsqlite3-dev libpcap-dev libc-ares-dev libgnutls28-dev \ + libsctp-dev sqlite3 libusb-1.0-0-dev libmnl-dev libsofia-sip-ua-glib-dev +``` + +### Example usage + +Build the Osmocom core network with full 2G and 3G support: + +``` +$ ./gen_makefile.py default.opts iu.opts no_dahdi.opts no_systemd.opts -I -m make +$ cd make +$ make cn +``` + +If you make modifications in one of the source trees, this `Makefile` will pick +it up, rebuild the project and also rebuild all dependencies (according to +`all.deps`). It is also easily possible to keep sources and build trees in +various configurations, see the command line options of `gen_makefile.py`. + +### Make targets + +Other make targets exist for specific use cases: + +* `usrp`: + Build the CN, OsmoBSC, OsmoBTS and OsmoTRX (default, e.g. when connecting + to an USRP) + +* `cn-bsc`: + Build the CN and OsmoBSC (e.g. when connecting to an external sysmoBTS) + +* `osmo-msc`: + Build only the OsmoMSC project and its dependencies (this can be used for + any project in `all.deps`). + +* `.make.osmo-ttcn3-hacks.clone`: + Clone the osmo-ttcn3-hacks git repository (it cannot be built by osmo-dev, + but cloning it is still useful.) + +If you modify the `all.deps` or `*.opts` file, you can easily run `make regen` +in a `make*` subdir to regenerate the `Makefile` from the same files, with the +same options for `gen_makefile.py`. + +In your `make*` subdir there are empty status files that are touched for every +completed make target. From these, `make` can detect what needs to be rebuilt. +You can manually remove them to force a rebuild of a specific target. For +example, if you `rm .make.libosmocore.autoconf`, libosmocore and all projects +depending on libosmocore will be rebuilt from scratch. + +### Configuration files + +### all.deps + +Whitespace-separated listing of: +``` +project_name depends_on_project_1 depends_on_project_2 ... +``` + +### all.urls + +Projects that are not developed at `gerrit.osmocom.org/$project` are listed +here in the following format: +``` +project_name URL +``` + +### all.buildsystems + +Projects that are not using `autotools` need an entry in this file in the +form of: +``` +project_name BUILDSYSTEM +``` + +Supported buildsystems are: +* `autotools` +* `cmake` +* `erlang` +* `meson` +* `python` + +#### `*.opts` files + +The `*.opts` files provide options that are passed to `./configure`, +`meson setup` and `cmake`. They have the following format: + +``` +project_name OPTION(S) +``` + +If `project_name` is `ALL`, the option gets added to all projects using the +`autotools` build system. This is because `./configure` just ignores any +options it does not understand and initially only `autotools` was supported by +`gen_makefile.py`. + +Find more information about specific `*.opts` files below. + +##### `prefix_usr.opts` + +By default, the Osmocom install prefix is `/usr/local`, while the systemd +`*.service` files expect binaries installed in `/usr/bin`. To install to `/usr` +instead, it is possible to add `prefix_usr.opts` to the `gen_makefile.py` +arguments, which sets `--prefix=/usr`. Be aware that this will cause problems +with distribution packages. + +##### `no_systemd.opts` + +`no_systemd.opts` disables installing `*.service` files, which is useful +because these files get installed to `/usr/lib/systemd/system` even if the +prefix is not `/usr`. Using `no_systemd.opts` is required for running +`gen_makefile.py` without the `-I` (`--sudo-make-install`) argument. + +### Run without sudo prompts + +`make` will ask for the sudo password to run `make install` and `ldconfig`. To +run non-interactively: + +``` +$ sudo chown -R $USER: /usr/local +$ echo "$USER ALL= NOPASSWD: $(command -v ldconfig)" | sudo tee /etc/sudoers.d/ldconfig +``` + +Then call `gen_makefile.py` once without `-I` (`--sudo-make-install`). + +## Troubleshooting + +### Environment variables + +If your system can't find installed libraries (e.g. if you run +`gen_makefile.py` with `--no-ldconfig`), pkg-config files or binaries then +setting these environment variables should help: + +``` +export LD_LIBRARY_PATH="/usr/local/lib" +export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" +export PATH="$PATH:/usr/local/bin" +``` + +### sanitize.opts and osmo-trx + +When using sanitize.opts, osmo-trx is not built with the address sanitizer +enabled. Linking a sanitizer-enabled libosmocore will not work. diff --git a/ttcn3/tmux/README.md b/ttcn3/tmux/README.md new file mode 100644 index 0000000..0d09976 --- /dev/null +++ b/ttcn3/tmux/README.md @@ -0,0 +1,6 @@ +It's possible to run TTCN-3 test cases without using Docker. This directory +contains scripts for starting a testsuite and the related binaries in a tmux +session. For example, ttcn3-bsc-test.sh does the following: + +* Starts osmo-bsc, osmo-stp, and three instances of osmo-bts-omldummy. +* Prepares a command for execuring the test suite. -- To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/43641?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-dev Gerrit-Branch: master Gerrit-Change-Id: Ie653062d43c486ce977ed772f0d06f0199952188 Gerrit-Change-Number: 43641 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de>
1 0
0 0
[XL] Change in osmo-sgsn[master]: add libvlr based on MSC commit 7a628a1029ef174328f7e86183f19e54e5d9df8f
by Jenkins Builder 15 Sep '26

15 Sep '26
Attention is currently required from: laforge, lynxis lazus, osmith. Jenkins Builder has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/39560?usp=email ) Change subject: add libvlr based on MSC commit 7a628a1029ef174328f7e86183f19e54e5d9df8f ...................................................................... Patch Set 11: (1 comment) File src/libvlr/vlr.c: Robot Comment from checkpatch (run ID ): https://gerrit.osmocom.org/c/osmo-sgsn/+/39560/comment/70a7277a_e59a717e?us… : PS11, Line 265: strcpy(name + maxlen - 2, ".."); Instead of strncpy()/strcpy(), use osmo_strlcpy() or OSMO_STRLCPY_ARRAY() -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/39560?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I221114e00e6f338a75ae0dd7ac285e262b23635d Gerrit-Change-Number: 39560 Gerrit-PatchSet: 11 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-CC: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Tue, 15 Sep 2026 09:46:58 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
[XL] Change in osmo-sgsn[master]: add libvlr based on MSC commit 7a628a1029ef174328f7e86183f19e54e5d9df8f
by Jenkins Builder 15 Sep '26

15 Sep '26
Attention is currently required from: laforge, lynxis lazus, osmith. Jenkins Builder has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/39560?usp=email ) Change subject: add libvlr based on MSC commit 7a628a1029ef174328f7e86183f19e54e5d9df8f ...................................................................... Patch Set 10: (1 comment) File src/libvlr/vlr.c: Robot Comment from checkpatch (run ID ): https://gerrit.osmocom.org/c/osmo-sgsn/+/39560/comment/7a83c326_0b0ebaf7?us… : PS10, Line 265: strcpy(name + maxlen - 2, ".."); Instead of strncpy()/strcpy(), use osmo_strlcpy() or OSMO_STRLCPY_ARRAY() -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/39560?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I221114e00e6f338a75ae0dd7ac285e262b23635d Gerrit-Change-Number: 39560 Gerrit-PatchSet: 10 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-CC: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Tue, 15 Sep 2026 09:46:18 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • ...
  • 190
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.