Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(548)

Unified Diff: net/quic/quic_packet_generator.cc

Issue 1327743005: relnote: Cache-align the encryption buffer in QuicPacketGenerator::SerializeAndSendPacket. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Close_QUIC_connection_101391398
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_packet_generator.cc
diff --git a/net/quic/quic_packet_generator.cc b/net/quic/quic_packet_generator.cc
index e058178ac3c9ef34515d3a80a364124517a4caad..c85411fbfe087864ef8aa0a6ea623b47ceacbd9c 100644
--- a/net/quic/quic_packet_generator.cc
+++ b/net/quic/quic_packet_generator.cc
@@ -454,7 +454,12 @@ bool QuicPacketGenerator::AddFrame(const QuicFrame& frame,
}
void QuicPacketGenerator::SerializeAndSendPacket() {
- char buffer[kMaxPacketSize];
+ // The optimized encryption algorithm implementations run faster when
+ // operating on aligned memory.
+ //
+ // TODO(rtenneti): Change the default 64 alignas value (used the default
+ // value from CACHELINE_SIZE).
+ ALIGNAS(64) char buffer[kMaxPacketSize];
SerializedPacket serialized_packet =
packet_creator_.SerializePacket(buffer, kMaxPacketSize);
if (serialized_packet.packet == nullptr) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698