Skip to content

Rework path migration #1859

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Apr 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ set(PICOQUIC_LIBRARY_FILES
picoquic/newreno.c
picoquic/pacing.c
picoquic/packet.c
picoquic/paths.c
picoquic/performance_log.c
picoquic/picohash.c
picoquic/picoquic_lb.c
Expand Down
173 changes: 92 additions & 81 deletions picoquic/frames.c

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion picoquic/logger.c
Original file line number Diff line number Diff line change
Expand Up @@ -1870,7 +1870,7 @@ static void textlog_outgoing_segment(void* F_log, int log_cnxid, picoquic_cnx_t*

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

ph.pn64 = sequence_number;
ph.pn = (uint32_t)ph.pn64;
Expand Down
4 changes: 2 additions & 2 deletions picoquic/logwriter.c
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ void binlog_outgoing_packet(picoquic_cnx_t* cnx, picoquic_path_t * path_x,

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

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

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

/* Algorithms used */
bytewrite_cstr(msg, cnx->congestion_alg->congestion_algorithm_id);
Expand Down
6 changes: 3 additions & 3 deletions picoquic/loss_recovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,12 +468,12 @@ static size_t picoquic_retransmit_needed_packet(picoquic_cnx_t* cnx, picoquic_pa
}
}
if (!all_paths_dubious) {
old_path->challenge_failed = 1;
old_path->first_tuple->challenge_failed = 1;
cnx->path_demotion_needed = 1;
}
}
else {
old_path->challenge_failed = 1;
old_path->first_tuple->challenge_failed = 1;
cnx->path_demotion_needed = 1;
}
}
Expand Down Expand Up @@ -899,7 +899,7 @@ static void picoquic_count_and_notify_loss(
if (timer_based_retransmit < 2) {
picoquic_log_packet_lost(cnx, old_p->send_path, old_p->ptype, old_p->sequence_number,
(timer_based_retransmit) ? "timer" : "repeat",
(old_p->send_path == NULL || old_p->send_path->p_remote_cnxid == NULL) ? NULL : &old_p->send_path->p_remote_cnxid->cnx_id,
(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,
old_p->length, current_time);

if (!old_p->is_preemptive_repeat) {
Expand Down
335 changes: 26 additions & 309 deletions picoquic/packet.c

Large diffs are not rendered by default.

Loading
Loading