Attention is currently required from: canghaiwuhen, laforge.
fixeria has posted comments on this change by canghaiwuhen. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/42050?usp=email )
Change subject: Fixed PDP QoS return length and terminal reconnection issues.
......................................................................
Patch Set 18:
(1 comment)
Patchset:
PS18:
I decided to rework and split this patch myself, so that it does not get stuck in Gerrit forever.
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/42050?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I11c24b64f0e49cf80c825969dbf018b2948d855c
Gerrit-Change-Number: 42050
Gerrit-PatchSet: 18
Gerrit-Owner: canghaiwuhen <canghaiwuhen(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: canghaiwuhen <canghaiwuhen(a)gmail.com>
Gerrit-Comment-Date: Mon, 06 Apr 2026 16:22:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
fixeria has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-bsc/+/42592?usp=email )
Change subject: lchan_fsm: don't mark lchan as BORKEN on unsupported mode NACK
......................................................................
lchan_fsm: don't mark lchan as BORKEN on unsupported mode NACK
When the BTS NACKs a Channel Activation with RSL_ERR_SERV_OPT_UNAVAIL
or RSL_ERR_SERV_OPT_UNIMPL, it means the requested service or channel
mode is not supported - not that the hardware is broken. In this
case the lchan should transition to LCHAN_ST_WAIT_AFTER_ERROR rather
than LCHAN_ST_BORKEN, which is reserved for genuine hardware failures.
Change-Id: Ide3830a697501a0c245a41451302f1e68d553b3c
Related: osmo-ttcn3-hacks.git I000b7b44749380c5af4da42abe37b4ada6e06ee4
Related: OS#6324
---
M src/osmo-bsc/lchan_fsm.c
1 file changed, 14 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/92/42592/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/42592?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ide3830a697501a0c245a41451302f1e68d553b3c
Gerrit-Change-Number: 42592
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/42589?usp=email )
Change subject: assignment_fsm: pass lchan to lchan_type_compat_with_mode()
......................................................................
assignment_fsm: pass lchan to lchan_type_compat_with_mode()
The lchan pointer is needed by the next patch, which will check
the BTS ipaccess supported-features flags to reject channel modes
that the BTS has reported as unsupported before attempting to
activate the lchan.
Change-Id: I51d5d1a1cf3c51f85f738196967d5c69870681bb
Related: OS#6324
---
M src/osmo-bsc/assignment_fsm.c
1 file changed, 7 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/89/42589/1
diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c
index e5392f6..11408d6 100644
--- a/src/osmo-bsc/assignment_fsm.c
+++ b/src/osmo-bsc/assignment_fsm.c
@@ -365,14 +365,15 @@
new_lchan->ts->max_primary_lchans : 0));
}
-static bool lchan_type_compat_with_mode(enum gsm_chan_t type, const struct channel_mode_and_rate *ch_mode_rate)
+static bool lchan_type_compat_with_mode(const struct gsm_lchan *lchan,
+ const struct channel_mode_and_rate *ch_mode_rate)
{
enum gsm48_chan_mode chan_mode = ch_mode_rate->chan_mode;
enum channel_rate chan_rate = ch_mode_rate->chan_rate;
switch (gsm48_chan_mode_to_non_vamos(chan_mode)) {
case GSM48_CMODE_SIGN:
- switch (type) {
+ switch (lchan->type) {
case GSM_LCHAN_TCH_F: return chan_rate == CH_RATE_FULL;
case GSM_LCHAN_TCH_H: return chan_rate == CH_RATE_HALF;
case GSM_LCHAN_SDCCH: return chan_rate == CH_RATE_SDCCH;
@@ -385,7 +386,7 @@
case GSM48_CMODE_DATA_6k0:
/* these services can all run on TCH/H, but we may have
* an explicit override by the 'chan_rate' argument */
- switch (type) {
+ switch (lchan->type) {
case GSM_LCHAN_TCH_F:
return chan_rate == CH_RATE_FULL;
case GSM_LCHAN_TCH_H:
@@ -398,7 +399,7 @@
case GSM48_CMODE_DATA_14k5:
case GSM48_CMODE_SPEECH_EFR:
/* these services all explicitly require a TCH/F */
- return type == GSM_LCHAN_TCH_F;
+ return lchan->type == GSM_LCHAN_TCH_F;
default:
return false;
@@ -473,7 +474,7 @@
/* Check if the currently existing lchan is compatible with the
* preferred rate/codec. */
for (i = 0; i < req->n_ch_mode_rate; i++) {
- if (!lchan_type_compat_with_mode(conn->lchan->type, &req->ch_mode_rate_list[i]))
+ if (!lchan_type_compat_with_mode(conn->lchan, &req->ch_mode_rate_list[i]))
continue;
conn->assignment.selected_ch_mode_rate = req->ch_mode_rate_list[i];
return true;
@@ -664,7 +665,7 @@
conn->assignment.new_lchan = req->target_lchan;
matching_mode = false;
for (i = 0; i < req->n_ch_mode_rate; i++) {
- if (!lchan_type_compat_with_mode(conn->assignment.new_lchan->type, &req->ch_mode_rate_list[i]))
+ if (!lchan_type_compat_with_mode(conn->assignment.new_lchan, &req->ch_mode_rate_list[i]))
continue;
conn->assignment.selected_ch_mode_rate = req->ch_mode_rate_list[i];
matching_mode = true;
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/42589?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I51d5d1a1cf3c51f85f738196967d5c69870681bb
Gerrit-Change-Number: 42589
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/42591?usp=email )
Change subject: lchan_fsm: ignore late lchan_rtp_fsm events
......................................................................
lchan_fsm: ignore late lchan_rtp_fsm events
The lchan_rtp_fsm is a child FSM that manages the MGW/RTP endpoint.
When the parent lchan_fsm transitions away before the child has
finished its work (e.g. a CRCX timeout or a DLCX completing after
the lchan is already idle), the child can still deliver
LCHAN_EV_RTP_RELEASED or LCHAN_EV_RTP_ERROR to the parent.
Currently these late events are not in the in_event_mask of every
state that can be reached with the child still running:
* LCHAN_ST_UNUSED: entered from WAIT_AFTER_ERROR after the error timer
fires, while a DLCX triggered at error time may still be in flight.
* LCHAN_ST_WAIT_AFTER_ERROR: already handles LCHAN_EV_RTP_RELEASED but
misses LCHAN_EV_RTP_ERROR (e.g. CRCX timeout arriving after the
NACK was handled).
Add the missing events to both states' in_event_mask and provide a
no-op handler in lchan_fsm_unused() so that the assert is not hit.
Change-Id: Ie6333bd941e4e5a6ddf0e3f113b8764e8bc2bbc0
---
M src/osmo-bsc/lchan_fsm.c
1 file changed, 8 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/91/42591/1
diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c
index 55875f0..524d66e 100644
--- a/src/osmo-bsc/lchan_fsm.c
+++ b/src/osmo-bsc/lchan_fsm.c
@@ -736,6 +736,11 @@
lchan_fsm_state_chg(LCHAN_ST_WAIT_TS_READY);
break;
+ case LCHAN_EV_RTP_RELEASED:
+ case LCHAN_EV_RTP_ERROR:
+ /* Ignore late lchan_rtp_fsm events arriving after the lchan is back to UNUSED. */
+ break;
+
default:
OSMO_ASSERT(false);
}
@@ -1710,6 +1715,8 @@
.action = lchan_fsm_unused,
.in_event_mask = 0
| S(LCHAN_EV_ACTIVATE)
+ | S(LCHAN_EV_RTP_RELEASED) /* ignore late lchan_rtp_fsm release events */
+ | S(LCHAN_EV_RTP_ERROR) /* ignore late lchan_rtp_fsm error events */
,
.out_state_mask = 0
| S(LCHAN_ST_WAIT_TS_READY)
@@ -1869,6 +1876,7 @@
.onenter = lchan_fsm_wait_after_error_onenter,
.in_event_mask = 0
| S(LCHAN_EV_RTP_RELEASED) /* ignore late lchan_rtp_fsm release events */
+ | S(LCHAN_EV_RTP_ERROR) /* ignore late lchan_rtp_fsm error events */
,
.out_state_mask = 0
| S(LCHAN_ST_UNUSED)
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/42591?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ie6333bd941e4e5a6ddf0e3f113b8764e8bc2bbc0
Gerrit-Change-Number: 42591
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/42590?usp=email )
Change subject: assignment_fsm: check ipaccess channel mode support
......................................................................
assignment_fsm: check ipaccess channel mode support
Add ipacc_chan_mode_supported(), which checks the NM_IPAC_F_CHANM_*
flags stored in the Baseband Transceiver's MO state (populated during
OML bring-up) to decide whether the BTS can handle a requested channel
mode. If the IE containing supported channel modes was never received,
the function returns true as if the given mode was supported.
Without this change, requesting a channel mode not supported by the
BTS results in a NACK to the RSL Channel Activation, which causes
the lchan to be marked as BROKEN and thus unavailable.
Change-Id: I680ba7993786f5486d671f931e75df4543670a37
Related: OS#6324
---
M src/osmo-bsc/assignment_fsm.c
1 file changed, 102 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/90/42590/1
diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c
index 11408d6..54a57aa 100644
--- a/src/osmo-bsc/assignment_fsm.c
+++ b/src/osmo-bsc/assignment_fsm.c
@@ -365,6 +365,86 @@
new_lchan->ts->max_primary_lchans : 0));
}
+/* Check whether the ipaccess BTS supports the requested channel mode.
+ * Returns false if the BTS has reported its supported channel modes and the
+ * requested mode is absent from that list. Returns true if the Supported
+ * Features IE was never received (older osmo-bts versions do not send it). */
+static bool ipacc_chan_mode_supported(const struct gsm_lchan *lchan,
+ const struct channel_mode_and_rate *ch_mode_rate)
+{
+ const struct ipacc_supp_feat *feat =
+ &lchan->ts->trx->bb_transc.mo.ipaccess.chan_modes;
+ uint32_t flag = 0;
+
+ /* Supported Features IE was not received */
+ if (!feat->present)
+ return true;
+
+ switch (gsm48_chan_mode_to_non_vamos(ch_mode_rate->chan_mode)) {
+ case GSM48_CMODE_SPEECH_V1:
+ flag = (lchan->type == GSM_LCHAN_TCH_H)
+ ? NM_IPAC_F_CHANM_SPEECH_HS : NM_IPAC_F_CHANM_SPEECH_FS;
+ break;
+ case GSM48_CMODE_SPEECH_EFR:
+ flag = NM_IPAC_F_CHANM_SPEECH_EFS;
+ break;
+ case GSM48_CMODE_SPEECH_AMR:
+ flag = (lchan->type == GSM_LCHAN_TCH_H)
+ ? NM_IPAC_F_CHANM_SPEECH_AHS : NM_IPAC_F_CHANM_SPEECH_AFS;
+ break;
+ case GSM48_CMODE_DATA_3k6:
+ case GSM48_CMODE_DATA_6k0:
+ case GSM48_CMODE_DATA_12k0:
+ case GSM48_CMODE_DATA_14k5:
+ if (ch_mode_rate->data_transparent) {
+ switch (ch_mode_rate->data_rate.t) {
+ case RSL_CMOD_CSD_T_1200_75:
+ flag = NM_IPAC_F_CHANM_CSD_T_1200_75;
+ break;
+ case RSL_CMOD_CSD_T_600:
+ flag = NM_IPAC_F_CHANM_CSD_T_600;
+ break;
+ case RSL_CMOD_CSD_T_1k2:
+ flag = NM_IPAC_F_CHANM_CSD_T_1k2;
+ break;
+ case RSL_CMOD_CSD_T_2k4:
+ flag = NM_IPAC_F_CHANM_CSD_T_2k4;
+ break;
+ case RSL_CMOD_CSD_T_4k8:
+ flag = NM_IPAC_F_CHANM_CSD_T_4k8;
+ break;
+ case RSL_CMOD_CSD_T_9k6:
+ flag = NM_IPAC_F_CHANM_CSD_T_9k6;
+ break;
+ case RSL_CMOD_CSD_T_14k4:
+ flag = NM_IPAC_F_CHANM_CSD_T_14k4;
+ break;
+ default:
+ return true; /* unhandled T rate */
+ }
+ } else {
+ switch (ch_mode_rate->data_rate.nt) {
+ case RSL_CMOD_CSD_NT_6k0:
+ flag = NM_IPAC_F_CHANM_CSD_NT_4k8;
+ break;
+ case RSL_CMOD_CSD_NT_12k0:
+ flag = NM_IPAC_F_CHANM_CSD_NT_9k6;
+ break;
+ case RSL_CMOD_CSD_NT_14k5:
+ flag = NM_IPAC_F_CHANM_CSD_NT_14k4;
+ break;
+ default:
+ return true; /* unhandled NT rate */
+ }
+ }
+ break;
+ default:
+ return true; /* unknown channel mode */
+ }
+
+ return (feat->val & flag) != 0;
+}
+
static bool lchan_type_compat_with_mode(const struct gsm_lchan *lchan,
const struct channel_mode_and_rate *ch_mode_rate)
{
@@ -373,6 +453,8 @@
switch (gsm48_chan_mode_to_non_vamos(chan_mode)) {
case GSM48_CMODE_SIGN:
+ /* Signalling does not require a specific channel mode on the BTS,
+ * so skip the ipaccess feature check (below) and return directly. */
switch (lchan->type) {
case GSM_LCHAN_TCH_F: return chan_rate == CH_RATE_FULL;
case GSM_LCHAN_TCH_H: return chan_rate == CH_RATE_HALF;
@@ -388,22 +470,39 @@
* an explicit override by the 'chan_rate' argument */
switch (lchan->type) {
case GSM_LCHAN_TCH_F:
- return chan_rate == CH_RATE_FULL;
+ if (chan_rate != CH_RATE_FULL)
+ return false;
+ break;
case GSM_LCHAN_TCH_H:
- return chan_rate == CH_RATE_HALF;
+ if (chan_rate != CH_RATE_HALF)
+ return false;
+ break;
default:
return false;
}
+ break;
case GSM48_CMODE_DATA_12k0:
case GSM48_CMODE_DATA_14k5:
case GSM48_CMODE_SPEECH_EFR:
/* these services all explicitly require a TCH/F */
- return lchan->type == GSM_LCHAN_TCH_F;
+ if (lchan->type != GSM_LCHAN_TCH_F)
+ return false;
+ break;
default:
return false;
}
+
+ switch (lchan->ts->trx->bts->type) {
+ case GSM_BTS_TYPE_NANOBTS:
+ case GSM_BTS_TYPE_OSMOBTS:
+ /* osmo-bts and nanoBTS report supported channel modes during
+ * the OML bring-up - additionally check them */
+ return ipacc_chan_mode_supported(lchan, ch_mode_rate);
+ default:
+ return true;
+ }
}
static __attribute__((constructor)) void assignment_fsm_init(void)
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/42590?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I680ba7993786f5486d671f931e75df4543670a37
Gerrit-Change-Number: 42590
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/42592?usp=email )
Change subject: lchan_fsm: don't mark lchan as BORKEN on unsupported mode NACK
......................................................................
lchan_fsm: don't mark lchan as BORKEN on unsupported mode NACK
When the BTS NACKs a Channel Activation with RSL_ERR_SERV_OPT_UNAVAIL
or RSL_ERR_SERV_OPT_UNIMPL, it means the requested service or channel
mode is not supported - not that the hardware is broken. In this
case the lchan should transition to LCHAN_ST_WAIT_AFTER_ERROR rather
than LCHAN_ST_BORKEN, which is reserved for genuine hardware failures.
Also add LCHAN_EV_RTP_ERROR to LCHAN_ST_WAIT_AFTER_ERROR's in_event_mask
so that a late LCHAN_EV_RTP_ERROR (e.g. MGCP CRCX timeout arriving after
the NACK was already handled) is silently absorbed rather than triggering
an unexpected-event warning.
Change-Id: Ide3830a697501a0c245a41451302f1e68d553b3c
Related: osmo-ttcn3-hacks.git I000b7b44749380c5af4da42abe37b4ada6e06ee4
Related: OS#6324
---
M src/osmo-bsc/lchan_fsm.c
1 file changed, 14 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/92/42592/1
diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c
index 524d66e..afb5cc8 100644
--- a/src/osmo-bsc/lchan_fsm.c
+++ b/src/osmo-bsc/lchan_fsm.c
@@ -977,12 +977,22 @@
lchan->release.rsl_error_cause = *(uint8_t*)data;
lchan->release.rr_cause = bsc_gsm48_rr_cause_from_rsl_cause(lchan->release.rsl_error_cause);
lchan->release.in_error = true;
- if (lchan->release.rsl_error_cause != RSL_ERR_RCH_ALR_ACTV_ALLOC)
- next_state = LCHAN_ST_BORKEN;
- else
+ switch (lchan->release.rsl_error_cause) {
+ case RSL_ERR_RCH_ALR_ACTV_ALLOC:
/* Taking this over from legacy code: send an RF Chan Release even though
* the Activ was NACKed. Is this really correct? */
next_state = LCHAN_ST_WAIT_RF_RELEASE_ACK;
+ break;
+ case RSL_ERR_SERV_OPT_UNAVAIL:
+ case RSL_ERR_SERV_OPT_UNIMPL:
+ /* BTS does not support the requested service or mode; the lchan
+ * itself is not broken, so don't mark it as such. */
+ next_state = LCHAN_ST_WAIT_AFTER_ERROR;
+ break;
+ default:
+ next_state = LCHAN_ST_BORKEN;
+ break;
+ }
lchan_fail_to(next_state, "Chan Activ NACK: %s (0x%x)",
rsl_err_name(lchan->release.rsl_error_cause), lchan->release.rsl_error_cause);
@@ -1759,6 +1769,7 @@
.out_state_mask = 0
| S(LCHAN_ST_UNUSED)
| S(LCHAN_ST_WAIT_RLL_RTP_ESTABLISH)
+ | S(LCHAN_ST_WAIT_AFTER_ERROR)
| S(LCHAN_ST_BORKEN)
| S(LCHAN_ST_WAIT_RF_RELEASE_ACK)
,
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/42592?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ide3830a697501a0c245a41451302f1e68d553b3c
Gerrit-Change-Number: 42592
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>