commit
11632d3c2c
|
@ -157,7 +157,7 @@ jobs:
|
||||||
- name: Build ngtcp2
|
- name: Build ngtcp2
|
||||||
if: matrix.http3 == 'http3'
|
if: matrix.http3 == 'http3'
|
||||||
run: |
|
run: |
|
||||||
git clone --depth 1 -b v0.9.0 https://github.com/ngtcp2/ngtcp2
|
git clone --depth 1 -b v0.10.0 https://github.com/ngtcp2/ngtcp2
|
||||||
cd ngtcp2
|
cd ngtcp2
|
||||||
autoreconf -i
|
autoreconf -i
|
||||||
./configure --prefix=$PWD/build --enable-lib-only PKG_CONFIG_PATH="../openssl/build/lib/pkgconfig" $EXTRA_NGTCP2_OPTS
|
./configure --prefix=$PWD/build --enable-lib-only PKG_CONFIG_PATH="../openssl/build/lib/pkgconfig" $EXTRA_NGTCP2_OPTS
|
||||||
|
|
|
@ -143,7 +143,7 @@ following libraries are required:
|
||||||
<https://github.com/quictls/openssl/tree/OpenSSL_1_1_1q+quic>`_; or
|
<https://github.com/quictls/openssl/tree/OpenSSL_1_1_1q+quic>`_; or
|
||||||
`BoringSSL <https://boringssl.googlesource.com/boringssl/>`_ (commit
|
`BoringSSL <https://boringssl.googlesource.com/boringssl/>`_ (commit
|
||||||
04989786e9ab16cef5261bbd05a2b1a8cb312dbf)
|
04989786e9ab16cef5261bbd05a2b1a8cb312dbf)
|
||||||
* `ngtcp2 <https://github.com/ngtcp2/ngtcp2>`_ >= 0.9.0
|
* `ngtcp2 <https://github.com/ngtcp2/ngtcp2>`_ >= 0.10.0
|
||||||
* `nghttp3 <https://github.com/ngtcp2/nghttp3>`_ >= 0.7.0
|
* `nghttp3 <https://github.com/ngtcp2/nghttp3>`_ >= 0.7.0
|
||||||
|
|
||||||
Use ``--enable-http3`` configure option to enable HTTP/3 feature for
|
Use ``--enable-http3`` configure option to enable HTTP/3 feature for
|
||||||
|
@ -379,7 +379,7 @@ Build ngtcp2:
|
||||||
|
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
$ git clone --depth 1 -b v0.9.0 https://github.com/ngtcp2/ngtcp2
|
$ git clone --depth 1 -b v0.10.0 https://github.com/ngtcp2/ngtcp2
|
||||||
$ cd ngtcp2
|
$ cd ngtcp2
|
||||||
$ autoreconf -i
|
$ autoreconf -i
|
||||||
$ ./configure --prefix=$PWD/build --enable-lib-only \
|
$ ./configure --prefix=$PWD/build --enable-lib-only \
|
||||||
|
|
|
@ -540,7 +540,7 @@ fi
|
||||||
# ngtcp2 (for src)
|
# ngtcp2 (for src)
|
||||||
have_libngtcp2=no
|
have_libngtcp2=no
|
||||||
if test "x${request_libngtcp2}" != "xno"; then
|
if test "x${request_libngtcp2}" != "xno"; then
|
||||||
PKG_CHECK_MODULES([LIBNGTCP2], [libngtcp2 >= 0.9.0], [have_libngtcp2=yes],
|
PKG_CHECK_MODULES([LIBNGTCP2], [libngtcp2 >= 0.10.0], [have_libngtcp2=yes],
|
||||||
[have_libngtcp2=no])
|
[have_libngtcp2=no])
|
||||||
if test "x${have_libngtcp2}" = "xno"; then
|
if test "x${have_libngtcp2}" = "xno"; then
|
||||||
AC_MSG_NOTICE($LIBNGTCP2_PKG_ERRORS)
|
AC_MSG_NOTICE($LIBNGTCP2_PKG_ERRORS)
|
||||||
|
@ -557,7 +557,7 @@ have_libngtcp2_crypto_openssl=no
|
||||||
if test "x${have_ssl_is_quic}" = "xyes" &&
|
if test "x${have_ssl_is_quic}" = "xyes" &&
|
||||||
test "x${request_libngtcp2}" != "xno"; then
|
test "x${request_libngtcp2}" != "xno"; then
|
||||||
PKG_CHECK_MODULES([LIBNGTCP2_CRYPTO_OPENSSL],
|
PKG_CHECK_MODULES([LIBNGTCP2_CRYPTO_OPENSSL],
|
||||||
[libngtcp2_crypto_openssl >= 0.9.0],
|
[libngtcp2_crypto_openssl >= 0.10.0],
|
||||||
[have_libngtcp2_crypto_openssl=yes],
|
[have_libngtcp2_crypto_openssl=yes],
|
||||||
[have_libngtcp2_crypto_openssl=no])
|
[have_libngtcp2_crypto_openssl=no])
|
||||||
if test "x${have_libngtcp2_crypto_openssl}" = "xno"; then
|
if test "x${have_libngtcp2_crypto_openssl}" = "xno"; then
|
||||||
|
|
|
@ -24,7 +24,7 @@ RUN git clone --depth 1 -b v0.7.1 https://github.com/ngtcp2/nghttp3 && \
|
||||||
cd .. && \
|
cd .. && \
|
||||||
rm -rf nghttp3
|
rm -rf nghttp3
|
||||||
|
|
||||||
RUN git clone --depth 1 -b v0.9.0 https://github.com/ngtcp2/ngtcp2 && \
|
RUN git clone --depth 1 -b v0.10.0 https://github.com/ngtcp2/ngtcp2 && \
|
||||||
cd ngtcp2 && \
|
cd ngtcp2 && \
|
||||||
autoreconf -i && \
|
autoreconf -i && \
|
||||||
./configure --enable-lib-only \
|
./configure --enable-lib-only \
|
||||||
|
|
|
@ -387,8 +387,8 @@ int Client::quic_init(const sockaddr *local_addr, socklen_t local_addrlen,
|
||||||
settings.qlog.write = qlog_write_cb;
|
settings.qlog.write = qlog_write_cb;
|
||||||
}
|
}
|
||||||
if (config->max_udp_payload_size) {
|
if (config->max_udp_payload_size) {
|
||||||
settings.max_udp_payload_size = config->max_udp_payload_size;
|
settings.max_tx_udp_payload_size = config->max_udp_payload_size;
|
||||||
settings.no_udp_payload_size_shaping = 1;
|
settings.no_tx_udp_payload_size_shaping = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngtcp2_transport_params params;
|
ngtcp2_transport_params params;
|
||||||
|
@ -592,14 +592,14 @@ int Client::write_quic() {
|
||||||
|
|
||||||
std::array<nghttp3_vec, 16> vec;
|
std::array<nghttp3_vec, 16> vec;
|
||||||
size_t pktcnt = 0;
|
size_t pktcnt = 0;
|
||||||
auto max_udp_payload_size = ngtcp2_conn_get_max_udp_payload_size(quic.conn);
|
auto max_udp_payload_size =
|
||||||
|
ngtcp2_conn_get_max_tx_udp_payload_size(quic.conn);
|
||||||
#ifdef UDP_SEGMENT
|
#ifdef UDP_SEGMENT
|
||||||
auto path_max_udp_payload_size =
|
auto path_max_udp_payload_size =
|
||||||
ngtcp2_conn_get_path_max_udp_payload_size(quic.conn);
|
ngtcp2_conn_get_path_max_tx_udp_payload_size(quic.conn);
|
||||||
#endif // UDP_SEGMENT
|
#endif // UDP_SEGMENT
|
||||||
size_t max_pktcnt =
|
auto max_pktcnt =
|
||||||
std::min(static_cast<size_t>(10),
|
ngtcp2_conn_get_send_quantum(quic.conn) / max_udp_payload_size;
|
||||||
static_cast<size_t>(64_k / max_udp_payload_size));
|
|
||||||
uint8_t *bufpos = quic.tx.data.get();
|
uint8_t *bufpos = quic.tx.data.get();
|
||||||
ngtcp2_path_storage ps;
|
ngtcp2_path_storage ps;
|
||||||
size_t gso_size = 0;
|
size_t gso_size = 0;
|
||||||
|
|
|
@ -611,7 +611,7 @@ int Http3Upstream::init(const UpstreamAddr *faddr, const Address &remote_addr,
|
||||||
settings.cc_algo = quicconf.upstream.congestion_controller;
|
settings.cc_algo = quicconf.upstream.congestion_controller;
|
||||||
settings.max_window = http3conf.upstream.max_connection_window_size;
|
settings.max_window = http3conf.upstream.max_connection_window_size;
|
||||||
settings.max_stream_window = http3conf.upstream.max_window_size;
|
settings.max_stream_window = http3conf.upstream.max_window_size;
|
||||||
settings.max_udp_payload_size = SHRPX_QUIC_MAX_UDP_PAYLOAD_SIZE;
|
settings.max_tx_udp_payload_size = SHRPX_QUIC_MAX_UDP_PAYLOAD_SIZE;
|
||||||
settings.rand_ctx.native_handle = &worker->get_randgen();
|
settings.rand_ctx.native_handle = &worker->get_randgen();
|
||||||
settings.token = ngtcp2_vec{const_cast<uint8_t *>(token), tokenlen};
|
settings.token = ngtcp2_vec{const_cast<uint8_t *>(token), tokenlen};
|
||||||
|
|
||||||
|
@ -738,14 +738,12 @@ int Http3Upstream::on_write() {
|
||||||
|
|
||||||
int Http3Upstream::write_streams() {
|
int Http3Upstream::write_streams() {
|
||||||
std::array<nghttp3_vec, 16> vec;
|
std::array<nghttp3_vec, 16> vec;
|
||||||
auto max_udp_payload_size = ngtcp2_conn_get_max_udp_payload_size(conn_);
|
auto max_udp_payload_size = ngtcp2_conn_get_max_tx_udp_payload_size(conn_);
|
||||||
#ifdef UDP_SEGMENT
|
#ifdef UDP_SEGMENT
|
||||||
auto path_max_udp_payload_size =
|
auto path_max_udp_payload_size =
|
||||||
ngtcp2_conn_get_path_max_udp_payload_size(conn_);
|
ngtcp2_conn_get_path_max_tx_udp_payload_size(conn_);
|
||||||
#endif // UDP_SEGMENT
|
#endif // UDP_SEGMENT
|
||||||
size_t max_pktcnt =
|
auto max_pktcnt = ngtcp2_conn_get_send_quantum(conn_) / max_udp_payload_size;
|
||||||
std::min(static_cast<size_t>(64_k), ngtcp2_conn_get_send_quantum(conn_)) /
|
|
||||||
max_udp_payload_size;
|
|
||||||
ngtcp2_pkt_info pi, prev_pi;
|
ngtcp2_pkt_info pi, prev_pi;
|
||||||
uint8_t *bufpos = tx_.data.get();
|
uint8_t *bufpos = tx_.data.get();
|
||||||
ngtcp2_path_storage ps, prev_ps;
|
ngtcp2_path_storage ps, prev_ps;
|
||||||
|
|
Loading…
Reference in New Issue