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

February 2023

  • 1 participants
  • 2601 discussions
Change in libosmo-abis[master]: trau_sync: add synchronization pattern for Ericsson RBS MCS9
by dexter 14 Feb '23

14 Feb '23
dexter has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/31316 ) Change subject: trau_sync: add synchronization pattern for Ericsson RBS MCS9 ...................................................................... trau_sync: add synchronization pattern for Ericsson RBS MCS9 Change-Id: Ic3d5262d9a32093ca9c15c8bcabf3176a57e8bf5 Related: OS#5198 --- M include/osmocom/trau/trau_sync.h M src/trau/trau_sync.c 2 files changed, 49 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmocom/trau/trau_sync.h b/include/osmocom/trau/trau_sync.h index 35a12bc..36388eb 100644 --- a/include/osmocom/trau/trau_sync.h +++ b/include/osmocom/trau/trau_sync.h @@ -14,6 +14,7 @@ OSMO_TRAU_SYNCP_V110, OSMO_TRAU_SYNCP_16_ER_CCU, OSMO_TRAU_SYNCP_64_ER_CCU, + OSMO_TRAU_SYNCP_64_ER_CCU_MCS9, }; typedef void (*frame_out_cb_t)(void *user_data, const ubit_t *bits, unsigned int num_bits); diff --git a/src/trau/trau_sync.c b/src/trau/trau_sync.c index cf76706..60bfad7 100644 --- a/src/trau/trau_sync.c +++ b/src/trau/trau_sync.c @@ -226,6 +226,54 @@ }, .byte_len = 160, }, + [OSMO_TRAU_SYNCP_64_ER_CCU_MCS9] = { + .name = "Ericsson CCU 64 kbps MCS9", + .byte_pattern = { + 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }, + .byte_mask = { + 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }, + .byte_len = 160, + }, }; static void expand_sync_pattern(struct sync_pattern *pat) -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/31316 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Ic3d5262d9a32093ca9c15c8bcabf3176a57e8bf5 Gerrit-Change-Number: 31316 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in libosmo-abis[master]: trau_sync: allow multiple secondary sync patterns
by dexter 14 Feb '23

