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/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/25535 ) Change subject: pcuif: Submit data_req with len=0 as idle frames ...................................................................... pcuif: Submit data_req with len=0 as idle frames This way PCU always answers DATA.ind and the BTS can still clearly identify idle frames. It also simplifies testing and verification of correct behavior. Related: SYS#4919 Change-Id: Ife718eeed2af011479c03099ea109518f04567bc --- M src/gprs_rlcmac_sched.cpp M src/pcu_l1_if.cpp 2 files changed, 30 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/35/25535/1 diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index 405b7db..b3639fb 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -486,9 +486,9 @@ } /* Prio 3: send dummy control message if need to poll or USF */ else { - /* If there's no TBF attached to this PDCH, we can early skip - * since there's nothing to transmit nor to poll/USF. This way - * we help BTS energy saving (on TRX!=C0) by sending nothing + /* If there's no TBF attached to this PDCH, we can submit an empty + * data_req since there's nothing to transmit nor to poll/USF. This + * way we help BTS energy saving (on TRX!=C0) by sending nothing * instead of a dummy block. The early return is done here and * not at the start of the function because the condition below * (num_tbfs==0) may not be enough, because temporary dummy TBFs @@ -504,8 +504,11 @@ * TRX0, since BTS is not preparing dummy bursts on idle TS for us */ skip_idle = skip_idle && trx != 0; #endif - if (skip_idle) - return 0; + if (skip_idle) { + msg = NULL; /* submit empty frame */ + goto tx_pdtch; + } + if ((msg = sched_dummy())) { /* increase counter */ gsmtap_cat = PCU_GSMTAP_C_DL_DUMMY; @@ -535,6 +538,7 @@ tap_n_acc(msg, bts, trx, ts, fn, gsmtap_cat); /* send PDTCH/PACCH to L1 */ +tx_pdtch: pcu_l1if_tx_pdtch(msg, bts, trx, ts, bts->trx[trx].arfcn, fn, block_nr); return 0; diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp index 1600da0..8d9defc 100644 --- a/src/pcu_l1_if.cpp +++ b/src/pcu_l1_if.cpp @@ -212,7 +212,8 @@ data_req->trx_nr = trx; data_req->ts_nr = ts; data_req->block_nr = block_nr; - memcpy(data_req->data, data, len); + if (len) + memcpy(data_req->data, data, len); data_req->len = len; return pcu_sock_send(msg); @@ -223,12 +224,20 @@ { #ifdef ENABLE_DIRECT_PHY if (bts->trx[trx].fl1h) { + if (!msg) /* Simply skip sending idle frames to L1 */ + return; l1if_pdch_req(bts->trx[trx].fl1h, ts, 0, fn, arfcn, block_nr, msg->data, msg->len); msgb_free(msg); return; } #endif + if (!msg) { + pcu_tx_data_req(bts, trx, ts, PCU_IF_SAPI_PDTCH, arfcn, fn, block_nr, + NULL, 0); + return; + } + pcu_tx_data_req(bts, trx, ts, PCU_IF_SAPI_PDTCH, arfcn, fn, block_nr, msg->data, msg->len); msgb_free(msg); @@ -243,10 +252,17 @@ gsmtap_send(the_pcu->gsmtap, arfcn, ts, GSMTAP_CHANNEL_PTCCH, 0, fn, 0, 0, data, data_len); #ifdef ENABLE_DIRECT_PHY if (bts->trx[trx].fl1h) { + if (!data_len) /* Simply skip sending idle frames to L1 */ + return; l1if_pdch_req(bts->trx[trx].fl1h, ts, 1, fn, arfcn, block_nr, data, data_len); return; } #endif + if (!data_len) { + pcu_tx_data_req(bts, trx, ts, PCU_IF_SAPI_PTCCH, arfcn, fn, block_nr, NULL, 0); + return; + } + pcu_tx_data_req(bts, trx, ts, PCU_IF_SAPI_PTCCH, arfcn, fn, block_nr, data, data_len); } @@ -544,8 +560,11 @@ * TRX0, since BTS is not preparing dummy bursts on idle TS for us: */ skip_idle = skip_idle && trx != 0; #endif - if (skip_idle) + if (skip_idle) { + pcu_l1if_tx_ptcch(bts, trx, ts, bts->trx[trx].arfcn, fn, block_nr, + NULL, 0); return 0; + } pcu_l1if_tx_ptcch(bts, trx, ts, bts->trx[trx].arfcn, fn, block_nr, pdch->ptcch_msg, GSM_MACBLOCK_LEN); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/25535 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ife718eeed2af011479c03099ea109518f04567bc Gerrit-Change-Number: 25535 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210922/7e157704/attachment.htm>