Skip to content

Commit 80ec1f2

Browse files
authored
Merge pull request #1859 from private-octopus/rework-path-migration
Rework path migration
2 parents e307c9c + e09e63e commit 80ec1f2

33 files changed

+1694
-1626
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ set(PICOQUIC_LIBRARY_FILES
9090
picoquic/newreno.c
9191
picoquic/pacing.c
9292
picoquic/packet.c
93+
picoquic/paths.c
9394
picoquic/performance_log.c
9495
picoquic/picohash.c
9596
picoquic/picoquic_lb.c

picoquic/frames.c

Lines changed: 92 additions & 81 deletions
Large diffs are not rendered by default.

picoquic/logger.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1870,7 +1870,7 @@ static void textlog_outgoing_segment(void* F_log, int log_cnxid, picoquic_cnx_t*
18701870

18711871
ret = picoquic_parse_packet_header((cnx == NULL) ? NULL : cnx->quic, send_buffer, send_length,
18721872
((cnx == NULL || cnx->path[0] == NULL) ? (struct sockaddr *)&default_addr :
1873-
(struct sockaddr *)&cnx->path[0]->local_addr), &ph, &pcnx, 0);
1873+
(struct sockaddr *)&cnx->path[0]->first_tuple->local_addr), &ph, &pcnx, 0);
18741874

18751875
ph.pn64 = sequence_number;
18761876
ph.pn = (uint32_t)ph.pn64;

picoquic/logwriter.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ void binlog_outgoing_packet(picoquic_cnx_t* cnx, picoquic_path_t * path_x,
842842

843843
picoquic_parse_packet_header((cnx == NULL) ? NULL : cnx->quic, send_buffer, send_length,
844844
((cnx == NULL || cnx->path[0] == NULL) ? (struct sockaddr *)&default_addr :
845-
(struct sockaddr *)&cnx->path[0]->local_addr), &ph, &pcnx, 0);
845+
(struct sockaddr *)&cnx->path[0]->first_tuple->local_addr), &ph, &pcnx, 0);
846846

847847
if (cnx != NULL) {
848848
picoquic_epoch_enum epoch = (ph.ptype == picoquic_packet_1rtt_protected) ? picoquic_epoch_1rtt :
@@ -1059,7 +1059,7 @@ void binlog_new_connection(picoquic_cnx_t * cnx)
10591059

10601060
bytewrite_int8(msg, cnx->client_mode != 0);
10611061
bytewrite_int32(msg, cnx->proposed_version);
1062-
bytewrite_cid(msg, &cnx->path[0]->p_remote_cnxid->cnx_id);
1062+
bytewrite_cid(msg, &cnx->path[0]->first_tuple->p_remote_cnxid->cnx_id);
10631063

10641064
/* Algorithms used */
10651065
bytewrite_cstr(msg, cnx->congestion_alg->congestion_algorithm_id);

picoquic/loss_recovery.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,12 +468,12 @@ static size_t picoquic_retransmit_needed_packet(picoquic_cnx_t* cnx, picoquic_pa
468468
}
469469
}
470470
if (!all_paths_dubious) {
471-
old_path->challenge_failed = 1;
471+
old_path->first_tuple->challenge_failed = 1;
472472
cnx->path_demotion_needed = 1;
473473
}
474474
}
475475
else {
476-
old_path->challenge_failed = 1;
476+
old_path->first_tuple->challenge_failed = 1;
477477
cnx->path_demotion_needed = 1;
478478
}
479479
}
@@ -899,7 +899,7 @@ static void picoquic_count_and_notify_loss(
899899
if (timer_based_retransmit < 2) {
900900
picoquic_log_packet_lost(cnx, old_p->send_path, old_p->ptype, old_p->sequence_number,
901901
(timer_based_retransmit) ? "timer" : "repeat",
902-
(old_p->send_path == NULL || old_p->send_path->p_remote_cnxid == NULL) ? NULL : &old_p->send_path->p_remote_cnxid->cnx_id,
902+
(old_p->send_path == NULL || old_p->send_path->first_tuple->p_remote_cnxid == NULL) ? NULL : &old_p->send_path->first_tuple->p_remote_cnxid->cnx_id,
903903
old_p->length, current_time);
904904

905905
if (!old_p->is_preemptive_repeat) {

picoquic/packet.c

Lines changed: 26 additions & 309 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)