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
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
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
Summary: Separate functionality for parsing receive timestamp and ecn fields in ACKs into their own functions.
Differential Revision: D68931150
fbshipit-source-id: 8031770b118138a0002999bca52c69f96f29b617
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
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.
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
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
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
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
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 />
[](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
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 />
[](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
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
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
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
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
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
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
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
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
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
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
Summary: I'm switching the usages of `writem` to use iovecs instead of IOBufs.
Reviewed By: kvtsoy
Differential Revision: D68857701
fbshipit-source-id: 96461aac85f39da9b85e16f2927b4539e712e5cb
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
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
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
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
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