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

January 2025

  • 1 participants
  • 1491 discussions
[S] Change in osmocom-bb[master]: trx_toolkit/clck_gen: Fix clock generator to emit ticks with exactly ...
by fixeria 22 Jan '25

22 Jan '25
Attention is currently required from: kirr. fixeria has posted comments on this change by kirr. ( https://gerrit.osmocom.org/c/osmocom-bb/+/39392?usp=email ) Change subject: trx_toolkit/clck_gen: Fix clock generator to emit ticks with exactly GSM frame period ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/39392?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ie12fbe8138bac1398805fa270b869e7a333fcba0 Gerrit-Change-Number: 39392 Gerrit-PatchSet: 1 Gerrit-Owner: kirr <kirr(a)nexedi.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: osmith <osmith(a)sysmocom.de> Gerrit-Attention: kirr <kirr(a)nexedi.com> Gerrit-Comment-Date: Wed, 22 Jan 2025 12:04:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in osmocom-bb[master]: trx_toolkit/clck_gen: Fix clock generator to emit ticks with exactly ...
by pespin 22 Jan '25

22 Jan '25
Attention is currently required from: kirr. pespin has posted comments on this change by kirr. ( https://gerrit.osmocom.org/c/osmocom-bb/+/39392?usp=email ) Change subject: trx_toolkit/clck_gen: Fix clock generator to emit ticks with exactly GSM frame period ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/39392?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ie12fbe8138bac1398805fa270b869e7a333fcba0 Gerrit-Change-Number: 39392 Gerrit-PatchSet: 1 Gerrit-Owner: kirr <kirr(a)nexedi.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: osmith <osmith(a)sysmocom.de> Gerrit-Attention: kirr <kirr(a)nexedi.com> Gerrit-Comment-Date: Wed, 22 Jan 2025 11:57:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in osmocom-bb[master]: trx_toolkit/clck_gen: Fix clock generator to emit ticks with exactly ...
by kirr 22 Jan '25

22 Jan '25
kirr has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/39392?usp=email ) Change subject: trx_toolkit/clck_gen: Fix clock generator to emit ticks with exactly GSM frame period ...................................................................... trx_toolkit/clck_gen: Fix clock generator to emit ticks with exactly GSM frame period Since fake_trx beginning in 3187c8e6 (target/fake_trx: initial release of virtual transceiver) CLCKGen was tuned to emitting ticks with sleep period being time of 1 GSM frame _decreased_ a bit by "Average loop back delay". The idea for this decrease probably was to compensate the time spent in each tick handler, so that combined sleep + tick work would occupy time of 1 GSM frame more or less. The idea of using hardcoded compensation turned out to be not very good, because for the overall tick period to be exactly as defined the compensation should be dynamic and take into account time spent in each tick handler. For example on one machine "loopback delay" is one value, while on another it will be another value. And if we attach more work to tick handler, like it already happened with adding tx queue, the compensation needs to take all that into account as well. abc63d8d (trx_toolkit/clck_gen.py: Fix clock generator not to accumulate timing error) explains the problem in detail and adds dynamic compensation so that the tick period stays as defined instead of drifting. But it missed to adjust CLCKgen to stop decreasing desired tick period a bit by "average loop back delay". So after that patch, because CLCKgen now follows desired period without drifting, its period was 4.615ms - 0.09ms instead of exact 4.615ms, which resulted in e.g. fake_trx and bts-trx clocks to become constantly dissynchronized with the following emitted by bts-trx non-stop: 20250122135431420 <0006> scheduler_trx.c:576 GSM clock skew: old fn=0, new fn=102 20250122135431882 <0006> scheduler_trx.c:604 We were 3 FN slower than TRX, compensated 20250122135432344 <0006> scheduler_trx.c:604 We were 2 FN slower than TRX, compensated 20250122135432805 <0006> scheduler_trx.c:604 We were 2 FN slower than TRX, compensated 20250122135433267 <0006> scheduler_trx.c:604 We were 2 FN slower than TRX, compensated 20250122135433728 <0006> scheduler_trx.c:604 We were 2 FN slower than TRX, compensated 20250122135434190 <0006> scheduler_trx.c:604 We were 2 FN slower than TRX, compensated 20250122135434651 <0006> scheduler_trx.c:604 We were 2 FN slower than TRX, compensated 20250122135435113 <0006> scheduler_trx.c:604 We were 2 FN slower than TRX, compensated 20250122135435575 <0006> scheduler_trx.c:604 We were 2 FN slower than TRX, compensated 20250122135436036 <0006> scheduler_trx.c:604 We were 2 FN slower than TRX, compensated 20250122135436498 <0006> scheduler_trx.c:604 We were 2 FN slower than TRX, compensated 20250122135436959 <0006> scheduler_trx.c:604 We were 2 FN slower than TRX, compensated 20250122135437421 <0006> scheduler_trx.c:604 We were 2 FN slower than TRX, compensated ... What happens here is that there are ~ 216 GSM frames every second, and since fake_trx drifts by 0.09ms every frame, it results in drifting by ~ 20ms every second. Which results in "2 FN slower than TRX" emitted approximately twice per second as above log excerpt confirms. -> Fix this by adjusting CLCKgen to emit ticks with exactly GSM frame period by default. Change-Id: Ie12fbe8138bac1398805fa270b869e7a333fcba0 --- M src/target/trx_toolkit/clck_gen.py M src/target/trx_toolkit/test_clck_gen.py 2 files changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/92/39392/1 diff --git a/src/target/trx_toolkit/clck_gen.py b/src/target/trx_toolkit/clck_gen.py index bf56f64..c6da8f6 100755 --- a/src/target/trx_toolkit/clck_gen.py +++ b/src/target/trx_toolkit/clck_gen.py @@ -34,9 +34,6 @@ SEC_DELAY_US = 1000 * 1000 GSM_FRAME_US = 4615.0 - # Average loop back delay - LO_DELAY_US = 90.0 - def __init__(self, clck_links, clck_start = 0, ind_period = 102): # This event is needed to control the thread self._breaker = threading.Event() @@ -47,7 +44,7 @@ self.clck_start = clck_start # Calculate counter time - self.ctr_interval = self.GSM_FRAME_US - self.LO_DELAY_US + self.ctr_interval = self.GSM_FRAME_US self.ctr_interval /= self.SEC_DELAY_US # (Optional) clock consumer diff --git a/src/target/trx_toolkit/test_clck_gen.py b/src/target/trx_toolkit/test_clck_gen.py index a920ce1..92e5e55 100644 --- a/src/target/trx_toolkit/test_clck_gen.py +++ b/src/target/trx_toolkit/test_clck_gen.py @@ -63,6 +63,11 @@ finally: clck.stop() + # verify that default tick interval is 1 TDMA frame exactly + def test_period_is_gsm_frame(self): + clck = clck_gen.CLCKGen([]) + self.assertEqual(clck.ctr_interval, 4.615e-3) + if __name__ == '__main__': unittest.main() -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/39392?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ie12fbe8138bac1398805fa270b869e7a333fcba0 Gerrit-Change-Number: 39392 Gerrit-PatchSet: 1 Gerrit-Owner: kirr <kirr(a)nexedi.com> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: osmith <osmith(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in ...osmo-s1gw[master]: s1ap_proxy: cosmetic: fix wrong arity in comment
by fixeria 22 Jan '25

22 Jan '25
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39387?usp=email ) Change subject: s1ap_proxy: cosmetic: fix wrong arity in comment ...................................................................... s1ap_proxy: cosmetic: fix wrong arity in comment Change-Id: Idfe81c8905a61a23f2a44057ddcf17184e75b85f --- M src/s1ap_proxy.erl 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/s1ap_proxy.erl b/src/s1ap_proxy.erl index 3414e79..365f141 100644 --- a/src/s1ap_proxy.erl +++ b/src/s1ap_proxy.erl @@ -574,7 +574,7 @@ %% Iterate over the given list of 'ProtocolIE-Field' IEs, -%% calling function handle_ie/1 for IEs matching the given IEI. +%% calling function handle_ie/3 for IEs matching the given IEI. %% Additionally look for {MME,eNB}-UE-S1AP-ID IEs and store their values. -type handle_ies_result() :: {ok, list()} | {error, term()}. -spec handle_ies(s1ap_ie_id(), list(), proxy_state()) -> {handle_ies_result(), proxy_state()}. -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39387?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: Idfe81c8905a61a23f2a44057ddcf17184e75b85f Gerrit-Change-Number: 39387 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in ...osmo-s1gw[master]: s1ap_proxy: fix IEI path leak in handle_ies/4
by fixeria 22 Jan '25

