From dd357a0a4ee32023f2297479ac2bc78d15a75034 Mon Sep 17 00:00:00 2001 From: Matt Joras Date: Wed, 14 Jun 2023 10:23:07 -0700 Subject: [PATCH] Set batch size to request group size Summary: As in title. The comment here was right all along. In practice this doesn't matter that much, but it matters significantly to synthetic performance tests like tperf. Reviewed By: shodoco Differential Revision: D46726195 fbshipit-source-id: fe22d12a7ac3a237a30b5d0d19cc9a0fd7a21e11 --- quic/dsr/backend/DSRPacketizer.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/quic/dsr/backend/DSRPacketizer.cpp b/quic/dsr/backend/DSRPacketizer.cpp index 4e66a2a6d..ef77c9839 100644 --- a/quic/dsr/backend/DSRPacketizer.cpp +++ b/quic/dsr/backend/DSRPacketizer.cpp @@ -99,10 +99,8 @@ BufQuicBatchResult writePacketsGroup( LOG(ERROR) << "Empty packetization request"; return {}; } - // TODO: Why don't I just limit the batch size to reqGroup.size()? What can go - // wrong? auto batchWriter = - BatchWriterPtr(new GSOPacketBatchWriter(kDefaultQuicMaxBatchSize)); + BatchWriterPtr(new GSOPacketBatchWriter(reqGroup.requests.size())); // This doesn't matter: IOBufQuicBatch ioBufBatch( std::move(batchWriter),