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
This commit is contained in:
Harald Welte 2024-03-16 10:18:40 +01:00
parent 8e12612e17
commit 471f859d77
4 changed files with 9 additions and 3 deletions

View File

@ -310,9 +310,6 @@ void m3ua_dh_to_xfer_param(struct osmo_mtp_transfer_param *param,
(mdh->ni & 0x3 << 6);
}
#define M3UA_MSG_SIZE 2048
#define M3UA_MSG_HEADROOM 512
struct msgb *m3ua_msgb_alloc(const char *name)
{
if (!name)

View File

@ -43,6 +43,7 @@
#include <osmocom/core/msgb.h>
#include <osmocom/core/socket.h>
#include <osmocom/core/sockaddr_str.h>
#include <osmocom/core/osmo_io.h>
#include <osmocom/netif/stream.h>
#include <osmocom/netif/ipa.h>
@ -900,6 +901,8 @@ static int xua_cli_connect_cb(struct osmo_stream_cli *cli)
if (fd < 0)
return fd;
osmo_iofd_set_alloc_info(osmo_stream_cli_get_iofd(cli), M3UA_MSG_SIZE, M3UA_MSG_HEADROOM);
/* update the socket name */
talloc_free(asp->sock_name);
asp->sock_name = osmo_sock_get_name(asp, fd);

View File

@ -43,6 +43,7 @@
#include <osmocom/core/msgb.h>
#include <osmocom/core/socket.h>
#include <osmocom/core/sockaddr_str.h>
#include <osmocom/core/osmo_io.h>
#include <osmocom/netif/stream.h>
#include <osmocom/netif/ipa.h>
@ -80,6 +81,8 @@ static int xua_accept_cb(struct osmo_stream_srv_link *link, int fd)
return -1;
}
osmo_iofd_set_alloc_info(osmo_stream_srv_get_iofd(srv), M3UA_MSG_SIZE, M3UA_MSG_HEADROOM);
switch (oxs->cfg.proto) {
case OSMO_SS7_ASP_PROT_IPA:
osmo_stream_srv_set_read_cb(srv, ss7_asp_ipa_srv_conn_rx_cb);

View File

@ -4,6 +4,9 @@
#include <osmocom/sigtran/osmo_ss7.h>
#include <osmocom/sigtran/xua_msg.h>
#define M3UA_MSG_SIZE 2048
#define M3UA_MSG_HEADROOM 512
struct osmo_sccp_addr;
struct m3ua_data_hdr;