Release 2.27.1

- [API] New knob to set outgoing packet batch size.
- Aborted connection now become tickable immediately.
- Abort connection when HTTP/3 frame cannot be opened (can only happen
  when malloc fails).
This commit is contained in:
Dmitri Tikhonov 2021-01-06 09:00:05 -05:00
parent 6511378725
commit 06b2a2363e
277 changed files with 368 additions and 283 deletions

View File

@ -1,4 +1,4 @@
# Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE.
# Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE.
LSQUIC APIs
===========

View File

@ -1,3 +1,10 @@
2021-01-06
- 2.27.1
- [API] New knob to set outgoing packet batch size.
- Aborted connection now become tickable immediately.
- Abort connection when HTTP/3 frame cannot be opened (can only happen
when malloc fails).
2020-12-31
- 2.27.0
- [API] Remove keylog callbacks. See issue #188.

View File

@ -1,4 +1,4 @@
# Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE.
# Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE.
cmake_minimum_required(VERSION 2.8)

View File

@ -1,4 +1,4 @@
# Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE.
# Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE.
In addition to the LiteSpeed QUIC Team, the following people contributed
to the LiteSpeed QUIC and HTTP/3 Library:

View File

@ -1,4 +1,4 @@
# Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE.
# Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE.
LSQUIC Examples
===============

View File

@ -1,4 +1,4 @@
# Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE.
# Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE.
INCLUDE(CheckFunctionExists)
CHECK_FUNCTION_EXISTS(sendmmsg HAVE_SENDMMSG)
CHECK_FUNCTION_EXISTS(recvmmsg HAVE_RECVMMSG)

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* duck_client.c -- The siduck client. See
* https://tools.ietf.org/html/draft-pardue-quic-siduck-00

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* A duck quacks! The server for the siduck protocol:
* https://tools.ietf.org/html/draft-pardue-quic-siduck-00

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* echo_client.c -- This is really a "line client:" it connects to QUIC server
* and sends it stuff, line by line. It works in tandem with echo_server.

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* echo_server.c -- QUIC server that echoes back input line by line
*/

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* http_client.c -- A simple HTTP/QUIC client
*/

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* http_server.c -- A simple HTTP/QUIC server
*

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* md5_client.c -- This client sends one or more files to MD5 QUIC server
* for MD5 sum calculation.

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* md5_server.c -- Read one or more streams from the client and return
* MD5 sum of the payload.

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#include <assert.h>
#ifndef WIN32
#include <arpa/inet.h>

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* prog.h -- common setup and options for QUIC program
*/

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#ifndef TEST_CERT_H
#define TEST_CERT_H

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#if __GNUC__
#define _GNU_SOURCE /* For struct in6_pktinfo */
#endif
@ -1953,6 +1953,11 @@ set_engine_option (struct lsquic_engine_settings *settings,
settings->es_ptpc_prop_gain = atof(val);
return 0;
}
if (0 == strncmp(name, "max_batch_size", 14))
{
settings->es_max_batch_size = atoi(val);
return 0;
}
break;
case 15:
if (0 == strncmp(name, "allow_migration", 15))

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* Test client's and server's common components.
*/

View File

@ -866,6 +866,14 @@ settings structure:
Default value is :macro:`LSQUIC_DF_DELAY_ONCLOSE`
.. member:: int es_max_batch_size
If set to a non-zero value, specifies maximum batch size. (The
batch of packets passed to :member:`lsquic_engine_api.ea_packets_out`).
Must be no larger than 1024.
Default value is :macro:`LSQUIC_DF_MAX_BATCH_SIZE`
To initialize the settings structure to library defaults, use the following
convenience function:
@ -1102,6 +1110,11 @@ out of date. Please check your :file:`lsquic.h` for actual values.*
By default, calling :member:`lsquic_stream_if.on_close()` is not delayed.
.. macro:: LSQUIC_DF_MAX_BATCH_SIZE
By default, maximum batch size is not specified, leaving it up to the
library.
Receiving Packets
-----------------
@ -1426,6 +1439,12 @@ Closing Connections
This closes the connection. :member:`lsquic_stream_if.on_conn_closed`
and :member:`lsquic_stream_if.on_close` callbacks will be called.
.. function:: void lsquic_conn_abort (lsquic_conn_t *conn)
This aborts the connection. The connection and all associated objects
will be destroyed (with necessary callbacks called) during the next time
:func:`lsquic_engine_process_conns()` is invoked.
Creating Streams
----------------

