Skip to content

关于f-stack在bbr上的一个bug #1032

Closed

Description

@qq16496578

最近在测试我公司的25g网卡时,发现了一个f-stack bbr的bug,是一个传参的问题,因为这个问题在使用bbr算法时,性能一直上不去。

bbr_get_raw_target_cwnd(bbr, gain, bw)此函数定义与被调用时传参的顺序不一致。应改为bbr_get_raw_target_cwnd(bbr, bw, gain)

如已发现此bug,可忽略。

Activity

  1. jfb8856606 commented on Nov 27, 2025

    @jfb8856606
    Contributor

    Thank you for your testing and feedback.

    We checked the definition and usage of the function and it does appear to have an issue.

    We further examined the FreeBSD-release-13.0 branch code used by F-Stack, as well as the code of the upcoming FreeBSD release-15.0 branch, and found that there have been no modifications.

    We will conduct some further testing and provide feedback later, but it may take a considerable amount of time before we can proceed.

  2. added a commit that references this issue on Mar 27, 2026
    85e7ee0
  3. jfb8856606 commented on Mar 27, 2026

    @jfb8856606
    Contributor

    We have confirmed the bug and submitted a fix: #1058

    The root cause is that both call sites in bbr_get_target_cwnd and bbr_get_a_state_target passed bw and gain in the wrong order to bbr_get_raw_target_cwnd. This caused bw (uint64_t) to be truncated to uint32_t and used as the gain multiplier, while the small gain value was used as the bandwidth, resulting in a severely underestimated congestion window.

    This is an upstream FreeBSD bug (present in all FreeBSD versions including releng/13.0 through releng/15.0 and main). We are fixing it in F-Stack first. Thank you for the detailed report!

  4. added 2 commits that reference this issue on Mar 27, 2026
    8c3808f
    74301b2
  5. added a commit that references this issue on Mar 27, 2026
    7bc9468
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions