abis: Avoid TCP/IPA RSL sockets continue conn establishment while shutting down

when something fails in osmo-bts during startup and it goes into SHUTDOWN state,
it is desirable to close new RSL links (sockets) which are in progress to connect,
while it waits for a while to complete shutdown (power ramping down, etc.).
This way we don't end up with new interactions and new state against a BSC if we
are shutting down.

The new libosmo-abis API is used since the higher layer struct e1inp_sign_link assigned
to each struct gsm_bts_trx is not provided to the osmo-bts code layer by libosmo-abis API
until the TCP+IPA handshake in the socket becomes fully established (sign_link_up()
callback).

Depends: libosmo-abis.git Ia6418321f3b6f1f7274efd414625a4b10a09a362
Change-Id: I599d074f51f490b43c9a89b105d1823391926947
This commit is contained in:
Pau Espin 2022-09-15 18:53:07 +02:00
parent e826d78399
commit cd3d71b318
2 changed files with 9 additions and 0 deletions

View File

@ -9,3 +9,4 @@
#library what description / commit summary line
libosmocore >1.7.0 BTS_FEAT_OSMUX, RSL_IE_OSMO_OSMUX_CID
libosmo-netif >1.2.0 OSMUX_DEFAULT_PORT
libosmo-abis >1.3.0 e1inp_ipa_bts_rsl_close_n()

View File

@ -230,6 +230,14 @@ static void abis_link_connected(struct osmo_fsm_inst *fi, uint32_t event, void *
trx->rsl_link = NULL;
if (trx == trx->bts->c0)
load_timer_stop(trx->bts);
} else {
/* If we have no rsl_link yet it may mean that lower
* layers are still establishing the socket (TCP, IPA).
* Let's tell it to stop connection establishment since
* we are shutting down. */
struct e1inp_line *line = e1inp_line_find(0);
if (line)
e1inp_ipa_bts_rsl_close_n(line, trx->nr);
}
/* Note: Here we could send NM_EV_RSL_DOWN to each
* trx->(bb_transc.)mo.fi, but we are starting shutdown of the