pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39918?usp=email )
Change subject: stp: TC_tmt_loadshare*: Use new vty command 'binding-table reset'
......................................................................
stp: TC_tmt_loadshare*: Use new vty command 'binding-table reset'
Reset the eSLS binding table state before starting the test, to run it
with a clean state.
This test also fixes TC_unknown_client_dynamic_tmt_loadshare since it
now resets the table after connecting the 2nd dynamic ASP, which allows
re-distributing all seeds in the table into the new available set of
ASPs.
Depends: libosmo-sigtran.git Change-Id I56c34072a9ded42c13dbfc105a0ab3353ca353ec
Change-Id: I40b7724edcc06a3df641e316be4770d0e56bb72d
---
M stp/STP_Tests_IPA.ttcn
M stp/STP_Tests_M3UA.ttcn
2 files changed, 8 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/18/39918/1
diff --git a/stp/STP_Tests_IPA.ttcn b/stp/STP_Tests_IPA.ttcn
index 88c9312..66e7262 100644
--- a/stp/STP_Tests_IPA.ttcn
+++ b/stp/STP_Tests_IPA.ttcn
@@ -269,7 +269,8 @@
f_init_ipa();
- f_vty_config2(VTY, {"cs7 instance 0", "as " & mp_ipa_as_names[2] & " ipa"}, "traffic-mode loadshare");
+ f_vty_config3(VTY, {"cs7 instance 0", "as " & mp_ipa_as_names[2] & " ipa"},
+ { "traffic-mode loadshare", "binding-table reset" });
/* bring up the 'sender' side (single ASP in AS) */
f_connect_ipa(0, unknwon_dynamic_asp);
@@ -284,6 +285,10 @@
/* activate the second 'receiver' side ASP */
f_connect_ipa(3, unknwon_dynamic_asp);
+ /* Since we are using dynamic ASPs, they were unknown by STP until they got connected.
+ * Hence, reset the binding-table so that load is now properly spread among them: */
+ f_vty_config2(VTY, {"cs7 instance 0", "as " & mp_ipa_as_names[2] & " ipa"}, "binding-table reset" );
+
/* 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. */
diff --git a/stp/STP_Tests_M3UA.ttcn b/stp/STP_Tests_M3UA.ttcn
index ba44b3f..89be9e0 100644
--- a/stp/STP_Tests_M3UA.ttcn
+++ b/stp/STP_Tests_M3UA.ttcn
@@ -663,7 +663,8 @@
f_init_m3ua();
- f_vty_config2(VTY, {"cs7 instance 0", "as as-receiver m3ua"}, "traffic-mode loadshare");
+ f_vty_config3(VTY, {"cs7 instance 0", "as as-receiver m3ua"},
+ { "traffic-mode loadshare", "binding-table reset" });
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);
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39918?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I40b7724edcc06a3df641e316be4770d0e56bb72d
Gerrit-Change-Number: 39918
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39917?usp=email )
Change subject: vty: Introduce AS node cmd 'binding-table reset'
......................................................................
vty: Introduce AS node cmd 'binding-table reset'
This is useful when reconfiguring a deployed osmo-stp where new ASPs are
added/removed to the config, or when changing the binding seed
calculation to improve distribution based on current traffic.
This will also be used by tests validating loadshare feature, to start
with a clean state every time.
Change-Id: I56c34072a9ded42c13dbfc105a0ab3353ca353ec
---
M src/osmo_ss7_as.c
M src/osmo_ss7_vty.c
M src/ss7_as.h
3 files changed, 22 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/17/39917/1
diff --git a/src/osmo_ss7_as.c b/src/osmo_ss7_as.c
index 525f394..e84a36d 100644
--- a/src/osmo_ss7_as.c
+++ b/src/osmo_ss7_as.c
@@ -350,6 +350,15 @@
return asp;
}
+/* Reset loadshare bindings table. It will be filled in as needed.
+ * This is useful for instance when user changes the ASP set inside an AS, or
+ * changes the way the binding seed (eSLS) is calculated. */
+void ss7_as_loadshare_binding_table_reset(struct osmo_ss7_as *as)
+{
+ memset(&as->aesls_table[0], 0, sizeof(as->aesls_table));
+ as->cfg.last_asp_idx_assigned = 0;
+}
+
static as_ext_sls_t osmo_ss7_instance_calc_itu_as_ext_sls(const struct osmo_ss7_as *as, uint32_t opc, uint8_t sls)
{
uint16_t opc12;
diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index bcf3ffe..bf3bec2 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -2185,6 +2185,17 @@
return CMD_SUCCESS;
}
+DEFUN_ATTR(as_bindingtable_reset, as_bindingtable_reset_cmd,
+ "binding-table reset",
+ "AS Loadshare binding table operations\n"
+ "Reset loadshare binding table\n",
+ CMD_ATTR_IMMEDIATE)
+{
+ struct osmo_ss7_as *as = vty->index;
+ ss7_as_loadshare_binding_table_reset(as);
+ return CMD_SUCCESS;
+}
+
DEFUN_ATTR(as_recov_tout, as_recov_tout_cmd,
"recovery-timeout <1-2000>",
"Specifies the recovery timeout value in milliseconds\n"
@@ -3440,6 +3451,7 @@
install_lib_element(L_CS7_AS_NODE, &as_traf_mode_loadshare_cmd);
install_lib_element(L_CS7_AS_NODE, &as_no_traf_mode_cmd);
install_lib_element(L_CS7_AS_NODE, &as_sls_shift_cmd);
+ install_lib_element(L_CS7_AS_NODE, &as_bindingtable_reset_cmd);
install_lib_element(L_CS7_AS_NODE, &as_recov_tout_cmd);
install_lib_element(L_CS7_AS_NODE, &as_qos_class_cmd);
install_lib_element(L_CS7_AS_NODE, &as_rout_key_cmd);
diff --git a/src/ss7_as.h b/src/ss7_as.h
index 13592e9..bc17726 100644
--- a/src/ss7_as.h
+++ b/src/ss7_as.h
@@ -131,6 +131,7 @@
unsigned int osmo_ss7_as_count_asp(const struct osmo_ss7_as *as);
int ss7_as_add_asp(struct osmo_ss7_as *as, struct osmo_ss7_asp *asp);
+void ss7_as_loadshare_binding_table_reset(struct osmo_ss7_as *as);
#define LOGPAS(as, subsys, level, fmt, args ...) \
_LOGSS7((as)->inst, subsys, level, "AS(%s) " fmt, (as)->cfg.name, ## args)
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39917?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: I56c34072a9ded42c13dbfc105a0ab3353ca353ec
Gerrit-Change-Number: 39917
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Attention is currently required from: osmith.
pespin has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-ci/+/39912?usp=email )
Change subject: lint: run 'ruff' on various repositories
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/39912?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I5c2ede1a7b2a204ca3deb24c55008c7585c289a0
Gerrit-Change-Number: 39912
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 03 Apr 2025 12:16:04 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes