Skip to content
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

[+] explicit path id first shot (ready to merge) #374

Closed
wants to merge 82 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
1cfa662
[+] add new transport parameter max_concurrent_paths
Yanmei-Liu Nov 15, 2023
b72623c
[+] add option for demo client
Yanmei-Liu Nov 15, 2023
eb183a5
[+] get min(local, remote) for max_concurrent_paths
Yanmei-Liu Nov 15, 2023
3311fc6
[+] add MP_CONNECTION_ID and MP_RETIRE_CONNECTION_ID frames
Yanmei-Liu Nov 16, 2023
dace8b1
[+] add basic logic for CID allocation
Yanmei-Liu Nov 16, 2023
94b5952
[+] add frame parser
Yanmei-Liu Nov 16, 2023
2d0bfe1
[+] add log for new frames
Yanmei-Liu Nov 16, 2023
ade9b2a
[~] initialize cid set under path
Yanmei-Liu Nov 16, 2023
52829d0
[~] adjust cid allocation
Yanmei-Liu Nov 16, 2023
3d6ec43
[~] adjust cid allocation
Yanmei-Liu Nov 16, 2023
1cd02b1
[+] add debug log and default value for transport param
Yanmei-Liu Nov 16, 2023
ab4a7c0
[+] set default value
Yanmei-Liu Nov 16, 2023
18bbc37
[+] add default value
Yanmei-Liu Nov 16, 2023
f2df0b5
[~] adjust cid set used when new path is created
Yanmei-Liu Nov 16, 2023
9e4bab2
[+] init cid set earlier
Yanmei-Liu Nov 16, 2023
d97ffd5
[+] adjust transport parameter and the frame format
Yanmei-Liu Nov 17, 2023
fe9ff6b
[~] frame type update
Yanmei-Liu Nov 17, 2023
547ce78
[=] replace definition names
Yanmei-Liu Nov 17, 2023
c665672
[~] fix new cid ack flag set
Yanmei-Liu Nov 17, 2023
d6a5095
[+] update encryption and decryption
Yanmei-Liu Nov 17, 2023
2b45794
[+] add debug log
Yanmei-Liu Nov 17, 2023
e92b26c
[+] update path id for decryption
Yanmei-Liu Nov 17, 2023
8790b3a
[=] add logs for encryption and decryption
Yanmei-Liu Nov 17, 2023
a309119
[~] change the path available / standby frames using path id
Yanmei-Liu Nov 17, 2023
7fc329e
[+] change the way addressing a path
Yanmei-Liu Nov 17, 2023
7618992
[+] add logs for path available and standby
Yanmei-Liu Nov 17, 2023
07b1daf
[~] use the path id from DCID to address the path when receiving path…
Yanmei-Liu Nov 17, 2023
9daa892
[+] address with path id in path abandon frame
Yanmei-Liu Nov 17, 2023
bc343dd
[~] also use path id to address a path when generating path abandon f…
Yanmei-Liu Nov 17, 2023
ab9ccd8
[+] add logs for abandon frame
Yanmei-Liu Nov 17, 2023
cd363f1
[~] adjust transport parameter
Yanmei-Liu Nov 17, 2023
6d42d48
[+] add test cases for path abandon
Yanmei-Liu Nov 17, 2023
1860067
[+] add retire cid after path abandon and 3 ptos
Yanmei-Liu Nov 17, 2023
3fcafaa
[~] bugfix for transport parameter
Yanmei-Liu Nov 17, 2023
e324a22
[+] add retire conn id process
Yanmei-Liu Nov 17, 2023
1031717
[+] add logs for debug
Yanmei-Liu Nov 17, 2023
dc07ac5
[~] bug fix for mp retire conn id
Yanmei-Liu Nov 17, 2023
d64bd3b
[+] add protection
Yanmei-Liu Nov 17, 2023
26fb2e7
[+] merge 2 transport parameters
Yanmei-Liu Feb 24, 2024
93aa8bb
[~] delete unused code
Yanmei-Liu Feb 24, 2024
7f3d93d
[~] modify default value
Yanmei-Liu Feb 24, 2024
e9e0d17
[+] add support version
Yanmei-Liu Feb 24, 2024
ee60a10
[+] adjust tp
Yanmei-Liu Feb 24, 2024
962234a
[+] adjust parameter
Yanmei-Liu Feb 24, 2024
6b1592b
[+] Update frame fields
Yanmei-Liu Feb 28, 2024
99cdb53
[+] update cid set
Yanmei-Liu Feb 28, 2024
b474c5f
[+] Update cid seq
Yanmei-Liu Feb 28, 2024
7163bbc
[=] delete unused log
Yanmei-Liu Feb 28, 2024
bb46c4b
[+] update ack_mp process
Yanmei-Liu Feb 29, 2024
e777ab5
[+] Update MAX_PATHS and ack-eciliting
Yanmei-Liu Mar 1, 2024
2c0fde7
[+] Update cal
Yanmei-Liu Mar 1, 2024
d793940
[+] Fix packet sending err
Yanmei-Liu Mar 1, 2024
8ae982f
[+] fix max_path = 0
Yanmei-Liu Mar 1, 2024
2899f58
[+] add log for new cid generate
Yanmei-Liu Mar 16, 2024
9c648e1
[+] modify check active cid number under per path
Yanmei-Liu Mar 16, 2024
f07769f
[+] add one more unused active cid for each path
Yanmei-Liu Mar 16, 2024
f898519
[+] supports -07 for path standby / available
Yanmei-Liu Mar 16, 2024
3bc9c14
[+] add more logs
Yanmei-Liu Mar 16, 2024
615a082
[+] fix path id
Yanmei-Liu Mar 16, 2024
01d879f
[+] update API
Yanmei-Liu Mar 16, 2024
842f91a
[+] update remote limit for max paths
Yanmei-Liu Mar 16, 2024
00337ec
[+] Make sure path can still be find after the first cid was retired
Yanmei-Liu Mar 17, 2024
137ef37
[+] fix check with origin dcid
Yanmei-Liu Mar 17, 2024
3f753cc
[+] add more logs for max_paths
Yanmei-Liu Mar 17, 2024
84c9a1d
[+] fix upper bond of path id
Yanmei-Liu Mar 17, 2024
dd0a744
[+] compatible for RETIRE_CID
Yanmei-Liu Mar 17, 2024
6967204
[+] support multipath draft-10
Yanmei-Liu Jul 12, 2024
4ee60ad
[+] add support for version 10
Yanmei-Liu Jul 12, 2024
2ab89f6
[+] supporting draft - 10
Yanmei-Liu Jul 12, 2024
e7deb05
[=] Update log
Yanmei-Liu Jul 12, 2024
33cc5a3
[+] Update unused cid check for connection
Yanmei-Liu Jul 15, 2024
8ec39b0
[~] 修复检查条件
Yanmei-Liu Jul 15, 2024
6f90722
[+] add path available send
Yanmei-Liu Jul 20, 2024
8009378
[+] add option for idle timeout
Yanmei-Liu Jul 21, 2024
194f7bd
[~] 统一用0作为max_concurrent_paths未设置判断
Yanmei-Liu Sep 18, 2024
d8aa0cb
[+] 更新合并draft-10最新改动 / 同步FEC分支 / 同步内部修复
Yanmei-Liu Sep 20, 2024
fa0f496
Merge branch 'main' into dev/path_idx
Yanmei-Liu Sep 20, 2024
84d5737
[+] 补齐缺少的文件
Yanmei-Liu Sep 23, 2024
3c67657
[~] 同步单元测试内容
Yanmei-Liu Sep 23, 2024
3f96b4b
[~] 同步demo_client修改
Yanmei-Liu Sep 23, 2024
8198f8e
[~] 去除不用的option
Yanmei-Liu Sep 23, 2024
c89a0de
[=] 去除暂时不用的API
Yanmei-Liu Sep 23, 2024
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
Prev Previous commit
Next Next commit
[+] adjust transport parameter and the frame format
  • Loading branch information
