pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/29366 )
Change subject: abis: Avoid TCP/IPA RSL sockets continue conn establishment while shutting down
......................................................................
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
---
M TODO-RELEASE
M src/common/abis.c
2 files changed, 9 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/66/29366/1
diff --git a/TODO-RELEASE b/TODO-RELEASE
index c91d81c..d981d15 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -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()
diff --git a/src/common/abis.c b/src/common/abis.c
index 4afe81a..8cb4878 100644
--- a/src/common/abis.c
+++ b/src/common/abis.c
@@ -230,6 +230,14 @@
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(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
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/29366
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I599d074f51f490b43c9a89b105d1823391926947
Gerrit-Change-Number: 29366
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/29353 )
Change subject: osmux: Use local/remote CID terminology
......................................................................
osmux: Use local/remote CID terminology
This terminology is much more common and used in other protocols, like
PFCP.
Related: SYS#5987
Change-Id: Ia5eb833c296c504555f273a7fc3af5d746af19c0
---
M common/chapters/osmux/mgcp_extension_osmux.adoc
M common/chapters/osmux/mo_call_osmux_aoip.msc
M common/chapters/osmux/mo_call_osmux_sccplite.msc
M common/chapters/osmux/mo_call_osmux_sccplite_nat.msc
M common/chapters/osmux/osmux.adoc
5 files changed, 20 insertions(+), 20 deletions(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, but someone else must approve
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
diff --git a/common/chapters/osmux/mgcp_extension_osmux.adoc b/common/chapters/osmux/mgcp_extension_osmux.adoc
index e2b0947..45e95e7 100644
--- a/common/chapters/osmux/mgcp_extension_osmux.adoc
+++ b/common/chapters/osmux/mgcp_extension_osmux.adoc
@@ -19,11 +19,11 @@
In request messages, the value part of `X-Osmux` specifies the CID to be used by
OsmoMGW to _send_ Osmux frames to the remote peer for that connection, also
-known as _sendCID_.
+known as the MGW's _remote CID_ or the peer's _local CID_.
In response messages, the value part of `X-Osmux` specifies the CID where
OsmoMGW expect to _receive_ Osmux frames from the remote peer for that
-connection, also known as _recvCID_.
+connection, also known as the MGW's _local CID_ or the peer's _remote CID_.
.Example: `X-Osmux` format with a known CID 3.
----
@@ -39,12 +39,12 @@
If the MGCP client is willing to use Osmux for a given connection, it shall
specify so during `CRCX` time, and not later. If at `CRCX` time the MGCP client
-doesn't yet know the _sendCID_, it can use an astersik (*) and provide
-_sendCID_ later within `MDCX` messages.
+doesn't yet know the MGW's _remote CID_, it can use an astersik (*) and provide
+_remote CID_ later within `MDCX` messages.
All subsequent `MDCX` messages sent towards an Osmux connection must contain the
-original _sendCID_ sent during `CRCX`. The same way, all `MDCX` response shall
-contain the _recvCID_ sent during `CRCX`.
+original MGW's _remote CID_ sent during `CRCX`. The same way, all `MDCX` response shall
+contain the _local CID_ sent during `CRCX`.
The other required connection address parameters, such as IP address, port, and
codecs, are negotiated through MGCP and SDP as usual, but in this case the IP
@@ -72,7 +72,7 @@
a=ptime:20
----
-.Example: response to `CRCX` containing the <<recvCID>>
+.Example: response to `CRCX` containing the MGW's _local CID_
----
200 189 OK
I: 07E41584
diff --git a/common/chapters/osmux/mo_call_osmux_aoip.msc b/common/chapters/osmux/mo_call_osmux_aoip.msc
index 9cb2e50..27e79ba 100644
--- a/common/chapters/osmux/mo_call_osmux_aoip.msc
+++ b/common/chapters/osmux/mo_call_osmux_aoip.msc
@@ -14,7 +14,7 @@
# Allocate MGW/MSC Osmux endpoint
m_sc -> mgw_msc [label="MGCP CRCX rtpbridge/*@mgw, X-Osmux: *"];
- mgw_msc box mgw_msc [label="Bind to MGW-local Osmux Port (1984)\nAllocate new endpoint 1, recvCID 5"];
+ mgw_msc box mgw_msc [label="Bind to MGW-local Osmux Port (1984)\nAllocate new endpoint 1, MGW's local CID 5"];
mgw_msc -> m_sc [label="MGCP CRCX rtpbridge/1@mgw OK (MGW:1984, X-Osmux: 5)"];
bsc <- m_sc [label="BSSAP ASSGN REQ (3GPP AoIP, extension IE: Osmux CID 5)"];
@@ -37,7 +37,7 @@
...;
mgw_bsc <- bsc [label="MGCP CRCX rtpbridge/2@mgw (MSC:1984, X-Osmux: 5)"];
- mgw_bsc box mgw_bsc [label="Bind to MGW-local Osmux Port (1985)\nConnect to MSC:1984\nAllocate new recvCID 7"];
+ mgw_bsc box mgw_bsc [label="Bind to MGW-local Osmux Port (1985)\nConnect to MSC:1984\nAllocate new MGW's local CID 7"];
mgw_bsc -> bsc [label="MGCP CRCX rtpbridge/2@mgw OK (MGW:1985, X-Osmux: 7)"];
...;
diff --git a/common/chapters/osmux/mo_call_osmux_sccplite.msc b/common/chapters/osmux/mo_call_osmux_sccplite.msc
index 903da46..037805b 100644
--- a/common/chapters/osmux/mo_call_osmux_sccplite.msc
+++ b/common/chapters/osmux/mo_call_osmux_sccplite.msc
@@ -12,7 +12,7 @@
# Allocate MGW/MSC Osmux endpoint
m_sc -> mgw_msc [label="MGCP CRCX *@mgw, X-Osmux: *"];
- mgw_msc box mgw_msc [label="Bind to MGW-local Osmux Port (1984)\nAllocate new endpoint 1, recvCID 5"];
+ mgw_msc box mgw_msc [label="Bind to MGW-local Osmux Port (1984)\nAllocate new endpoint 1, MGW's local CID 5"];
mgw_msc -> m_sc [label="MGCP CRCX rtpbridge/1@mgw OK (MGW:1984, X-Osmux: 5)"];
bsc <- m_sc [label="BSSAP ASSGN REQ (CIC:1)"];
@@ -39,7 +39,7 @@
# MSC configures BSC-MGW MSC-side of the endpoint through MGCP UDP forwarding
mgw_bsc <- m_sc [label="MGCP CRCX 1@mgw (MSC:1984, X-Osmux: 5)"];
- mgw_bsc box mgw_bsc [label="Bind to BTS-local Osmux Port (1985)\nAllocate new recvCID 7"];
+ mgw_bsc box mgw_bsc [label="Bind to BTS-local Osmux Port (1985)\nAllocate new MGW's local CID 7"];
mgw_bsc -> m_sc [label="MGCP CRCX 1@mgw OK (MGW:1985, X-Osmux: 7)"];
mgw_bsc <- m_sc [label="MGCP MDCX 1@mgw (recvonly) "];
mgw_bsc box mgw_bsc [label="Connect Osmux socket to remote (MSC) Osmux Port"];
diff --git a/common/chapters/osmux/mo_call_osmux_sccplite_nat.msc b/common/chapters/osmux/mo_call_osmux_sccplite_nat.msc
index 2aa8105..d309ebb 100644
--- a/common/chapters/osmux/mo_call_osmux_sccplite_nat.msc
+++ b/common/chapters/osmux/mo_call_osmux_sccplite_nat.msc
@@ -18,7 +18,7 @@
# NAT: MGW/MSC Osmux endpoint
#bscnat -> bscnat [label="MGCP CRCX *@mgw, X-Osmux: *"];
- mgw_msc box mgw_msc [label="Bind to MGW-local Osmux Port (1984)\nAllocate new endpoint 2, recvCID 5"];
+ mgw_msc box mgw_msc [label="Bind to MGW-local Osmux Port (1984)\nAllocate new endpoint 2, MGW's local CID 5"];
#mgw_msc -> m_sc [label="MGCP CRCX rtpbridge/1@mgw OK (MGW:1984, X-Osmux: 5)"];
bsc <- bscnat [label="BSSAP ASSGN REQ (CIC:2)"];
@@ -48,7 +48,7 @@
# MSC configures BSC-MGW MSC-side of the endpoint through MGCP UDP forwarding
bscnat <- m_sc [label="MGCP CRCX 1@mgw (MSC:3000)"];
- bscnat box bscnat [label="Allocate new endpoint 2\nAllocate new recvCID 5\nBind to local Osmux Port (1984)\nBind to local RTP port 4000"];
+ bscnat box bscnat [label="Allocate new endpoint 2\nAllocate new MGW's local CID 5\nBind to local Osmux Port (1984)\nBind to local RTP port 4000"];
mgw_bsc <- bscnat [label="MGCP CRCX 2@mgw (MSC:1984, X-Osmux: 5)"];
mgw_bsc -> bscnat [label="MGCP CRCX 2@mgw OK (MGW:1985, X-Osmux: 7)"];
bscnat -> m_sc [label="MGCP CRCX 1@mgw OK (MGW:4000)"];
diff --git a/common/chapters/osmux/osmux.adoc b/common/chapters/osmux/osmux.adoc
index 5e53b60..ca1acd5 100644
--- a/common/chapters/osmux/osmux.adoc
+++ b/common/chapters/osmux/osmux.adoc
@@ -50,13 +50,13 @@
=== CID allocation
-Each peer (BSC/MGW and MSC/MGW) allocates its own _recvCID_, and receives from
-the peer through the used GSM protocol the peer's _recvCID_, which becomes
-the local _sendCID_ for that connection.
+Each peer (BSC/MGW and MSC/MGW) allocates its own _local CID_, and receives from
+its peer a _remote CID_ (aka the peer's _local CID_) through the used GSM
+protocol. This _remote CID_ is then used to send Osmux frames to that peer.
----
-BSC/MGW(recvCID=Y,sendCID=?)<-X--MSC/MGW(recvCID=X,sendCID=?)
-BSC/MGW(recvCID=Y,sendCID=X)--Y->MSC/MGW(recvCID=X,sendCID=Y)
+BSC/MGW(localCID=Y,remoteCID=?)<-X--MSC/MGW(localCID=X,remoteCID=?)
+BSC/MGW(localCID=Y,remoteCID=X)--Y->MSC/MGW(localCID=X,remoteCID=Y)
----
This way each peer is responsible for allocating and managing their own local
@@ -75,13 +75,13 @@
BSC. Each of the peers could actually have more than one Osmux socket towards
the other peer, by using a pool of ports or IP addresses, so there's really not
limit if required as long as there's a way to infer the initially negotiated
-`<srcIP, srcPort, dstIP, dstPort, sendCID>` tuple from the received audio
+`<srcIP, srcPort, dstIP, dstPort, remoteCID>` tuple from the received audio
packets.
However, due to some constrains from in between NATs explained in section above,
BSC/MGW IP address and port are not a priory known, and could change between
different connections coming from it. As a result, it is difficult to infer the
-entire tuple, so for now MGW needs to allocate its Osmux _recvCID_ in a clever
+entire tuple, so for now MGW needs to allocate its Osmux _local CID_ in a clever
way, in order to be able to identify the full tuple from it.
Hence, currently OsmoMGW CID allocation implementation shares CID between all
--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/29353
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: Ia5eb833c296c504555f273a7fc3af5d746af19c0
Gerrit-Change-Number: 29353
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: merged