Attention is currently required from: pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39391?usp=email )
Change subject: AS loadsharing: Implement AS loadshare, skip unavailable AS/lset when choosing
......................................................................
Patch Set 9: Code-Review+1
--
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: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I928fb1ef5db6922f1386a188e3fbf9e70780f25d
Gerrit-Change-Number: 39391
Gerrit-PatchSet: 9
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 04 Mar 2025 15:40:33 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39672?usp=email )
Change subject: Log DPC with configured pointcode format upon routing failure
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39672?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: Iba19a6b4f8f739cdd836a480d099077ba4370c0f
Gerrit-Change-Number: 39672
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 04 Mar 2025 15:40:10 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: daniel, fixeria, laforge, osmith, pespin.
Hello Jenkins Builder, daniel, fixeria, laforge, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-sigtran/+/39396?usp=email
to look at the new patch set (#9).
The following approvals got outdated and were removed:
Code-Review+1 by laforge, Code-Review+1 by osmith, Verified+1 by Jenkins Builder
Change subject: ASP loadsharing: Pass ownership of Tx xua_msg down the stack [1/2]
......................................................................
ASP loadsharing: Pass ownership of Tx xua_msg down the stack [1/2]
This is a first step towards getting MTP OPC & SLS fields down the stack
so that they can be used to implement loadsharing at ASP level.
So far, we always encode the xua_msg (which holds the OPC and SLS info
into xua_msg->mtp) into a msgb before passing it to as->fi through event
XUA_AS_E_TRANSFER_REQ, which in turn calls xua_as_transmit_msg(as, msg).
This patch is part 1 of 2 patches, which only modifies mostly the
Tx path, but still requires modifications on Rx path (done in patch 2/2)
to properly handle the forwarding path from Rx to Tx without double
freeing. It is submitted in 2 parts to ease code reviewing.
Future patches will modify that code to pass a xua_msg and only
encode it into a msgb deeper into the stack after an ASP has been
selected and msg needs to be transmitted.
All previous calls to sua_tx_xua_asp() actually had a memory leak before
this change, hence why no xua_msg_free() is removed from callers in this
patch. Since now ownership is taken by sua_tx_xua_asp() which always
frees the xua msg, the memleak is fixed.
Related: SYS#7112
Change-Id: I49e718e624da08510a9c3d28bdb360c59f9a65d3
---
M src/ipa.c
M src/m3ua.c
M src/osmo_ss7_hmrt.c
M src/sua.c
4 files changed, 48 insertions(+), 19 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/96/39396/9
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39396?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: I49e718e624da08510a9c3d28bdb360c59f9a65d3
Gerrit-Change-Number: 39396
Gerrit-PatchSet: 9
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Attention is currently required from: osmith, pespin.
Hello Jenkins Builder, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-sigtran/+/39391?usp=email
to look at the new patch set (#9).
The following approvals got outdated and were removed:
Code-Review+1 by osmith, Verified+1 by Jenkins Builder
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_hmrt.c
M src/ss7_combined_linkset.h
M src/xua_snm.c
M tests/ss7/ss7_test.c
M tests/vty/osmo_stp_route_prio.vty
6 files changed, 67 insertions(+), 21 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/91/39391/9
--
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: newpatchset
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I928fb1ef5db6922f1386a188e3fbf9e70780f25d
Gerrit-Change-Number: 39391
Gerrit-PatchSet: 9
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Attention is currently required from: daniel, fixeria, laforge, pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39671?usp=email )
Change subject: sccp_user: Fix dynamic ASP not associated to AS
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39671?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I16371ef813c2e12993caae16a1626d10ae8ded54
Gerrit-Change-Number: 39671
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 04 Mar 2025 15:22:31 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: daniel, fixeria, laforge, osmith.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39671?usp=email )
Change subject: sccp_user: Fix dynamic ASP not associated to AS
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
This fixes regressions in HNBGW_Tests from today. I'll merge it later today if there's no review to avoid further failures.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39671?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I16371ef813c2e12993caae16a1626d10ae8ded54
Gerrit-Change-Number: 39671
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 04 Mar 2025 15:20:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: osmith.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/38731?usp=email )
Change subject: AS loadsharing: Introduce combined_linkset
......................................................................
Set Ready For Review
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/38731?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I500ec74ba975e3c93071771027e4e5fe6000e6f3
Gerrit-Change-Number: 38731
Gerrit-PatchSet: 11
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 04 Mar 2025 15:12:07 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39651?usp=email )
Change subject: stp: Fix brokeness in STP_Tests_M3UA.TC_tmt_loadshare
......................................................................
stp: Fix brokeness in STP_Tests_M3UA.TC_tmt_loadshare
The test was not even setting the traffic-mode in the IUT.
Furthermore, it was expecting pure round-robin behavior, which was the
older behavior of osmo-stp when loadshare traffic-mode was selected.
Actually split the test into 2, naming them properly (since round robin
is not a AS traffic mode in itself, but a possible implementation of the
loadshare traffic-mode.
The new test validates the usual loadshare traffic-mode based on SLS
distribution.
Related: SYS#7112
Depends: libosmo-sigtran.git Change-Id I61340549c596f1c04bc2269dbc165c327bf72037
Change-Id: I16d81cb2f88bb2927f248182ad4f8f27c8c24859
---
M stp/STP_Tests_M3UA.ttcn
M stp/expected-results.xml
2 files changed, 107 insertions(+), 9 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
Jenkins Builder: Verified
osmith: Looks good to me, approved
diff --git a/stp/STP_Tests_M3UA.ttcn b/stp/STP_Tests_M3UA.ttcn
index 3fb3fc0..4a3da7c 100644
--- a/stp/STP_Tests_M3UA.ttcn
+++ b/stp/STP_Tests_M3UA.ttcn
@@ -585,24 +585,24 @@
}
}
-/* test "traffic-mode load-share" behavior */
-testcase TC_tmt_loadshare() runs on RAW_M3UA_CT {
+/* Test "traffic-mode roundrobin" behavior (distributing within ASPs of a given AS in roundrobin fashion). */
+testcase TC_tmt_loadshare_roundrobin() runs on RAW_M3UA_CT {
var integer i;
f_init_m3ua();
+ f_vty_config2(VTY, {"cs7 instance 0", "as as-receiver m3ua"}, "traffic-mode roundrobin");
+
var OCT4 rctx_sender := int2oct(f_m3ua_cli_config(0).routing_ctx, 4);
var OCT4 pc_sender := int2oct(f_m3ua_cli_config(0).point_code, 4);
var OCT4 rctx_receiver := int2oct(f_m3ua_cli_config(1).routing_ctx, 4);
var OCT4 pc_receiver := int2oct(f_m3ua_cli_config(1).point_code, 4);
- /* FIXME: configure the STP via VTY to set traffic-mode */
-
/* bring up the 'sender' side (single ASP in AS) */
f_M3UA_asp_up_act(0, omit, rctx_sender);
/* activate the first 'receiver' side ASP */
- f_M3UA_asp_up_act(1, c_M3UA_TMT_loadshare, omit); // TODO: rctx
+ f_M3UA_asp_up_act(1, c_M3UA_TMT_loadshare, rctx_receiver);
/* verify traffic is routed from sender to [sole] receiver */
for (i := 0; i < 10; i := i+1) {
@@ -610,12 +610,12 @@
}
/* activate the second 'receiver' side ASP (no NOTIFY) */
- f_M3UA_asp_up_act(2, c_M3UA_TMT_loadshare, omit, c_M3UA_ST_I_AS_ACTIVE, omit); // TODO: rctx
+ f_M3UA_asp_up_act(2, c_M3UA_TMT_loadshare, rctx_receiver, c_M3UA_ST_I_AS_ACTIVE, omit);
/* verify traffic is routed from sender to new receiver */
const integer iter_per_asp := 5;
var Integers num_rx := {};
- for (i := 0; i < g_m3ua_num_clients; i := i + 1) {
+ for (i := 0; i < 3; i := i + 1) {
num_rx := num_rx & {0};
}
for (i := 0; i < 2*iter_per_asp; i := i+1) {
@@ -640,6 +640,102 @@
setverdict(pass);
f_clear_m3ua();
+
+ f_vty_config2(VTY, {"cs7 instance 0", "as as-receiver m3ua"}, "no traffic-mode");
+}
+
+private altstep as_count_rx_sls(integer idx, template (present) PDU_M3UA exp, inout Integers sls_counter, inout integer rx_counter)
+runs on RAW_M3UA_CT {
+ var M3UA_RecvFrom rx;
+ [] M3UA[idx].receive(t_M3UA_RecvFrom(exp)) -> value rx {
+ var integer sls := oct2int(rx.msg.m3UA_DATA.messageParameters.protocol_Data.sLS);
+ sls_counter[sls] := sls_counter[sls] + 1;
+ rx_counter := rx_counter + 1;
+ }
+}
+
+/* Test "traffic-mode loadshare" behavior. Validates ASP Loadsharing scenario
+ * (distributing traffic within ASPs of one AS).
+ * NOTE: This test does not validate AS Loadsharing, (distributing traffic
+ * within linksets/ASs of a combined linkset). */
+testcase TC_tmt_loadshare_sls() runs on RAW_M3UA_CT {
+ var integer i;
+
+ f_init_m3ua();
+
+ f_vty_config2(VTY, {"cs7 instance 0", "as as-receiver m3ua"}, "traffic-mode loadshare");
+
+ var OCT4 rctx_sender := int2oct(f_m3ua_cli_config(0).routing_ctx, 4);
+ var OCT4 pc_sender := int2oct(f_m3ua_cli_config(0).point_code, 4);
+ var OCT4 rctx_receiver := int2oct(f_m3ua_cli_config(1).routing_ctx, 4);
+ var OCT4 pc_receiver := int2oct(f_m3ua_cli_config(1).point_code, 4);
+
+ /* bring up the 'sender' side (single ASP in AS) */
+ f_M3UA_asp_up_act(0, omit, rctx_sender);
+
+ /* activate the first 'receiver' side ASP */
+ f_M3UA_asp_up_act(1, c_M3UA_TMT_loadshare, rctx_receiver);
+
+ /* verify traffic is routed from sender to [sole] receiver */
+ for (i := 0; i < 10; i := i+1) {
+ f_test_traffic(0, rctx_sender, pc_sender, 1, rctx_receiver, pc_receiver);
+ }
+
+ /* activate the second 'receiver' side ASP (no NOTIFY) */
+ f_M3UA_asp_up_act(2, c_M3UA_TMT_loadshare, rctx_receiver, c_M3UA_ST_I_AS_ACTIVE, omit);
+
+ /* verify traffic is routed from sender to new receiver */
+ const integer iter_per_asp := 20;
+ const integer NUM_SLS := 16; /* SLS in ITU is 4 bits. */
+ var integer num_rx_1 := 0;
+ var integer num_rx_2 := 0;
+ var Integers sls_num_rx_1 := {};
+ var Integers sls_num_rx_2 := {};
+ for (i := 0; i < NUM_SLS; i := i + 1) {
+ sls_num_rx_1 := sls_num_rx_1 & {0};
+ sls_num_rx_2 := sls_num_rx_2 & {0};
+ }
+ for (i := 0; i < 2*iter_per_asp; i := i+1) {
+ var octetstring data := f_rnd_octstring_rnd_len(100);
+ var template (value) M3UA_Protocol_Data tx_pd;
+ var template (present) M3UA_Protocol_Data rx_pd;
+ /* Distribute traffic over ASPs based on SLS, since OPC is always the same.
+ * SLS in ITU is 4 bits. */
+ var OCT1 sls := int2oct(i mod 16, 1);
+ tx_pd := ts_M3UA_protocol_data(pc_sender, pc_receiver, '23'O, '00'O, '00'O, sls, data);
+ rx_pd := tr_M3UA_protocol_data(pc_sender, pc_receiver, '23'O, '00'O, '00'O, sls, data);
+ f_M3UA_send(0, ts_M3UA_DATA(rctx_sender, tx_pd), 1);
+ alt {
+ [] as_count_rx_sls(1, tr_M3UA_DATA(rctx_receiver, rx_pd), sls_num_rx_1, num_rx_1);
+ [] as_count_rx_sls(2, tr_M3UA_DATA(rctx_receiver, rx_pd), sls_num_rx_2, num_rx_2);
+ }
+ }
+
+ /* Make sure traffic was sent over both ASPs and that it was distributed: */
+ if (num_rx_1 == 0) {
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Rx 0 packets in 1st ASP!");
+ }
+ if (num_rx_2 == 0) {
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Rx 0 packets in 2nd ASP!");
+ }
+ if (num_rx_1 + num_rx_2 != 2*iter_per_asp) {
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+ log2str("Rx ", num_rx_1 + num_rx_2 ," packets in total vs exp ", 2*iter_per_asp));
+ }
+
+ /* Check that a given SLS is not forwarded to both ASPs: */
+ for (i := 0; i < NUM_SLS; i := i+1) {
+ if (sls_num_rx_1[i] > 0 and sls_num_rx_2[i] > 0) {
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+ log2str("Rx packets for SLS ", i, " in both ASPs!"));
+ }
+
+ }
+ setverdict(pass);
+
+ f_clear_m3ua();
+
+ f_vty_config2(VTY, {"cs7 instance 0", "as as-receiver m3ua"}, "no traffic-mode");
}
/* test "traffic-mode broadcast" behavior */
@@ -1414,7 +1510,8 @@
execute( TC_asp_act_loadshare() );
execute( TC_asp_act_broadcast() );
execute( TC_tmt_override() );
- execute( TC_tmt_loadshare() );
+ execute( TC_tmt_loadshare_roundrobin() );
+ execute( TC_tmt_loadshare_sls() );
execute( TC_tmt_broadcast() );
execute( TC_act_rctx_data_no_rctx() );
diff --git a/stp/expected-results.xml b/stp/expected-results.xml
index bc9c861..a764349 100644
--- a/stp/expected-results.xml
+++ b/stp/expected-results.xml
@@ -8,7 +8,8 @@
<testcase classname='STP_Tests_M3UA' name='TC_asp_act_loadshare' time='MASKED'/>
<testcase classname='STP_Tests_M3UA' name='TC_asp_act_broadcast' time='MASKED'/>
<testcase classname='STP_Tests_M3UA' name='TC_tmt_override' time='MASKED'/>
- <testcase classname='STP_Tests_M3UA' name='TC_tmt_loadshare' time='MASKED'/>
+ <testcase classname='STP_Tests_M3UA' name='TC_tmt_loadshare_roundrobin' time='MASKED'/>
+ <testcase classname='STP_Tests_M3UA' name='TC_tmt_loadshare_sls' time='MASKED'/>
<testcase classname='STP_Tests_M3UA' name='TC_tmt_broadcast' time='MASKED'/>
<testcase classname='STP_Tests_M3UA' name='TC_act_rctx_data_no_rctx' time='MASKED'/>
<testcase classname='STP_Tests_M3UA' name='TC_m3ua_tcp_cli' time='MASKED'/>
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39651?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I16d81cb2f88bb2927f248182ad4f8f27c8c24859
Gerrit-Change-Number: 39651
Gerrit-PatchSet: 6
Gerrit-Owner: pespin <pespin(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>