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

Unified Diff: net/quic/quic_packet_creator.cc

Issue 1402943004: relnote: Cache-align the encryption buffer in QuicPacketCreator::SerializePacket. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Disables_strike_register_103965712
Patch Set: Created 5 years, 2 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_creator.cc
diff --git a/net/quic/quic_packet_creator.cc b/net/quic/quic_packet_creator.cc
index 3dcfe6e06b98f9bdb435b298b4136c6fb9cdec03..5c2c644f6b52361becc8fe5b88229c3f8794feef 100644
--- a/net/quic/quic_packet_creator.cc
+++ b/net/quic/quic_packet_creator.cc
@@ -450,7 +450,11 @@ SerializedPacket QuicPacketCreator::SerializePacket(
bool possibly_truncated_by_length = packet_size_ == max_plaintext_size_ &&
queued_frames_.size() == 1 &&
queued_frames_.back().type == ACK_FRAME;
- 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];
scoped_ptr<QuicPacket> packet;
// Use the packet_size_ instead of the buffer size to ensure smaller
// packet sizes are properly used.
« 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