diff --git a/interop/run_endpoint.sh b/interop/run_endpoint.sh index 88d6f2b4f..4011d4fe2 100644 --- a/interop/run_endpoint.sh +++ b/interop/run_endpoint.sh @@ -4,7 +4,7 @@ /setup.sh case $TESTCASE in - versionnegotiation|handshake|longrtt|transfer|zerortt|multiconnect|chacha20|resumption|http3|retry|keyupdate) + versionnegotiation|handshake|longrtt|transfer|zerortt|multiconnect|chacha20|resumption|http3|retry|keyupdate|mphandshake|mptransfer|mppathabandon|mppathstatus) : ;; *) @@ -62,7 +62,19 @@ if [ "$ROLE" == "client" ]; then elif [ "$TESTCASE" == "keyupdate" ]; then echo "./demo_client $ARGS -U $REQUESTS -u 30" ./demo_client $ARGS -U "$REQUESTS" -u 30 + + elif [ "$TESTCASE" == "mphandshake" ] || [ "$TESTCASE" == "mptransfer" ]; then + echo "./demo_client $ARGS -U $REQUESTS -M -i eth0 -i eth0 -w 3000" + ./demo_client $ARGS -U "$REQUESTS" -M -i eth0 -i eth0 -w 3000 + elif [ "$TESTCASE" == "mppathabandon" ]; then + echo "./demo_client $ARGS -U $REQUESTS -M -i eth0 -i eth0 -w 3000 -Z 1000" + ./demo_client $ARGS -U "$REQUESTS" -M -i eth0 -i eth0 -w 3000 -Z 1000 + + elif [ "$TESTCASE" == "mppathstatus" ]; then + echo "./demo_client $ARGS -U $REQUESTS -M -i eth0 -i eth0 -w 3000 -b" + ./demo_client $ARGS -U "$REQUESTS" -M -i eth0 -i eth0 -w 3000 -b + # common testcase else echo -e "./demo_client $ARGS -U \"$REQUESTS\"\n" @@ -85,7 +97,7 @@ elif [ "$ROLE" == "server" ]; then #cp -r /www /logs - ARGS="-l d -L "$LOG_DIR/server.log" -p 443 -D "/www" -k $SSLKEYLOGFILE" + ARGS="-l d -L "$LOG_DIR/server.log" -p 443 -D "/www" -k $SSLKEYLOGFILE -M" echo "./demo_server $ARGS" ./demo_server $ARGS fi diff --git a/scripts/case_test.sh b/scripts/case_test.sh index 9d939f0ea..9782ab3f6 100755 --- a/scripts/case_test.sh +++ b/scripts/case_test.sh @@ -3475,7 +3475,6 @@ if [ "$cli_res1" == "1" ] && [ -n "$cli_res2" ] \ else echo ">>>>>>>> pass:0" case_print_result "h3_ext_finish_bytestream_during_transmission" "fail" - exit fi # close bytestream during transmission (-x 305) diff --git a/src/tls/xqc_crypto.c b/src/tls/xqc_crypto.c index 02b5300fb..9cd6f18be 100644 --- a/src/tls/xqc_crypto.c +++ b/src/tls/xqc_crypto.c @@ -661,9 +661,9 @@ xqc_crypto_derive_updated_keys(xqc_crypto_t *crypto, xqc_key_type_t type) /* update application traffic secret */ static uint8_t LABEL[] = "quic ku"; - uint8_t dest_buf[INITIAL_SECRET_MAX_LEN]; + uint8_t dest_buf[XQC_MAX_KNP_LEN]; - ret = xqc_hkdf_expand_label(dest_buf, INITIAL_SECRET_MAX_LEN, + ret = xqc_hkdf_expand_label(dest_buf, current_ckm->secret.len, current_ckm->secret.base, current_ckm->secret.len, LABEL, xqc_lengthof(LABEL), &crypto->md); if (ret != XQC_OK) { diff --git a/src/transport/xqc_conn.c b/src/transport/xqc_conn.c index d98ee8f73..63c1da34f 100644 --- a/src/transport/xqc_conn.c +++ b/src/transport/xqc_conn.c @@ -322,7 +322,7 @@ xqc_conn_init_trans_settings(xqc_connection_t *conn) xqc_conn_set_default_settings(rs); /* set local default setting values */ - ls->max_streams_bidi = 1024; + ls->max_streams_bidi = 128; ls->max_stream_data_bidi_remote = XQC_MAX_RECV_WINDOW; if (conn->conn_settings.enable_stream_rate_limit) { @@ -332,7 +332,7 @@ xqc_conn_init_trans_settings(xqc_connection_t *conn) ls->max_stream_data_bidi_local = XQC_MAX_RECV_WINDOW; } - ls->max_streams_uni = 1024; + ls->max_streams_uni = 128; ls->max_stream_data_uni = XQC_MAX_RECV_WINDOW; if (conn->conn_settings.recv_rate_bytes_per_sec) { @@ -368,11 +368,14 @@ xqc_conn_init_flow_ctl(xqc_connection_t *conn) { xqc_conn_flow_ctl_t *flow_ctl = &conn->conn_flow_ctl; xqc_trans_settings_t * settings = & conn->local_settings; - flow_ctl->fc_max_data_can_send = settings->max_data; /* replace with the value specified by peer after handshake */ + + /* TODO: send params are inited to be zero, until zerortt inited or handshake done */ + flow_ctl->fc_max_data_can_send = 1024 * 1024; /* replace with the value specified by peer after handshake */ + flow_ctl->fc_max_streams_bidi_can_send = 16; /* replace with the value specified by peer after handshake */ + flow_ctl->fc_max_streams_uni_can_send = 16; /* replace with the value specified by peer after handshake */ + flow_ctl->fc_max_data_can_recv = settings->max_data; - flow_ctl->fc_max_streams_bidi_can_send = settings->max_streams_bidi; /* replace with the value specified by peer after handshake */ flow_ctl->fc_max_streams_bidi_can_recv = settings->max_streams_bidi; - flow_ctl->fc_max_streams_uni_can_send = settings->max_streams_uni; /* replace with the value specified by peer after handshake */ flow_ctl->fc_max_streams_uni_can_recv = settings->max_streams_uni; flow_ctl->fc_data_sent = 0; flow_ctl->fc_data_recved = 0; @@ -1428,7 +1431,7 @@ xqc_on_packets_send_burst(xqc_connection_t *conn, xqc_path_ctx_t *path, ssize_t xqc_pacing_on_packet_sent(&send_ctl->ctl_pacing, packet_out->po_used_size); } - xqc_send_ctl_on_packet_sent(send_ctl, pn_ctl, packet_out, now); + xqc_send_ctl_on_packet_sent(send_ctl, pn_ctl, packet_out, now, sent); xqc_path_send_buffer_remove(path, packet_out); if (XQC_IS_ACK_ELICITING(packet_out->po_frame_types)) { xqc_send_queue_insert_unacked(packet_out, @@ -1919,7 +1922,7 @@ xqc_send_packet_with_pn(xqc_connection_t *conn, xqc_path_ctx_t *path, xqc_packet pn_ctl->ctl_packet_number[packet_out->po_pkt.pkt_pns]++; xqc_conn_log_sent_packet(conn, packet_out, now); - xqc_send_ctl_on_packet_sent(path->path_send_ctl, pn_ctl, packet_out, now); + xqc_send_ctl_on_packet_sent(path->path_send_ctl, pn_ctl, packet_out, now, sent); return sent; } diff --git a/src/transport/xqc_engine.c b/src/transport/xqc_engine.c index 7f8b2a6d7..779d880e7 100644 --- a/src/transport/xqc_engine.c +++ b/src/transport/xqc_engine.c @@ -754,6 +754,7 @@ xqc_engine_process_conn(xqc_connection_t *conn, xqc_usec_t now) } XQC_CHECK_IMMEDIATE_CLOSE(); + ret = xqc_conn_try_add_new_conn_id(conn, 0); if (ret) { xqc_log(conn->log, XQC_LOG_ERROR, "|xqc_conn_try_add_new_conn_id error|"); diff --git a/src/transport/xqc_packet.h b/src/transport/xqc_packet.h index 3427e6af7..b7789613a 100644 --- a/src/transport/xqc_packet.h +++ b/src/transport/xqc_packet.h @@ -16,7 +16,7 @@ #define XQC_MSS (XQC_QUIC_MAX_MSS + XQC_ACK_SPACE) /* max 0rtt packet count sent by client */ -#define XQC_PACKET_0RTT_MAX_COUNT 30 +#define XQC_PACKET_0RTT_MAX_COUNT 64 /* max 0rtt packet count buffered by server before Initial packet received */ #define XQC_UNDECRYPT_0RTT_MAX_BEFORE_INIT 10 /* max buffered packet count */ diff --git a/src/transport/xqc_send_ctl.c b/src/transport/xqc_send_ctl.c index b9f9e3037..206abda09 100644 --- a/src/transport/xqc_send_ctl.c +++ b/src/transport/xqc_send_ctl.c @@ -610,7 +610,7 @@ xqc_send_ctl_update_cwnd_limited(xqc_send_ctl_t *send_ctl) * OnPacketSent */ void -xqc_send_ctl_on_packet_sent(xqc_send_ctl_t *send_ctl, xqc_pn_ctl_t *pn_ctl, xqc_packet_out_t *packet_out, xqc_usec_t now) +xqc_send_ctl_on_packet_sent(xqc_send_ctl_t *send_ctl, xqc_pn_ctl_t *pn_ctl, xqc_packet_out_t *packet_out, xqc_usec_t now, ssize_t sent) { xqc_pkt_num_space_t pns = packet_out->po_pkt.pkt_pns; @@ -646,7 +646,7 @@ xqc_send_ctl_on_packet_sent(xqc_send_ctl_t *send_ctl, xqc_pn_ctl_t *pn_ctl, xqc_ pn_ctl->ctl_largest_sent[pns] = packet_out->po_pkt.pkt_num; } - send_ctl->ctl_bytes_send += packet_out->po_used_size; + send_ctl->ctl_bytes_send += sent; if (packet_out->po_largest_ack > 0) { xqc_ack_sent_record_add(&pn_ctl->ack_sent_record[pns], packet_out, send_ctl->ctl_srtt, now); diff --git a/src/transport/xqc_send_ctl.h b/src/transport/xqc_send_ctl.h index 7ca18f30b..13a895c24 100644 --- a/src/transport/xqc_send_ctl.h +++ b/src/transport/xqc_send_ctl.h @@ -195,7 +195,7 @@ void xqc_send_ctl_decrease_inflight(xqc_connection_t *conn, xqc_packet_out_t *pa void xqc_send_ctl_on_pns_discard(xqc_send_ctl_t *send_ctl, xqc_pkt_num_space_t pns); -void xqc_send_ctl_on_packet_sent(xqc_send_ctl_t *send_ctl, xqc_pn_ctl_t *pn_ctl, xqc_packet_out_t *packet_out, xqc_usec_t now); +void xqc_send_ctl_on_packet_sent(xqc_send_ctl_t *send_ctl, xqc_pn_ctl_t *pn_ctl, xqc_packet_out_t *packet_out, xqc_usec_t now, ssize_t sent); int xqc_send_ctl_on_ack_received (xqc_send_ctl_t *send_ctl, xqc_pn_ctl_t *pn_ctl, xqc_send_queue_t *send_queue, xqc_ack_info_t *const ack_info, xqc_usec_t ack_recv_time, xqc_bool_t ack_on_same_path);