1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-04-18 17:24:03 +03:00

8461 Commits

Author SHA1 Message Date
Konstantin Tsoy
4bfdd122e0 Change processUdpPacket() to return an error
Summary: Next, remove throws

Reviewed By: sharmafb

Differential Revision: D69567910

fbshipit-source-id: 5d78324b7d1a9b9e65e789ee51f0091e2547de80
2025-02-14 19:21:05 -08:00
Konstantin Tsoy
d98c90c48d Change onReadData() to return an error
Summary:
All according to plan: https://fburl.com/gdoc/pebccgi1
Changing function definitions to return errors while still throwing.

Reviewed By: sharmafb

Differential Revision: D69567329

fbshipit-source-id: 5d40ee32fe185d5674785632a9a13e4cef996988
2025-02-14 19:21:05 -08:00
Matt Joras
6a8f9bcb6b Add fixed short header padding
Summary: This adds a knob which puts a fixed amount of padding at the start of short header packets. This is useful to test the consequences of e.g. a larger CID or the impacts of a smaller packet size.

Reviewed By: jbeshay

Differential Revision: D69603113

fbshipit-source-id: b92ba78682eed21b7d75e38c9584a93481e2eb2f
2025-02-14 09:57:41 -08:00
Joseph Beshay
485e35e787 Ensure transportSettingsOverride fn_ takes precedence
Summary: Previously, we had code that changes the transport settings after the override function. This defeats the purpose of the override function where some overrides would not take place. This changes the function to be called last before setting the transport settings on the transport. Also, to avoid an additional copy of the transportSettings, this changes the function to modify its input transportSettings. The class variable transportSettings_ is a const so it is not possible to pass it by mistake to the override function.

Reviewed By: hanidamlaj, kvtsoy

Differential Revision: D69620347

fbshipit-source-id: fa5b7d4f54de50e4b19b75f284ed3d5e5c681f68
2025-02-14 09:55:37 -08:00
Joseph Beshay
cab3f2c3b4 Refactor ACK decoding for the different ACK types
Summary: Separate functionality for parsing receive timestamp and ecn fields in ACKs into their own functions.

Differential Revision: D68931150

fbshipit-source-id: 8031770b118138a0002999bca52c69f96f29b617
2025-02-13 17:48:18 -08:00
Joseph Beshay
015c62e964 Refactor ACK writing for the different ACK types
Summary:
This replaces three separate functions for writing ACK, ACK_ECN, and ACK_RECEIVE_TIMESTAMPS with one function that can write all three.

Previously, we have two paths:
1. Default path which writes the base ACK frame and optionally adds the ECN counts if the frame type is ACK_ECN.
2. If ACK_RECEIVE_TIMESTAMPS are supported, another path would take the ART config and write that frame with the ART fields.
Path #2 does not support ECN marks.

This change consolidates ACK writing into a single path which takes ART config and frame type. It decides which fields to include based upon the type and config passed. This change does not add any new frame types but it prepares for one that can carry both ECN counts and ART fields.

Differential Revision: D68931147

fbshipit-source-id: 47b425b30f00b6c76574bc768d0ec249c60a0aa7
2025-02-13 17:48:18 -08:00
Joseph Beshay
40146c4558 Reset scheduledForDestructionCount when resetting outstanding packets
Summary: As title.

Reviewed By: sharmafb

Differential Revision: D69564993