Yanmei-Liu committed Aug 21, 2024
commit d97ffd57fa8188831f846f7bd62f9feac8d01770
4 changes: 2 additions & 2 deletions src/transport/xqc_frame.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ xqc_process_frames(xqc_connection_t *conn, xqc_packet_in_t *packet_in)
break;
#endif

case 0x15228c09:
case XQC_TRANS_FRAME_TYPE_MP_NEW_CONN_ID:
if (conn->conn_settings.multipath_version >= XQC_MULTIPATH_06) {
ret = xqc_process_mp_new_conn_id_frame(conn, packet_in);

Expand All @@ -385,7 +385,7 @@ xqc_process_frames(xqc_connection_t *conn, xqc_packet_in_t *packet_in)
ret = -XQC_EMP_INVALID_MP_VERTION;
}
break;
case 0x15228c0a:
case XQC_TRANS_FRAME_TYPE_MP_RETIRE_CONN_ID:
if (conn->conn_settings.multipath_version >= XQC_MULTIPATH_06) {
ret = xqc_process_retire_conn_id_frame(conn, packet_in);

Expand Down
31 changes: 16 additions & 15 deletions src/transport/xqc_frame_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -2849,7 +2849,7 @@ xqc_gen_mp_new_conn_id_frame(xqc_packet_out_t *packet_out, xqc_cid_t *new_cid,
const unsigned char *begin = dst_buf;

/* write frame type */
uint64_t frame_type = 0x15228c09;
uint64_t frame_type = XQC_TRANS_FRAME_TYPE_MP_NEW_CONN_ID;
unsigned frame_type_bits = xqc_vint_get_2bit(frame_type);
xqc_vint_write(dst_buf, frame_type, frame_type_bits, xqc_vint_len(frame_type_bits));
dst_buf += xqc_vint_len(frame_type_bits);
Expand All @@ -2873,6 +2873,11 @@ xqc_gen_mp_new_conn_id_frame(xqc_packet_out_t *packet_out, xqc_cid_t *new_cid,
xqc_vint_write(dst_buf, retire_prior_to, retire_prior_to_bits, xqc_vint_len(retire_prior_to_bits));
dst_buf += xqc_vint_len(retire_prior_to_bits);

/* Path ID (i) */
unsigned path_id_bits = xqc_vint_get_2bit(path_id);
xqc_vint_write(dst_buf, path_id, path_id_bits, xqc_vint_len(path_id_bits));
dst_buf += xqc_vint_len(path_id_bits);

xqc_vint_write(dst_buf, cid_len, cid_len_bits, xqc_vint_len(cid_len_bits));
dst_buf += xqc_vint_len(cid_len_bits);

Expand All @@ -2884,10 +2889,6 @@ xqc_gen_mp_new_conn_id_frame(xqc_packet_out_t *packet_out, xqc_cid_t *new_cid,
dst_buf += XQC_STATELESS_RESET_TOKENLEN;
}

unsigned path_id_bits = xqc_vint_get_2bit(path_id);
xqc_vint_write(dst_buf, path_id, path_id_bits, xqc_vint_len(path_id_bits));
dst_buf += xqc_vint_len(path_id_bits);

packet_out->po_frame_types |= XQC_FRAME_BIT_MP_NEW_CONNECTION_ID;

return dst_buf - begin;
Expand All @@ -2900,10 +2901,10 @@ xqc_gen_mp_new_conn_id_frame(xqc_packet_out_t *packet_out, xqc_cid_t *new_cid,
* Type (i) = 0x15228c09,
* Sequence Number (i),
* Retire Prior To (i),
* Path Identifier(i),
* Length (8),
* Connection ID (8..160),
* Stateless Reset Token (128),
* Path Identifier(i),
* }
*
* Figure 39: MP_NEW_CONNECTION_ID Frame Format
Expand Down Expand Up @@ -2938,6 +2939,14 @@ xqc_parse_mp_new_conn_id_frame(xqc_packet_in_t *packet_in,
}
p += vlen;

/* Path ID (i) */
vlen = xqc_vint_read(p, end, path_id);
if (vlen < 0) {
return -XQC_EVINTREAD;
}
new_cid->path_id = *path_id;
p += vlen;

/* Length (8) */
if (p >= end) {
return -XQC_EPROTO;
Expand All @@ -2961,14 +2970,6 @@ xqc_parse_mp_new_conn_id_frame(xqc_packet_in_t *packet_in,
xqc_memcpy(new_cid->sr_token, p, XQC_STATELESS_RESET_TOKENLEN);
p += XQC_STATELESS_RESET_TOKENLEN;

/* Path ID (i) */
vlen = xqc_vint_read(p, end, path_id);
if (vlen < 0) {
return -XQC_EVINTREAD;
}
new_cid->path_id = *path_id;
p += vlen;

packet_in->pos = p;

packet_in->pi_frame_types |= XQC_FRAME_BIT_MP_NEW_CONNECTION_ID;
Expand All @@ -2995,7 +2996,7 @@ xqc_gen_mp_retire_conn_id_frame(xqc_packet_out_t *packet_out, uint64_t seq_num,
const unsigned char *begin = dst_buf;

/* write frame type */
uint64_t frame_type = 0x15228c0a;
uint64_t frame_type = XQC_TRANS_FRAME_TYPE_MP_RETIRE_CONN_ID;
unsigned frame_type_bits = xqc_vint_get_2bit(frame_type);
xqc_vint_write(dst_buf, frame_type, frame_type_bits, xqc_vint_len(frame_type_bits));
dst_buf += xqc_vint_len(frame_type_bits);
Expand Down
4 changes: 4 additions & 0 deletions src/transport/xqc_frame_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
#define XQC_DATAGRAM_LENGTH_FIELD_BYTES 2
#define XQC_DATAGRAM_HEADER_BYTES (XQC_DATAGRAM_LENGTH_FIELD_BYTES + 1)


#define XQC_TRANS_FRAME_TYPE_MP_NEW_CONN_ID 0x15228c09
#define XQC_TRANS_FRAME_TYPE_MP_RETIRE_CONN_ID 0x15228c0a

/**
* generate datagram frame
*/
Expand Down
2 changes: 1 addition & 1 deletion src/transport/xqc_transport_params.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ typedef enum {
XQC_TRANSPORT_PARAM_ENABLE_MULTIPATH_05 = 0x0f739bbc1b666d05,
XQC_TRANSPORT_PARAM_ENABLE_MULTIPATH_06 = 0x0f739bbc1b666d06,
/* multipath max concurrent paths */
XQC_TRANSPORT_PARAM_MAX_CONCURRENT_PATHS = 0x0f739bbc1b666df1,
XQC_TRANSPORT_PARAM_MAX_CONCURRENT_PATHS = 0x0f29e3d19e,

/* google connection options */
XQC_TRANSPORT_PARAM_GOOGLE_CO = 0x3128,
Expand Down