Skip to content

Commit

Permalink
deps: update ngtcp2 to 1.10.0
Browse files Browse the repository at this point in the history
PR-URL: #56334
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
  • Loading branch information
nodejs-github-bot authored Dec 24, 2024
1 parent 6577166 commit 270a2f1
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 16 deletions.
4 changes: 3 additions & 1 deletion deps/ngtcp2/ngtcp2/lib/includes/ngtcp2/ngtcp2.h
Original file line number Diff line number Diff line change
Expand Up @@ -1471,7 +1471,9 @@ typedef struct ngtcp2_transport_params {
uint64_t max_udp_payload_size;
/**
* :member:`active_connection_id_limit` is the maximum number of
* Connection ID that sender can store.
* Connection ID that sender can store. If specified, it must be in
* the range of [:macro:`NGTCP2_DEFAULT_ACTIVE_CONNECTION_ID_LIMIT`,
* 8], inclusive.
*/
uint64_t active_connection_id_limit;
/**
Expand Down
4 changes: 2 additions & 2 deletions deps/ngtcp2/ngtcp2/lib/includes/ngtcp2/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
*
* Version number of the ngtcp2 library release.
*/
#define NGTCP2_VERSION "1.9.1"
#define NGTCP2_VERSION "1.10.0"

/**
* @macro
Expand All @@ -46,6 +46,6 @@
* number, 8 bits for minor and 8 bits for patch. Version 1.2.3
* becomes 0x010203.
*/
#define NGTCP2_VERSION_NUM 0x010901
#define NGTCP2_VERSION_NUM 0x010a00

#endif /* !defined(NGTCP2_VERSION_H) */
3 changes: 2 additions & 1 deletion deps/ngtcp2/ngtcp2/lib/ngtcp2_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -11739,7 +11739,8 @@ static ngtcp2_ssize conn_write_vmsg_wrapper(ngtcp2_conn *conn,

if (cstat->bytes_in_flight >= cstat->cwnd) {
conn->rst.is_cwnd_limited = 1;
} else if ((cstat->cwnd >= cstat->ssthresh ||
} else if (conn->rst.app_limited == 0 &&
(cstat->cwnd >= cstat->ssthresh ||
cstat->bytes_in_flight * 2 < cstat->cwnd) &&
nwrite == 0 && conn_pacing_pkt_tx_allowed(conn, ts) &&
(conn->flags & NGTCP2_CONN_FLAG_HANDSHAKE_COMPLETED)) {
Expand Down
4 changes: 2 additions & 2 deletions deps/ngtcp2/ngtcp2/lib/ngtcp2_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

#include "ngtcp2_conv.h"

#define NGTCP2_INITIAL_TABLE_LENBITS 4
#define NGTCP2_INITIAL_HASHBITS 4

void ngtcp2_map_init(ngtcp2_map *map, const ngtcp2_mem *mem) {
map->mem = mem;
Expand Down Expand Up @@ -196,7 +196,7 @@ int ngtcp2_map_insert(ngtcp2_map *map, ngtcp2_map_key_type key, void *data) {
return rv;
}
} else {
rv = map_resize(map, NGTCP2_INITIAL_TABLE_LENBITS);
rv = map_resize(map, NGTCP2_INITIAL_HASHBITS);
if (rv != 0) {
return rv;
}
Expand Down
15 changes: 5 additions & 10 deletions deps/ngtcp2/ngtcp2/lib/ngtcp2_rtb.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,12 @@ static ngtcp2_ssize rtb_reclaim_frame(ngtcp2_rtb *rtb, uint8_t flags,
if (!fr->stream.fin) {
/* 0 length STREAM frame with offset == 0 must be
retransmitted if no non-empty data are sent to this
stream, and no data in this stream are acknowledged. */
stream, fin flag is not set, and no data in this stream
are acknowledged. */
if (fr->stream.offset != 0 || fr->stream.datacnt != 0 ||
strm->tx.offset || (strm->flags & NGTCP2_STRM_FLAG_ANY_ACKED)) {
strm->tx.offset ||
(strm->flags &
(NGTCP2_STRM_FLAG_SHUT_WR | NGTCP2_STRM_FLAG_ANY_ACKED))) {
continue;
}
} else if (strm->flags & NGTCP2_STRM_FLAG_FIN_ACKED) {
Expand Down Expand Up @@ -1284,14 +1287,6 @@ static int rtb_on_pkt_lost_resched_move(ngtcp2_rtb *rtb, ngtcp2_conn *conn,
return 0;
}

if (ent->flags & NGTCP2_RTB_ENTRY_FLAG_PMTUD_PROBE) {
ngtcp2_log_info(rtb->log, NGTCP2_LOG_EVENT_LDC,
"pkn=%" PRId64
" is a PMTUD probe packet, no retransmission is necessary",
ent->hd.pkt_num);
return 0;
}

if (ent->flags & NGTCP2_RTB_ENTRY_FLAG_LOST_RETRANSMITTED) {
--rtb->num_lost_pkts;

Expand Down

0 comments on commit 270a2f1

Please sign in to comment.