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

Side by Side Diff: net/quic/quic_protocol.h

Issue 1401053005: relnote: Reduce the size of QUIC's TransmissionInfo struct based on (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add_test_cases_to_catch_failure_104130818
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 unified diff | Download patch
« no previous file with comments | « no previous file | net/quic/quic_protocol.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_QUIC_QUIC_PROTOCOL_H_ 5 #ifndef NET_QUIC_QUIC_PROTOCOL_H_
6 #define NET_QUIC_QUIC_PROTOCOL_H_ 6 #define NET_QUIC_QUIC_PROTOCOL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <limits> 10 #include <limits>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 typedef uint64 QuicPublicResetNonceProof; 44 typedef uint64 QuicPublicResetNonceProof;
45 typedef uint8 QuicPacketEntropyHash; 45 typedef uint8 QuicPacketEntropyHash;
46 typedef uint32 QuicHeaderId; 46 typedef uint32 QuicHeaderId;
47 // QuicTag is the type of a tag in the wire protocol. 47 // QuicTag is the type of a tag in the wire protocol.
48 typedef uint32 QuicTag; 48 typedef uint32 QuicTag;
49 typedef std::vector<QuicTag> QuicTagVector; 49 typedef std::vector<QuicTag> QuicTagVector;
50 typedef std::map<QuicTag, std::string> QuicTagValueMap; 50 typedef std::map<QuicTag, std::string> QuicTagValueMap;
51 // TODO(rtenneti): Didn't use SpdyPriority because SpdyPriority is uint8 and 51 // TODO(rtenneti): Didn't use SpdyPriority because SpdyPriority is uint8 and
52 // QuicPriority is uint32. Use SpdyPriority when we change the QUIC_VERSION. 52 // QuicPriority is uint32. Use SpdyPriority when we change the QUIC_VERSION.
53 typedef uint32 QuicPriority; 53 typedef uint32 QuicPriority;
54 typedef uint16 QuicPacketLength;
54 55
55 // Default initial maximum size in bytes of a QUIC packet. 56 // Default initial maximum size in bytes of a QUIC packet.
56 const QuicByteCount kDefaultMaxPacketSize = 1350; 57 const QuicByteCount kDefaultMaxPacketSize = 1350;
57 // Default initial maximum size in bytes of a QUIC packet for servers. 58 // Default initial maximum size in bytes of a QUIC packet for servers.
58 const QuicByteCount kDefaultServerMaxPacketSize = 1000; 59 const QuicByteCount kDefaultServerMaxPacketSize = 1000;
59 // The maximum packet size of any QUIC packet, based on ethernet's max size, 60 // The maximum packet size of any QUIC packet, based on ethernet's max size,
60 // minus the IP and UDP headers. IPv6 has a 40 byte header, UPD adds an 61 // minus the IP and UDP headers. IPv6 has a 40 byte header, UPD adds an
61 // additional 8 bytes. This is a total overhead of 48 bytes. Ethernet's 62 // additional 8 bytes. This is a total overhead of 48 bytes. Ethernet's
62 // max packet size is 1500 bytes, 1500 - 48 = 1452. 63 // max packet size is 1500 bytes, 1500 - 48 = 1452.
63 const QuicByteCount kMaxPacketSize = 1452; 64 const QuicByteCount kMaxPacketSize = 1452;
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 struct NET_EXPORT_PRIVATE TransmissionInfo { 1178 struct NET_EXPORT_PRIVATE TransmissionInfo {
1178 // Used by STL when assigning into a map. 1179 // Used by STL when assigning into a map.
1179 TransmissionInfo(); 1180 TransmissionInfo();
1180 1181
1181 // Constructs a Transmission with a new all_tranmissions set 1182 // Constructs a Transmission with a new all_tranmissions set
1182 // containing |packet_number|. 1183 // containing |packet_number|.
1183 TransmissionInfo(RetransmittableFrames* retransmittable_frames, 1184 TransmissionInfo(RetransmittableFrames* retransmittable_frames,
1184 QuicPacketNumberLength packet_number_length, 1185 QuicPacketNumberLength packet_number_length,
1185 TransmissionType transmission_type, 1186 TransmissionType transmission_type,
1186 QuicTime sent_time, 1187 QuicTime sent_time,
1187 QuicByteCount bytes_sent, 1188 QuicPacketLength bytes_sent,
1188 bool is_fec_packet); 1189 bool is_fec_packet);
1189 1190
1190 RetransmittableFrames* retransmittable_frames; 1191 RetransmittableFrames* retransmittable_frames;
1191 QuicPacketNumberLength packet_number_length; 1192 QuicPacketNumberLength packet_number_length;
1193 QuicPacketLength bytes_sent;
1194 uint16 nack_count;
1192 QuicTime sent_time; 1195 QuicTime sent_time;
1193 QuicByteCount bytes_sent;
1194 QuicPacketCount nack_count;
1195 // Reason why this packet was transmitted. 1196 // Reason why this packet was transmitted.
1196 TransmissionType transmission_type; 1197 TransmissionType transmission_type;
1197 // Stores the packet numbers of all transmissions of this packet.
1198 // Must always be nullptr or have multiple elements.
1199 PacketNumberList* all_transmissions;
1200 // In flight packets have not been abandoned or lost. 1198 // In flight packets have not been abandoned or lost.
1201 bool in_flight; 1199 bool in_flight;
1202 // True if the packet can never be acked, so it can be removed. 1200 // True if the packet can never be acked, so it can be removed.
1203 bool is_unackable; 1201 bool is_unackable;
1204 // True if the packet is an FEC packet. 1202 // True if the packet is an FEC packet.
1205 bool is_fec_packet; 1203 bool is_fec_packet;
1204 // Stores the packet numbers of all transmissions of this packet.
1205 // Must always be nullptr or have multiple elements.
1206 PacketNumberList* all_transmissions;
1206 }; 1207 };
1207 1208
1208 // Convenience wrapper to wrap an iovec array and the total length, which must 1209 // Convenience wrapper to wrap an iovec array and the total length, which must
1209 // be less than or equal to the actual total length of the iovecs. 1210 // be less than or equal to the actual total length of the iovecs.
1210 struct NET_EXPORT_PRIVATE QuicIOVector { 1211 struct NET_EXPORT_PRIVATE QuicIOVector {
1211 QuicIOVector(const struct iovec* iov, int iov_count, size_t total_length) 1212 QuicIOVector(const struct iovec* iov, int iov_count, size_t total_length)
1212 : iov(iov), iov_count(iov_count), total_length(total_length) {} 1213 : iov(iov), iov_count(iov_count), total_length(total_length) {}
1213 1214
1214 const struct iovec* iov; 1215 const struct iovec* iov;
1215 const int iov_count; 1216 const int iov_count;
1216 const size_t total_length; 1217 const size_t total_length;
1217 }; 1218 };
1218 1219
1219 } // namespace net 1220 } // namespace net
1220 1221
1221 #endif // NET_QUIC_QUIC_PROTOCOL_H_ 1222 #endif // NET_QUIC_QUIC_PROTOCOL_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698