14 Feb '23
dexter has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/31315 ) Change subject: trau_sync: allow multiple secondary sync patterns ...................................................................... trau_sync: allow multiple secondary sync patterns At the moment we can only apply one pattern to synchronize on a TRAU bitstream. This is sufficient because TRAU framing usually does not change synchronization patterns. However there may be systems out there that occasionally switch the synchronization pattern. Change-Id: Id7de21b2de7d02ae5a8f3cbc003aa7974651a289 Related: OS#5198 --- M include/osmocom/trau/trau_sync.h M src/trau/trau_sync.c 2 files changed, 62 insertions(+), 13 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmocom/trau/trau_sync.h b/include/osmocom/trau/trau_sync.h index 512b749..35a12bc 100644 --- a/include/osmocom/trau/trau_sync.h +++ b/include/osmocom/trau/trau_sync.h @@ -24,3 +24,4 @@ void osmo_trau_sync_rx_ubits(struct osmo_fsm_inst *fi, const ubit_t *bits, size_t n_bits); void osmo_trau_sync_set_pat(struct osmo_fsm_inst *fi, enum osmo_trau_sync_pat_id pat_id); +void osmo_trau_sync_set_secondary_pat(struct osmo_fsm_inst *fi, enum osmo_trau_sync_pat_id pat_id, size_t pat_index); diff --git a/src/trau/trau_sync.c b/src/trau/trau_sync.c index 4835f85..cf76706 100644 --- a/src/trau/trau_sync.c +++ b/src/trau/trau_sync.c @@ -32,6 +32,8 @@ #define S(x) (1 << (x)) #define MAX_TRAU_BYTES 160 +#define MAX_TRAU_SYNC_PATTERN 8 +#define PRIMARY_PATTERN 0 #define T_SYNC 1 @@ -286,16 +288,15 @@ ubit_t history[MAX_TRAU_BYTES*8+1]; /* +1 not required, but helps to expose bugs */ /*! index of next-to-be-written ubit in history */ unsigned int history_idx; - /*! the pattern we are trying to sync to */ - const struct sync_pattern *pattern; + /*! the pattern(s) we are trying to sync to */ + const struct sync_pattern *pattern[MAX_TRAU_SYNC_PATTERN]; /*! number of consecutive frames without sync */ unsigned int num_consecutive_errors; }; /* correlate the history (up to the last received bit) against the pattern */ -static int correlate_history_against_pattern(struct trau_rx_sync_state *tss) +static int correlate_history_against_pattern(struct trau_rx_sync_state *tss, const struct sync_pattern *pattern) { - const struct sync_pattern *pattern = tss->pattern; int i, start, num_wrong = 0; /* compute index of first bit in history array */ @@ -317,6 +318,33 @@ return num_wrong; } +/* correlate the history (up to the last received bit) against multiple patterns */ +static int correlate_history_against_patterns(struct trau_rx_sync_state *tss) +{ + size_t pat_index; + int num_wrong; + int num_wrong_best = MAX_TRAU_BYTES * 8; + + for (pat_index = PRIMARY_PATTERN; pat_index < MAX_TRAU_SYNC_PATTERN; pat_index++) { + const struct sync_pattern *pattern; + + pattern = tss->pattern[pat_index]; + if (!pattern) + continue; + num_wrong = correlate_history_against_pattern(tss, pattern); + + /* We cannot achieve a better result than 0 errors */ + if (num_wrong == 0) + return 0; + + /* Keep track on the best result */ + if (num_wrong < num_wrong_best) + num_wrong_best = num_wrong; + } + + return num_wrong_best; +} + /* add (append) one ubit to the history; wrap as needed */ static void rx_history_add_bit(struct trau_rx_sync_state *tss, ubit_t bit) { @@ -328,7 +356,7 @@ /* append bits to history. We assume that this does NOT wrap */ static void rx_history_add_bits(struct trau_rx_sync_state *tss, const ubit_t *bits, size_t n_bits) { - unsigned int frame_bits_remaining = tss->pattern->byte_len*8 - tss->history_idx; + unsigned int frame_bits_remaining = tss->pattern[PRIMARY_PATTERN]->byte_len*8 - tss->history_idx; OSMO_ASSERT(frame_bits_remaining >= n_bits); memcpy(&tss->history[tss->history_idx], bits, n_bits); tss->history_idx = tss->history_idx + n_bits; @@ -339,7 +367,7 @@ { ubit_t tmp[sizeof(tss->history)]; size_t history_size = sizeof(tss->history); - size_t pattern_bits = tss->pattern->byte_len*8; + size_t pattern_bits = tss->pattern[PRIMARY_PATTERN]->byte_len*8; size_t first_bit = (history_size + tss->history_idx - pattern_bits) % history_size; int i; @@ -388,7 +416,9 @@ int rc; rx_history_add_bit(tss, bit); - rc = correlate_history_against_pattern(tss); + + /* Apply only the primary pattern while waiting for the alignment */ + rc = correlate_history_against_pattern(tss, tss->pattern[PRIMARY_PATTERN]); if (!rc) { osmo_fsm_inst_state_chg(fi, FRAME_ALIGNED, 0, 0); /* treat remainder of input bits in correct state */ @@ -407,7 +437,7 @@ struct trau_rx_sync_state *tss = (struct trau_rx_sync_state *) fi->priv; /* dispatch aligned frame to user */ rx_history_align(tss); - tss->out_cb(tss->user_data, tss->history, tss->pattern->byte_len*8); + tss->out_cb(tss->user_data, tss->history, tss->pattern[PRIMARY_PATTERN]->byte_len*8); } static void trau_sync_aligned(struct osmo_fsm_inst *fi, uint32_t event, void *data) @@ -420,7 +450,7 @@ case TRAUSYNC_E_RX_BITS: ubb = data; while (ubb_length(ubb)) { - unsigned int frame_bits_remaining = tss->pattern->byte_len*8 - tss->history_idx; + unsigned int frame_bits_remaining = tss->pattern[PRIMARY_PATTERN]->byte_len*8 - tss->history_idx; if (ubb_length(ubb) < frame_bits_remaining) { /* frame not filled by this message; just add data */ rx_history_add_bits(tss, ubb_data(ubb), ubb_length(ubb)); @@ -430,8 +460,8 @@ rx_history_add_bits(tss, ubb_data(ubb), frame_bits_remaining); ubb_pull(ubb, frame_bits_remaining); - /* check if we still have frame sync */ - rc = correlate_history_against_pattern(tss); + /* check if we still have frame sync using the primary and all secondary patterns */ + rc = correlate_history_against_patterns(tss); if (rc > 0) { tss->num_consecutive_errors++; if (tss->num_consecutive_errors >= 3) { @@ -551,7 +581,7 @@ tss->out_cb = frame_out_cb; tss->user_data = user_data; - tss->pattern = &sync_patterns[pat_id]; + tss->pattern[PRIMARY_PATTERN] = &sync_patterns[pat_id]; /* An unusued E1 timeslot normally would send an idle signal that * has all bits set to one. In order to prevent false-positive @@ -566,7 +596,25 @@ { struct trau_rx_sync_state *tss = fi->priv; - tss->pattern = &sync_patterns[pat_id]; + /* Clear the pattern list to get rid of all secondary pattern settings */ + memset(tss->pattern, 0, sizeof(tss->pattern)); + + /* Set the primary pattern and reset the FSM */ + tss->pattern[PRIMARY_PATTERN] = &sync_patterns[pat_id]; + osmo_fsm_inst_state_chg(fi, FRAME_ALIGNMENT_LOST, 0, 0); +} + +void osmo_trau_sync_set_secondary_pat(struct osmo_fsm_inst *fi, enum osmo_trau_sync_pat_id pat_id, size_t pat_index) +{ + struct trau_rx_sync_state *tss = fi->priv; + + OSMO_ASSERT(pat_index > PRIMARY_PATTERN); + OSMO_ASSERT(pat_index < ARRAY_SIZE(tss->pattern)); + + /* Make sure that only a pattern of the same size can be set as secondary pattern */ + OSMO_ASSERT(tss->pattern[PRIMARY_PATTERN]->byte_len == sync_patterns[pat_id].byte_len); + + tss->pattern[pat_index] = &sync_patterns[pat_id]; osmo_fsm_inst_state_chg(fi, FRAME_ALIGNMENT_LOST, 0, 0); } -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/31315 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Id7de21b2de7d02ae5a8f3cbc003aa7974651a289 Gerrit-Change-Number: 31315 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmocom-bb[master]: trxcon: move AMR mode setting to l1sched_lchan_set_amr_cfg()
by pespin 14 Feb '23

