Commit Graph

11 Commits

Author SHA1 Message Date
Harald Welte 471f859d77 Use same msgb allocation size like before osmo_io introduction
In Change-Id Ia1910f3b99d918ec2a34d5304c3f40ba015c25c9 we introduced
osmo_io support for xUA + IPA.  However, when we did that, the msgb
allocation sizes of libosmo-sigtran were neglected, and rather the
defaults of osmo_io used.

This commit returns libosmo-sigtran to the exact msgb allocation +
headroom sizes used before the osmo_io migration.

Related: OS#5752
Closes: OS#6403
Depends: libosmo-netif.git Change-Id Ie19c8294ddb12dfe5e0fd44e047c47e6f9cbd384
Change-Id: I0c6dcff4523e4c04aae43a4585b5e0c3617ef1a6
2024-03-16 10:18:40 +01:00
Harald Welte e099fb9d69 cosmetic: rename ss7_asp_*_conn_cb to ss7_asp_*_conn_rx_cb
The old/existing name says it is a connection call-back, but not what
kind of all-back; let's introduce 'rx' to indicate it is a receive
call-back.

Change-Id: Iaaef8128d4a26ea75fbce7067a8ab935a319beb4
2024-03-14 08:07:28 +01:00
Harald Welte 9257cd896e xua + ipa: Add support for I/O in OSMO_IO mode
This switches osmo_stream_{cli,srv} over to using the OSMO_IO
mode instead of the classic OSMO_FD mode.  The difference is that
we no longer read/write directly to a file descriptor, but we pass
message buffers to/from the library.

This in turn allows the library to use more efficient I/O mechanisms
as osmo_io backend, for example the Linux kernel io_uring.

This re-introduces Change-Id: I7d02037990f4af405839309510dc6c04e36c3369
which was previously reverted due to regressions caused by a missing
change in libosmo-netif.

Depends: libosmo-netif.git I6cf5bad5f618e71c80017960c38009b089dbd6a1
Depends: libosmocore.git I89eb519b22d21011d61a7855b2364bc3c295df82
Closes: OS#5752
Change-Id: Ia1910f3b99d918ec2a34d5304c3f40ba015c25c9
2024-03-13 22:18:36 +01:00
Harald Welte c72c2d383c Revert "xua + ipa: Add support for I/O in OSMO_IO mode"
This reverts commit d4ec8e7f9f
which caused severe regressions in the TTCN-3 tests: All STP_Tests_M3UA
are failing, as are STP_Tests.* and SCCP_Tests_RAW.TC_process_rx_ludt

Change-Id: I708a5fe0481b14e1b0cdc86149ffc86ee7b5be59
2024-03-07 08:49:30 +01:00
Harald Welte d4ec8e7f9f xua + ipa: Add support for I/O in OSMO_IO mode
This switches osmo_stream_{cli,srv} over to using the OSMO_IO
mode instead of the classic OSMO_FD mode.  The difference is that
we no longer read/write directly to a file descriptor, but we pass
message buffers to/from the library.

This in turn allows the library to use more efficient I/O mechanisms
as osmo_io backend, for example the Linux kernel io_uring.

Change-Id: I7d02037990f4af405839309510dc6c04e36c3369
Depends: libosmo-netif.git I6cf5bad5f618e71c80017960c38009b089dbd6a1
Depends: libosmocore.git I89eb519b22d21011d61a7855b2364bc3c295df82
Closes: OS#5752
2024-03-06 16:14:16 +01:00
Vadim Yanitskiy 542027f051 xua_accept_cb(): distinguish ASPs using different trans_proto
This fixes a problem found by TTCN-3 testcases: two ASPs can have
identical socket address/port, but different transport protocols.
We need to take this into account in ss7_asp_find_by_socket_addr().

Change-Id: I28aab37e8967de51ad2714543fd235d407e304c5
Related: osmo-ttcn3-hacks.git I1e2a887aa22f317783b3207494fd707d7b426439
Related: SYS#5424
2024-03-04 02:50:03 +07:00
Vadim Yanitskiy 22929b1c04 Implement M3UA-over-TCP (in addition to SCTP)
RFC 4666 section 1.3.1 states that "TCP MAY be used as the underlying
common transport protocol" under certain scenarios.  There is even
IANA-allocated TCP port 2905 for that purpose (see section 1.4.8).

Since TCP is a stream oriented protocol, so we need to handle message
boundaries ourselves by reading the M3UA header to know the PDU length.

Change-Id: I8c76d271472befacbeb998a93bbdc9e8660d9b5d
Related: SYS#5424
2024-02-27 00:45:31 +07:00
Pau Espin 08001775c6 xua_server: asp: Support removing local addresses
The socket is reconfigured (and hence reopened) upon VTY node exit if
changes were stored in the address list of the xua_server
(osmo_stream_srv_link).

Related: OS#4607
Change-Id: I942edff7695efeea7753f22e31c2098c201290ff
2023-10-04 11:21:05 +00:00
Pau Espin abf26ce1ad Allow configuring per-ASP SCTP INIT parameters
Related: SYS#6558
Depends: libosmo-netif.git Change-Id I5343c7659881b29e0201e72badbc2d07e1ef2dca
Change-Id: I4c104f0313b549efab7fae2e81a163474e9bcd4b
2023-09-08 18:14:52 +02:00
Pau Espin 13a341e813 asp,xua_srv: Use new osmo_stream API to request sockopt SCTP AUTH/ASCONF SUPPORTED
Support to enable AUTH/ASCONF in the SCTP socket was added recently in
libosmocore and libosmo-netif, in order to support the Peer Primary
Address features used by the libosmo-sccp code.
The code to request the AUTH/ASCONF support through setsockopt() was
internally applied transparently by lisbosmo-netif's osmo_stream. This
is not 100% disarable since other users of the library may not need/want
that behavior.
As a result, libosmo-netif's osmo_stream no longer enables the SCTP
AUTH/ASCONF support by default, but it must be enabled through
the new osmo_stream_{cli,srv_link}_set_param() API.

This change in behavior of the API/implementation can be done because
all these new features are pretty new and no release of
libosmocore/libosmo-netif/libosmo-sccp has been released yet.

Related: SYS#6501
Related: SYS#6558
Depends: libosmo-netif.git Change-Id I2607c1c926a625986cd851adc65dd8b4de83d6ab
Change-Id: I16c97fc148792aa3e39b7414899660990c39dfff
2023-09-08 18:14:37 +02:00
Pau Espin 0937875983 ss7: Split asp and xua_server into their own files
This allows having a clearer picture of the several entities involved,
as well as simplifying the files.

In the future, we can do the same for AS, route, etc. and leave osmo_ss7
for the "instance" object.

Change-Id: I3d43268459d61b0b9f9bec34bf31dc0851fa5e48
2023-09-07 13:14:51 +02:00