22 Jan '25
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39388?usp=email ) Change subject: s1ap_proxy: fix IEI path leak in handle_ies/4 ...................................................................... s1ap_proxy: fix IEI path leak in handle_ies/4 Function handle_ies/3 prepends a new item to the IEI path and calls function handle_ies/4. The later was expected to remove that item from the IEI path upon returning the new #proxy_state. This was done correctly in the successful scenario, however the error case was overlooked in 00f51fe. As a result of this, whenever handle_ie/3 returns an error, the IEI path is not properly cleaned and stale IEIs remain in the #proxy_state. Fix this by removing the head IEI in the same place where we push it. Change-Id: I64629a215c05e8d577a8943ae872945d61b5107c Fixes: 00f51fe ("s1ap_proxy: handle_ies(): pass IEI path to handle_ie()") Related: SYS#7288 --- M src/s1ap_proxy.erl 1 file changed, 8 insertions(+), 5 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve osmith: Looks good to me, approved fixeria: Verified Jenkins Builder: Verified diff --git a/src/s1ap_proxy.erl b/src/s1ap_proxy.erl index 365f141..f04fb61 100644 --- a/src/s1ap_proxy.erl +++ b/src/s1ap_proxy.erl @@ -578,8 +578,12 @@ %% Additionally look for {MME,eNB}-UE-S1AP-ID IEs and store their values. -type handle_ies_result() :: {ok, list()} | {error, term()}. -spec handle_ies(s1ap_ie_id(), list(), proxy_state()) -> {handle_ies_result(), proxy_state()}. -handle_ies(IEI, IEs, #proxy_state{path = P} = S) -> - handle_ies([], IEI, IEs, S#proxy_state{path = [IEI | P]}). +handle_ies(IEI, IEs, #proxy_state{path = P} = S0) -> + %% prepend IEI to the path and call handle_ies/4 + {Result, S1} = handle_ies([], IEI, IEs, + S0#proxy_state{path = [IEI | P]}), + %% remove IEI from the path and return the result + {Result, S1#proxy_state{path = P}}. handle_ies(Acc, IEI, [IE | IEs], #proxy_state{path = P} = S0) -> @@ -610,10 +614,9 @@ handle_ies([IE | Acc], IEI, IEs, S0) end; -handle_ies(Acc, IEI, [], - #proxy_state{path = [IEI | P]} = S) -> +handle_ies(Acc, _IEI, [], S) -> IEs = lists:reverse(Acc), - {{ok, IEs}, S#proxy_state{path = P}}. + {{ok, IEs}, S}. build_erab_setup_response_failure(#proxy_state{erabs = ERABs, -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39388?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I64629a215c05e8d577a8943ae872945d61b5107c Gerrit-Change-Number: 39388 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in ...osmo-s1gw[master]: s1ap_proxy: fix IEI path leak in handle_ies/4
by osmith 22 Jan '25

22 Jan '25
Attention is currently required from: fixeria, laforge. osmith has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39388?usp=email ) Change subject: s1ap_proxy: fix IEI path leak in handle_ies/4 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39388?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I64629a215c05e8d577a8943ae872945d61b5107c Gerrit-Change-Number: 39388 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> 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: Wed, 22 Jan 2025 10:13:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in ...osmo-s1gw[master]: s1ap_proxy: fix IEI path leak in handle_ies/4
by fixeria 21 Jan '25

21 Jan '25
Attention is currently required from: laforge, osmith. fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39388?usp=email ) Change subject: s1ap_proxy: fix IEI path leak in handle_ies/4 ...................................................................... Patch Set 1: Verified+1 (1 comment) Patchset: PS1: The customer has reported that this patch fixes the problem. -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39388?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I64629a215c05e8d577a8943ae872945d61b5107c Gerrit-Change-Number: 39388 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Tue, 21 Jan 2025 16:53:45 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in pysim[master]: global_platform: add new command "install_cap"
by fixeria 21 Jan '25

21 Jan '25
Attention is currently required from: dexter, laforge. fixeria has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/39199?usp=email ) Change subject: global_platform: add new command "install_cap" ...................................................................... Patch Set 8: Code-Review+1 (2 comments) File docs/cap-tutorial.rst: https://gerrit.osmocom.org/c/pysim/+/39199/comment/33ed55df_7175f973?usp=em… : PS7, Line 5: support > Done The phrasing is still weird here. You write "cards [do] support ... support" (support twice). The "do support" was fine, I would remove the second "support". File pySim/global_platform/__init__.py: https://gerrit.osmocom.org/c/pysim/+/39199/comment/1b671f5b_96633546?usp=em… : PS8, Line 865: add_mutually_exclusive_group() Do we require at least one argument to be supplied? Or not? (Asking to be sure) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/39199?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I6cbd37f0fad5579b20e83c27349bd5acc129e6d0 Gerrit-Change-Number: 39199 Gerrit-PatchSet: 8 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 21 Jan 2025 16:52:35 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
1 0
0 0
[L] Change in libosmo-sigtran[master]: AS loadsharing: Initial routing implementation based on extended-SLS
by pespin 21 Jan '25

