tbf_dl: Don't fake EGPRS MS class when no related info is available

For instance if PCU received DL data to be sent to an MS from an SGSN,
and the MS is not currently cached in the PCU (because there's no TBF
active for it), it will page it and transmit the DL data to it.
The SGSN is capable of sending (EGPRS) MS Class information in that same
DL data message, so it's the one responsible for providing that
information if not available at the PCU.
In the PCU if we don't have information about that MS and SGSN didn't
provide us information about it, we cannot assume the MS is going to be
EGPRS capable and even less expecting a specific EGPRS MS class.
So let's drop this code.

Related: OS#4544
Change-Id: Icce66cadb51af25ae0c3b3719940eccb548fe33b
This commit is contained in:
Pau Espin 2020-10-27 14:45:20 +01:00
parent 4808d1ceb8
commit 569f0d27c7
3 changed files with 22 additions and 13 deletions

View File

@ -129,15 +129,6 @@ struct gprs_rlcmac_dl_tbf *tbf_alloc_dl_tbf(struct gprs_rlcmac_bts *bts, GprsMs
OSMO_ASSERT(ms != NULL);
if (ms->egprs_ms_class() == 0 && bts->egprs_enabled) {
if (ms->ms_class() > 0) {
LOGP(DTBF, LOGL_NOTICE, "Not accepting non-EGPRS phone in EGPRS-only mode\n");
bts->bts->do_rate_ctr_inc(CTR_TBF_FAILED_EGPRS_ONLY);
return NULL;
}
ms->set_egprs_ms_class(1);
}
LOGP(DTBF, LOGL_DEBUG, "********** DL-TBF starts here **********\n");
LOGP(DTBF, LOGL_INFO, "Allocating DL TBF: MS_CLASS=%d/%d\n",
ms->ms_class(), ms->egprs_ms_class());

View File

@ -2185,7 +2185,7 @@ static void test_tbf_gprs_egprs()
rc = gprs_rlcmac_dl_tbf::handle(bts, tlli, 0, imsi, ms_class, 0,
delay_csec, buf, sizeof(buf));
OSMO_ASSERT(rc == -EBUSY);
OSMO_ASSERT(rc == 0);
fprintf(stderr, "=== end %s ===\n", __func__);
gprs_bssgp_destroy(bts);

View File

@ -2997,10 +2997,28 @@ Creating MS object, TLLI = 0x00000000
Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
Modifying MS object, TLLI = 0x00000000, IMSI '' -> '001001123456789'
The MS object cannot fully confirm an unexpected TLLI: 0xc0006789, partly confirmed
Not accepting non-EGPRS phone in EGPRS-only mode
No PDCH resource
********** DL-TBF starts here **********
Allocating DL TBF: MS_CLASS=45/0
[DL] algo A <single> (suggested TRX: -1): Alloc start
- Skipping TS 0, because not enabled
- Skipping TS 1, because not enabled
- Skipping TS 2, because not enabled
- Skipping TS 3, because not enabled
- Skipping TS 5, because not enabled
- Skipping TS 6, because not enabled
- Skipping TS 7, because not enabled
[DL] Assign downlink TS=4 TFI=0
PDCH(TS 4, TRX 0): Attaching TBF(TFI=0 TLLI=0xc0006789 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000001.
TBF(TFI=0 TLLI=0xc0006789 DIR=DL STATE=NULL) Setting Control TS 4
TBF(TFI=0 TLLI=0xc0006789 DIR=DL STATE=NULL) Allocated: trx = 0, ul_slots = 10, dl_slots = 10
Attaching TBF to MS object, TLLI = 0xc0006789, TBF = TBF(TFI=0 TLLI=0xc0006789 DIR=DL STATE=NULL)
TBF(TFI=0 TLLI=0xc0006789 DIR=DL STATE=NULL) [DOWNLINK] START
TBF(TFI=0 TLLI=0xc0006789 DIR=DL STATE=NULL) Send dowlink assignment on PCH, no TBF exist (IMSI=001001123456789)
TBF(TFI=0 TLLI=0xc0006789 DIR=DL STATE=NULL) changes state from NULL to ASSIGN
TBF(TFI=0 TLLI=0xc0006789 DIR=DL STATE=ASSIGN) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220 pollFN=-1
TBF(TFI=0 TLLI=0xc0006789 DIR=DL STATE=ASSIGN) appending 256 bytes
=== end test_tbf_gprs_egprs ===
Destroying MS object, TLLI = 0xc0006789
=== start test_tbf_ws ===
Creating MS object, TLLI = 0x00000000
Modifying MS object, TLLI = 0x00000000, MS class 0 -> 12