Skip to content

Commit bb1c16b

Browse files
authored
Merge pull request #1852 from private-octopus/multipath-draft-13
Interop fixes fordraft multipath 13
2 parents cf6e404 + e86620e commit bb1c16b

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

picoquic/frames.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3822,7 +3822,17 @@ uint8_t* picoquic_format_ack_frame_in_context(picoquic_cnx_t* cnx, uint8_t* byte
38223822
(((is_ecn) ? picoquic_frame_type_path_ack_ecn : picoquic_frame_type_path_ack));
38233823

38243824
/* Check that there something to acknowledge */
3825+
#if 1
3826+
int not_needed = picoquic_sack_list_is_empty(&ack_ctx->sack_list);
3827+
if (!not_needed && !ack_ctx->act[is_opportunistic].ack_needed &&
3828+
ack_ctx->sack_list.ack_tree.size == 1) {
3829+
picoquic_sack_item_t* last_sack = picoquic_sack_last_item(&ack_ctx->sack_list);
3830+
not_needed = (last_sack->nb_times_sent[is_opportunistic] >= PICOQUIC_MAX_ACK_RANGE_REPEAT);
3831+
}
3832+
if (!not_needed){
3833+
#else
38253834
if (!picoquic_sack_list_is_empty(&ack_ctx->sack_list)) {
3835+
#endif
38263836
uint8_t* num_block_byte = NULL;
38273837
picoquic_sack_item_t* last_sack = picoquic_sack_last_item(&ack_ctx->sack_list);
38283838

@@ -3956,6 +3966,15 @@ uint8_t * picoquic_format_ack_frame(picoquic_cnx_t* cnx, uint8_t* bytes, uint8_t
39563966
for (int path_id = 0; path_id < cnx->nb_paths; path_id++) {
39573967
if (bytes != NULL) {
39583968
ack_ctx = &cnx->path[path_id]->ack_ctx;
3969+
/* Adding test to verify that we do not send too many acks after demotion. */
3970+
if (cnx->path[path_id]->path_is_demoted &&
3971+
!ack_ctx->act[is_opportunistic].ack_needed &&
3972+
ack_ctx->sack_list.ack_tree.size == 1) {
3973+
picoquic_sack_item_t* last_sack = picoquic_sack_last_item(&ack_ctx->sack_list);
3974+
if (last_sack->nb_times_sent[is_opportunistic] >= PICOQUIC_MIN_ACK_RANGE_REPEAT) {
3975+
continue;
3976+
}
3977+
}
39593978
bytes = picoquic_format_ack_frame_in_context(cnx, bytes, bytes_max, more_data,
39603979
current_time, ack_ctx, &need_time_stamp, cnx->path[path_id]->unique_path_id, is_opportunistic);
39613980
if (is_opportunistic) {

picoquicfirst/picoquicdemo.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,9 @@ int client_loop_cb(picoquic_quic_t* quic, picoquic_packet_loop_cb_enum cb_mode,
664664
}
665665
}
666666
}
667+
if (!cb_ctx->multipath_probe_done && cb_ctx->cnx_client->is_notified_that_path_is_allowed) {
668+
ret = client_create_additional_path(cb_ctx->cnx_client, cb_ctx);
669+
}
667670
/* Track the migration to server preferred address */
668671
if (cb_ctx->cnx_client->remote_parameters.prefered_address.is_defined && !cb_ctx->migration_to_preferred_finished) {
669672
if (picoquic_compare_addr(

picoquictest/multipath_qlog_ref.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,6 @@
333333
[76910, 1, "transport", "packet_received", { "packet_type": "1RTT", "header": { "packet_size": 55, "packet_number": 6, "dcid": "1209080706050403" }, "frames": [{
334334
"frame_type": "time_stamp", "time_stamp": 9733}, {
335335
"frame_type": "path_ack", "path_id": 0, "ack_delay": 0, "acked_ranges": [[1, 12]]}, {
336-
"frame_type": "path_ack", "path_id": 1, "ack_delay": 0, "acked_ranges": [[0, 0]]}, {
337336
"frame_type": "padding"}]}],
338337
[76910, 0, "transport", "packet_sent", { "packet_type": "1RTT", "header": { "packet_size": 39, "packet_number": 15, "dcid": "0908070605040302" }, "frames": [{
339338
"frame_type": "time_stamp", "time_stamp": 9613}, {

0 commit comments

Comments
 (0)