DCQCN bugs and their fixes
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 50/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- cpp
- Domain
- networking, performance
Research direction
Start with dcqcn.h, dcqcn.cpp, roce.h, roce.cpp, and dcqcn_logger.cpp, using the cited upstream revision as context. Review each listed failure and fix, then run the relevant simulator cases, including incast and mixed link speeds. Done means the nine reported bugs are fixed and finished flows stop cleanly.
Written by the indexing model from the issue text.
Description
DCQCN bugs
Line numbers refer to upstream 64d199c.
1. _alpha is static
- Where:
dcqcn.h:44,dcqcn.cpp:22 - Bug: All flows share one alpha, so a CNP to any flow changes every flow's rate cuts.
- Fix: Made it a per-instance member, initialised to 1 in the constructor.
2. No minimum rate (divide by zero)
- Where:
dcqcn.cpp:56,roce.h:48 - Bug:
_RC(uint64) rounds down to 0 after repeated cuts.update_spacingthen divides by zero, and the flow stalls or hits the assert atroce.cpp:341. Incast triggers it. - Fix: Clamp
_RC >= _min_rate(rate/100000) after each cut.
3. Byte counter mixes packets and bytes
- Where:
dcqcn.cpp:117 - Bug: It adds a packet count but compares against
_Bin bytes, so byte-counter increase and hyper-increase never run. - Fix: Multiply the packet count by
_mss.
4. Alpha-decay timer never moves forward
- Where:
dcqcn.cpp:128 - Bug:
_last_alpha_updateis never updated, so alpha decays on every tick instead of every 55 µs and falls to ~0. - Fix: Set
_last_alpha_update = nowinside theif.
5. Finished flows never stop (the sim never ends)
- Where:
dcqcn.cpp:113,roce.cpp:329 - Bug: There is no
_donecheck, and the stop check compares_highest_sent(packets) with_flow_size(bytes). Finished flows keep scheduling events, so every run goes to-end(~1000× slowdown). - Fix:
if (_done) return;in bothdoNextEvents, and_highest_sent * _mss >= _flow_size.
6. Packet leak after a flow finishes
- Where:
dcqcn.cpp:159,roce.cpp:246 - Bug: Packets arriving after the flow is done are dropped without being freed.
- Fix: Call
pkt.free()before returning.
7. _RAI / _RHAI are static
- Where:
dcqcn.h:46 - Bug: Each source sets them from its own link rate, so with mixed link speeds all sources use the last value set.
- Fix: Made them per-instance.
8. _T / _BC overflow
- Where:
dcqcn.h:55 - Bug: They are
uint16_t;_Toverflows after ~3.6 s without a CNP. - Fix: Changed to
uint32_t.
9. Sink logger looks for the wrong record type
- Where:
dcqcn_logger.cpp:126 - Bug: It parses
HPCC_SINK, but records are written asDCQCN_SINK. - Fix:
case Logger::DCQCN_SINK.
- Dominant language
- C++
- Stars
- 35
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from spcl/HTSIM
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
[Windows] Hidden title bar: a maximized window restored from minimized on a secondary monitor gets the primary monitor's work area as its client areaPossibly taken @lijy91 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
libnativeapi/nativeapi#53 · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
bot-triaged module: correctness (silent) module: fft triage review
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
patrickjquinn/Marathon-Shell#84 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 80/100
Maintainers usually reply within 1 day