Repository navigation
cell M6: re-phasing a live cell (F1 v19, channel-switch IE v2) - #575
Conversation
RAN_REPHASE=1: the CU moves a running DU whose phase plan (the others where they are) scores at least RAN_REPHASE_MIN_GAIN higher, with its UEs: the DU steps its TSF at an instant idle in both grids (rephase_plan: after the old active span, landing after the new one; the superframe count runs on), the discipline takes the new phase and the network offset follows; its UEs shift their view of its clock by the same step and re-place their uplink beacon. Announced in the channel-switch IE (v2: step, instant); F1 ChannelSwitchCmd.phase_us. Rig (testrig m6_rephase.sh, 2 runs per case): cell 2 moved 20000 -> 51200 live; 1-2 uplinks of the moved UE out of slot at the move, then 100 %; afterwards no suspend gaps, each UE measures the other cell in idle gaps, and each DU hears its UE in 0.997-1.000 of superframes (0.90-0.95 before and in the baseline). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
PR Summary by QodoRe-phase running cells with coordinated DU and UE clock steps
AI Description
Diagram
High-Level Assessment
Files changed (8)
|
Code Review by Qodo
1.
|
…does a move the DU did not make (test: CELL_DU_TEST_REPHASE_FAIL); stops its beacon on every move; the stale beacon checked for small forward moves; the CU takes the best reachable phase; one net_base value; re-read after any write; neighbour offsets under f1_mu; docs point at the headers Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
All eight findings were valid. Fixed in
Rig re-run on the fixed build ( |
#566 item: more than three cells, and re-phasing live cells. This PR covers the re-phasing; a fourth cell needs a seventh radio, and the full tour needs #563's range.
Why. The planner places only joining cells. A cell that started at a bad phase, such as a fixed
CELL_PHASE_USor one that joined before its neighbours, stays there and keeps paying for suspend gaps: 1–2 uplinks in 20.What. A live phase move, the channel switch with a TSF step instead of a retune.
RAN_REPHASE=1,RAN_REPHASE_MIN_GAIN[1.0],RAN_REPHASE_AT_S): scores each running DU's phase against its plan with the others left in place, and moves the one with the largest gain. Ties go to the highest id, so the oldest cell stays the reference. One DU at a time, never during a handover.ran.rephaseis logged at the decision andran.cs_doneonce the report shows the phase.ChannelSwitchCmd.phase_us(−1 = a channel move).ChannelSwitch.h: IE v2 carriesstep_usandat_us.rephase_plan()picks an instant idle in both grids: after the old active span, landing after the new one, before the next TBTT. The superframe count runs on, and it prefers a negative step so Kestrel's one stale old-phase beacon stays in idle time.no_windowor a different channel), announces it for ≥ 3 superframes, then steps the TSF. Its discipline takes the new phase viaset_phase(plusstepped()for ledger parts), the network offset follows, and the neighbours' offsets are recomputed. The runtime phase is now an atomic for the RX and F1 threads.cell_m5covers the IE v2 round-trip and tamper check,rephase_planat the rig's phases (including the positive-step and no-window cases) and the F1 v19 round-trip.docs/cell-m6.mdsection "Re-phasing a live cell", plusPhasePlan.hcomments.Rig (testrig
scripts/m6_rephase.sh, 2 runs per case, all pass): cell 1 on ch149 at phase 0, cell 2 on ch157 started at 20000, suspend gaps one in 20.Not covered: a chain of moves, where one move makes another worthwhile, has run only as a single move.
ctest: 95/95 pass.
🤖 Generated with Claude Code