pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/32058 ) Change subject: trxcon: do not call l1sched_prim_dequeue() at ul_bid != 0 ...................................................................... trxcon: do not call l1sched_prim_dequeue() at ul_bid != 0 It may happen that the Tx queue is empty at TDMA Fn corresponding to ul_bid == 0, and then shortly after something appears at ul_bid != 0. The lchan Tx handlers call the encoding functions from libosmocoding only at bid == 0, so dequeueing at ul_bid != 0 makes no sense. Change-Id: Ic0bbe2ab6c0ccd96c1f8af8aa17ac88adf7f88ed Related: OS#5500 --- M src/host/trxcon/src/sched_trx.c 1 file changed, 26 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/host/trxcon/src/sched_trx.c b/src/host/trxcon/src/sched_trx.c index acf060e..bcd24f0 100644 --- a/src/host/trxcon/src/sched_trx.c +++ b/src/host/trxcon/src/sched_trx.c @@ -122,14 +122,18 @@ return; /* If no primitive is being processed, try obtaining one from Tx queue */ - if (lchan->prim == NULL) - lchan->prim = l1sched_lchan_prim_dequeue(lchan, br->fn); if (lchan->prim == NULL) { - /* If CBTX (Continuous Burst Transmission) is required */ - if (l1sched_lchan_desc[chan].flags & L1SCHED_CH_FLAG_CBTX) - l1sched_lchan_prim_assign_dummy(lchan); - if (lchan->prim == NULL) + /* Align to the first burst of a block */ + if (frame->ul_bid != 0) return; + lchan->prim = l1sched_lchan_prim_dequeue(lchan, br->fn); + if (lchan->prim == NULL) { + /* If CBTX (Continuous Burst Transmission) is required */ + if (l1sched_lchan_desc[chan].flags & L1SCHED_CH_FLAG_CBTX) + l1sched_lchan_prim_assign_dummy(lchan); + if (lchan->prim == NULL) + return; + } } /* TODO: report TX buffers health to the higher layers */ -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/32058 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ic0bbe2ab6c0ccd96c1f8af8aa17ac88adf7f88ed Gerrit-Change-Number: 32058 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-MessageType: merged