fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39864?usp=email )
Change subject: sctp_{client,server}: disable Nagle by setting sctp_nodelay
......................................................................
sctp_{client,server}: disable Nagle by setting sctp_nodelay
The Nagle's algorithm [1] works by combining a number of small outgoing
messages and sending them all at once. It's enabled by default when
opening a socket. While it helps to reduce the network congestion by
reducing the number of outgoing packets, it comes at the cost of
increased delay. Disable it by setting sctp_nodelay to true.
[1] https://en.wikipedia.org/wiki/Nagle%27s_algorithm
Change-Id: I6058a593a617d67d479eea0673d899a5da2d49bf
Related: SYS#7288
---
M src/sctp_client.erl
M src/sctp_server.erl
2 files changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/64/39864/1
diff --git a/src/sctp_client.erl b/src/sctp_client.erl
index 5875f61..de3fefb 100644
--- a/src/sctp_client.erl
+++ b/src/sctp_client.erl
@@ -101,6 +101,7 @@
connect({LocAddr, RemAddr}, Port) ->
{ok, Sock} = gen_sctp:open([{ip, LocAddr},
{type, seqpacket},
+ {sctp_nodelay, true},
{active, true}]),
gen_sctp:connect_init(Sock, RemAddr, Port, []),
{ok, Sock}.
diff --git a/src/sctp_server.erl b/src/sctp_server.erl
index 27752d8..e9066ac 100644
--- a/src/sctp_server.erl
+++ b/src/sctp_server.erl
@@ -111,6 +111,7 @@
{port, BindPort},
{type, seqpacket},
{reuseaddr, true},
+ {sctp_nodelay, true},
{active, true}]),
?LOG_INFO("SCTP server listening on ~w:~w", [BindAddr, BindPort]),
ok = gen_sctp:listen(Sock, true),
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39864?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: I6058a593a617d67d479eea0673d899a5da2d49bf
Gerrit-Change-Number: 39864
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: dexter.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/39863?usp=email )
Change subject: saip-tool: add commandline option to edit mandatory services list
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/39863?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: I120b98d4b0942c26674bc1365c5711101ec95235
Gerrit-Change-Number: 39863
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 27 Mar 2025 17:24:16 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: dexter, fixeria.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/39862?usp=email )
Change subject: saip-tool: allow removing of profile elements by type
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/39862?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: I92f9f9d5b4382242963f1b3ded814a0d013c4808
Gerrit-Change-Number: 39862
Gerrit-PatchSet: 1
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: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 27 Mar 2025 17:24:00 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: dexter.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/39860?usp=email )
Change subject: saip-tool: add features to add and remove applications profile elements
......................................................................
Patch Set 1:
(6 comments)
Patchset:
PS1:
In general what we're seeing is that it may probably make sense to eventually (at a later point, unrelated to this patch) switch to something like a 'saip-shell' which has various commands. This way the user could start saip-shell with a UPP in DER format, and then navigate the PEs, update/remove/reorder/whatever and save at the end. Those steps then could also be performed with scripts, like pySim-shell supports.
File contrib/saip-tool.py:
https://gerrit.osmocom.org/c/pysim/+/39860/comment/a7b17e7a_3f22f4b4?usp=em… :
PS1, Line 22: import zipfile
removing those unused imports is a logically separate change, isn't it?
https://gerrit.osmocom.org/c/pysim/+/39860/comment/a793ac1c_15e913b6?usp=em… :
PS1, Line 267: app_index = 0
shouldn't we simply make this part of the 'info' command? We already display some basic information about applications there. If you're worried about verbosity, we could add a '--verbose'
https://gerrit.osmocom.org/c/pysim/+/39860/comment/75d235ac_f93364e0?usp=em… :
PS1, Line 272:
I think this line should be removed, it's likely just a debug aid?
https://gerrit.osmocom.org/c/pysim/+/39860/comment/ad77b270_2aa23f46?usp=em… :
PS1, Line 349: 0]
> I am not sure here, As far as I know there can be multiple securityDomain PEs in a profile. […]
There can be multiple security domains. It's probably unusual, but legal AFAIR. I suggest to check if there's only one and abort if there are multiple printing a message that this is currently not yet supported.
https://gerrit.osmocom.org/c/pysim/+/39860/comment/383cc264_2fd3faf4?usp=em… :
PS1, Line 375:
> I wonder if it is better to put this in a method in ProfileElementApplication?
yes, I think a method would be better style.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/39860?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: I41db96f2f0ccc29c1725a92215ce6b17d87b76ce
Gerrit-Change-Number: 39860
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 27 Mar 2025 17:22:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
Attention is currently required from: dexter, fixeria.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/39859?usp=email )
Change subject: saip-tool: add function to write PE sequence
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/39859?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: I38733422270f5b9c18187b7f247b84bf21f9121b
Gerrit-Change-Number: 39859
Gerrit-PatchSet: 1
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: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 27 Mar 2025 17:16:57 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: laforge.
dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/39863?usp=email )
Change subject: saip-tool: add commandline option to edit mandatory services list
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
I am not sure if we really need this. I added this because I wanted to try something out.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/39863?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: I120b98d4b0942c26674bc1365c5711101ec95235
Gerrit-Change-Number: 39863
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: Jenkins Builder
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Thu, 27 Mar 2025 13:09:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: laforge.
dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/39860?usp=email )
Change subject: saip-tool: add features to add and remove applications profile elements
......................................................................
Patch Set 1:
(2 comments)
File contrib/saip-tool.py:
https://gerrit.osmocom.org/c/pysim/+/39860/comment/4207e90f_5ada36ac?usp=em… :
PS1, Line 349: 0]
I am not sure here, As far as I know there can be multiple securityDomain PEs in a profile. If this really is the case, we have to add a parameter to identify the security domain. If not, we should be fine.
https://gerrit.osmocom.org/c/pysim/+/39860/comment/e9288f2b_b340e7fb?usp=em… :
PS1, Line 375:
I wonder if it is better to put this in a method in ProfileElementApplication?
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/39860?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: I41db96f2f0ccc29c1725a92215ce6b17d87b76ce
Gerrit-Change-Number: 39860
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: Jenkins Builder
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Thu, 27 Mar 2025 13:07:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/39859?usp=email )
Change subject: saip-tool: add function to write PE sequence
......................................................................
saip-tool: add function to write PE sequence
To prevent code duplication and to make the implementation simpler,
let's add a function that takes care of writing the PE sequnece
to an output file.
Change-Id: I38733422270f5b9c18187b7f247b84bf21f9121b
---
M contrib/saip-tool.py
1 file changed, 8 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/59/39859/1
diff --git a/contrib/saip-tool.py b/contrib/saip-tool.py
index 763e18d..b7282bd 100755
--- a/contrib/saip-tool.py
+++ b/contrib/saip-tool.py
@@ -65,6 +65,12 @@
parser_info = subparsers.add_parser('tree', help='Display the filesystem tree')
+def write_pes(pes: ProfileElementSequence, output_file:str):
+ """write the PE sequence to a file"""
+ print("Writing %u PEs to file '%s'..." % (len(pes.pe_list), output_file))
+ with open(output_file, 'wb') as f:
+ f.write(pes.to_der())
+
def do_split(pes: ProfileElementSequence, opts):
i = 0
for pe in pes.pe_list:
@@ -132,9 +138,7 @@
pes.pe_list = new_pe_list
pes._process_pelist()
- print("Writing %u PEs to file '%s'..." % (len(pes.pe_list), opts.output_file))
- with open(opts.output_file, 'wb') as f:
- f.write(pes.to_der())
+ write_pes(pes, opts.output_file)
def do_remove_naa(pes: ProfileElementSequence, opts):
if not opts.naa_type in NAAs:
@@ -142,9 +146,7 @@
naa = NAAs[opts.naa_type]
print("Removing NAAs of type '%s' from Sequence..." % opts.naa_type)
pes.remove_naas_of_type(naa)
- print("Writing %u PEs to file '%s'..." % (len(pes.pe_list), opts.output_file))
- with open(opts.output_file, 'wb') as f:
- f.write(pes.to_der())
+ write_pes(pes, opts.output_file)
def do_info(pes: ProfileElementSequence, opts):
def get_naa_count(pes: ProfileElementSequence) -> dict:
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/39859?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I38733422270f5b9c18187b7f247b84bf21f9121b
Gerrit-Change-Number: 39859
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>