gfe-relnote: Introduce kDefaultUdpPacketControlBufferSize and use it in QuicPacketReader as the control buffer size. No behavior change, not protected.
Why? I need to remove kCmsgSpaceForReadPacket, which is defined in quic_socket_utils.h.
Merge note: Please define kCmsgSpaceForGooglePacketHeaderImpl=0 in Chromium's quic_udp_socket_platform_impl.h.
PiperOrigin-RevId: 291940730
Change-Id: I0e7d9652e42218b06ce535b2d7297dda88971341
diff --git a/quic/core/quic_udp_socket.h b/quic/core/quic_udp_socket.h
index 8be9e57..04f8435 100644
--- a/quic/core/quic_udp_socket.h
+++ b/quic/core/quic_udp_socket.h
@@ -25,6 +25,8 @@
const QuicUdpSocketFd kQuicInvalidSocketFd = -1;
#endif
+const size_t kDefaultUdpPacketControlBufferSize = 512;
+
enum class QuicUdpPacketInfoBit : uint8_t {
DROPPED_PACKETS = 0, // Read
V4_SELF_IP, // Read
@@ -205,7 +207,8 @@
// |result->packet_buffer.buffer_len| is set to the
// packet length on a successful return.
// result->control_buffer: The control buffer, used by ReadPacket internally.
- // It is recommended to be at least 512 bytes.
+ // It is recommended to be
+ // |kDefaultUdpPacketControlBufferSize| bytes.
// result->ok: True iff a packet is successfully received.
//
// If |*result| is reused for subsequent ReadPacket() calls, caller needs to