View File

@ -26,7 +26,7 @@ author = u'LiteSpeed Technologies'
# The short X.Y version
version = u'2.27'
# The full version, including alpha/beta/rc tags
release = u'2.27.0'
release = u'2.27.1'
# -- General configuration ---------------------------------------------------

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#ifndef __LSQUIC_H__
#define __LSQUIC_H__
@ -25,7 +25,7 @@ extern "C" {
#define LSQUIC_MAJOR_VERSION 2
#define LSQUIC_MINOR_VERSION 27
#define LSQUIC_PATCH_VERSION 0
#define LSQUIC_PATCH_VERSION 1
/**
* Engine flags:
@ -434,6 +434,12 @@ typedef struct ssl_ctx_st * (*lsquic_lookup_cert_f)(
/** By default, calling on_close() is not delayed */
#define LSQUIC_DF_DELAY_ONCLOSE 0
/**
* By default, maximum batch size is not specified, leaving it up to the
* library.
*/
#define LSQUIC_DF_MAX_BATCH_SIZE 0
struct lsquic_engine_settings {
/**
* This is a bit mask wherein each bit corresponds to a value in
@ -1038,6 +1044,15 @@ struct lsquic_engine_settings {
* Default value is @ref LSQUIC_DF_DELAY_ONCLOSE
*/
int es_delay_onclose;
/**
* If set to a non-zero value, specifies maximum batch size. (The
* batch of packets passed to @ref ea_packets_out() callback). Must
* be no larger than 1024.
*
* Default value is @ref LSQUIC_DF_MAX_BATCH_SIZE
*/
unsigned es_max_batch_size;
};
/* Initialize `settings' to default values */

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#ifndef __LSQUIC_TYPES_H__
#define __LSQUIC_TYPES_H__

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#ifndef LSXPACK_HEADER_H_v206
#define LSXPACK_HEADER_H_v206

View File

@ -1,4 +1,4 @@
# Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE.
# Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE.
cmake_minimum_required(VERSION 2.8)
add_subdirectory(liblsquic)

View File

@ -1,4 +1,4 @@
# Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE.
# Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE.
SET(lsquic_STAT_SRCS
ls-qpack/lsqpack.c
lsquic_adaptive_cc.c

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2015 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE.chrome file.

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2015 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE.chrome file.

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2015 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE.chrome file.

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2015 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE.chrome file.

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2015 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE.chrome file.

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2015 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE.chrome file.

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/* libfiu - Fault Injection in Userspace
*

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#line 2 "ls-sfparser.c"
#line 2 "ls-sfparser.l"
/*

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
MIT License

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/* lsquic_adaptive_cc.c -- adaptive congestion controller */
#include <inttypes.h>

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_adaptive_cc.h -- Adaptive congestion controller
*

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_alarmset.c -- A set of alarms
*/

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_alarmset.h -- A set of alarms
*/

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_arr.c
*/

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_arr.h -- Array
*/

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_attq.c -- Advisory Tick Time Queue
*

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_attq.h -- Advisory Tick Time Queue
*/

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE.chrome file.

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#ifndef LSQUIC_BBR_H
#define LSQUIC_BBR_H

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#include <assert.h>
#include <inttypes.h>
#include <stddef.h>

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#ifndef LSQUIC_BW_SAMPLER_H
#define LSQUIC_BW_SAMPLER_H 1

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#ifndef LSQUIC_BYTESWAP_H
#define LSQUIC_BYTESWAP_H 1

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#include <inttypes.h>
#include <stdint.h>
#include <stdlib.h>

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* Stream/crypto handshake adapter for the client side.
*

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* Stream/crypto handshake adapter for the client side.
*/

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_cong_ctl.h -- congestion control interface
*/

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#include <assert.h>
#include <inttypes.h>
#include <string.h>

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_conn.h -- Connection interface
*

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_conn_flow.h -- Connection flow control-related functions
*/

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_conn_public.h -- Connection's "public interface"
*

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#include <openssl/rand.h>
#include <stdint.h>

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_crand.h -- cached random bytes
*

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#include <assert.h>
#include <stdbool.h>
#include <string.h>

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#ifndef __LSQUIC_CRT_COMPRESS_H__
#define __LSQUIC_CRT_COMPRESS_H__

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#include <assert.h>
#include <string.h>

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#ifndef __LSQUIC_CRYPTO_H__
#define __LSQUIC_CRYPTO_H__

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_cubic.c -- LSQUIC CUBIC implementation.
*/

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_cubic.h -- CUBIC congestion control protocol.
*/

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_data_in_if.h -- DATA in interface
*/

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_di_error.c -- A placeholder when things go wrong
*

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_di_hash.c -- Copy incoming data into a hash
*

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_di_nocopy.c -- The "no-copy" data in stream.
*

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#ifndef LSQUIC_ENC_SESS_H
#define LSQUIC_ENC_SESS_H 1
@ -295,7 +295,7 @@ struct enc_session_funcs_iquic
void *(crypto_streams)[4],
const struct crypto_stream_if *,
const struct lsquic_cid *odcid,
const struct lsquic_cid *iscid );
const struct lsquic_cid *iscid);
void
(*esfi_shake_stream)(enc_session_t *, struct lsquic_stream *,

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#include <stddef.h>
#include <stdint.h>
#include <string.h>

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_enc_sess_ietf.c -- Crypto session for IETF QUIC
*/
@ -1014,7 +1014,7 @@ iquic_esfi_create_server (struct lsquic_engine_public *enpub,
void *(crypto_streams)[4],
const struct crypto_stream_if *cryst_if,
const struct lsquic_cid *odcid,
const struct lsquic_cid *iscid )
const struct lsquic_cid *iscid)
{
struct enc_sess_iquic *enc_sess;

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#include <time.h>
#ifdef WIN32
#include <vc_compat.h>

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_eng_hist.h - Engine history.
*

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_engine.c - QUIC engine
*/
@ -101,9 +101,10 @@
#endif
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
/* The batch of outgoing packets grows and shrinks dynamically */
/* Batch sizes must be powers of two */
/* Batch sizes do not have to be powers of two */
#define MAX_OUT_BATCH_SIZE 1024
#define MIN_OUT_BATCH_SIZE 4
#define INITIAL_OUT_BATCH_SIZE 32
@ -247,6 +248,7 @@ struct lsquic_engine
struct min_heap conns_out;
struct eng_hist history;
unsigned batch_size;
unsigned min_batch_size, max_batch_size;
struct lsquic_conn *curr_conn;
struct pr_queue *pr_queue;
struct attq *attq;
@ -482,6 +484,14 @@ lsquic_engine_check_settings (const struct lsquic_engine_settings *settings,
return -1;
}
if (settings->es_max_batch_size > MAX_OUT_BATCH_SIZE)
{
if (err_buf)
snprintf(err_buf, err_buf_sz, "max batch size is greater than "
"the allowed maximum of %u", (unsigned) MAX_OUT_BATCH_SIZE);
return -1;
}
return 0;
}
@ -699,7 +709,19 @@ lsquic_engine_new (unsigned flags,
}
engine->attq = lsquic_attq_create();
eng_hist_init(&engine->history);
engine->batch_size = INITIAL_OUT_BATCH_SIZE;
if (engine->pub.enp_settings.es_max_batch_size)
{
engine->max_batch_size = engine->pub.enp_settings.es_max_batch_size;
engine->min_batch_size = MIN(4, engine->max_batch_size);
engine->batch_size = MAX(engine->max_batch_size / 4,
engine->min_batch_size);
}
else
{
engine->min_batch_size = MIN_OUT_BATCH_SIZE;
engine->max_batch_size = MAX_OUT_BATCH_SIZE;
engine->batch_size = INITIAL_OUT_BATCH_SIZE;
}
if (engine->pub.enp_settings.es_honor_prst)
{
engine->pub.enp_srst_hash = lsquic_hash_create();
@ -799,14 +821,14 @@ log_packet_checksum (const lsquic_cid_t *cid, const char *direction,
static void
grow_batch_size (struct lsquic_engine *engine)
{
engine->batch_size <<= engine->batch_size < MAX_OUT_BATCH_SIZE;
engine->batch_size = MIN(engine->batch_size * 2, engine->max_batch_size);
}
static void
shrink_batch_size (struct lsquic_engine *engine)
{
engine->batch_size >>= engine->batch_size > MIN_OUT_BATCH_SIZE;
engine->batch_size = MAX(engine->batch_size / 2, engine->min_batch_size);
}

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_engine_public.h -- Engine's "public interface"
*

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#ifndef WIN32
#include <arpa/inet.h>
#else

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_ev_log.h -- Event logger
*/

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_frab_list.c -- List of buffer for simple reading and writing
*/

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_frab_list.h -- List of buffer for simple reading and writing
*

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#include <stdint.h>
#include "lsquic_frame_common.h"

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_frame_common.h
*/

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_frame_reader.c -- Read HTTP frames from stream
*/

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_frame_reader.h -- Read HTTP frames from stream
*/

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_frame_writer.c -- write frames to HEADERS stream.
*

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_frame_writer.h -- write frames to HEADERS stream.
*/

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_full_conn.c -- A "full" connection object has full functionality
*/
@ -3768,6 +3768,7 @@ full_conn_ci_abort (struct lsquic_conn *lconn)
struct full_conn *conn = (struct full_conn *) lconn;
LSQ_INFO("User aborted connection");
conn->fc_flags |= FC_ABORTED;
lsquic_engine_add_conn_to_tickable(conn->fc_enpub, lconn);
}
@ -4323,6 +4324,13 @@ full_conn_ci_is_tickable (lsquic_conn_t *lconn)
return 1;
}
if (conn->fc_flags & FC_IMMEDIATE_CLOSE_FLAGS)
{
LSQ_DEBUG("tickable: immediate close flags: 0x%X",
(unsigned) (conn->fc_flags & FC_IMMEDIATE_CLOSE_FLAGS));
return 1;
}
LSQ_DEBUG("not tickable");
return 0;
}

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#ifndef LSQUIC_FULL_CONN_H
#define LSQUIC_FULL_CONN_H

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_full_conn_ietf.c -- IETF QUIC connection.
*/
@ -2931,6 +2931,7 @@ ietf_full_conn_ci_abort (struct lsquic_conn *lconn)
struct ietf_full_conn *conn = (struct ietf_full_conn *) lconn;
LSQ_INFO("User aborted connection");
conn->ifc_flags |= IFC_ABORTED;
lsquic_engine_add_conn_to_tickable(conn->ifc_enpub, lconn);
}
@ -4114,6 +4115,13 @@ ietf_full_conn_ci_is_tickable (struct lsquic_conn *lconn)
return 1;
}
if (conn->ifc_flags & IFC_IMMEDIATE_CLOSE_FLAGS)
{
LSQ_DEBUG("tickable: immediate close flags: 0x%X",
(unsigned) (conn->ifc_flags & IFC_IMMEDIATE_CLOSE_FLAGS));
return 1;
}
LSQ_DEBUG("not tickable");
return 0;
}

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* Global state
*/

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#define _GNU_SOURCE /* for memmem */
#include <assert.h>

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#ifndef LSQUIC_HANDSHAKE_H
#define LSQUIC_HANDSHAKE_H 1

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_hash.c
*/

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_hash.c -- A generic hash
*/

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#include <assert.h>
#include <inttypes.h>
#include <stddef.h>

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_hcsi_reader.h -- HTTP Control Stream Incoming (HCSI) reader
*/

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_hcso_writer.c - write to outgoing HTTP Control Stream
*/

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_hcso_writer.h
*/

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
#ifndef LSQUIC_HEADERS_H
#define LSQUIC_HEADERS_H 1

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
/*
* HEADERS stream logic
*/

Some files were not shown because too many files have changed in this diff Show More