Skip to content

Expose usrsctp's cwnd-based max burst as a setting - #7

Merged
onebeastchris merged 1 commit into
opencollab-incubator:mainfrom
electronicboy:shane/sctp-cwnd-based-max-burst
Nov 27, 2026
Merged

onebeastchris merged 1 commit into
opencollab-incubator:mainfrom
electronicboy:shane/sctp-cwnd-based-max-burst

Conversation

@electronicboy

@electronicboy electronicboy commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Exposes opencollab-incubator/libdatachannel#5's (merged) cwndBasedMaxBurst setting on SctpSettings: SctpSettings.Builder.cwndBasedMaxBurst(boolean).

  • Off means usrsctp's max burst only limits each burst. On, or unset, keeps usrsctp's default, where max burst also cuts cwnd to what's in flight plus maxBurst MTUs whenever the sender is application-limited.
  • Unset is the default, so nothing changes for existing users.
  • LibDataChannel.setSctpSettingsNative and jni/src/util.cpp pass it through as rtcSctpSettings.cwndBasedMaxBurst: 1 on, -1 off, 0 unset.

NetherNetNative in CloudburstMC/Network sets max burst indirectly, through libdatachannel's default of 10. With this setting, a NetherNet server can stop the clamp from pinning cwnd at about 10 packets going into every chunk or pack burst. The reasoning and test results are in #5.

libdatachannel

Syncs jni/libdatachannel to opencollab-incubator/libdatachannel@0b158812, which has opencollab-incubator/libdatachannel#5 (this setting) and opencollab-incubator/libdatachannel#4 (the send-queue stats). It's rebased onto main, and the temporary commit that fetched the submodule from electronicboy/libdatachannel is gone. #6 syncs to the same commit, so the two merge in either order.

Testing

  • :compileJava passes on this branch, and this repo's native build matrix runs on the PR.
  • The same change (on top of Expose the bytes in the SCTP association's own queues and the send buffer that bounds them #6) has been built into release natives for all eight targets by this repo's native build matrix, with every smoke test passing. It's running in production at CubeCraft, with the clamp left on. Setting it off was exercised on a test rig, live, through LibDataChannel.setSctpSettings.
  • The natives weren't rebuilt for this exact branch.

Comment thread .gitmodules Resolved
SctpSettings.Builder.cwndBasedMaxBurst(boolean) chooses whether max burst shrinks cwnd to what is in
flight plus maxBurst MTUs whenever the sender is application-limited, as usrsctp does by default, or
only limits each burst. Unset, usrsctp's default holds.

Syncs jni/libdatachannel to opencollab-incubator/libdatachannel@0b158812, which adds the setting (opencollab-incubator#5).
@electronicboy
electronicboy force-pushed the shane/sctp-cwnd-based-max-burst branch from c5810d8 to b3b9f45 Compare November 25, 2026 12:45
@onebeastchris
onebeastchris merged commit 3075809 into opencollab-incubator:main Nov 27, 2026
16 of 17 checks passed
onebeastchris added a commit to CloudburstMC/Network that referenced this pull request Nov 27, 2026
This brings in upstream improvements, mainly:

usrsctp changes:
- opencollab-incubator/usrsctp#1 (Restart T3-rtx on a new cumulative ack in the express SACK path)

libdatachannel:
- opencollab-incubator/libdatachannel#4 (Report the bytes in the SCTP association's own queues)
- opencollab-incubator/libdatachannel#5 (Make usrsctp's cwnd-based max burst a setting)
- opencollab-incubator/libdatachannel#6 (Pull in usrsctp changes)

libdatachannel-java:
- opencollab-incubator/libdatachannel-java#6 (Expose the bytes in the SCTP association's own queues and the send buffer that bounds them)
- opencollab-incubator/libdatachannel-java#7 (Expose usrsctp's cwnd-based max burst as a setting)
- opencollab-incubator/libdatachannel-java#8 (Sync jni/libdatachannel to latest fork update)
- opencollab-incubator/libdatachannel-java#9 (fix: windows handles leak (x86_64) due to libstdc++ issue)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants