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-pcu/+/24854 )
Change subject: Indicate to the BTS whether DATA.req contains a dummy block
......................................................................
Indicate to the BTS whether DATA.req contains a dummy block
This will allow the BTS to decide whether transmission of a given
DATA.req can be avoided on non-BCCH carriers for the purpose of energy
saving. The idea is simple: if a PDCH timeslot has no Uplink nor
Downlink TBFs allocated, then (most likely) nobody is listening to it.
Add a new field 'flags' to DATA.req message, and use the first LSB bit
to indicate that it contains a potentially ignorable RLC/MAC block.
Given that INFO.ind is currently the longest possible message, we
can easily add new fields to shorter messages like DATA.{ind,req}.
Change-Id: I72c7f0f0853f2bda77c20e3ec1bcd0c7c815c750
Related: SYS#4919, OS#4772
---
M include/osmocom/pcu/pcuif_proto.h
M src/gprs_rlcmac_sched.cpp
M src/pcu_l1_if.cpp
M src/pcu_l1_if.h
4 files changed, 32 insertions(+), 12 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/54/24854/1
diff --git a/include/osmocom/pcu/pcuif_proto.h b/include/osmocom/pcu/pcuif_proto.h
index 23b7a2c..caa52bb 100644
--- a/include/osmocom/pcu/pcuif_proto.h
+++ b/include/osmocom/pcu/pcuif_proto.h
@@ -70,6 +70,9 @@
char text[TXT_MAX_LEN]; /* Text to be transmitted to BTS */
} __attribute__ ((packed));
+/* Indicates that the PDU contains a dummy RLC/MAC block */
+#define PCU_IF_DATA_F_DUMMY (1 << 0)
+
struct gsm_pcu_if_data {
uint8_t sapi;
uint8_t len;
@@ -83,6 +86,7 @@
uint16_t ber10k; /* !< \brief BER in units of 0.01% */
int16_t ta_offs_qbits; /* !< \brief Burst TA Offset in quarter bits */
int16_t lqual_cb; /* !< \brief Link quality in centiBel */
+ uint8_t flags; /* !< \brief See PCU_IF_DATA_F_* above */
} __attribute__ ((packed));
/* data confirmation with direct tlli (instead of raw mac block with tlli) */
diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp
index 2adf1f3..c99c45b 100644
--- a/src/gprs_rlcmac_sched.cpp
+++ b/src/gprs_rlcmac_sched.cpp
@@ -421,6 +421,7 @@
bool tx_is_egprs = false;
bool require_gprs_only;
enum mcs_kind req_mcs_kind; /* Restrict CS/MCS if DL Data block is to be sent */
+ uint8_t flags = 0x00;
if (trx >= 8 || ts >= 8)
return -EINVAL;
@@ -495,6 +496,12 @@
else if ((msg = sched_dummy())) {
/* increase counter */
gsmtap_cat = PCU_GSMTAP_C_DL_DUMMY;
+
+ /* the BTS can potentially suspend transmission of this block */
+ const unsigned num_tbfs = pdch->num_tbfs(GPRS_RLCMAC_DL_TBF)
+ + pdch->num_tbfs(GPRS_RLCMAC_UL_TBF);
+ if (num_tbfs == 0 && usf_tbf == NULL)
+ flags |= PCU_IF_DATA_F_DUMMY;
} else {
return -ENOMEM;
}
@@ -520,7 +527,7 @@
tap_n_acc(msg, bts, trx, ts, fn, gsmtap_cat);
/* send PDTCH/PACCH to L1 */
- pcu_l1if_tx_pdtch(msg, bts, trx, ts, bts->trx[trx].arfcn, fn, block_nr);
+ pcu_l1if_tx_pdtch(msg, bts, trx, ts, bts->trx[trx].arfcn, fn, block_nr, flags);
return 0;
}
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 5aa8849..0432923 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -170,8 +170,7 @@
}
static int pcu_tx_data_req(struct gprs_rlcmac_bts *bts, uint8_t trx, uint8_t ts, uint8_t sapi,
- uint16_t arfcn, uint32_t fn, uint8_t block_nr, uint8_t *data,
- uint8_t len)
+ uint16_t arfcn, uint32_t fn, uint8_t block_nr, uint8_t *data, uint8_t len, uint8_t flags)
{
struct msgb *msg;
struct gsm_pcu_if *pcu_prim;
@@ -196,12 +195,13 @@
data_req->block_nr = block_nr;
memcpy(data_req->data, data, len);
data_req->len = len;
+ data_req->flags = flags;
return pcu_sock_send(msg);
}
void pcu_l1if_tx_pdtch(msgb *msg, struct gprs_rlcmac_bts *bts, uint8_t trx, uint8_t ts, uint16_t arfcn,
- uint32_t fn, uint8_t block_nr)
+ uint32_t fn, uint8_t block_nr, uint8_t flags)
{
#ifdef ENABLE_DIRECT_PHY
if (bts->trx[trx].fl1h) {
@@ -212,14 +212,15 @@
}
#endif
pcu_tx_data_req(bts, trx, ts, PCU_IF_SAPI_PDTCH, arfcn, fn, block_nr,
- msg->data, msg->len);
+ msg->data, msg->len, flags);
msgb_free(msg);
}
void pcu_l1if_tx_ptcch(struct gprs_rlcmac_bts *bts,
uint8_t trx, uint8_t ts, uint16_t arfcn,
uint32_t fn, uint8_t block_nr,
- uint8_t *data, size_t data_len)
+ uint8_t *data, size_t data_len,
+ uint8_t flags)
{
if (the_pcu->gsmtap_categ_mask & (1 << PCU_GSMTAP_C_DL_PTCCH))
gsmtap_send(the_pcu->gsmtap, arfcn, ts, GSMTAP_CHANNEL_PTCCH, 0, fn, 0, 0, data, data_len);
@@ -229,7 +230,7 @@
return;
}
#endif
- pcu_tx_data_req(bts, trx, ts, PCU_IF_SAPI_PTCCH, arfcn, fn, block_nr, data, data_len);
+ pcu_tx_data_req(bts, trx, ts, PCU_IF_SAPI_PTCCH, arfcn, fn, block_nr, data, data_len, flags);
}
void pcu_l1if_tx_agch(struct gprs_rlcmac_bts *bts, bitvec * block, int plen)
@@ -243,7 +244,7 @@
if (the_pcu->gsmtap_categ_mask & (1 << PCU_GSMTAP_C_DL_AGCH))
gsmtap_send(the_pcu->gsmtap, 0, 0, GSMTAP_CHANNEL_AGCH, 0, 0, 0, 0, data, GSM_MACBLOCK_LEN);
- pcu_tx_data_req(bts, 0, 0, PCU_IF_SAPI_AGCH, 0, 0, 0, data, GSM_MACBLOCK_LEN);
+ pcu_tx_data_req(bts, 0, 0, PCU_IF_SAPI_AGCH, 0, 0, 0, data, GSM_MACBLOCK_LEN, 0x00);
}
void pcu_l1if_tx_pch(struct gprs_rlcmac_bts *bts, bitvec * block, int plen, uint16_t pgroup)
@@ -268,7 +269,7 @@
if (the_pcu->gsmtap_categ_mask & (1 << PCU_GSMTAP_C_DL_PCH))
gsmtap_send(the_pcu->gsmtap, 0, 0, GSMTAP_CHANNEL_PCH, 0, 0, 0, 0, data + 3, GSM_MACBLOCK_LEN);
- pcu_tx_data_req(bts, 0, 0, PCU_IF_SAPI_PCH, 0, 0, 0, data, PAGING_GROUP_LEN + GSM_MACBLOCK_LEN);
+ pcu_tx_data_req(bts, 0, 0, PCU_IF_SAPI_PCH, 0, 0, 0, data, PAGING_GROUP_LEN + GSM_MACBLOCK_LEN, 0x00);
}
void pcu_rx_block_time(struct gprs_rlcmac_bts *bts, uint16_t arfcn, uint32_t fn, uint8_t ts_no)
@@ -471,6 +472,7 @@
uint32_t fn, uint8_t block_nr)
{
struct gprs_rlcmac_pdch *pdch;
+ uint8_t flags = 0x00;
/* Prevent buffer overflow */
if (trx >= ARRAY_SIZE(bts->trx) || ts >= 8)
@@ -481,8 +483,14 @@
if (!pdch->m_is_enabled)
return -EAGAIN;
+ /* determine if the BTS can suspend transmission of this block */
+ const unsigned num_tbfs = pdch->num_tbfs(GPRS_RLCMAC_DL_TBF)
+ + pdch->num_tbfs(GPRS_RLCMAC_UL_TBF);
+ if (num_tbfs == 0)
+ flags |= PCU_IF_DATA_F_DUMMY;
+
pcu_l1if_tx_ptcch(bts, trx, ts, bts->trx[trx].arfcn, fn, block_nr,
- pdch->ptcch_msg, GSM_MACBLOCK_LEN);
+ pdch->ptcch_msg, GSM_MACBLOCK_LEN, flags);
return 0;
}
diff --git a/src/pcu_l1_if.h b/src/pcu_l1_if.h
index 2a4f0ea..26e092e 100644
--- a/src/pcu_l1_if.h
+++ b/src/pcu_l1_if.h
@@ -145,11 +145,12 @@
#ifdef __cplusplus
struct gprs_rlcmac_bts;
void pcu_l1if_tx_pdtch(msgb *msg, struct gprs_rlcmac_bts *bts, uint8_t trx, uint8_t ts,
- uint16_t arfcn, uint32_t fn, uint8_t block_nr);
+ uint16_t arfcn, uint32_t fn, uint8_t block_nr, uint8_t flags);
void pcu_l1if_tx_ptcch(struct gprs_rlcmac_bts *bts,
uint8_t trx, uint8_t ts, uint16_t arfcn,
uint32_t fn, uint8_t block_nr,
- uint8_t *data, size_t data_len);
+ uint8_t *data, size_t data_len,
+ uint8_t flags);
void pcu_l1if_tx_agch(struct gprs_rlcmac_bts *bts, bitvec * block, int len);
void pcu_l1if_tx_pch(struct gprs_rlcmac_bts *bts, bitvec * block, int plen, uint16_t pgroup);
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/24854
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I72c7f0f0853f2bda77c20e3ec1bcd0c7c815c750
Gerrit-Change-Number: 24854
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/20210706/0db242ec/attachment.htm>