Skip to content

Commit 0e35a27

Browse files
committed
Change ACKMP to MPACK
As the draft will soon evolve with this.
1 parent 7d2c27c commit 0e35a27

File tree

2 files changed

+29
-29
lines changed

2 files changed

+29
-29
lines changed

quiche/src/frame.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ pub enum Frame {
178178
length: usize,
179179
},
180180

181-
ACKMP {
181+
MPACK {
182182
space_identifier: u64,
183183
ack_delay: u64,
184184
ranges: ranges::RangeSet,
@@ -431,7 +431,7 @@ impl Frame {
431431
(packet::Type::ZeroRTT, Frame::PathResponse { .. }) => false,
432432
(packet::Type::ZeroRTT, Frame::RetireConnectionId { .. }) => false,
433433
(packet::Type::ZeroRTT, Frame::ConnectionClose { .. }) => false,
434-
(packet::Type::ZeroRTT, Frame::ACKMP { .. }) => false,
434+
(packet::Type::ZeroRTT, Frame::MPACK { .. }) => false,
435435
(packet::Type::ZeroRTT, Frame::PathAbandon { .. }) => false,
436436
(packet::Type::ZeroRTT, Frame::PathStandby { .. }) => false,
437437
(packet::Type::ZeroRTT, Frame::PathAvailable { .. }) => false,
@@ -659,7 +659,7 @@ impl Frame {
659659

660660
Frame::DatagramHeader { .. } => (),
661661

662-
Frame::ACKMP {
662+
Frame::MPACK {
663663
space_identifier,
664664
ack_delay,
665665
ranges,
@@ -918,7 +918,7 @@ impl Frame {
918918
*length // data
919919
},
920920

921-
Frame::ACKMP {
921+
Frame::MPACK {
922922
space_identifier,
923923
ack_delay,
924924
ranges,
@@ -989,7 +989,7 @@ impl Frame {
989989
Frame::ACK { .. } |
990990
Frame::ApplicationClose { .. } |
991991
Frame::ConnectionClose { .. } |
992-
Frame::ACKMP { .. }
992+
Frame::MPACK { .. }
993993
)
994994
}
995995

@@ -1192,7 +1192,7 @@ impl Frame {
11921192
raw: None,
11931193
},
11941194

1195-
Frame::ACKMP {
1195+
Frame::MPACK {
11961196
space_identifier,
11971197
ack_delay,
11981198
ranges,
@@ -1437,7 +1437,7 @@ impl std::fmt::Debug for Frame {
14371437
write!(f, "DATAGRAM len={length}")?;
14381438
},
14391439

1440-
Frame::ACKMP {
1440+
Frame::MPACK {
14411441
space_identifier,
14421442
ack_delay,
14431443
ranges,
@@ -1446,7 +1446,7 @@ impl std::fmt::Debug for Frame {
14461446
} => {
14471447
write!(
14481448
f,
1449-
"ACK_MP space_id={space_identifier} delay={ack_delay} blocks={ranges:?} ecn_counts={ecn_counts:?}",
1449+
"MP_ACK space_id={space_identifier} delay={ack_delay} blocks={ranges:?} ecn_counts={ecn_counts:?}",
14501450
)?;
14511451
},
14521452

@@ -1574,7 +1574,7 @@ fn parse_ack_mp_frame(ty: u64, b: &mut octets::Octets) -> Result<Frame> {
15741574
let (ack_delay, ranges, ecn_counts) =
15751575
parse_common_ack_frame(b, ty & 0x01 != 0)?;
15761576

1577-
Ok(Frame::ACKMP {
1577+
Ok(Frame::MPACK {
15781578
space_identifier,
15791579
ack_delay,
15801580
ranges,
@@ -2552,7 +2552,7 @@ mod tests {
25522552
ranges.insert(15..19);
25532553
ranges.insert(3000..5000);
25542554

2555-
let frame = Frame::ACKMP {
2555+
let frame = Frame::MPACK {
25562556
space_identifier: 894_994,
25572557
ack_delay: 874_656_534,
25582558
ranges,
@@ -2595,7 +2595,7 @@ mod tests {
25952595
ecn_ce_count: 300,
25962596
});
25972597

2598-
let frame = Frame::ACKMP {
2598+
let frame = Frame::MPACK {
25992599
space_identifier: 894_994,
26002600
ack_delay: 874_656_534,
26012601
ranges,

quiche/src/lib.rs

+18-18
Original file line numberDiff line numberDiff line change
@@ -3055,13 +3055,13 @@ impl Connection {
30553055
}
30563056
},
30573057

3058-
frame::Frame::ACKMP {
3058+
frame::Frame::MPACK {
30593059
space_identifier,
30603060
ranges,
30613061
..
30623062
} => {
30633063
// Stop acknowledging packets less than or equal to the
3064-
// largest acknowledged in the sent ACK_MP frame that,
3064+
// largest acknowledged in the sent MP_ACK frame that,
30653065
// in turn, got acked.
30663066
if let Some(largest_acked) = ranges.last() {
30673067
self.pkt_num_spaces
@@ -3609,7 +3609,7 @@ impl Connection {
36093609
self.ids.mark_retire_dcid_seq(path_id, seq_num, true);
36103610
},
36113611

3612-
frame::Frame::ACKMP {
3612+
frame::Frame::MPACK {
36133613
space_identifier, ..
36143614
} => {
36153615
self.pkt_num_spaces
@@ -3826,14 +3826,14 @@ impl Connection {
38263826
}
38273827
}
38283828

3829-
// Create ACK_MP frames if needed.
3829+
// Create MP_ACK frames if needed.
38303830
if multiple_application_data_pkt_num_spaces &&
38313831
!is_closing &&
38323832
path.active()
38333833
{
3834-
// We first check if we should bundle the ACK_MP belonging to our
3835-
// path. We only bundle additional ACK_MP from other paths if we
3836-
// need to send one. This avoids sending ACK_MP frames endlessly.
3834+
// We first check if we should bundle the MP_ACK belonging to our
3835+
// path. We only bundle additional MP_ACK from other paths if we
3836+
// need to send one. This avoids sending MP_ACK frames endlessly.
38373837
let mut wrote_ack_mp = false;
38383838
let pns = self.pkt_num_spaces.spaces.get_mut(epoch, path_id)?;
38393839
if pns.recv_pkt_need_ack.len() > 0 &&
@@ -3846,7 +3846,7 @@ impl Connection {
38463846
self.local_transport_params.ack_delay_exponent as u32,
38473847
);
38483848

3849-
let frame = frame::Frame::ACKMP {
3849+
let frame = frame::Frame::MPACK {
38503850
space_identifier: path_id,
38513851
ack_delay,
38523852
ranges: pns.recv_pkt_need_ack.clone(),
@@ -3855,10 +3855,10 @@ impl Connection {
38553855
};
38563856

38573857
// When a PING frame needs to be sent, avoid sending the
3858-
// ACK_MP if there is not enough cwnd
3858+
// MP_ACK if there is not enough cwnd
38593859
// available for both (note that PING
38603860
// frames are always 1 byte, so we just need to check that the
3861-
// ACK_MP's length is lower than cwnd).
3861+
// MP_ACK's length is lower than cwnd).
38623862
if (pns.ack_elicited ||
38633863
(left_before_packing_ack_frame - left) + frame.wire_len() <
38643864
cwnd_available) &&
@@ -3894,7 +3894,7 @@ impl Connection {
38943894
as u32,
38953895
);
38963896

3897-
let frame = frame::Frame::ACKMP {
3897+
let frame = frame::Frame::MPACK {
38983898
space_identifier: space_id,
38993899
ack_delay,
39003900
ranges: pns.recv_pkt_need_ack.clone(),
@@ -3910,7 +3910,7 @@ impl Connection {
39103910
push_frame_to_pkt!(b, frames, frame, left)
39113911
{
39123912
// Continue advertising until we send the
3913-
// ACK_MP
3913+
// MP_ACK
39143914
// on
39153915
// its own path, unless the path is not
39163916
// active.
@@ -7893,7 +7893,7 @@ impl Connection {
78937893

78947894
frame::Frame::DatagramHeader { .. } => unreachable!(),
78957895

7896-
frame::Frame::ACKMP {
7896+
frame::Frame::MPACK {
78977897
space_identifier,
78987898
ranges,
78997899
ack_delay,
@@ -7918,7 +7918,7 @@ impl Connection {
79187918

79197919
let handshake_status = self.handshake_status();
79207920

7921-
// If an endpoint receives an ACK_MP frame with a packet number
7921+
// If an endpoint receives an MP_ACK frame with a packet number
79227922
// space ID which was never issued by endpoints (i.e., with a
79237923
// sequence number larger than the largest one advertised), it
79247924
// MUST treat this as a connection error of type
@@ -7927,10 +7927,10 @@ impl Connection {
79277927
return Err(Error::MultiPathViolation);
79287928
}
79297929

7930-
// If an endpoint receives an ACK_MP frame with a packet number
7930+
// If an endpoint receives an MP_ACK frame with a packet number
79317931
// space ID which is no more active (e.g., retired by a
79327932
// RETIRE_CONNECTION_ID frame or belonging to closed paths), it
7933-
// MUST ignore the ACK_MP frame without causing a connection
7933+
// MUST ignore the MP_ACK frame without causing a connection
79347934
// error.
79357935
if let Some(path_id) =
79367936
self.paths.pid_from_path_id(space_identifier)
@@ -8399,7 +8399,7 @@ impl Connection {
83998399
}
84008400
}
84018401

8402-
// When using multiple packet number spaces, let's force ACK_MP sending
8402+
// When using multiple packet number spaces, let's force MP_ACK sending
84038403
// on their corresponding paths.
84048404
if self.is_multipath_enabled() {
84058405
if let Some(pid) = self
@@ -18019,7 +18019,7 @@ mod tests {
1801918019
assert_eq!(path_s2c_0.active(), true);
1802018020
assert_eq!(path_s2c_1.active(), true);
1802118021

18022-
// Flush the ACK_MP on the newly active path.
18022+
// Flush the MP_ACK on the newly active path.
1802318023
assert_eq!(pipe.advance(), Ok(()));
1802418024

1802518025
// Emit enough data to use both paths, but no more than their initial

0 commit comments

Comments
 (0)