fbshipit-source-id: 86eb6910d0e1c38e2f2a7101769b7c367a7430ac
2025-02-13 11:21:02 -08:00
Facebook Community Bot
c526f93d0e
Re-sync with internal repository (#372)
The internal and external repositories are out of sync. This Pull Request attempts to brings them back in sync by patching the GitHub repository. Please carefully review this patch. You must disable ShipIt for your project in order to merge this pull request. DO NOT IMPORT this pull request. Instead, merge it directly on GitHub using the MERGE BUTTON. Re-enable ShipIt after merging.
2025-02-13 10:04:13 -08:00
Aman Sharma
598b6f245d Make a SendmmsgGSOInplacePacketBatchWriter
Summary: The `SendmmsgGSOInplacePacketBatchWriter` is equivalent to the `SendmmsgGSOPacketBatchWriter`, except that it operates on the in-place buffer.

Reviewed By: jbeshay

Differential Revision: D69410775

fbshipit-source-id: 32782f9797e7e2354cbafabf956985b96900f59b
2025-02-13 00:14:48 -08:00
Aman Sharma
f86853c916 Make a QuicAsyncUDPSocket::writemGSO API that uses iovecs
Summary: This is one step in the overall process of removing the usage of folly::IOBuf in the QUIC codebase.

Reviewed By: jbeshay, kvtsoy

Differential Revision: D69410532

fbshipit-source-id: 50f9d828f2215b1db23171c0d673f4d2aa0fe885
2025-02-13 00:14:48 -08:00
Konstantin Tsoy
9418c93c02 Expose getPeerCertificate() in client
Summary: Expose getPeerCertificate() in client

Reviewed By: sharmafb

Differential Revision: D69485548

fbshipit-source-id: de6bd480554c51ad6209bc77eefc8fecd773c796
2025-02-12 16:15:02 -08:00
Xiao Li
646cec48cd allow builder to customize CMAKE_CXX_STANDARD for fizz, mvfst and wangle
Summary:
In OSS build, we need to enable coroutine with gnu++20 and clang.

When we build folly with CXX standard gnu++20 and clang, it will fail to build fizz, mvfst / wangle if these project has CXX standard set to 17.

example error log:

  /usr/bin/clang++ -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_CONTEXT_DYN_LINK -DBOOST_CONTEXT_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_NO_LIB -DBOOST_REGEX_DYN_LINK -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_THREAD_NO_LIB -DFMT_SHARED -DGFLAGS_IS_A_DLL=0 -DWANGLE_HAVE_SSL_SESSION_DUP -Dwangle_EXPORTS -I/tmp/fbcode_builder_getdeps-ZappZfbthriftZbuildZfbcode_builder-root/repos/github.com-facebook-wangle.git/wangle/.. -isystem /usr/include/libdwarf -isystem /usr/include/libiberty -std=gnu++20 -O2 -fcoroutines-ts -I/usr/include/python3.10/ -O2 -g -DNDEBUG -fPIC -std=c++17 -MD -MT CMakeFiles/wangle.dir/acceptor/EvbHandshakeHelper.cpp.o -MF CMakeFiles/wangle.dir/acceptor/EvbHandshakeHelper.cpp.o.d -o CMakeFiles/wangle.dir/acceptor/EvbHandshakeHelper.cpp.o -c /tmp/fbcode_builder_getdeps-ZappZfbthriftZbuildZfbcode_builder-root/repos/github.com-facebook-wangle.git/wangle/acceptor/EvbHandshakeHelper.cpp
  In file included from /tmp/fbcode_builder_getdeps-ZappZfbthriftZbuildZfbcode_builder-root/repos/github.com-facebook-wangle.git/wangle/acceptor/EvbHandshakeHelper.cpp:17:
  In file included from /tmp/fbcode_builder_getdeps-ZappZfbthriftZbuildZfbcode_builder-root/repos/github.com-facebook-wangle.git/wangle/../wangle/acceptor/EvbHandshakeHelper.h:22:
  In file included from /usr/local/include/folly/io/async/AsyncSSLSocket.h:21:
  In file included from /usr/local/include/folly/Optional.h:680:
  In file included from /usr/local/include/folly/coro/Coroutine.h:40:
  /usr/bin/../lib/gcc/aarch64-linux-gnu/11/../../../../include/c++/11/coroutine:334:2: error: "the coroutine   header requires -fcoroutines"
  #error "the coroutine header requires -fcoroutines"

When building with clang, it does not support flag: "-fcoroutines". It needs "-fcoroutines-ts" to enable coroutines support.

Change to not set CMAKE_CXX_STANDARD to 17 and set(CMAKE_CXX_EXTENSIONS OFF) when the CMAKE_CXX_STANDARD is provided

Reviewed By: jmswen

Differential Revision: D69486269

fbshipit-source-id: 9ef6ef173d3aba5f4490406457f62a135e7fedd0
2025-02-12 15:53:39 -08:00
Jolene Tan
9b44e8dac0 Implement Fizz ClientHello padding client extension
Summary: Implement TLS padding extension in QUIC `FizzClientExtensions`

Reviewed By: mjoras

Differential Revision: D69134166

fbshipit-source-id: 8ef10d92b0f8ff33940807f44bf3f8940b795ae3
2025-02-12 10:35:12 -08:00
Michael Lee
dd947c79d9 Continue moving for quic/server
Summary: Continue converting from `TARGETS` to `BUCK`

Reviewed By: bigfootjon

Differential Revision: D69125366

fbshipit-source-id: 820506fc1b17ed907a3f4839a8780e214a5d7e11
2025-02-12 08:37:22 -08:00
Michael Lee
ad96bd5eab Continue moving for quic/server/**
Summary:
Continue converting from `TARGETS` to `BUCK`

Converting `quic/server/BUCK` produces interesting new build failures, so don't do that for now.

Reviewed By: bigfootjon

Differential Revision: D69476070

fbshipit-source-id: 20548eee792eb07bc7ab1dce91d768d92e1f2c98
2025-02-11 18:59:22 -08:00
dependabot[bot]
5a304b3942 Bump dom-iterator from 1.0.0 to 1.0.2 in /quic/docs/docsite (#370)
Summary:
Bumps [dom-iterator](https://github.com/MatthewMueller/dom-iterator) from 1.0.0 to 1.0.2.
<details>
<summary>Commits</summary>
<ul>
<li><a href="95a87f136a"><code>95a87f1</code></a> Release 1.0.2</li>
<li><a href="77986414e4"><code>7798641</code></a> Merge pull request <a href="https://redirect.github.com/MatthewMueller/dom-iterator/issues/15">https://github.com/facebook/mvfst/issues/15</a> from arjangeertsema/master</li>
<li><a href="e459d50d18"><code>e459d50</code></a> removed cheerio dependency</li>
<li><a href="d690a6ea53"><code>d690a6e</code></a> Release 1.0.1</li>
<li><a href="cf9c9701b3"><code>cf9c970</code></a> pin deps and almost fix build</li>
<li><a href="c08c3e1c37"><code>c08c3e1</code></a> Merge pull request <a href="https://redirect.github.com/MatthewMueller/dom-iterator/issues/13">https://github.com/facebook/mvfst/issues/13</a> from vladajankovic/master</li>
<li><a href="9e0e0fad5a"><code>9e0e0fa</code></a> Fix for CVE-2024-21541</li>
<li>See full diff in <a href="https://github.com/MatthewMueller/dom-iterator/compare/1.0.0...1.0.2">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dom-iterator&package-manager=npm_and_yarn&previous-version=1.0.0&new-version=1.0.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebook/mvfst/network/alerts).

</details>

Pull Request resolved: https://github.com/facebook/mvfst/pull/370

Reviewed By: sharmafb

Differential Revision: D69433132

Pulled By: jbeshay

fbshipit-source-id: 84d51998c00d91743ca883c9c6eb54671357918a
2025-02-11 14:41:02 -08:00
dependabot[bot]
4ca060ffcd Bump serialize-javascript from 6.0.0 to 6.0.2 in /quic/docs/docsite (#371)
Summary:
Bumps [serialize-javascript](https://github.com/yahoo/serialize-javascript) from 6.0.0 to 6.0.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/yahoo/serialize-javascript/releases">serialize-javascript's releases</a>.</em></p>
<blockquote>
<h2>v6.0.2</h2>
<ul>
<li>fix: serialize URL string contents to prevent XSS (<a href="https://redirect.github.com/yahoo/serialize-javascript/issues/173">https://github.com/facebook/mvfst/issues/173</a>)  f27d65d</li>
<li>Bump <code>@​babel/traverse</code> from 7.10.1 to 7.23.7 (<a href="https://redirect.github.com/yahoo/serialize-javascript/issues/171">https://github.com/facebook/mvfst/issues/171</a>)  02499c0</li>
<li>docs: update readme with URL support (<a href="https://redirect.github.com/yahoo/serialize-javascript/issues/146">https://github.com/facebook/mvfst/issues/146</a>)  0d88527</li>
<li>chore: update node version and lock file  e2a3a91</li>
<li>fix typo (<a href="https://redirect.github.com/yahoo/serialize-javascript/issues/164">https://github.com/facebook/mvfst/issues/164</a>)  5a1fa64</li>
</ul>
<p><a href="https://github.com/yahoo/serialize-javascript/compare/v6.0.1...v6.0.2">https://github.com/yahoo/serialize-javascript/compare/v6.0.1...v6.0.2</a></p>
<h2>v6.0.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Bump mocha from 9.0.1 to 9.0.2 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/yahoo/serialize-javascript/pull/126">yahoo/serialize-javascript#126</a></li>
<li>Bump mocha from 9.0.2 to 9.0.3 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/yahoo/serialize-javascript/pull/127">yahoo/serialize-javascript#127</a></li>
<li>Bump path-parse from 1.0.6 to 1.0.7 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/yahoo/serialize-javascript/pull/129">yahoo/serialize-javascript#129</a></li>
<li>Bump mocha from 9.0.3 to 9.1.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/yahoo/serialize-javascript/pull/130">yahoo/serialize-javascript#130</a></li>
<li>Bump mocha from 9.1.0 to 9.1.1 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/yahoo/serialize-javascript/pull/131">yahoo/serialize-javascript#131</a></li>
<li>Bump mocha from 9.1.1 to 9.1.2 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/yahoo/serialize-javascript/pull/132">yahoo/serialize-javascript#132</a></li>
<li>Bump mocha from 9.1.2 to 9.1.3 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/yahoo/serialize-javascript/pull/133">yahoo/serialize-javascript#133</a></li>
<li>Bump mocha from 9.1.3 to 9.1.4 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/yahoo/serialize-javascript/pull/137">yahoo/serialize-javascript#137</a></li>
<li>Bump mocha from 9.1.4 to 9.2.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/yahoo/serialize-javascript/pull/138">yahoo/serialize-javascript#138</a></li>
<li>Bump chai from 4.3.4 to 4.3.6 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/yahoo/serialize-javascript/pull/140">yahoo/serialize-javascript#140</a></li>
<li>Bump ansi-regex from 5.0.0 to 5.0.1 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/yahoo/serialize-javascript/pull/141">yahoo/serialize-javascript#141</a></li>
<li>Bump mocha from 9.2.0 to 9.2.2 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/yahoo/serialize-javascript/pull/143">yahoo/serialize-javascript#143</a></li>
<li>Bump minimist from 1.2.5 to 1.2.6 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/yahoo/serialize-javascript/pull/144">yahoo/serialize-javascript#144</a></li>
<li>Bump mocha from 9.2.2 to 10.0.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/yahoo/serialize-javascript/pull/145">yahoo/serialize-javascript#145</a></li>
<li>Bump mocha from 10.0.0 to 10.1.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/yahoo/serialize-javascript/pull/149">yahoo/serialize-javascript#149</a></li>
<li>Bump chai from 4.3.6 to 4.3.7 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/yahoo/serialize-javascript/pull/150">yahoo/serialize-javascript#150</a></li>
<li>ci: test.yml - actions bump by <a href="https://github.com/piwysocki"><code>@​piwysocki</code></a> in <a href="https://redirect.github.com/yahoo/serialize-javascript/pull/151">yahoo/serialize-javascript#151</a></li>
<li>Bump minimatch from 3.0.4 to 3.1.2 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/yahoo/serialize-javascript/pull/152">yahoo/serialize-javascript#152</a></li>
<li>Bump mocha from 10.1.0 to 10.2.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/yahoo/serialize-javascript/pull/153">yahoo/serialize-javascript#153</a></li>
<li>Bump json5 from 2.1.3 to 2.2.3 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/yahoo/serialize-javascript/pull/155">yahoo/serialize-javascript#155</a></li>
<li>Fix serialization issue for 0n. by <a href="https://github.com/momocow"><code>@​momocow</code></a> in <a href="https://redirect.github.com/yahoo/serialize-javascript/pull/156">yahoo/serialize-javascript#156</a></li>
<li>Release v6.0.1 by <a href="https://github.com/okuryu"><code>@​okuryu</code></a> in <a href="https://redirect.github.com/yahoo/serialize-javascript/pull/157">yahoo/serialize-javascript#157</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/piwysocki"><code>@​piwysocki</code></a> made their first contribution in <a href="https://redirect.github.com/yahoo/serialize-javascript/pull/151">yahoo/serialize-javascript#151</a></li>
<li><a href="https://github.com/momocow"><code>@​momocow</code></a> made their first contribution in <a href="https://redirect.github.com/yahoo/serialize-javascript/pull/156">yahoo/serialize-javascript#156</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/yahoo/serialize-javascript/compare/v6.0.0...v6.0.1">https://github.com/yahoo/serialize-javascript/compare/v6.0.0...v6.0.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="b71ec23841"><code>b71ec23</code></a> 6.0.2</li>
<li><a href="f27d65d3de"><code>f27d65d</code></a> fix: serialize URL string contents to prevent XSS (<a href="https://redirect.github.com/yahoo/serialize-javascript/issues/173">https://github.com/facebook/mvfst/issues/173</a>)</li>
<li><a href="02499c0adf"><code>02499c0</code></a> Bump <code>@​babel/traverse</code> from 7.10.1 to 7.23.7 (<a href="https://redirect.github.com/yahoo/serialize-javascript/issues/171">https://github.com/facebook/mvfst/issues/171</a>)</li>
<li><a href="0d885272f4"><code>0d88527</code></a> docs: update readme with URL support (<a href="https://redirect.github.com/yahoo/serialize-javascript/issues/146">https://github.com/facebook/mvfst/issues/146</a>)</li>
<li><a href="e2a3a9173e"><code>e2a3a91</code></a> chore: update node version and lock file</li>
<li><a href="5a1fa646d9"><code>5a1fa64</code></a> fix typo (<a href="https://redirect.github.com/yahoo/serialize-javascript/issues/164">https://github.com/facebook/mvfst/issues/164</a>)</li>
<li><a href="7139f9251b"><code>7139f92</code></a> Release v6.0.1 (<a href="https://redirect.github.com/yahoo/serialize-javascript/issues/157">https://github.com/facebook/mvfst/issues/157</a>)</li>
<li><a href="7e23ae89e4"><code>7e23ae8</code></a> Fix serialization issue for 0n. (<a href="https://redirect.github.com/yahoo/serialize-javascript/issues/156">https://github.com/facebook/mvfst/issues/156</a>)</li>
<li><a href="343abd98ff"><code>343abd9</code></a> Bump json5 from 2.1.3 to 2.2.3 (<a href="https://redirect.github.com/yahoo/serialize-javascript/issues/155">https://github.com/facebook/mvfst/issues/155</a>)</li>
<li><a href="38d0e70e2d"><code>38d0e70</code></a> Bump mocha from 10.1.0 to 10.2.0 (<a href="https://redirect.github.com/yahoo/serialize-javascript/issues/153">https://github.com/facebook/mvfst/issues/153</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/yahoo/serialize-javascript/compare/v6.0.0...v6.0.2">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serialize-javascript&package-manager=npm_and_yarn&previous-version=6.0.0&new-version=6.0.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebook/mvfst/network/alerts).

</details>

Pull Request resolved: https://github.com/facebook/mvfst/pull/371

Reviewed By: sharmafb

Differential Revision: D69433149

Pulled By: jbeshay

fbshipit-source-id: 5e97a112005c3d76a39fb8a77cb112e22ab93e33
2025-02-11 14:40:09 -08:00
Aman Sharma
57ae934f07 Always use InplaceQuicPacketBuilder within writeCloseCommon
Summary: See title

Reviewed By: hanidamlaj

Differential Revision: D69195840

fbshipit-source-id: 777a4cbb8d2ae8754308a1bbedc35d399e9f44ff
2025-02-11 11:02:18 -08:00
Aman Sharma
c6d19083df Make a SendmmsgInplacePacketBatchWriter
Summary: See title.

Reviewed By: mjoras

Differential Revision: D69073543

fbshipit-source-id: 11f8a376909df9ae2bc7560cac09a1d2f431acaa
2025-02-10 16:28:00 -08:00
dependabot[bot]
8f617c79b0 Bump nanoid from 3.3.4 to 3.3.8 in /quic/docs/docsite (#368)
Summary:
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.4 to 3.3.8.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/ai/nanoid/blob/main/CHANGELOG.md">nanoid's changelog</a>.</em></p>
<blockquote>
<h2>3.3.8</h2>
<ul>
<li>Fixed a way to break Nano ID by passing non-integer size (by <a href="https://github.com/myndzi"><code>@​myndzi</code></a>).</li>
</ul>
<h2>3.3.7</h2>
<ul>
<li>Fixed <code>node16</code> TypeScript support (by Saadi Myftija).</li>
</ul>
<h2>3.3.6</h2>
<ul>
<li>Fixed package.</li>
</ul>
<h2>3.3.5</h2>
<ul>
<li>Backport funding information.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="3044cd5e73"><code>3044cd5</code></a> Release 3.3.8 version</li>
<li><a href="4fe34959c3"><code>4fe3495</code></a> Update size limit</li>
<li><a href="d643045f40"><code>d643045</code></a> Fix pool pollution, infinite loop (<a href="https://redirect.github.com/ai/nanoid/issues/510">#510</a>)</li>
<li><a href="89d82d2ce4"><code>89d82d2</code></a> Release 3.3.7 version</li>
<li><a href="5022c35aca"><code>5022c35</code></a> Update dual-publish</li>
<li><a href="3e7a8e557b"><code>3e7a8e5</code></a> Remove benchmark from CI for v3</li>
<li><a href="d3561446ae"><code>d356144</code></a> Fix CI for v3</li>
<li><a href="37b25dfac2"><code>37b25df</code></a> Move to pnpm 8</li>
<li><a href="d96f39222a"><code>d96f392</code></a> Release 3.3.6 version</li>
<li><a href="8210dfb9fc"><code>8210dfb</code></a> Release 3.3.5 version</li>
<li>Additional commits viewable in <a href="https://github.com/ai/nanoid/compare/3.3.4...3.3.8">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=nanoid&package-manager=npm_and_yarn&previous-version=3.3.4&new-version=3.3.8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebook/mvfst/network/alerts).

</details>

Pull Request resolved: https://github.com/facebook/mvfst/pull/368

Reviewed By: sharmafb

Differential Revision: D69421812

Pulled By: jbeshay

fbshipit-source-id: 8f82124b0010830febddc505ca486c327b62e589
2025-02-10 16:17:29 -08:00
Aman Sharma
0b17183460 Make the returned body buffer in InplaceQuicPacketBuilder::buildPacket() have cipherOverhead_ tailroom
Summary: This isn't really a functional change. I'm making the returned buffer have cipherOverhead_ tailroom instead of having 0 tailroom.

Reviewed By: jbeshay

Differential Revision: D69062899

fbshipit-source-id: 363dd374790f5b7ffea1031a667a41f7cb0d8937
2025-02-10 15:40:48 -08:00
Alan Frindell
530491a885 RoundRobin
Summary:
This class tracks a group of identifiers and round-robins them out via geNext or peekNext/consume.  There are two ways to advance, either by bytes (passed in) or the number of calls to getNext().

It's implemented using a doubly-linked list, with an optional map for fast deletion of large sets.

Reviewed By: mjoras

Differential Revision: D68641758

fbshipit-source-id: ffb17ef6afee336da0117b07ef4119db867a4881
2025-02-09 18:40:06 -08:00
Alan Frindell
ac34f7e952 PriorityQueue API
Summary:
New generic PriorityQueue API

The goal is to abstract the priority mechanism and even what is a "priority" from mvfst entirely.  The queue prioritizes "Identifiers" which can be streams or datagram "flows", which is more flexible than mvfst is currently capable of.

Reviewed By: hanidamlaj

Differential Revision: D68641756

fbshipit-source-id: 0449ed7852216f2906c0ecf9c14a10cce3c308c7
2025-02-09 18:40:06 -08:00
Nadav Rotem
d4d827ca25 Fix: Correct Zstd capitalization in FindZstd.cmake
Summary:
X-link: https://github.com/facebook/folly/pull/2379

This commit addresses a CMake warning due to inconsistent capitalization of the Zstd package name in FindZstd.cmake. This fixes issues with finding and using the Zstd library.

Tested on Cmake 3.28.3
X-link: https://github.com/facebookincubator/zstrong/pull/1170

Reviewed By: terrelln

Differential Revision: D69284782

fbshipit-source-id: 4acc32705ae937f075e1531cae3449cfae0d84ec
2025-02-08 15:17:06 -08:00
Joseph Beshay
3badba2e37 Fix broken PacketsReceivedEventsSingle test on Windows as client
Summary:
The default client read path does not support reading ECN bits on Windows. This is the path the test is designed around.

This change avoids checking the ECN bit values only for Windows as a client.

Reviewed By: mjoras

Differential Revision: D69329741

fbshipit-source-id: c4795e0eb0293e674174360acc427c342554836c
2025-02-07 20:36:47 -08:00
Joseph Beshay
c926d1a034 Do not attempt to apply unsupported SOL_UDP socket options on Windows
Summary: SOL_UDP is not supported on Windows. folly netops defines SOL_UDP as 0 which is equal to IPPROTO_IP. This causes SocketUtil to wrongly attempt to apply any SOL_UDP options to IPv6 sockets on Windows.  SocketUtilTest.applySocketOptions unit test caught that.

Reviewed By: mjoras

Differential Revision: D69329742

fbshipit-source-id: 27a3896fbe8583ed4a13aee5a6d1d343c9ff0f77
2025-02-07 20:36:47 -08:00
Joseph Beshay
7c3609b155 Fix QuicServerTest on Windows
Summary:
Initializing the folly Socket Addresses with a string, requires WSAStartup() to have been called. Otherwise, SocketAddress::getAddrInfo() fails with the following error:
```
Failed to resolve address for '1.2.3.4': Either the application has not called WSAStartup, or WSAStartup failed.  (error=10093)
```

Rather that adding Windows specific #defines, initializing these constants using the IPAddress() constuctor avoids the issue since it uses inet_pton() underneath.

Reviewed By: mjoras

Differential Revision: D69329743

fbshipit-source-id: 17571f62031c43ff2ca890f682e43b6cd139d4f8
2025-02-07 20:36:47 -08:00
Jon Maltiel Swenson
2c2b3ce52c Remove getdeps dependency on Python 3.8
Summary:
X-link: https://github.com/facebookincubator/zstrong/pull/1175

Instead of having fbthrift download and build Python 3.8 (which is ancient), users should be able to build fbthrift against the target Python environment. (This is consistent with how Python packages would normally be built/installed.)

Note that users can specify their target version of Python via the `PYTHON_LIBRARY` and `PYTHON_INCLUDE_DIR` CMake variables, as demonstrated in the command in the test plan.

Reviewed By: vladmihailescu

Differential Revision: D68510340

fbshipit-source-id: f94805de4220b2c107ed0aa0d57fd23b65b29bd2
2025-02-07 12:19:15 -08:00
Joseph Beshay
8182c8722e Default to 10s ProbeRTT interval to match bbr1
Summary: As title.

Reviewed By: sharmafb

Differential Revision: D69158017

fbshipit-source-id: 407aab7f30aaa72d49848a917948d780bd5096a7
2025-02-05 13:34:48 -08:00
Joseph Beshay
a651dcc4d0 Use loss in round when deciding whether to exit probe bw up
Summary: This improves the loss measurement when exiting ProbeBW_UP based upon loss. We shouldn't assume on ack is enough to trigger the loss threshold.

Reviewed By: sharmafb

Differential Revision: D69158002

fbshipit-source-id: 7966d8353683de9b09731db8da09871c6fcecebf
2025-02-05 13:34:48 -08:00
Konstantin Tsoy
476607c217 Clean up inline writes param
Summary: Clean up inline writes param

Differential Revision: D68977602

fbshipit-source-id: 4edb4ca08605fab76b56e706c2ccc85836018594
2025-02-04 23:51:44 -08:00
Konstantin Tsoy
14d8a46842 Clean up mvfstCheckIdleTimerOnWrites param
Summary: Clean up mvfstCheckIdleTimerOnWrites param

Reviewed By: sharmafb

Differential Revision: D68972795

fbshipit-source-id: f19f9947fa8a8affe4c4411c22d893cb95d71fe0
2025-02-04 23:51:44 -08:00
Open Source Bot
e87434bf71 Updating hashes
Summary:
GitHub releases:

https://github.com/facebook/buck2/releases/tag/2025-02-01

Reviewed By: ckwalsh

fbshipit-source-id: 11cc2d85400255dcd1087a364e832140cd495878
2025-02-01 09:33:41 -08:00
Joseph Beshay
2feff142e1 Count non-contiguous ranges within a single lossEvent
Summary: My previous attempt at counting non-contiguous losses overlooked the fact that not all losses are contiguous within a single ACK. This change fixes that.

Reviewed By: ritengupta

Differential Revision: D68937070

fbshipit-source-id: 24e9ce148fa8747dcbe68936fc50d70f6b1b061b
2025-01-31 13:42:53 -08:00
Yedidya Feldblum
ccb3db67fd migrate uses of legacy alias folly::io::getCodec
Reviewed By: hanidamlaj

Differential Revision: D68642745

fbshipit-source-id: 68cf1999537f2233dfb6778d22cdc2c371708b04
2025-01-31 10:28:59 -08:00
Open Source Bot
b699a97243 Updating hashes
Summary:
GitHub commits:

95ca206fe4
93a84683bb
0b1692802f
69d9467c0c
fd53add59f
f257d29e6c
7247a677db
7cadf395cb
1953157acc
79e1def7d7

Reviewed By: ckwalsh

fbshipit-source-id: c55553eddfab04b96b50cfe92d8cb4cd797bbb82
2025-01-31 09:34:06 -08:00
Aman Sharma
69d9467c0c Move SendmmsgPacketBatchWriter to sendmsg with iovecs
Summary: I'm switching the usages of `writem` to use iovecs instead of IOBufs.

Reviewed By: kvtsoy

Differential Revision: D68857701

fbshipit-source-id: 96461aac85f39da9b85e16f2927b4539e712e5cb
v2025.02.03.00 v2025.02.10.00 v2025.02.17.00
2025-01-30 14:51:03 -08:00
Michael Lee
128904b918 Switch to fb_dirsync_cpp_library
Summary:
Okay, a little less custom impl and a little more generic.

Does this actually work? We shall see..

Reviewed By: kvtsoy

Differential Revision: D68518976

fbshipit-source-id: 4a37b733793031c8ac72590f23e39981dd291039
2025-01-30 12:33:20 -08:00
Joseph Beshay
f938384574 Add counters for bbr1 and bbr2 exiting startup
Summary: As title.

Reviewed By: kvtsoy

Differential Revision: D68863490

fbshipit-source-id: 26fdd28f2af2b3d20719e3b5a788d1fd1b106e41
2025-01-30 11:55:18 -08:00
Open Source Bot
c537d982bb Updating hashes
Summary:
GitHub commits:

0192a33bd3
46d6ca62b1
54e3b773ff
7828628247
2ba5e91379
88adfe4440
f4fff3d0bc
6b429c4be9
9ecc4bf9f5
5ec77739d8
3c7cc5138a

Reviewed By: ckwalsh

fbshipit-source-id: 0d7de4f8baac58cb654f688f0f87cb0a66ec5702
2025-01-30 09:33:57 -08:00
Joseph Beshay
2ba5e91379 Do not update short-term model when probing for bandwidth
Summary: As title.

Reviewed By: sharmafb

Differential Revision: D68845837

fbshipit-source-id: bac4561ffa804b4976978d02351b00a8a886dbb2
2025-01-29 17:21:20 -08:00
Aman Sharma
e23203533a Remove versions of writeStreamFrameData that operate on Buf and BufQueue
Summary: This is a step in the process of moving away from `folly::IOBuf` in our codebase

Reviewed By: jbeshay

Differential Revision: D68731820

fbshipit-source-id: b8e6f86cceb99d5fa5450f18ad5116d05ae9e13c
2025-01-29 16:16:16 -08:00
Michael Lee
222ee95369 Some refactor and clean up to use select instead
Summary: There is a lot of extra support for things that are unused. Delete and clean up

Reviewed By: jbeshay

Differential Revision: D68518974

fbshipit-source-id: 69864849784a8fa6c83925c9279750ba2cd0c2cd
2025-01-29 14:53:19 -08:00
Jakob Degen
321261eeef modefilefree: Tear out cxx modules from build_mode.bzl
Summary: Dead code

Reviewed By: scottcao

Differential Revision: D68812661

fbshipit-source-id: ffcbe2d2962bf2549dfbf7116f7e0d8dce95b3cd
2025-01-29 14:51:10 -08:00
Igor Levin
4c32beec3e Let QUIC server worker read multiple packets from a socket that raised an event.
Summary: Since introduction of quic RX delay metric, we could observe relatively high values and spikiness on p90 and p99 percentiles. Experimentally trying to read several packets (tests done with value of 32 for the ceiling per EVB loop) on the server side per worker per EVB seems to improve tail latencies a lot. It does increase loop time somewhat, but we balance it with doing much more work per the loop, so we at least should be on par perf/efficieincy wise, and much better on latency side.

Reviewed By: meleshuk, mjoras

Differential Revision: D62986886

fbshipit-source-id: 9e6cbf3b3c87d028d922aa7d7089291a680aaa75
2025-01-29 12:49:06 -08:00
Open Source Bot
bb98ff43ab Updating hashes
Summary:
GitHub commits:

21b037277c
08afb6835e
0dd928f626
cb9dbc9b98
33aba632b8
26c69ab5be
ac03e61f34
ee9bac99b9
812277f4d9
97f21533e7
88cb93d1be

Reviewed By: bigfootjon

fbshipit-source-id: d66abfad6dee828c4dc58985bc22e336d7297f14
2025-01-29 09:37:28 -08:00
Joseph Beshay
26c69ab5be Only count non-contiguous loss ranges during Startup
Summary: This fixes a minor spec diversion.

Reviewed By: ritengupta, sharmafb

Differential Revision: D68734803

fbshipit-source-id: 23962ec8dbd8eb1d10bc11cede3d2a65ff1edb32
2025-01-28 14:38:07 -08:00
Matt Joras
b4b50d198e Add some logs to getStream CHECKs
Summary: As in title.

Reviewed By: jbeshay

Differential Revision: D68779912

fbshipit-source-id: 8161c8ab2d579a43c7283c70a8f1e231304b5b7e
2025-01-28 14:32:09 -08:00
Aman Sharma
6800a7511e API for reliable resets
Reviewed By: jbeshay

Differential Revision: D67360862

fbshipit-source-id: 163f030b866a5ba6fa89f8b97bb15875f8bbf2a0
2025-01-28 12:37:29 -08:00
Alan Frindell
02bc142cd5 Default ctor for CircularDeque::iterator
Summary:
This seems to be required for windows builds to use std::find with reverse_iterator.

The iterator is valid for comparison and should return false when compared to, say, someValidDeque_.begin().  All other operations are undefined and will crash.

Reviewed By: jbeshay, sharmafb

Differential Revision: D68742641

fbshipit-source-id: a08c167a3ef35e73b2dc7b10b9bb29a5741031be
2025-01-28 12:27:42 -08:00