14 Feb '23
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/31115 ) Change subject: trxcon: move AMR mode setting to l1sched_lchan_set_amr_cfg() ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/31115 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ia9504d6194a4aac6256f7d4caf73eb42bb58563e Gerrit-Change-Number: 31115 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 14 Feb 2023 08:29:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libosmo-abis[master]: e1_input: add timeslot type NONE
by pespin 14 Feb '23

14 Feb '23
Attention is currently required from: dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/31307 ) Change subject: e1_input: add timeslot type NONE ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/31307 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I073cfaba0d5073447842f22665e213135ea3f635 Gerrit-Change-Number: 31307 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 14 Feb 2023 08:27:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmocom-bb[master]: trxcon: make l1sched_a5_burst_dec() accept l1sched_burst_ind
by osmith 14 Feb '23

14 Feb '23
Attention is currently required from: laforge, fixeria. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/31114 ) Change subject: trxcon: make l1sched_a5_burst_dec() accept l1sched_burst_ind ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/31114 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I5dd16cff1c9730a496748681842f571d25653cb9 Gerrit-Change-Number: 31114 Gerrit-PatchSet: 2 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-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 14 Feb 2023 08:23:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmocom-bb[master]: trxcon: move AMR mode setting to l1sched_lchan_set_amr_cfg()
by fixeria 14 Feb '23

14 Feb '23
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/31115 ) Change subject: trxcon: move AMR mode setting to l1sched_lchan_set_amr_cfg() ...................................................................... Patch Set 1: (1 comment) File src/host/trxcon/src/trxcon_fsm.c: https://gerrit.osmocom.org/c/osmocom-bb/+/31115/comment/c4178779_3397ffd7 PS1, Line 453: l1sched_lchan_set_amr_cfg(lchan, > whatever, what I mean is that you are changing the behavior here silently, marking stuff as applied […] Done -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/31115 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ia9504d6194a4aac6256f7d4caf73eb42bb58563e Gerrit-Change-Number: 31115 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 14 Feb 2023 00:22:13 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in osmocom-bb[master]: trxcon: move AMR mode setting to l1sched_lchan_set_amr_cfg()
by fixeria 14 Feb '23

14 Feb '23
Attention is currently required from: fixeria. Hello Jenkins Builder, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmocom-bb/+/31115 to look at the new patch set (#2). Change subject: trxcon: move AMR mode setting to l1sched_lchan_set_amr_cfg() ...................................................................... trxcon: move AMR mode setting to l1sched_lchan_set_amr_cfg() Change-Id: Ia9504d6194a4aac6256f7d4caf73eb42bb58563e --- M src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h M src/host/trxcon/src/sched_trx.c M src/host/trxcon/src/trxcon_fsm.c 3 files changed, 34 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/15/31115/2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/31115 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ia9504d6194a4aac6256f7d4caf73eb42bb58563e Gerrit-Change-Number: 31115 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-ttcn3-hacks[master]: library/DIAMETER_Emulation: initiate CER/CEA exchange in client mode
by laforge 13 Feb '23

13 Feb '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31292 ) Change subject: library/DIAMETER_Emulation: initiate CER/CEA exchange in client mode ...................................................................... library/DIAMETER_Emulation: initiate CER/CEA exchange in client mode Change-Id: I7537b306c2a569e2232597f21e15d3cf4ec9a12c Related: SYS#5602, SYS#6333 --- M library/DIAMETER_Emulation.ttcn 1 file changed, 14 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/library/DIAMETER_Emulation.ttcn b/library/DIAMETER_Emulation.ttcn index f16acae..6eb72ad 100644 --- a/library/DIAMETER_Emulation.ttcn +++ b/library/DIAMETER_Emulation.ttcn @@ -276,13 +276,14 @@ } function main(DIAMETEROps ops, DIAMETER_conn_parameters p, charstring id) runs on DIAMETER_Emulation_CT { + var boolean server_mode := p.remote_sctp_port == -1; var Result res; g_diameter_id := id; f_imsi_table_init(); f_expect_table_init(); map(self:DIAMETER, system:DIAMETER_CODEC_PT); - if (p.remote_sctp_port == -1) { + if (server_mode) { res := DIAMETER_CodecPort_CtrlFunct.f_IPL4_listen(DIAMETER, p.local_ip, p.local_sctp_port, { sctp := valueof(ts_SCTP) }); } else { res := DIAMETER_CodecPort_CtrlFunct.f_IPL4_connect(DIAMETER, p.remote_ip, p.remote_sctp_port, @@ -294,6 +295,18 @@ } g_diameter_conn_id := res.connId; + /* If in client mode, send CER immediately */ + if (not server_mode) { + var template (value) PDU_DIAMETER req; + var PDU_DIAMETER rsp; + + req := ts_DIA_CER(f_inet_addr(p.local_ip), p.vendor_app_id, + orig_host := p.origin_host, orig_realm := p.origin_realm); + rsp := f_diameter_xceive(req, tr_DIAMETER_A(Capabilities_Exchange, req.application_id)); + /* notify our user that the CER->CEA exchange has happened */ + DIAMETER_UNIT.send(DiameterCapabilityExchgInd:{rx := rsp, tx := valueof(req)}); + } + while (true) { var DIAMETER_ConnHdlr vc_conn; var template IMSI imsi_t; -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31292 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: I7537b306c2a569e2232597f21e15d3cf4ec9a12c Gerrit-Change-Number: 31292 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-ttcn3-hacks[master]: library: fix f_diameter_xceive(): start timer T
by laforge 13 Feb '23

13 Feb '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31321 ) Change subject: library: fix f_diameter_xceive(): start timer T ...................................................................... library: fix f_diameter_xceive(): start timer T Change-Id: Ibf98bc942813641063a8da49d9da5c2e27aad57a Related: SYS#5602, SYS#6333 --- M library/DIAMETER_Emulation.ttcn 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/library/DIAMETER_Emulation.ttcn b/library/DIAMETER_Emulation.ttcn index d9d9f7a..f16acae 100644 --- a/library/DIAMETER_Emulation.ttcn +++ b/library/DIAMETER_Emulation.ttcn @@ -258,6 +258,7 @@ var DIAMETER_RecvFrom mrf; DIAMETER.send(t_DIAMETER_Send(g_diameter_conn_id, tx)); + T.start; alt { [] DIAMETER.receive(tr_DIAMETER_RecvFrom_R(rx_t)) -> value mrf { } [] DIAMETER.receive(tr_DIAMETER_RecvFrom_R(?)) -> value mrf { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31321 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: Ibf98bc942813641063a8da49d9da5c2e27aad57a Gerrit-Change-Number: 31321 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-ttcn3-hacks[master]: library: f_diameter_xceive(): fix no matching alt
by laforge 13 Feb '23

13 Feb '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31291 ) Change subject: library: f_diameter_xceive(): fix no matching alt ...................................................................... library: f_diameter_xceive(): fix no matching alt Currently an unexpected PDU will trigger a DTE (no matching alt). Let's add an additional wildcard alt and terminate grecefully. Change-Id: I6dbc646d5f036f454f197137373796f40c4c9e74 Related: SYS#5602, SYS#6333 --- M library/DIAMETER_Emulation.ttcn 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/library/DIAMETER_Emulation.ttcn b/library/DIAMETER_Emulation.ttcn index 09f92be..d9d9f7a 100644 --- a/library/DIAMETER_Emulation.ttcn +++ b/library/DIAMETER_Emulation.ttcn @@ -260,6 +260,10 @@ DIAMETER.send(t_DIAMETER_Send(g_diameter_conn_id, tx)); alt { [] DIAMETER.receive(tr_DIAMETER_RecvFrom_R(rx_t)) -> value mrf { } + [] DIAMETER.receive(tr_DIAMETER_RecvFrom_R(?)) -> value mrf { + setverdict(fail, "Rx unexpected DIAMETER PDU: ", mrf); + mtc.stop; + } [] DIAMETER.receive(tr_SctpAssocChange) { repeat; } [] DIAMETER.receive(tr_SctpPeerAddrChange) { repeat; } [] T.timeout { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31291 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: I6dbc646d5f036f454f197137373796f40c4c9e74 Gerrit-Change-Number: 31291 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • ...
  • 261
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.