Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 4d579f4
Author: Masakazu Kitajo <maskit@apache.org>
Date:   Thu Aug 13 08:32:58 2020 +0900

    Fix docs

commit 8c114c0
Merge: f39e397 b527464
Author: Masakazu Kitajo <maskit@apache.org>
Date:   Thu Aug 13 07:31:56 2020 +0900

    Merge branch 'master' into quic-latest

    * master:
      Adding autopep8 as a pre-commit hook. (apache#7071)
      Refresh proxy protocol diagram (apache#7095)
      Skip docs builds if there are no changes in the doc dir and files it includes (apache#7088)
      Remove more deadcode (apache#7098)
      destroy threads after job done (apache#7083)
      Fix compilation error - missing '&' operator (apache#7093)
      Adds description for ssl_ticket_number in ssl_multicert docs (apache#7091)
      Ran clang-tidy over the source tree (apache#7077)
      Move the direct self loop check later to HttpSM::do_http_server_open just before connection upstream. (apache#7069)

commit f39e397
Merge: d09a757 2219cee
Author: Masakazu Kitajo <maskit@apache.org>
Date:   Thu Aug 6 09:08:46 2020 +0900

    Merge branch 'master' into quic-latest

    * master:
      Signal WRITE_COMPLETE regardless of transmission progress (apache#7062)
      Converts files to #pragma once (apache#7089)
      Fix eval_ip compile - missing const. (apache#7087)
      Fix a crash on connection migration to the advertised preferred address (apache#7080)
      Update and run the autopep8 make target (apache#7070)
      Fixes no_content_length status code description in docs (apache#7086)
      const-ify quic/http3 code (apache#7084)
      Fixes build warnings in maxmind_acl (apache#7085)
      Add TS_USE_QUIC to traffic_layout info (apache#7074)
      Added support for out of tree builds with vscode (apache#7072)
      constify Print() methods and other low hanging fruit (apache#7068)
      Updating to AuTest 1.8.1. (apache#7065)
      Use system include-style for STL and OpenSSL headers (apache#7066)
      tests: gitignore ssl-delay-server binary (apache#7067)

     Conflicts:
    	iocore/net/quic/QUICLossDetector.cc
    	iocore/net/quic/QUICLossDetector.h

commit d09a757
Author: Randall Meyer <rrm@apache.org>
Date:   Tue Aug 4 13:52:53 2020 -0700

    const-ify quic/http3 code (apache#7079)

commit 84e4c8e
Merge: 50937c0 3087f16
Author: Masakazu Kitajo <maskit@apache.org>
Date:   Fri Jul 31 10:24:13 2020 +0900

    Merge branch 'master' into quic-latest

    * master:
      Fix a crash on active timeout on QUIC connections (apache#7059)
      Don't make an error on receiving retransmitted handshake data (apache#7061)
      Document proxy.config.http.cache.post_method. (apache#7060)
      Quote out lists of servers and domains in splitdns.config example (apache#7057)
      Fix proxy.process.http.current_client_connections (apache#7056)
      Fixed CLIENT-URL to use the pristine client URL (apache#7050)
      Removes FIXME that is unlikely to be fixed at this point in the project history (apache#7058)
      Move to denylists and allowlists (apache#7034)
      Avoid unnecessary copying of STL map for QUICTPConfigQCP class. (apache#7039)

commit 50937c0
Merge: f6e1744 9467a2c
Author: Masakazu Kitajo <maskit@apache.org>
Date:   Tue Jul 28 10:08:26 2020 +0900

    Merge branch 'master' into quic-latest

    * master:
      Fixes spelling/license formatting in traffic_dump plugin (apache#7047)
      Fixes spelling in docs (apache#7048)
      Fixes spelling H3-related code (apache#7046)
      Cleans up various versions checks (apache#7049)
      Fix a typo (apache#7043)

     Conflicts:
    	iocore/net/quic/QUICHandshake.cc
    	iocore/net/quic/QUICLossDetector.cc
    	iocore/net/quic/QUICNewRenoCongestionController.cc
    	iocore/net/quic/test/test_QUICPacketFactory.cc

commit f6e1744
Merge: 83e1da7 549c626
Author: Masakazu Kitajo <maskit@apache.org>
Date:   Mon Jul 27 11:11:58 2020 +0900

    Merge branch 'master' into quic-latest

    * master:
      Make tls_conn_timeout test more reliable in CI (apache#7018)
      Remove deprecated verify.server for 9.0 (apache#7040)
      Updated GitHub description and homepage URL to be https (apache#7019)
      Add virtual destructor to QUICTPConfig. (apache#7036)
      Fix code to eliminate warning and enable feature (apache#7031)
      add a null check to avoid crashing (apache#7035)
      Squashed commit of the following: (apache#7000)
      Fixed problem with all "forced" volumes cache (apache#7028)
      Spacing tweaks to acl_filter_rule::print (apache#7026)
      Removes dead code from iocore/dns (apache#7025)
      Removes TODO (apache#7027)
      Add logic to resolve content-length transfer-encoding conflicts on response (apache#6992)
      Add memory_profile plugin (apache#7014)
      Fix typos relating to tls_bridge (apache#7011)
      slice: clean up of created 502 response header (apache#6919)
      Add new API / TSPluginDSOReloadEnable that overrides the configuration variable `proxy.config.plugin.dynamic_reload_mode` for a particular plugin. (apache#6880)
      Remove incorrect assert in inactivity timeout handling (apache#7012)
      Removes use of SPLIT_DNS macro (apache#7010)
      Fixed core when sending back a redirect and having an invalid server response (apache#7004)
      slice: fix throttle not work (apache#7008)
      Updates to thread scale factor (apache#7007)
      Added tasks and launch files for vscode, to configure, build and debug (apache#7005)
      NextHop Strategy Refactor and Fixes (apache#6782)
      Make the setting of the continuation handler safer. (apache#6996)
      ProtocolStack n -> count (apache#7006)
      Fix volume/stripe calcs when using forced volumes (apache#6995)
      Cleanup: Write error message on diags output instead of stderr (apache#6997)

     Conflicts:
    	iocore/net/P_QUICNetVConnection.h
    	iocore/net/P_QUICPacketHandler.h
    	iocore/net/QUICNetProcessor.cc
    	iocore/net/QUICNetVConnection.cc
    	iocore/net/QUICPacketHandler.cc
    	iocore/net/quic/Mock.h
    	iocore/net/quic/QUICCongestionController.h
    	iocore/net/quic/QUICContext.cc
    	iocore/net/quic/QUICContext.h
    	iocore/net/quic/QUICDebugNames.cc
    	iocore/net/quic/QUICFrame.cc
    	iocore/net/quic/QUICHandshake.cc
    	iocore/net/quic/QUICKeyGenerator.h
    	iocore/net/quic/QUICLossDetector.cc
    	iocore/net/quic/QUICLossDetector.h
    	iocore/net/quic/QUICNewRenoCongestionController.cc
    	iocore/net/quic/QUICPacket.cc
    	iocore/net/quic/QUICPacket.h
    	iocore/net/quic/QUICPacketFactory.cc
    	iocore/net/quic/QUICPacketFactory.h
    	iocore/net/quic/QUICRetryIntegrityTag.cc
    	iocore/net/quic/QUICRetryIntegrityTag.h
    	iocore/net/quic/QUICTLS.h
    	iocore/net/quic/QUICTLS_boringssl.cc
    	iocore/net/quic/QUICTLS_openssl.cc
    	iocore/net/quic/QUICTransportParameters.cc
    	iocore/net/quic/QUICTransportParameters.h
    	iocore/net/quic/QUICTypes.cc
    	iocore/net/quic/QUICTypes.h
    	iocore/net/quic/qlog/QLogListener.h
    	iocore/net/quic/test/test_QUICHandshakeProtocol.cc
    	iocore/net/quic/test/test_QUICLossDetector.cc
    	iocore/net/quic/test/test_QUICPacket.cc
    	iocore/net/quic/test/test_QUICPacketFactory.cc
    	iocore/net/quic/test/test_QUICPacketHeaderProtector.cc
    	iocore/net/quic/test/test_QUICStreamManager.cc
    	iocore/net/quic/test/test_QUICVersionNegotiator.cc
    	proxy/http/HttpProxyServerMain.cc
    	src/traffic_quic/quic_client.cc
    	src/tscore/ink_inet.cc

commit 83e1da7
Author: Masakazu Kitajo <maskit@apache.org>
Date:   Wed Jul 22 23:26:56 2020 +0900

    Fix a crash on path validation

commit c74bd89
Author: Masakazu Kitajo <maskit@apache.org>
Date:   Wed Jul 22 23:19:05 2020 +0900

    Fix a crash on traffic_quic

commit b4a0c8c
Author: Masakazu Kitajo <maskit@apache.org>
Date:   Wed Jul 22 16:37:02 2020 +0900

    Update Congestion Control logic to draft-29

commit 53da240
Author: Masakazu Kitajo <maskit@apache.org>
Date:   Wed Jul 22 11:40:18 2020 +0900

    Adjust debug log verbosity

commit 92a34b0
Author: Masakazu Kitajo <maskit@apache.org>
Date:   Tue Jul 21 12:04:00 2020 +0900

    Fix infinite PING

commit 42c4054
Author: Masakazu Kitajo <maskit@apache.org>
Date:   Thu Jul 9 10:16:04 2020 +0900

    Update Loss Detection logic to draft-29

commit e8109c0
Author: Masakazu Kitajo <maskit@apache.org>
Date:   Fri Jun 26 10:57:42 2020 +0900

    Update tests

commit 3a8cb4a
Author: Masakazu Kitajo <maskit@apache.org>
Date:   Thu Jun 25 14:58:47 2020 +0900

    Use different keys and nonces for Draft-27 and Draft-29

commit 37af625
Author: Masakazu Kitajo <maskit@apache.org>
Date:   Thu Jun 25 14:14:57 2020 +0900

    Use different salts for Draft-27 and Draft-29

commit 52e57fe
Author: Masakazu Kitajo <maskit@apache.org>
Date:   Mon Jun 22 11:53:43 2020 +0900

    Rename SERVER_BUSY to CONNECTION_REFUSED

commit e5fb638
Author: Masakazu Kitajo <maskit@apache.org>
Date:   Mon Jun 22 11:50:38 2020 +0900

    Update QUIC draft version numbers to 29

commit a9ef9b0
Author: Masakazu Kitajo <maskit@apache.org>
Date:   Fri Jul 10 17:21:46 2020 +0900

    Update code for BoringSSL

commit 58cac98
Author: Masakazu Kitajo <maskit@apache.org>
Date:   Thu Jun 4 11:24:16 2020 +0900

    Don't include exercise version number provided by a client into VN packet

commit 47e1eb7
Author: Masakazu Kitajo <maskit@apache.org>
Date:   Thu Jun 4 10:45:14 2020 +0900

    Updates tests and fixes a couple of typoes

commit f41ca7b
Author: Masakazu Kitajo <maskit@apache.org>
Date:   Mon Jun 1 12:46:32 2020 +0900

    Support both QUIC draft-27 and draft-28

commit 3a5b3c7
Author: Masakazu Kitajo <maskit@apache.org>
Date:   Thu May 28 13:57:57 2020 +0900

    Add QUIC APPLICATION_ERROR error code

commit 0457e74
Author: Masakazu Kitajo <maskit@apache.org>
Date:   Thu May 28 13:33:02 2020 +0900

    Add support for new Transport Parameters on draft-28

commit 2717ecc
Author: Masakazu Kitajo <maskit@apache.org>
Date:   Mon May 25 11:46:49 2020 +0900

    Rename QUIC Transport Parameters

    ORIGINAL_CONNECTION_ID -> ORIGINAL_DESTINATION_CONNECTION_ID
    MAX_PACKET_SIZE -> MAX_UDP_PAYLOAD_SIZE

commit 9ef2167
Author: Masakazu Kitajo <maskit@apache.org>
Date:   Mon May 25 10:34:54 2020 +0900

    Update QUIC draft version numbers to 28
  • Loading branch information
maskit committed Aug 12, 2020
1 parent b527464 commit 9fa4250
Show file tree
Hide file tree
Showing 69 changed files with 1,551 additions and 1,000 deletions.
4 changes: 2 additions & 2 deletions doc/admin-guide/files/records.config.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4092,13 +4092,13 @@ removed in the future without prior notice.
This is just for debugging. Do not change it from the default value unless
you really understand what this is.

.. ts:cv:: CONFIG proxy.config.quic.congestion_control.initial_window_scale INT 10
.. ts:cv:: CONFIG proxy.config.quic.congestion_control.initial_window INT 12000
:reloadable:

This is just for debugging. Do not change it from the default value unless
you really understand what this is.

.. ts:cv:: CONFIG proxy.config.quic.congestion_control.minimum_window_scale INT 2
.. ts:cv:: CONFIG proxy.config.quic.congestion_control.minimum_window INT 2400
:reloadable:

This is just for debugging. Do not change it from the default value unless
Expand Down
2 changes: 2 additions & 0 deletions include/ts/apidefs.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -1232,7 +1232,9 @@ extern tsapi const char *const TS_ALPN_PROTOCOL_HTTP_1_0;
extern tsapi const char *const TS_ALPN_PROTOCOL_HTTP_1_1;
extern tsapi const char *const TS_ALPN_PROTOCOL_HTTP_2_0;
extern tsapi const char *const TS_ALPN_PROTOCOL_HTTP_3;
extern tsapi const char *const TS_ALPN_PROTOCOL_HTTP_3_D27;
extern tsapi const char *const TS_ALPN_PROTOCOL_HTTP_QUIC;
extern tsapi const char *const TS_ALPN_PROTOCOL_HTTP_QUIC_D27;

extern tsapi int TS_ALPN_PROTOCOL_INDEX_HTTP_0_9;
extern tsapi int TS_ALPN_PROTOCOL_INDEX_HTTP_1_0;
Expand Down
2 changes: 2 additions & 0 deletions include/tscore/ink_inet.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ extern const std::string_view IP_PROTO_TAG_HTTP_1_1;
extern const std::string_view IP_PROTO_TAG_HTTP_2_0;
extern const std::string_view IP_PROTO_TAG_HTTP_QUIC;
extern const std::string_view IP_PROTO_TAG_HTTP_3;
extern const std::string_view IP_PROTO_TAG_HTTP_QUIC_D27;
extern const std::string_view IP_PROTO_TAG_HTTP_3_D27;

struct IpAddr; // forward declare.

Expand Down
35 changes: 25 additions & 10 deletions iocore/net/P_QUICNetVConnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,11 @@ class QUICNetVConnection : public UnixNetVConnection,
public:
QUICNetVConnection();
~QUICNetVConnection();
void init(QUICConnectionId peer_cid, QUICConnectionId original_cid, UDPConnection *, QUICPacketHandler *,
void init(QUICVersion version, QUICConnectionId peer_cid, QUICConnectionId original_cid, UDPConnection *, QUICPacketHandler *,
QUICResetTokenTable *rtable);
void init(QUICConnectionId peer_cid, QUICConnectionId original_cid, QUICConnectionId first_cid, UDPConnection *,
QUICPacketHandler *, QUICResetTokenTable *rtable, QUICConnectionTable *ctable);
void init(QUICVersion version, QUICConnectionId peer_cid, QUICConnectionId original_cid, QUICConnectionId first_cid,
QUICConnectionId retry_cid, UDPConnection *, QUICPacketHandler *, QUICResetTokenTable *rtable,
QUICConnectionTable *ctable);

// accept new conn_id
int acceptEvent(int event, Event *e);
Expand Down Expand Up @@ -199,13 +200,20 @@ class QUICNetVConnection : public UnixNetVConnection,
QUICConnectionId peer_connection_id() const override;
QUICConnectionId original_connection_id() const override;
QUICConnectionId first_connection_id() const override;
QUICConnectionId retry_source_connection_id() const override;
QUICConnectionId initial_source_connection_id() const override;
QUICConnectionId connection_id() const override;
std::string_view cids() const override;
const QUICFiveTuple five_tuple() const override;
uint32_t pmtu() const override;
NetVConnectionContext_t direction() const override;
QUICVersion negotiated_version() const override;
std::string_view negotiated_application_name() const override;
bool is_closed() const override;
bool is_at_anti_amplification_limit() const override;
bool is_address_validation_completed() const override;
bool is_handshake_completed() const override;
bool has_keys_for(QUICPacketNumberSpace space) const override;

// QUICConnection (QUICFrameHandler)
std::vector<QUICFrameType> interests() override;
Expand All @@ -226,17 +234,20 @@ class QUICNetVConnection : public UnixNetVConnection,

QUICConfig::scoped_config _quic_config;

QUICConnectionId _peer_quic_connection_id; // dst cid in local
QUICConnectionId _peer_old_quic_connection_id; // dst previous cid in local
QUICConnectionId _original_quic_connection_id; // dst cid of initial packet from client
QUICConnectionId _first_quic_connection_id; // dst cid of initial packet from client that doesn't have retry token
QUICConnectionId _quic_connection_id; // src cid in local
QUICConnectionId _peer_quic_connection_id; // dst cid in local
QUICConnectionId _peer_old_quic_connection_id; // dst previous cid in local
QUICConnectionId _original_quic_connection_id; // dst cid of initial packet from client
QUICConnectionId _first_quic_connection_id; // dst cid of initial packet from client that doesn't have retry token
QUICConnectionId _retry_source_connection_id; // src cid used for sending Retry packet
QUICConnectionId _initial_source_connection_id; // src cid used for Initial packet
QUICConnectionId _quic_connection_id; // src cid in local
QUICFiveTuple _five_tuple;
bool _connection_migration_initiated = false;

char _cids_data[MAX_CIDS_SIZE] = {0};
std::string_view _cids;

QUICVersion _initial_version;
UDPConnection *_udp_con = nullptr;
QUICPacketProtectionKeyInfo _pp_key_info;
QUICPacketHandler *_packet_handler = nullptr;
Expand Down Expand Up @@ -277,6 +288,8 @@ class QUICNetVConnection : public UnixNetVConnection,
uint32_t _state_closing_recv_packet_window = 1;
uint64_t _flow_control_buffer_size = 1024;

void _init_submodules();

void _schedule_packet_write_ready(bool delay = false);
void _unschedule_packet_write_ready();
void _close_packet_write_ready(Event *data);
Expand Down Expand Up @@ -304,9 +317,9 @@ class QUICNetVConnection : public UnixNetVConnection,
uint64_t _maximum_stream_frame_data_size();

Ptr<IOBufferBlock> _store_frame(Ptr<IOBufferBlock> parent_block, size_t &size_added, uint64_t &max_frame_size, QUICFrame &frame,
std::vector<QUICFrameInfo> &frames);
std::vector<QUICSentPacketInfo::FrameInfo> &frames);
QUICPacketUPtr _packetize_frames(uint8_t *packet_buf, QUICEncryptionLevel level, uint64_t max_packet_size,
std::vector<QUICFrameInfo> &frames);
std::vector<QUICSentPacketInfo::FrameInfo> &frames);
void _packetize_closing_frame();
QUICPacketUPtr _build_packet(uint8_t *packet_buf, QUICEncryptionLevel level, const Ptr<IOBufferBlock> &parent_block,
bool retransmittable, bool probing, bool crypto);
Expand Down Expand Up @@ -337,7 +350,9 @@ class QUICNetVConnection : public UnixNetVConnection,
QUICPacketUPtr _dequeue_recv_packet(uint8_t *packet_buf, QUICPacketCreationResult &result);
void _validate_new_path(const QUICPath &path);

bool _handshake_completed = false;
int _complete_handshake_if_possible();

void _switch_to_handshake_state();
void _switch_to_established_state();
void _switch_to_closing_state(QUICConnectionErrorUPtr error);
Expand Down
2 changes: 1 addition & 1 deletion iocore/net/P_QUICPacketHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class QUICPacketHandlerIn : public NetAccept, public QUICPacketHandler
private:
void _recv_packet(int event, UDPPacket *udp_packet) override;
int _stateless_retry(const uint8_t *buf, uint64_t buf_len, UDPConnection *connection, IpEndpoint from, QUICConnectionId dcid,
QUICConnectionId scid, QUICConnectionId *original_cid);
QUICConnectionId scid, QUICConnectionId *original_cid, QUICConnectionId *retry_cid, QUICVersion version);
bool _send_stateless_reset(QUICConnectionId dcid, uint32_t instance_id, UDPConnection *udp_con, IpEndpoint &addr,
size_t maximum_size);
void _send_invalid_token_error(const uint8_t *initial_packet, uint64_t initial_packet_len, UDPConnection *connection,
Expand Down
2 changes: 1 addition & 1 deletion iocore/net/QUICNetProcessor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ QUICNetProcessor::connect_re(Continuation *cont, sockaddr const *remote_addr, Ne
QUICConnectionId client_dst_cid;
client_dst_cid.randomize();
// vc->init set handler of vc `QUICNetVConnection::startEvent`
vc->init(client_dst_cid, client_dst_cid, con, packet_handler, this->_rtable);
vc->init(QUIC_SUPPORTED_VERSIONS[0], client_dst_cid, client_dst_cid, con, packet_handler, this->_rtable);
packet_handler->init(vc);

// Connection ID will be changed
Expand Down

0 comments on commit 9fa4250

Please sign in to comment.