21 Jan '25
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39377?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: AS loadsharing: Initial routing implementation based on extended-SLS ...................................................................... AS loadsharing: Initial routing implementation based on extended-SLS This commit adds a new set of APIs and structs to support routing based on OPC,DPC,SLS fields and hence to support AS-loadshare. The routing decision is still actually left as beforehand, ie. the first AS/linkset in the combined_linkset is selected. This will allow future work, i.e to: - Check if data can be sent over the combined link (at least one AS/linkset is ACTIVE), and otherwise try using a combined link with a less specific match (shorter prefix mask or/and lower priority). - Select one of the AS/linksets in the combined link based on a round robin approach. Related: SYS#7112 Change-Id: I0fb4ca4959096f748a23082efa0481300de56436 --- M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7_combined_linkset.c M src/osmo_ss7_hmrt.c M src/osmo_ss7_instance.c M src/osmo_ss7_route.c M src/osmo_ss7_route_table.c M src/osmo_ss7_vty.c M src/sccp_scrc.c M src/ss7_combined_linkset.h M src/ss7_instance.h M src/ss7_route.h M src/ss7_route_table.h M src/xua_rkm.c M src/xua_snm.c M tests/ss7/ss7_test.c M tests/vty/osmo_stp_test.vty 16 files changed, 280 insertions(+), 42 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/77/39377/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39377?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I0fb4ca4959096f748a23082efa0481300de56436 Gerrit-Change-Number: 39377 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder
1 0
0 0
[M] Change in libosmo-sigtran[master]: AS loadsharing: Implement AS loadshare, skip unavailable AS/lset when...
by pespin 21 Jan '25

