Change in osmo-bts[master]: osmo-bts-trx: rx_{tchf,tchh}_fn(): ensure complete set of bursts
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/27555 ) Change subject: osmo-bts-trx: rx_{tchf,tchh}_fn(): ensure complete set of bursts ...................................................................... osmo-bts-trx: rx_{tchf,tchh}_fn(): ensure complete set of bursts The idea of this change is to avoid attempting to decode the burst buffer unless it's filled up completely. This eliminates expected decoding errors in the beginning of lchan's lifetime. Moreover this allows us to be sure that the measurement history is complete, so that we can abuse it to store TDMA frame numbers later. Note that even in the absence of NOPE indications (TRXDv0 case) we can still be sure that the burst mask has no gaps due to lost bursts, because they are compensated by trx_sched_calc_frame_loss(). Change-Id: I56bebe1374eb803e3c1e9f08dda4da50a074ab0b --- M src/osmo-bts-trx/sched_lchan_tchf.c M src/osmo-bts-trx/sched_lchan_tchh.c 2 files changed, 14 insertions(+), 14 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo-bts-trx/sched_lchan_tchf.c b/src/osmo-bts-trx/sched_lchan_tchf.c index a689a1f..9a168af 100644 --- a/src/osmo-bts-trx/sched_lchan_tchf.c +++ b/src/osmo-bts-trx/sched_lchan_tchf.c @@ -85,7 +85,7 @@ if (bi->bid == 0) { memcpy(*bursts_p, *bursts_p + 464, 464); memset(*bursts_p + 464, 0, 464); - *mask = 0x0; + *mask = *mask << 4; } /* update mask */ @@ -106,13 +106,13 @@ if (bi->bid != 3) return 0; - /* check for complete set of bursts */ - if ((*mask & 0xf) != 0xf) { - LOGL1SB(DL1P, LOGL_NOTICE, l1ts, bi, - "Received incomplete frame (%u/%u)\n", - bi->fn % l1ts->mf_period, l1ts->mf_period); + /* fill up the burst buffer so that we have 8 bursts in there */ + if (OSMO_UNLIKELY((*mask & 0xff) != 0xff)) { + LOGL1SB(DL1P, LOGL_DEBUG, l1ts, bi, + "UL burst buffer is not filled up: mask=0x%02x != 0xff\n", + *mask); + return 0; /* TODO: send BFI */ } - *mask = 0x0; /* decode * also shift buffer by 4 bursts for interleaving */ diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c index 6b49974..627291e 100644 --- a/src/osmo-bts-trx/sched_lchan_tchh.c +++ b/src/osmo-bts-trx/sched_lchan_tchh.c @@ -92,7 +92,7 @@ memcpy(*bursts_p, *bursts_p + 232, 232); memcpy(*bursts_p + 232, *bursts_p + 464, 232); memset(*bursts_p + 464, 0, 232); - *mask = 0x0; + *mask = *mask << 2; } /* update mask */ @@ -113,13 +113,13 @@ if (bi->bid != 1) return 0; - /* check for complete set of bursts */ - if ((*mask & 0x3) != 0x3) { - LOGL1SB(DL1P, LOGL_NOTICE, l1ts, bi, - "Received incomplete frame (%u/%u)\n", - bi->fn % l1ts->mf_period, l1ts->mf_period); + /* fill up the burst buffer so that we have 6 bursts in there */ + if (OSMO_UNLIKELY((*mask & 0x3f) != 0x3f)) { + LOGL1SB(DL1P, LOGL_DEBUG, l1ts, bi, + "UL burst buffer is not filled up: mask=0x%02x != 0x3f\n", + *mask); + return 0; /* TODO: send BFI */ } - *mask = 0x0; /* skip decoding of the last 4 bursts of FACCH/H */ if (chan_state->ul_ongoing_facch) { -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/27555 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I56bebe1374eb803e3c1e9f08dda4da50a074ab0b Gerrit-Change-Number: 27555 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier@sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Reviewer: osmith <osmith@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-MessageType: merged
participants (1)
-
fixeria