diff --git a/quic/api/QuicTransportFunctions.cpp b/quic/api/QuicTransportFunctions.cpp index 59eeb3f68..005d26e82 100644 --- a/quic/api/QuicTransportFunctions.cpp +++ b/quic/api/QuicTransportFunctions.cpp @@ -1641,20 +1641,6 @@ folly::Expected 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( diff --git a/quic/server/QuicServerWorker.cpp b/quic/server/QuicServerWorker.cpp index 859ca63b1..157f05cf6 100644 --- a/quic/server/QuicServerWorker.cpp +++ b/quic/server/QuicServerWorker.cpp @@ -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 rejectNewConnections) { rejectNewConnections_ = std::move(rejectNewConnections); diff --git a/quic/server/QuicServerWorker.h b/quic/server/QuicServerWorker.h index 874977bd7..383e32e9a 100644 --- a/quic/server/QuicServerWorker.h +++ b/quic/server/QuicServerWorker.h @@ -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;