Avoid using N3101 in DL TBFs

TS 44.060 13.4 "N3101" clearly states this counter relates to UL TBFs,
since it only applies to TBFs for which USFs are set:
"When the network after setting USF for a given TBF, receives a valid data block of this TBF from
the mobile station in a block assigned for this USF, it will reset
counter N3101.  If PS Handover is not ongoing, the network will increment counter N3101 for each
USF for which no data is received for this TBF."

Furthermore, N3101 must only be reset for data blocks, so drop all rx
CTRL block patches on UL TBF resetting the counter.

Change-Id: I207f3906d13fc6feea2282e261f468a09db37d86
This commit is contained in:
Pau Espin 2023-06-09 17:03:35 +02:00
parent 74f6dd7a00
commit d8c38777a1
2 changed files with 10 additions and 21 deletions

View File

@ -356,9 +356,6 @@ void gprs_rlcmac_pdch::rcv_control_ack(Packet_Control_Acknowledgement_t *packet,
tbf = poll->tbf_poll.poll_tbf;
reason = poll->tbf_poll.reason;
/* Reset N3101 counter: */
tbf->n_reset(N3101);
ms_update_announced_tlli(tbf->ms(), tlli);
/* Gather MS from TBF again, since it may be NULL or may have been merged during ms_update_announced_tlli */
ms = tbf->ms();
@ -499,9 +496,6 @@ void gprs_rlcmac_pdch::rcv_control_dl_ack_nack(Packet_Downlink_Ack_Nack_t *ack_n
return;
}
/* Reset N3101 counter: */
tbf->n_reset(N3101);
pdch_ulc_release_fn(ulc, fn);
LOGPTBF(tbf, LOGL_DEBUG, "RX: [PCU <- BTS] Packet Downlink Ack/Nack\n");
@ -569,8 +563,6 @@ void gprs_rlcmac_pdch::rcv_control_egprs_dl_ack_nack(EGPRS_PD_AckNack_t *ack_nac
return;
}
/* Reset N3101 counter: */
tbf->n_reset(N3101);
pdch_ulc_release_fn(ulc, fn);
LOGPTBF(tbf, LOGL_DEBUG,
@ -670,8 +662,6 @@ void gprs_rlcmac_pdch::rcv_resource_request(Packet_Resource_Request_t *request,
LOGP(DRLCMAC, LOGL_NOTICE, "PACKET RESOURCE REQ unknown downlink TFI=%d\n", tfi);
return;
}
/* Reset N3101 counter: */
dl_tbf->n_reset(N3101);
ms = tbf_ms(dl_tbf_as_tbf(dl_tbf));
dl_tbf = NULL;
} else { /* ID_TYPE = UL_TFI */
@ -681,8 +671,6 @@ void gprs_rlcmac_pdch::rcv_resource_request(Packet_Resource_Request_t *request,
LOGP(DRLCMAC, LOGL_NOTICE, "PACKET RESOURCE REQ unknown uplink TFI=%d\n", tfi);
return;
}
/* Reset N3101 counter: */
ul_tbf->n_reset(N3101);
ms = tbf_ms(ul_tbf_as_tbf(ul_tbf));
ul_tbf = NULL;
}

View File

@ -307,10 +307,14 @@ void tbf_assign_control_ts(struct gprs_rlcmac_tbf *tbf)
void gprs_rlcmac_tbf::n_reset(enum tbf_counters n)
{
if (n >= N_MAX) {
LOGPTBF(this, LOGL_ERROR, "attempting to reset unknown counter %s\n",
get_value_string(tbf_counters_names, n));
return;
OSMO_ASSERT(n < N_MAX);
switch(n) {
case N3101:
OSMO_ASSERT(direction == GPRS_RLCMAC_UL_TBF);
break;
default:
break;
}
Narr[n] = 0;
@ -321,16 +325,13 @@ bool gprs_rlcmac_tbf::n_inc(enum tbf_counters n)
{
uint8_t chk;
if (n >= N_MAX) {
LOGPTBF(this, LOGL_ERROR, "attempting to increment unknown counter %s\n",
get_value_string(tbf_counters_names, n));
return true;
}
OSMO_ASSERT(n < N_MAX);
Narr[n]++;
switch(n) {
case N3101:
OSMO_ASSERT(direction == GPRS_RLCMAC_UL_TBF);
chk = bts->n3101;
break;
case N3103: