Skip to content

Commit

Permalink
[~]merge branch interop into main
Browse files Browse the repository at this point in the history
  • Loading branch information
cherylsy committed Nov 2, 2023
2 parents 0ff85e0 + 3296742 commit 9ea3572
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 16 deletions.
16 changes: 14 additions & 2 deletions interop/run_endpoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
:
;;
*)
Expand Down Expand Up @@ -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"
Expand All @@ -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
1 change: 0 additions & 1 deletion scripts/case_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/tls/xqc_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
17 changes: 10 additions & 7 deletions src/transport/xqc_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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;
}

Expand Down
1 change: 1 addition & 0 deletions src/transport/xqc_engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -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|");
Expand Down
2 changes: 1 addition & 1 deletion src/transport/xqc_packet.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
4 changes: 2 additions & 2 deletions src/transport/xqc_send_ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/transport/xqc_send_ctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 9ea3572

Please sign in to comment.