mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-08-08 09:42:06 +03:00
Remove forcible setting of ContinuousMemory
Summary: Previously, we didn't support all combinations of (batching mode, data path type). Reviewed By: mjoras Differential Revision: D73280506 fbshipit-source-id: 752a1eda4f58a19f86410bff514415017ffdb383
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b90551c3bb
commit
0c5295f4ef
@@ -1641,20 +1641,6 @@ folly::Expected<WriteQuicDataResult, QuicError> writeConnectionDataToSocket(
|
||||
return folly::makeUnexpected(gsoResult.error());
|
||||
}
|
||||
connection.gsoSupported = sock.getGSO().value() >= 0;
|
||||
if (!*connection.gsoSupported) {
|
||||
if (!useSinglePacketInplaceBatchWriter(
|
||||
connection.transportSettings.maxBatchSize,
|
||||
connection.transportSettings.dataPathType) &&
|
||||
(connection.transportSettings.dataPathType ==
|
||||
DataPathType::ContinuousMemory)) {
|
||||
// Change data path type to DataPathType::ChainedMemory.
|
||||
// Continuous memory data path is only supported with working GSO or
|
||||
// SinglePacketInplaceBatchWriter.
|
||||
LOG(ERROR) << "Switching data path to ChainedMemory as "
|
||||
<< "GSO is not supported on the socket";
|
||||
connection.transportSettings.dataPathType = DataPathType::ChainedMemory;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
auto batchWriter = BatchWriterFactory::makeBatchWriter(
|
||||
|
@@ -62,8 +62,7 @@ QuicServerWorker::QuicServerWorker(
|
||||
SetEventCallback ec)
|
||||
: callback_(std::move(callback)),
|
||||
setEventCallback_(ec),
|
||||
transportSettings_(
|
||||
validateTransportSettings(std::move(transportSettings))),
|
||||
transportSettings_(std::move(transportSettings)),
|
||||
takeoverPktHandler_(this),
|
||||
observerList_(this) {
|
||||
pending0RttData_.setPruneHook(
|
||||
@@ -1272,19 +1271,6 @@ void QuicServerWorker::setFizzContext(
|
||||
ctx_ = ctx;
|
||||
}
|
||||
|
||||
TransportSettings QuicServerWorker::validateTransportSettings(
|
||||
TransportSettings transportSettings) {
|
||||
if (transportSettings.batchingMode != QuicBatchingMode::BATCHING_MODE_GSO &&
|
||||
transportSettings.batchingMode !=
|
||||
QuicBatchingMode::BATCHING_MODE_SENDMMSG_GSO) {
|
||||
if (transportSettings.dataPathType == DataPathType::ContinuousMemory) {
|
||||
LOG(ERROR) << "Unsupported data path type and batching mode combination";
|
||||
}
|
||||
transportSettings.dataPathType = DataPathType::ChainedMemory;
|
||||
}
|
||||
return transportSettings;
|
||||
}
|
||||
|
||||
void QuicServerWorker::rejectNewConnections(
|
||||
std::function<bool()> rejectNewConnections) {
|
||||
rejectNewConnections_ = std::move(rejectNewConnections);
|
||||
|
@@ -45,9 +45,6 @@ class QuicServerWorker : public FollyAsyncUDPSocketAlias::ReadCallback,
|
||||
static int getUnfinishedHandshakeCount();
|
||||
|
||||
private:
|
||||
static TransportSettings validateTransportSettings(
|
||||
TransportSettings transportSettings);
|
||||
|
||||
struct MsgHdr : public folly::EventRecvmsgCallback::MsgHdr {
|
||||
static auto constexpr kBuffSize = 1024;
|
||||
|
||||
|
Reference in New Issue
Block a user