Skip to content

Commit 7bbe5c3

Browse files
committed
Reclaim multipath name
1 parent f6569b4 commit 7bbe5c3

19 files changed

+100
-99
lines changed

picoquic/bbr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2004,7 +2004,7 @@ static picoquic_packet_context_t* BBRAccessEcnPacketContext(picoquic_path_t* pat
20042004
/* TODO: ECN counts should be a function of path, not number space! */
20052005
picoquic_packet_context_t* pkt_ctx = &path_x->cnx->pkt_ctx[picoquic_packet_context_application];
20062006

2007-
if (path_x->cnx->is_unique_path_id_enabled) {
2007+
if (path_x->cnx->is_multipath_enabled) {
20082008
pkt_ctx = &path_x->pkt_ctx;
20092009
}
20102010
else if (path_x != path_x->cnx->path[0]) {

picoquic/frames.c

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ uint8_t * picoquic_format_new_connection_id_frame(picoquic_cnx_t* cnx, picoquic_
376376
int * more_data, int * is_pure_ack, picoquic_local_cnxid_t* l_cid)
377377
{
378378
uint8_t* bytes0 = bytes;
379-
unsigned int is_mp = cnx->is_unique_path_id_enabled;
379+
unsigned int is_mp = cnx->is_multipath_enabled;
380380

381381
if (l_cid != NULL && l_cid->cnx_id.id_len > 0) {
382382
if ((bytes = picoquic_frames_varint_encode(bytes, bytes_max,
@@ -617,7 +617,7 @@ int picoquic_queue_retire_connection_id_frame(picoquic_cnx_t * cnx, uint64_t uni
617617
int is_pure_ack = 1;
618618
int more_data = 0;
619619
uint8_t * bytes_next = picoquic_format_retire_connection_id_frame(frame_buffer, frame_buffer + sizeof(frame_buffer),
620-
&more_data, &is_pure_ack, cnx->is_unique_path_id_enabled, unique_path_id, sequence);
620+
&more_data, &is_pure_ack, cnx->is_multipath_enabled, unique_path_id, sequence);
621621

622622
if ((consumed = bytes_next - frame_buffer) > 0) {
623623
ret = picoquic_queue_misc_frame(cnx, frame_buffer, consumed, is_pure_ack);
@@ -1777,7 +1777,7 @@ uint8_t* picoquic_format_available_stream_frames(picoquic_cnx_t* cnx, picoquic_p
17771777
{
17781778
uint8_t* bytes_previous = bytes_next;
17791779
picoquic_stream_head_t* stream = picoquic_find_ready_stream_path(cnx,
1780-
(cnx->is_unique_path_id_enabled || cnx->is_simple_multipath_enabled)?path_x: NULL);
1780+
(cnx->is_multipath_enabled || cnx->is_simple_multipath_enabled)?path_x: NULL);
17811781
int more_stream_data = 0;
17821782

17831783
while (*ret == 0 && stream != NULL && stream->stream_priority <= current_priority && bytes_next < bytes_max) {
@@ -1786,7 +1786,7 @@ uint8_t* picoquic_format_available_stream_frames(picoquic_cnx_t* cnx, picoquic_p
17861786

17871787
if (*ret == 0) {
17881788
stream = picoquic_find_ready_stream_path(cnx,
1789-
(cnx->is_unique_path_id_enabled || cnx->is_simple_multipath_enabled)?path_x: NULL);
1789+
(cnx->is_multipath_enabled || cnx->is_simple_multipath_enabled)?path_x: NULL);
17901790
if (stream != NULL && bytes_next + 17 >= bytes_max) {
17911791
more_stream_data = 1;
17921792
break;
@@ -2447,7 +2447,7 @@ picoquic_packet_t* picoquic_check_spurious_retransmission(picoquic_cnx_t* cnx,
24472447
old_path->path_packet_acked_time_sent = p->send_time;
24482448
old_path->path_packet_acked_received = current_time;
24492449
if (old_path->nb_retransmit > 0 &&
2450-
((!cnx->is_unique_path_id_enabled &&
2450+
((!cnx->is_multipath_enabled &&
24512451
!cnx->is_simple_multipath_enabled) ||
24522452
(old_path->path_packet_last == NULL ||
24532453
p->path_packet_number >= old_path->path_packet_last->path_packet_number))) {
@@ -2702,7 +2702,7 @@ static uint64_t picoquic_compute_ack_gap(picoquic_cnx_t* cnx, uint64_t data_rate
27022702
ack_gap = ack_gap_min;
27032703
}
27042704
else if (ack_gap > 32) {
2705-
if (cnx->is_simple_multipath_enabled || cnx->is_unique_path_id_enabled ||
2705+
if (cnx->is_simple_multipath_enabled || cnx->is_multipath_enabled ||
27062706
cnx->congestion_alg == NULL ||
27072707
cnx->congestion_alg->congestion_algorithm_number == PICOQUIC_CC_ALGO_NUMBER_NEW_RENO ||
27082708
cnx->congestion_alg->congestion_algorithm_number == PICOQUIC_CC_ALGO_NUMBER_FAST
@@ -3054,7 +3054,7 @@ int picoquic_process_ack_of_ack_mp_frame(
30543054

30553055
if (ret == 0) {
30563056
picoquic_ack_context_t* ack_ctx = NULL;
3057-
if (cnx->is_unique_path_id_enabled) {
3057+
if (cnx->is_multipath_enabled) {
30583058
int path_index = picoquic_find_path_by_unique_id(cnx, path_id);
30593059
if (path_index >= 0) {
30603060
ack_ctx = &cnx->path[path_index]->ack_ctx;
@@ -3522,7 +3522,7 @@ static int picoquic_process_ack_range(
35223522
old_path->path_packet_acked_time_sent = p->send_time;
35233523
old_path->path_packet_acked_received = current_time;
35243524
if (old_path->nb_retransmit > 0 &&
3525-
((!cnx->is_unique_path_id_enabled &&
3525+
((!cnx->is_multipath_enabled &&
35263526
!cnx->is_simple_multipath_enabled) ||
35273527
(old_path->path_packet_last == NULL ||
35283528
p->path_packet_number >= old_path->path_packet_last->path_packet_number))) {
@@ -3591,7 +3591,7 @@ const uint8_t* picoquic_decode_ack_frame(picoquic_cnx_t* cnx, const uint8_t* byt
35913591
else
35923592
{
35933593
if (pc == picoquic_packet_context_application) {
3594-
if (cnx->is_unique_path_id_enabled) {
3594+
if (cnx->is_multipath_enabled) {
35953595
int path_index = picoquic_find_path_by_unique_id(cnx, path_id);
35963596
if (path_index < 0) {
35973597
/* No such path ID. Ignore frame. TODO: error if never seen? */
@@ -3860,7 +3860,7 @@ uint8_t * picoquic_format_ack_frame(picoquic_cnx_t* cnx, uint8_t* bytes, uint8_t
38603860
int need_time_stamp = (pc == picoquic_packet_context_application && cnx->is_time_stamp_sent);
38613861
picoquic_ack_context_t* ack_ctx = NULL;
38623862

3863-
if (cnx->is_unique_path_id_enabled && pc == picoquic_packet_context_application) {
3863+
if (cnx->is_multipath_enabled && pc == picoquic_packet_context_application) {
38643864
int ack_still_needed = 0;
38653865
int ack_after_fin = 0;
38663866
for (int path_id = 0; path_id < cnx->nb_paths; path_id++) {
@@ -3899,7 +3899,7 @@ void picoquic_set_ack_needed(picoquic_cnx_t* cnx, uint64_t current_time, picoqui
38993899
picoquic_path_t * path_x, int is_immediate_ack_required)
39003900
{
39013901
if (pc == picoquic_packet_context_application &&
3902-
cnx->is_unique_path_id_enabled) {
3902+
cnx->is_multipath_enabled) {
39033903
/* TODO: this code seems wrong */
39043904
path_x->ack_ctx.act[0].is_immediate_ack_required |= is_immediate_ack_required;
39053905
if (!path_x->ack_ctx.act[0].ack_needed) {
@@ -3921,7 +3921,7 @@ void picoquic_set_ack_needed(picoquic_cnx_t* cnx, uint64_t current_time, picoqui
39213921
uint64_t picoquic_ack_gap_override_if_needed(picoquic_cnx_t* cnx, int path_index)
39223922
{
39233923
uint64_t ack_gap = cnx->ack_gap_remote;
3924-
if (cnx->is_unique_path_id_enabled) {
3924+
if (cnx->is_multipath_enabled) {
39253925
if (!cnx->path[path_index]->path_is_demoted &&
39263926
!cnx->path[path_index]->challenge_failed &&
39273927
!cnx->path[path_index]->response_required &&
@@ -4002,7 +4002,7 @@ int picoquic_is_ack_needed(picoquic_cnx_t* cnx, uint64_t current_time, uint64_t*
40024002
pc, is_opportunistic);
40034003

40044004
if (pc == picoquic_packet_context_application) {
4005-
if (cnx->is_unique_path_id_enabled) {
4005+
if (cnx->is_multipath_enabled) {
40064006
for (int i = 0; ret == 0 && i < cnx->nb_paths; i++) {
40074007
ret |= picoquic_is_ack_needed_in_ctx(cnx, &cnx->path[i]->ack_ctx, current_time, i,
40084008
next_wake_time, pc, is_opportunistic);
@@ -5265,14 +5265,14 @@ const uint8_t* picoquic_decode_path_abandon_frame(const uint8_t* bytes, const ui
52655265

52665266
/* This code assumes that the frame type is already skipped */
52675267

5268-
if (!cnx->is_simple_multipath_enabled && !cnx->is_unique_path_id_enabled) {
5268+
if (!cnx->is_simple_multipath_enabled && !cnx->is_multipath_enabled) {
52695269
/* Frame is unexpected */
52705270
picoquic_connection_error_ex(cnx, PICOQUIC_TRANSPORT_FRAME_FORMAT_ERROR,
52715271
picoquic_frame_type_path_abandon, "multipath not negotiated");
52725272
}
52735273
else if ((bytes = picoquic_parse_path_abandon_frame(bytes, bytes_max, &path_id, &reason)) != NULL) {
52745274
/* process the abandon frame */
5275-
int path_number = (cnx->is_unique_path_id_enabled)?
5275+
int path_number = (cnx->is_multipath_enabled)?
52765276
picoquic_find_path_by_unique_id(cnx, path_id):
52775277
picoquic_find_path_by_cnxid_id(cnx, 1, path_id);
52785278
if (path_number < 0) {
@@ -5347,7 +5347,7 @@ int picoquic_queue_path_available_or_standby_frame(
53475347
uint64_t frame_type = (status == picoquic_path_status_available) ?
53485348
picoquic_frame_type_path_available : picoquic_frame_type_path_standby;
53495349
uint64_t sequence = cnx->status_sequence_to_send_next++;
5350-
uint64_t path_id = (cnx->is_unique_path_id_enabled)?
5350+
uint64_t path_id = (cnx->is_multipath_enabled)?
53515351
path_x->unique_path_id :
53525352
path_x->p_remote_cnxid->sequence;
53535353
int is_pure_ack = 0;
@@ -5389,7 +5389,7 @@ const uint8_t* picoquic_decode_path_available_or_standby_frame(const uint8_t* by
53895389

53905390
/* This code assumes that the frame type is already skipped */
53915391

5392-
if (!cnx->is_simple_multipath_enabled && !cnx->is_unique_path_id_enabled) {
5392+
if (!cnx->is_simple_multipath_enabled && !cnx->is_multipath_enabled) {
53935393
/* Frame is unexpected */
53945394
picoquic_connection_error_ex(cnx, PICOQUIC_TRANSPORT_FRAME_FORMAT_ERROR,
53955395
frame_id64, "multipath not negotiated");
@@ -5401,7 +5401,7 @@ const uint8_t* picoquic_decode_path_available_or_standby_frame(const uint8_t* by
54015401
}
54025402
else {
54035403
/* process the status frame */
5404-
int path_number = (cnx->is_unique_path_id_enabled)?
5404+
int path_number = (cnx->is_multipath_enabled)?
54055405
picoquic_find_path_by_unique_id(cnx, path_id):
54065406
picoquic_find_path_by_cnxid_id(cnx, 1, path_id);
54075407
if (path_number < 0) {
@@ -5440,7 +5440,7 @@ int picoquic_path_available_or_standby_frame_need_repeat(picoquic_cnx_t* cnx, co
54405440
}
54415441
else {
54425442
/* check whether this is the last frame sent on path */
5443-
int path_number = (cnx->is_unique_path_id_enabled)?
5443+
int path_number = (cnx->is_multipath_enabled)?
54445444
picoquic_find_path_by_unique_id(cnx, path_id):
54455445
picoquic_find_path_by_cnxid_id(cnx, 1, path_id);
54465446
if (path_number < 0 ||
@@ -5500,7 +5500,7 @@ const uint8_t* picoquic_decode_max_paths_frame(const uint8_t* bytes, const uint8
55005500

55015501
/* This code assumes that the frame type is already skipped */
55025502

5503-
if (!cnx->is_unique_path_id_enabled) {
5503+
if (!cnx->is_multipath_enabled) {
55045504
/* Frame is unexpected */
55055505
picoquic_connection_error_ex(cnx, PICOQUIC_TRANSPORT_FRAME_FORMAT_ERROR,
55065506
picoquic_frame_type_max_paths, "unique path_id not negotiated");

picoquic/logwriter.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ static uint64_t binlog_get_path_id(picoquic_cnx_t* cnx, picoquic_path_t* path_x)
658658
path_id = path_x->p_local_cnxid->sequence;
659659
}
660660
}
661-
else if (cnx->is_unique_path_id_enabled && path_x != NULL) {
661+
else if (cnx->is_multipath_enabled && path_x != NULL) {
662662
path_id = path_x->unique_path_id;
663663
}
664664

@@ -1029,7 +1029,7 @@ void binlog_new_connection(picoquic_cnx_t * cnx)
10291029

10301030
if (ret == 0) {
10311031
cnx->f_binlog = create_binlog(log_filename, picoquic_get_quic_time(cnx->quic),
1032-
cnx->local_parameters.enable_multipath | cnx->local_parameters.enable_simple_multipath | cnx->local_parameters.is_unique_path_id_enabled);
1032+
cnx->local_parameters.enable_multipath | cnx->local_parameters.enable_simple_multipath | cnx->local_parameters.is_multipath_enabled);
10331033
if (cnx->f_binlog == NULL) {
10341034
cnx->binlog_file_name = picoquic_string_free(cnx->binlog_file_name);
10351035
ret = -1;
@@ -1132,14 +1132,14 @@ void binlog_cc_dump(picoquic_cnx_t* cnx, uint64_t current_time)
11321132

11331133
bytestream_buf stream_msg;
11341134
bytestream* ps_msg = bytestream_buf_init(&stream_msg, BYTESTREAM_MAX_BUFFER_SIZE);
1135-
int path_max = (cnx->is_simple_multipath_enabled || cnx->is_unique_path_id_enabled) ? cnx->nb_paths : 1;
1135+
int path_max = (cnx->is_simple_multipath_enabled || cnx->is_multipath_enabled) ? cnx->nb_paths : 1;
11361136

11371137
for (int path_id = 0; path_id < path_max; path_id++)
11381138
{
11391139
picoquic_path_t* path = cnx->path[path_id];
11401140
picoquic_packet_context_t* pkt_ctx = &cnx->pkt_ctx[picoquic_packet_context_application];
11411141

1142-
if (cnx->is_unique_path_id_enabled) {
1142+
if (cnx->is_multipath_enabled) {
11431143
pkt_ctx = &cnx->path[path_id]->pkt_ctx;
11441144
}
11451145

@@ -1177,7 +1177,7 @@ void binlog_cc_dump(picoquic_cnx_t* cnx, uint64_t current_time)
11771177
bytewrite_vint(ps_msg, path->receive_rate_estimate);
11781178
bytewrite_vint(ps_msg, path->send_mtu);
11791179
bytewrite_vint(ps_msg, path->pacing_packet_time_microsec);
1180-
if (cnx->is_simple_multipath_enabled || cnx->is_unique_path_id_enabled) {
1180+
if (cnx->is_simple_multipath_enabled || cnx->is_multipath_enabled) {
11811181
bytewrite_vint(ps_msg, path->nb_losses_found);
11821182
bytewrite_vint(ps_msg, path->nb_spurious);
11831183
}

picoquic/loss_recovery.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ int picoquic_retransmit_needed(picoquic_cnx_t* cnx,
177177
{
178178
size_t length = 0;
179179

180-
if (pc == picoquic_packet_context_application && cnx->is_unique_path_id_enabled) {
180+
if (pc == picoquic_packet_context_application && cnx->is_multipath_enabled) {
181181
/* If unique multipath is enabled, should check for retransmission on all paths */
182182
for (int i=0; i<cnx->nb_paths; i++) {
183183
if (length == 0) {
@@ -440,7 +440,7 @@ static size_t picoquic_retransmit_needed_packet(picoquic_cnx_t* cnx, picoquic_pa
440440
*/
441441

442442
/* If ack only packets are lost, bundle a ping next time an ACK is sent on that path */
443-
if (old_p->send_path != NULL && (cnx->is_unique_path_id_enabled || cnx->is_simple_multipath_enabled)) {
443+
if (old_p->send_path != NULL && (cnx->is_multipath_enabled || cnx->is_simple_multipath_enabled)) {
444444
old_p->send_path->is_ack_lost = 1;
445445
}
446446
picoquic_count_and_notify_loss(cnx, old_p, 2, current_time);
@@ -485,7 +485,7 @@ static size_t picoquic_retransmit_needed_packet(picoquic_cnx_t* cnx, picoquic_pa
485485
}
486486
old_path->nb_retransmit++;
487487
old_path->last_loss_event_detected = current_time;
488-
if ((cnx->is_simple_multipath_enabled || cnx->is_unique_path_id_enabled) && cnx->nb_paths > 1) {
488+
if ((cnx->is_simple_multipath_enabled || cnx->is_multipath_enabled) && cnx->nb_paths > 1) {
489489
picoquic_retransmit_path_packet_queue(cnx, old_path, pkt_ctx, current_time);
490490
}
491491
if (old_path->nb_retransmit > 9 &&
@@ -494,7 +494,7 @@ static size_t picoquic_retransmit_needed_packet(picoquic_cnx_t* cnx, picoquic_pa
494494
DBG_PRINTF("%s\n", "Too many data retransmits, abandon path");
495495
picoquic_log_app_message(cnx, "%s", "Too many data retransmits, abandon path");
496496

497-
if (cnx->is_unique_path_id_enabled || cnx->is_simple_multipath_enabled) {
497+
if (cnx->is_multipath_enabled || cnx->is_simple_multipath_enabled) {
498498
int all_paths_dubious = 1;
499499
for (int path_id = 0; path_id < cnx->nb_paths; path_id++) {
500500
if (cnx->path[path_id]->nb_retransmit == 0) {
@@ -518,7 +518,7 @@ static size_t picoquic_retransmit_needed_packet(picoquic_cnx_t* cnx, picoquic_pa
518518
cnx->cnx_state >= picoquic_state_ready) {
519519
/* TODO: only disconnect if there is no other available path */
520520
int all_paths_bad = 1;
521-
if (cnx->is_unique_path_id_enabled || cnx->is_simple_multipath_enabled) {
521+
if (cnx->is_multipath_enabled || cnx->is_simple_multipath_enabled) {
522522
for (int path_id = 0; path_id < cnx->nb_paths; path_id++) {
523523
if (cnx->path[path_id]->nb_retransmit <= 9) {
524524
all_paths_bad = 0;
@@ -655,7 +655,7 @@ static int picoquic_is_packet_probably_lost(picoquic_cnx_t* cnx,
655655

656656
if (current_time >= retransmit_time_timer) {
657657
if (picoquic_is_packet_ack_eliciting(old_p) &&
658-
(cnx->is_unique_path_id_enabled || cnx->is_simple_multipath_enabled) &&
658+
(cnx->is_multipath_enabled || cnx->is_simple_multipath_enabled) &&
659659
cnx->nb_paths > 1)
660660
{
661661
*is_timer_expired = 1;
@@ -888,7 +888,7 @@ static picoquic_packet_t* picoquic_process_lost_packet(picoquic_cnx_t* cnx, pico
888888
}
889889

890890
/* If ack only packets are lost, bundle a ping next time an ACK is sent on that path */
891-
if (old_p->send_path != NULL && (cnx->is_unique_path_id_enabled || cnx->is_simple_multipath_enabled)) {
891+
if (old_p->send_path != NULL && (cnx->is_multipath_enabled || cnx->is_simple_multipath_enabled)) {
892892
old_p->send_path->is_ack_lost = 1;
893893
}
894894

@@ -1021,7 +1021,7 @@ static void picoquic_retransmit_path_packet_queue(picoquic_cnx_t* cnx, picoquic_
10211021
}
10221022

10231023
/* If ack only packets are lost, bundle a ping next time an ACK is sent on that path */
1024-
if (old_p->send_path != NULL && (cnx->is_unique_path_id_enabled || cnx->is_simple_multipath_enabled)) {
1024+
if (old_p->send_path != NULL && (cnx->is_multipath_enabled || cnx->is_simple_multipath_enabled)) {
10251025
old_p->send_path->is_ack_lost = 1;
10261026
}
10271027

@@ -1042,7 +1042,7 @@ void picoquic_retransmit_demoted_path(picoquic_cnx_t* cnx, picoquic_path_t* path
10421042
picoquic_packet_context_t* pkt_ctx = NULL;
10431043

10441044
if (cnx->cnx_state == picoquic_state_ready && cnx->nb_paths > 1) {
1045-
if (cnx->is_unique_path_id_enabled) {
1045+
if (cnx->is_multipath_enabled) {
10461046
pkt_ctx = &path_x->pkt_ctx;
10471047
}
10481048
else {
@@ -1064,7 +1064,7 @@ void picoquic_queue_retransmit_on_ack(picoquic_cnx_t* cnx, picoquic_path_t* path
10641064

10651065
/* If multipath, pick the packet context associated with the current path,
10661066
* else, pick the default 1RTT context */
1067-
if (cnx->is_unique_path_id_enabled) {
1067+
if (cnx->is_multipath_enabled) {
10681068
pkt_ctx = &path_x->pkt_ctx;
10691069
}
10701070
else {

picoquic/newreno.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ void picoquic_newreno_sim_notify(
125125
}
126126
break;
127127
case picoquic_congestion_notification_spurious_repeat:
128-
if (!cnx->is_unique_path_id_enabled) {
128+
if (!cnx->is_multipath_enabled) {
129129
if (current_time - nr_state->recovery_start < path_x->smoothed_rtt &&
130130
nr_state->recovery_sequence > picoquic_cc_get_ack_number(cnx, path_x)) {
131131
/* If spurious repeat of initial loss detected,

0 commit comments

Comments
 (0)