Attention is currently required from: osmith, laforge, pespin.
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/27836 )

Change subject: osmo-bts-trx: check if scheduling of [dummy] FACCH/H is allowed
......................................................................


Patch Set 3:

(1 comment)

File src/osmo-bts-trx/sched_lchan_tchh.c:

https://gerrit.osmocom.org/c/osmo-bts/+/27836/comment/076432a7_8ba14e4e
PS2, Line 415:                  goto send_burst; /* send garbage */
> Thanks, for the explanation, it's clearer now. […]
Before answering this question I thought it's just garbage, but actually no. 
Short answer: half-filled bursts mixed with zeroes. Basically whatever remained 
in the buffer from a previous invocation of this function: bursts of a 
previously encoded frame. Long answer below.

Normally when tch_dl_dequeue() yields a L2 frame (let's say 'b'), the burst 
buffer already contains 262 bits of the previous frame (let's say 'a') at the 
odd numbered bit positions (bursts b0 and b1). We fill in 262 bits of the new 
frame 'b' to the even numbered bit positions of bursts {b0, b1} and the other 
262 bits to the odd numbered bit positions of bursts {b2, b3}.

        b0   b1   b2   b3   b4   b5
      +----+----+----+----+----+----+
 ...  | ba | ba | _b | _b | __ | __ | ...
      +----+----+----+----+----+----+
       bid0 bid1 bid0 bid1 bid0 bid1
      ^
      |
      | We're here.

Now imagine tch_dl_dequeue() yields NULL, and we're not permitted to schedule 
FACCH/H. We have nothing to fill in to the even numbered bit positions of b0 
and b1 (marked with '_'), which were initialized with zeroes thanks to the 
memset() above.

        b0   b1   b2   b3   b4   b5
      +----+----+----+----+----+----+
 ...  | _a | _a | __ | __ | __ | __ | ...
      +----+----+----+----+----+----+
       bid0 bid1 bid0 bid1 bid0 bid1
      ^
      |
      | We're here.

By jumping to 'send_burst' we send half-filled burst b0 and then b1, so that 
the MS is still able to decode the previous frame 'a'. Please let me know if 
something is not clear.



--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/27836
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I6f8af140a6ccf3d5fd7b98f6cb5c18e2c5e2f61b
Gerrit-Change-Number: 27836
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <[email protected]>
Gerrit-CC: osmith <[email protected]>
Gerrit-CC: pespin <[email protected]>
Gerrit-Attention: osmith <[email protected]>
Gerrit-Attention: laforge <[email protected]>
Gerrit-Attention: pespin <[email protected]>
Gerrit-Comment-Date: Wed, 20 Apr 2022 17:24:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <[email protected]>
Gerrit-MessageType: comment

Reply via email to