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 submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/24324 ) Change subject: [VAMOS] osmo-bts-trx: implement and enable PDU batching for TRXDv2 ...................................................................... [VAMOS] osmo-bts-trx: implement and enable PDU batching for TRXDv2 This change implements TRXD PDU batching approach b), which is described in section 25.3.4 of the user manual [1]. This approach is quite easy to implement on the transceiver side, so we can enable it by default. .Example: datagram structure for combination b) ---- +--------+----------------+---------+------------------------+ | TRXN=N | TDMA FN=F TN=0 | BATCH=1 | Hard-/Soft-bits | +--------+----------------+---------+------------------------+ | TRXN=N | TDMA FN=F TN=1 | BATCH=1 | Hard-/Soft-bits | +--------+----------------+---------+------------------------+ | TRXN=N | TDMA FN=F TN=2 | BATCH=1 | Hard-/Soft-bits | +--------+----------------+---------+------------------------+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +--------+----------------+---------+------------------------+ | TRXN=N | TDMA FN=F TN=7 | BATCH=0 | Hard-/Soft-bits | +--------+----------------+---------+------------------------+ ---- Other PDU batching approaches can be introduced later. [1] https://downloads.osmocom.org/docs/latest/osmobts-usermanual.pdf Change-Id: I9b4cc8e10cd683b28d22e32890569484cd20372d Related: SYS#4895, OS#4941 --- M include/osmo-bts/scheduler.h M src/osmo-bts-trx/scheduler_trx.c M src/osmo-bts-trx/trx_if.c 3 files changed, 23 insertions(+), 5 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmo-bts/scheduler.h b/include/osmo-bts/scheduler.h index 3ea08d9..cf980bc 100644 --- a/include/osmo-bts/scheduler.h +++ b/include/osmo-bts/scheduler.h @@ -256,8 +256,6 @@ size_t burst_len; }; -#define TRX_BR_F_MORE_PDUS (1 << 0) - /*! DL burst request with the corresponding meta info */ struct trx_dl_burst_req { uint8_t flags; /*!< see TRX_BR_F_* */ diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index 2a37abb..fa5c719 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -143,6 +143,9 @@ continue; trx_if_send_burst(l1h, br); } + + /* Batch all timeslots into a single TRXD PDU */ + trx_if_send_burst(l1h, NULL); } } diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index fcad75c..eae11ee 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -1071,6 +1071,7 @@ { uint8_t pdu_ver = l1h->config.trxd_pdu_ver_use; static uint8_t *buf = &trx_data_buf[0]; + static uint8_t *last_pdu = NULL; static unsigned int pdu_num = 0; ssize_t snd_len, buf_len; @@ -1081,6 +1082,16 @@ return -ENODEV; } + /* Burst batching breaker */ + if (br == NULL) { + if (pdu_num > 0) + goto sendall; + return -ENOMSG; + } + + /* Pointer to the last encoded PDU */ + last_pdu = &buf[0]; + switch (pdu_ver) { /* Both versions have the same PDU format */ case 0: /* TRXDv0 */ @@ -1092,7 +1103,8 @@ break; case 2: /* TRXDv2 */ buf[0] = br->tn; - buf[1] = (br->trx_num & 0x3f) | (br->flags << 7); + /* BATCH.ind will be unset in the last PDU */ + buf[1] = (br->trx_num & 0x3f) | (1 << 7); buf[2] = br->mts; buf[3] = br->att; buf[4] = (uint8_t) br->scpir; @@ -1117,14 +1129,19 @@ /* One more PDU in the buffer */ pdu_num++; - /* More PDUs to send? Batch them! */ - if (pdu_ver >= 2 && br->flags & TRX_BR_F_MORE_PDUS) + /* TRXDv2: wait for the batching breaker */ + if (pdu_ver >= 2) return 0; +sendall: LOGPPHI(l1h->phy_inst, DTRX, LOGL_DEBUG, "Tx TRXDv%u datagram with %u PDU(s): fn=%u\n", pdu_ver, pdu_num, br->fn); + /* TRXDv2: unset BATCH.ind in the last PDU */ + if (pdu_ver >= 2) + last_pdu[1] &= ~(1 << 7); + buf_len = buf - &trx_data_buf[0]; buf = &trx_data_buf[0]; pdu_num = 0; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/24324 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I9b4cc8e10cd683b28d22e32890569484cd20372d Gerrit-Change-Number: 24324 Gerrit-PatchSet: 5 Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-CC: neels <nhofmeyr at sysmocom.de> Gerrit-CC: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210601/bce5d284/attachment.htm>