This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/20674 )
Change subject: scheduler: drop Uplink SACCH loss detection from Downlink path
......................................................................
scheduler: drop Uplink SACCH loss detection from Downlink path
We do have NOPE/IDLE indications on the TRXD interface since
Jul 4 2019, so this hack that can finally be eliminated.
Change-Id: Ic292d180ba64206fb4d88adb284f9f9d058b4587
---
M include/osmo-bts/scheduler.h
M src/common/scheduler.c
M src/osmo-bts-trx/sched_lchan_tchf.c
M src/osmo-bts-trx/sched_lchan_xcch.c
M src/osmo-bts-virtual/scheduler_virtbts.c
5 files changed, 0 insertions(+), 123 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/74/20674/1
diff --git a/include/osmo-bts/scheduler.h b/include/osmo-bts/scheduler.h
index f19a13e..da9e20c 100644
--- a/include/osmo-bts/scheduler.h
+++ b/include/osmo-bts/scheduler.h
@@ -93,7 +93,6 @@
uint8_t ul_mask; /* mask of received bursts */
/* loss detection */
- uint8_t lost_frames; /* how many L2 frames were lost */
uint32_t last_tdma_fn; /* last processed TDMA frame number */
uint32_t proc_tdma_fs; /* how many TDMA frames were processed */
uint32_t lost_tdma_fs; /* how many TDMA frames were lost */
diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index e7cbc83..b9e5439 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -723,7 +723,6 @@
struct msgb *msg;
struct osmo_phsap_prim *l1sap;
uint8_t chan_nr = trx_chan_desc[chan].chan_nr | tn;
- struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn);
/* compose primitive */
msg = l1sap_msgb_alloc(l2_len);
@@ -742,9 +741,6 @@
if (l2_len)
memcpy(msg->l2h, l2, l2_len);
- if (L1SAP_IS_LINK_SACCH(trx_chan_desc[chan].link_id))
- l1ts->chan_state[chan].lost_frames = 0;
-
/* forward primitive */
l1sap_up(l1t->trx, l1sap);
@@ -759,7 +755,6 @@
struct msgb *msg;
struct osmo_phsap_prim *l1sap;
struct gsm_bts_trx *trx = l1t->trx;
- struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn);
uint8_t chan_nr = trx_chan_desc[chan].chan_nr | tn;
struct gsm_lchan *lchan = &trx->ts[L1SAP_CHAN2TS(chan_nr)].lchan[l1sap_chan2ss(chan_nr)];
@@ -779,9 +774,6 @@
if (tch_len)
memcpy(msg->l2h, tch, tch_len);
- if (l1ts->chan_state[chan].lost_frames)
- l1ts->chan_state[chan].lost_frames--;
-
LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, -1, l1sap->u.data.fn,
"%s Rx -> RTP: %s\n",
gsm_lchan_name(lchan), osmo_hexdump(msgb_l2(msg), msgb_l2len(msg)));
diff --git a/src/osmo-bts-trx/sched_lchan_tchf.c b/src/osmo-bts-trx/sched_lchan_tchf.c
index 9c5bfc2..fe21559 100644
--- a/src/osmo-bts-trx/sched_lchan_tchf.c
+++ b/src/osmo-bts-trx/sched_lchan_tchf.c
@@ -314,58 +314,6 @@
uint8_t tch_mode = chan_state->tch_mode;
struct osmo_phsap_prim *l1sap;
- /* handle loss detection of received TCH frames */
- if (rsl_cmode == RSL_CMOD_SPD_SPEECH
- && ++(chan_state->lost_frames) > 5) {
- uint8_t tch_data[GSM_FR_BYTES];
- int len;
-
- LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn,
- "Missing TCH bursts detected, sending BFI\n");
-
- /* indicate bad frame */
- switch (tch_mode) {
- case GSM48_CMODE_SPEECH_V1: /* FR / HR */
- if (chan != TRXC_TCHF) { /* HR */
- tch_data[0] = 0x70; /* F = 0, FT = 111 */
- memset(tch_data + 1, 0, 14);
- len = 15;
- break;
- }
- memset(tch_data, 0, GSM_FR_BYTES);
- len = GSM_FR_BYTES;
- break;
- case GSM48_CMODE_SPEECH_EFR: /* EFR */
- if (chan != TRXC_TCHF)
- goto inval_mode1;
- memset(tch_data, 0, GSM_EFR_BYTES);
- len = GSM_EFR_BYTES;
- break;
- case GSM48_CMODE_SPEECH_AMR: /* AMR */
- len = osmo_amr_rtp_enc(tch_data,
- chan_state->codec[chan_state->dl_cmr],
- chan_state->codec[chan_state->dl_ft], AMR_BAD);
- if (len < 2) {
- LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn,
- "Failed to encode AMR_BAD frame (rc=%d), "
- "not sending BFI\n", len);
- return;
- }
- memset(tch_data + 2, 0, len - 2);
- break;
- default:
-inval_mode1:
- LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "TCH mode invalid, please fix!\n");
- len = 0;
- }
-
- if (len) {
- /* Note: RSSI/ToA256 is set to 0 to indicate to the higher
- * layers that this is a faked tch_ind */
- _sched_compose_tch_ind(l1t, tn, fn, chan, tch_data, len, 0, 10000, 0, 0);
- }
- }
-
/* get frame and unlink from queue */
msg1 = _sched_dequeue_prim(l1t, tn, fn, chan);
msg2 = _sched_dequeue_prim(l1t, tn, fn, chan);
diff --git a/src/osmo-bts-trx/sched_lchan_xcch.c b/src/osmo-bts-trx/sched_lchan_xcch.c
index b96bc0b..7e1de6f 100644
--- a/src/osmo-bts-trx/sched_lchan_xcch.c
+++ b/src/osmo-bts-trx/sched_lchan_xcch.c
@@ -169,21 +169,6 @@
/* BURST BYPASS */
- /* handle loss detection of SACCH */
- if (L1SAP_IS_LINK_SACCH(trx_chan_desc[chan].link_id)) {
- /* count and send BFI */
- if (++(l1ts->chan_state[chan].lost_frames) > 1) {
- /* TODO: Should we pass old TOA here? Otherwise we risk
- * unnecessary decreasing TA */
-
- /* Note: RSSI is set to 0 to indicate to the higher
- * layers that this is a faked ph_data_ind */
- _sched_compose_ph_data_ind(l1t, br->tn, 0, chan, NULL, 0,
- 0, 0, 0, 10000,
- PRES_INFO_INVALID);
- }
- }
-
/* allocate burst memory, if not already */
if (!*bursts_p) {
*bursts_p = talloc_zero_size(tall_bts_ctx, 464);
diff --git a/src/osmo-bts-virtual/scheduler_virtbts.c b/src/osmo-bts-virtual/scheduler_virtbts.c
index 466e864..9e9a9e9 100644
--- a/src/osmo-bts-virtual/scheduler_virtbts.c
+++ b/src/osmo-bts-virtual/scheduler_virtbts.c
@@ -254,53 +254,6 @@
uint8_t rsl_cmode = chan_state->rsl_cmode;
uint8_t tch_mode = chan_state->tch_mode;
struct osmo_phsap_prim *l1sap;
-#if 0
- /* handle loss detection of received TCH frames */
- if (rsl_cmode == RSL_CMOD_SPD_SPEECH
- && ++(chan_state->lost_frames) > 5) {
- uint8_t tch_data[GSM_FR_BYTES];
- int len;
-
- LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn, "Missing TCH bursts detected, sending "
- "BFI for %s\n", trx_chan_desc[chan].name);
-
- /* indicate bad frame */
- switch (tch_mode) {
- case GSM48_CMODE_SPEECH_V1: /* FR / HR */
- if (chan != TRXC_TCHF) { /* HR */
- tch_data[0] = 0x70; /* F = 0, FT = 111 */
- memset(tch_data + 1, 0, 14);
- len = 15;
- break;
- }
- memset(tch_data, 0, GSM_FR_BYTES);
- len = GSM_FR_BYTES;
- break;
- case GSM48_CMODE_SPEECH_EFR: /* EFR */
- if (chan != TRXC_TCHF)
- goto inval_mode1;
- memset(tch_data, 0, GSM_EFR_BYTES);
- len = GSM_EFR_BYTES;
- break;
- case GSM48_CMODE_SPEECH_AMR: /* AMR */
- len = amr_compose_payload(tch_data,
- chan_state->codec[chan_state->dl_cmr],
- chan_state->codec[chan_state->dl_ft], 1);
- if (len < 2)
- break;
- memset(tch_data + 2, 0, len - 2);
- _sched_compose_tch_ind(l1t, tn, 0, chan, tch_data, len);
- break;
- default:
-inval_mode1:
- LOGP(DL1P, LOGL_ERROR, "TCH mode invalid, please "
- "fix!\n");
- len = 0;
- }
- if (len)
- _sched_compose_tch_ind(l1t, tn, 0, chan, tch_data, len);
- }
-#endif
/* get frame and unlink from queue */
msg1 = _sched_dequeue_prim(l1t, tn, fn, chan);
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/20674
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ic292d180ba64206fb4d88adb284f9f9d058b4587
Gerrit-Change-Number: 20674
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201016/82c82a81/attachment.htm>