21 Jan '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39391?usp=email ) Change subject: AS loadsharing: Implement AS loadshare, skip unavailable AS/lset when choosing ...................................................................... AS loadsharing: Implement AS loadshare, skip unavailable AS/lset when choosing Pick normal route containing destination AS/lset to serve a given func(<OPC,DPC,SLS>)=eSLS on a round-robin base. If normal route becomes unavailable, pick an alternative route in a similar way. This alternative route will be used until itself becomes unavailable or the normal route becomes available again. Related: SYS#7112 Change-Id: I928fb1ef5db6922f1386a188e3fbf9e70780f25d --- M src/osmo_ss7_combined_linkset.c M src/osmo_ss7_link.c M src/osmo_ss7_linkset.c M src/osmo_ss7_route.c M src/ss7_combined_linkset.h M src/ss7_link.h M src/ss7_linkset.h M tests/ss7/ss7_test.c 8 files changed, 92 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/91/39391/1 diff --git a/src/osmo_ss7_combined_linkset.c b/src/osmo_ss7_combined_linkset.c index ed0fc79..23b3ae0 100644 --- a/src/osmo_ss7_combined_linkset.c +++ b/src/osmo_ss7_combined_linkset.c @@ -49,6 +49,20 @@ * link set) or of an alternative link set (combined link set)." *****************************************************************************/ +static inline struct llist_head *_ss7_llist_round_robin(struct llist_head *list, void **state) +{ + struct llist_head *e = *state; + if (!e || e->next == list) + e = list; + e = e->next; + if (e == list) + e = NULL; + *state = e; + return e; +} +#define ss7_llist_round_robin(list, state, struct_type, entry_name) \ + llist_entry(_ss7_llist_round_robin(list, state), struct_type, entry_name) + /*! \brief Insert combined_link into its routing table * \param[in] clset Combined link to be inserted into its routing table * \returns 0 on success, negative on error @@ -135,6 +149,14 @@ clset->esls_table[i].alt_rt = NULL; } + /* Update round robin state */ + if (rt == clset->last_route_roundrobin) { + ss7_llist_round_robin(&clset->routes, &clset->last_route_roundrobin, struct osmo_ss7_route, list); + /* If there's only one left, remove state: */ + if (rt == clset->last_route_roundrobin) + clset->last_route_roundrobin = NULL; + } + llist_del(&rt->list); rt->clset = NULL; clset->num_routes--; @@ -172,6 +194,27 @@ return NULL; } +static struct osmo_ss7_route *ss7_combined_linkset_select_route_roundrobin(struct osmo_ss7_combined_linkset *clset) +{ + struct osmo_ss7_route *rt; + struct osmo_ss7_route *rt_found = NULL; + unsigned int i = 0; + + while (i < clset->num_routes) { + i++; + rt = ss7_llist_round_robin(&clset->routes, &clset->last_route_roundrobin, struct osmo_ss7_route, list); + if (ss7_route_is_available(rt)) { + rt_found = rt; + break; + } + } + + if (!rt_found) + return NULL; + + return rt_found; +} + struct osmo_ss7_route * ss7_combined_linkset_lookup_route(struct osmo_ss7_combined_linkset *clset, const struct osmo_ss7_route_label *rtlabel) { @@ -192,20 +235,20 @@ return rt; } - /* TODO: Check if the AS/linkset in rt is actually UP and can be - * used, otherwise start ITU Q.704 section 7 "forced rerouting" prcoedure: - * we need to pick a temporary dst (update the esls_table entry) while the - * original one is DOWN. */ + /* No current route available, try to find a new current route: */ - /* We need to pick a new AS/linkset from the combined linkset and cache - * it so it is always used for this eSLS: */ - /* FIXME: for now we simply take the first AS in the combined linksed, to be improved later... */ - rt = llist_first_entry_or_null(&clset->routes, struct osmo_ss7_route, list); + /* No normal route selected yet: */ + if (!eslse->normal_rt) { + rt = ss7_combined_linkset_select_route_roundrobin(clset); + /* Either a normal route was selected or none found: */ + eslse->normal_rt = rt; + return rt; + } - /* TODO: here we'd need to actually check if dst AS/linkset in the route - * is actually UP, otherwise pick next one in the roundrobin list... */ + /* Normal route unavailable and no alternative route (or unavailable too). + * start ITU Q.704 section 7 "forced rerouting" procedure: */ + rt = ss7_combined_linkset_select_route_roundrobin(clset); if (rt) - clset->esls_table[esls].normal_rt = rt; - + eslse->alt_rt = rt; return rt; } diff --git a/src/osmo_ss7_link.c b/src/osmo_ss7_link.c index 321d72e..6310824 100644 --- a/src/osmo_ss7_link.c +++ b/src/osmo_ss7_link.c @@ -75,3 +75,11 @@ return link; } + +/* Whether link is available, ITU Q.704 section 3.2 */ +bool +ss7_link_is_available(const struct osmo_ss7_link *link) +{ + /* TODO: manage operational availability of a link... */ + return link->cfg.adm_state == OSMO_SS7_LS_ENABLED; +} diff --git a/src/osmo_ss7_linkset.c b/src/osmo_ss7_linkset.c index 5b4b316..8f63505 100644 --- a/src/osmo_ss7_linkset.c +++ b/src/osmo_ss7_linkset.c @@ -101,3 +101,14 @@ return lset; } + +bool +ss7_linkset_is_available(const struct osmo_ss7_linkset *lset) +{ + for (unsigned int i = 0; i < ARRAY_SIZE(lset->links); i++) { + struct osmo_ss7_link *link = lset->links[i]; + if (link && ss7_link_is_available(link)) + return true; + } + return false; +} diff --git a/src/osmo_ss7_route.c b/src/osmo_ss7_route.c index 9683dd3..194d5dd 100644 --- a/src/osmo_ss7_route.c +++ b/src/osmo_ss7_route.c @@ -306,12 +306,9 @@ bool ss7_route_is_available(const struct osmo_ss7_route *rt) { OSMO_ASSERT(rt); - if (rt->dest.as) { - if (osmo_ss7_as_active(rt->dest.as)) - return true; - - } else { - /* TODO: linkset */ - } + if (rt->dest.as) + return osmo_ss7_as_active(rt->dest.as); + if (rt->dest.linkset) + return ss7_linkset_is_available(rt->dest.linkset); return false; } diff --git a/src/ss7_combined_linkset.h b/src/ss7_combined_linkset.h index e2f9c9d..b80a007 100644 --- a/src/ss7_combined_linkset.h +++ b/src/ss7_combined_linkset.h @@ -33,6 +33,7 @@ /*! list of \ref osmo_ss7_route */ struct llist_head routes; unsigned int num_routes; + void *last_route_roundrobin; struct { uint32_t pc; diff --git a/src/ss7_link.h b/src/ss7_link.h index 5ea6556..b0014c6 100644 --- a/src/ss7_link.h +++ b/src/ss7_link.h @@ -31,3 +31,5 @@ void ss7_link_destroy(struct osmo_ss7_link *link); struct osmo_ss7_link * ss7_link_find_or_create(struct osmo_ss7_linkset *lset, uint32_t id); +bool +ss7_link_is_available(const struct osmo_ss7_link *link); diff --git a/src/ss7_linkset.h b/src/ss7_linkset.h index daa442f..beb60a1 100644 --- a/src/ss7_linkset.h +++ b/src/ss7_linkset.h @@ -30,3 +30,6 @@ ss7_linkset_find_by_name(struct osmo_ss7_instance *inst, const char *name); struct osmo_ss7_linkset * ss7_linkset_find_or_create(struct osmo_ss7_instance *inst, const char *name, uint32_t pc); + +bool +ss7_linkset_is_available(const struct osmo_ss7_linkset *lset); diff --git a/tests/ss7/ss7_test.c b/tests/ss7/ss7_test.c index 95fa1b1..f61ee0a 100644 --- a/tests/ss7/ss7_test.c +++ b/tests/ss7/ss7_test.c @@ -154,6 +154,7 @@ { struct osmo_ss7_route_table *rtbl; struct osmo_ss7_linkset *lset_a, *lset_b; + struct osmo_ss7_link *l_a, *l_b; struct osmo_ss7_route *rt, *rt12, *rtdef; struct osmo_ss7_route_label route_label; @@ -173,8 +174,15 @@ lset_a = ss7_linkset_find_or_create(s7i, "a", 100); OSMO_ASSERT(lset_a); + l_a = ss7_link_find_or_create(lset_a, 0); + OSMO_ASSERT(l_a); + l_a->cfg.adm_state = OSMO_SS7_LS_ENABLED; + lset_b = ss7_linkset_find_or_create(s7i, "b", 200); OSMO_ASSERT(lset_b); + l_b = ss7_link_find_or_create(lset_b, 0); + OSMO_ASSERT(l_b); + l_b->cfg.adm_state = OSMO_SS7_LS_ENABLED; /* route with full mask */ route_label = RT_LABEL(0, 12, 0); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39391?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I928fb1ef5db6922f1386a188e3fbf9e70780f25d Gerrit-Change-Number: 39391 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • ...
  • 150
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.