From 79e93d9164c7faf6215d942a9b43cd082ab4c3c4 Mon Sep 17 00:00:00 2001 From: Randall Meyer Date: Mon, 27 Jul 2020 10:50:40 -0700 Subject: [PATCH] Fixes spelling H3-related code --- iocore/net/P_QUICNet.h | 4 +- iocore/net/P_QUICPacketHandler.h | 6 +- iocore/net/QUICNetProcessor.cc | 2 +- iocore/net/QUICNetVConnection.cc | 14 ++-- iocore/net/quic/QUICAckFrameCreator.cc | 2 +- iocore/net/quic/QUICAckFrameCreator.h | 2 +- iocore/net/quic/QUICAltConnectionManager.cc | 2 +- iocore/net/quic/QUICAltConnectionManager.h | 2 +- iocore/net/quic/QUICBidirectionalStream.cc | 2 +- iocore/net/quic/QUICConfig.cc | 4 +- iocore/net/quic/QUICCongestionController.h | 2 +- iocore/net/quic/QUICConnection.h | 2 +- iocore/net/quic/QUICContext.h | 2 +- iocore/net/quic/QUICFlowController.cc | 2 +- iocore/net/quic/QUICFrame.cc | 6 +- iocore/net/quic/QUICFrame.h | 4 +- iocore/net/quic/QUICGlobals.cc | 2 +- iocore/net/quic/QUICHandshake.cc | 8 +-- iocore/net/quic/QUICHandshakeProtocol.h | 2 +- iocore/net/quic/QUICKeyGenerator_boringssl.cc | 2 +- iocore/net/quic/QUICKeyGenerator_openssl.cc | 2 +- iocore/net/quic/QUICLossDetector.cc | 2 +- iocore/net/quic/QUICLossDetector.h | 2 +- .../quic/QUICNewRenoCongestionController.cc | 4 +- iocore/net/quic/QUICPacket.cc | 72 +++++++++---------- iocore/net/quic/QUICPathValidator.h | 2 +- iocore/net/quic/QUICStreamState.cc | 4 +- iocore/net/quic/QUICTLS_boringssl.cc | 2 +- iocore/net/quic/QUICTLS_legacy.cc | 2 +- iocore/net/quic/QUICTLS_openssl.cc | 2 +- iocore/net/quic/QUICTypes.h | 4 +- iocore/net/quic/QUICUnidirectionalStream.cc | 2 +- iocore/net/quic/QUICVersionNegotiator.h | 2 +- iocore/net/quic/qlog/QLogEvent.cc | 2 +- iocore/net/quic/qlog/QLogUtils.h | 2 +- .../net/quic/test/test_QUICAckFrameCreator.cc | 2 +- .../net/quic/test/test_QUICFlowController.cc | 4 +- iocore/net/quic/test/test_QUICFrame.cc | 4 +- .../quic/test/test_QUICFrameRetransmitter.cc | 4 +- .../net/quic/test/test_QUICPacketFactory.cc | 2 +- iocore/net/quic/test/test_QUICPinger.cc | 2 +- iocore/net/quic/test/test_QUICStream.cc | 8 +-- proxy/http3/Http3App.cc | 4 +- proxy/http3/Http3App.h | 4 +- proxy/http3/Http3HeaderFramer.cc | 2 +- proxy/http3/Http3HeaderVIOAdaptor.h | 2 +- proxy/http3/Http3Types.cc | 2 +- proxy/http3/Http3Types.h | 2 +- proxy/http3/QPACK.cc | 6 +- proxy/http3/QPACK.h | 2 +- proxy/http3/test/test_Http3Frame.cc | 2 +- proxy/http3/test/test_QPACK.cc | 8 +-- src/traffic_quic/quic_client.cc | 2 +- src/traffic_quic/traffic_quic.cc | 4 +- 54 files changed, 121 insertions(+), 123 deletions(-) diff --git a/iocore/net/P_QUICNet.h b/iocore/net/P_QUICNet.h index a8a59a20199..09468bc03a4 100644 --- a/iocore/net/P_QUICNet.h +++ b/iocore/net/P_QUICNet.h @@ -21,8 +21,7 @@ limitations under the License. */ -#ifndef __P_QUICNET_H__ -#define __P_QUICNET_H__ +#pragma once #include @@ -77,4 +76,3 @@ get_QUICPollCont(EThread *t) } extern ClassAllocator quicPollEventAllocator; -#endif diff --git a/iocore/net/P_QUICPacketHandler.h b/iocore/net/P_QUICPacketHandler.h index 4df92ece805..d7f6dc2212f 100644 --- a/iocore/net/P_QUICPacketHandler.h +++ b/iocore/net/P_QUICPacketHandler.h @@ -53,7 +53,7 @@ class QUICPacketHandler QUICConnection *_check_stateless_reset(const uint8_t *buf, size_t buf_len); // FIXME Remove this - // QUICPacketHandler could be a continuation, but NetAccept is a contination too. + // QUICPacketHandler could be a continuation, but NetAccept is a continuation too. virtual Continuation *_get_continuation() = 0; Event *_collector_event = nullptr; @@ -65,7 +65,7 @@ class QUICPacketHandler }; /* - * @class QUICPacketHanderIn + * @class QUICPacketHandlerIn * @brief QUIC Packet Handler for incoming connections */ class QUICPacketHandlerIn : public NetAccept, public QUICPacketHandler @@ -97,7 +97,7 @@ class QUICPacketHandlerIn : public NetAccept, public QUICPacketHandler }; /* - * @class QUICPacketHanderOut + * @class QUICPacketHandlerOut * @brief QUIC Packet Handler for outgoing connections */ class QUICPacketHandlerOut : public Continuation, public QUICPacketHandler diff --git a/iocore/net/QUICNetProcessor.cc b/iocore/net/QUICNetProcessor.cc index 4dfebae1487..2075e81e0f2 100644 --- a/iocore/net/QUICNetProcessor.cc +++ b/iocore/net/QUICNetProcessor.cc @@ -43,7 +43,7 @@ QUICNetProcessor::QUICNetProcessor() {} QUICNetProcessor::~QUICNetProcessor() { - // TODO: clear all values before destory the table. + // TODO: clear all values before destroy the table. delete this->_ctable; } diff --git a/iocore/net/QUICNetVConnection.cc b/iocore/net/QUICNetVConnection.cc index 833875337f4..70df614754a 100644 --- a/iocore/net/QUICNetVConnection.cc +++ b/iocore/net/QUICNetVConnection.cc @@ -526,7 +526,7 @@ void QUICNetVConnection::destroy(EThread *t) { QUICConDebug("Destroy connection"); - /* TODO: Uncmment these blocks after refactoring read / write process + /* TODO: Uncomment these blocks after refactoring read / write process if (from_accept_thread) { quicNetVCAllocator.free(this); } else { @@ -806,7 +806,7 @@ QUICNetVConnection::state_handshake(int event, Event *data) // Don't make this error, and discard the packet. // Because: // - Attacker can terminate connections - // - It could be just an errora on lower layer + // - It could be just an error on lower layer error = nullptr; } else if (result == QUICPacketCreationResult::SUCCESS || result == QUICPacketCreationResult::UNSUPPORTED) { error = this->_state_handshake_process_packet(*packet); @@ -1291,7 +1291,7 @@ QUICNetVConnection::_state_connection_established_process_protected_packet(const } } - // For Connection Migration excercise + // For Connection Migration exercise if (this->netvc_context == NET_VCONNECTION_OUT && this->_quic_config->cm_exercise_enabled()) { this->_state_connection_established_initiate_connection_migration(); } @@ -1314,7 +1314,7 @@ QUICNetVConnection::_state_connection_established_receive_packet() // Don't make this error, and discard the packet. // Because: // - Attacker can terminate connections - // - It could be just an errora on lower layer + // - It could be just an error on lower layer continue; } else if (result == QUICPacketCreationResult::NO_PACKET) { return error; @@ -1400,7 +1400,7 @@ QUICNetVConnection::_state_draining_receive_packet() * 1. Check congestion window * 2. Allocate buffer for UDP Payload * 3. Generate QUIC Packet - * 4. Store data to the paylaod + * 4. Store data to the payload * 5. Send UDP Packet */ QUICConnectionErrorUPtr @@ -1758,7 +1758,7 @@ QUICNetVConnection::_build_packet(uint8_t *packet_buf, QUICEncryptionLevel level size_t token_len = 0; if (this->netvc_context == NET_VCONNECTION_OUT) { - // TODO: Add a case of using token which is advertized by NEW_TOKEN frame + // TODO: Add a case of using token which is advertised by NEW_TOKEN frame if (this->_av_token) { token = ats_unique_malloc(this->_av_token_len); token_len = this->_av_token_len; @@ -2301,7 +2301,7 @@ QUICNetVConnection::_state_connection_established_migrate_connection(const QUICP } /** - * Connection Migration Excercise from client + * Connection Migration Exercise from client */ QUICConnectionErrorUPtr QUICNetVConnection::_state_connection_established_initiate_connection_migration() diff --git a/iocore/net/quic/QUICAckFrameCreator.cc b/iocore/net/quic/QUICAckFrameCreator.cc index 43167daad16..6b27e34c1ed 100644 --- a/iocore/net/quic/QUICAckFrameCreator.cc +++ b/iocore/net/quic/QUICAckFrameCreator.cc @@ -182,7 +182,7 @@ QUICAckFrameManager::QUICAckFrameCreator::push_back(QUICPacketNumber packet_numb this->_latest_packet_received_time = Thread::get_hrtime(); } - // unorder packet should send ack immediately to accellerate the recovery + // unorder packet should send ack immediately to accelerate the recovery if (this->_expect_next != packet_number) { this->_should_send = true; } diff --git a/iocore/net/quic/QUICAckFrameCreator.h b/iocore/net/quic/QUICAckFrameCreator.h index 42a7540bf71..541f098270c 100644 --- a/iocore/net/quic/QUICAckFrameCreator.h +++ b/iocore/net/quic/QUICAckFrameCreator.h @@ -69,7 +69,7 @@ class QUICAckFrameManager : public QUICFrameGenerator bool _available = false; // packet_number has data to sent bool _should_send = false; // ack frame should be sent immediately bool _has_new_data = false; // new data after last sent - uint32_t _ack_eliciting_count = 0; // every two ack-eliciting packet should send ack immediatly + uint32_t _ack_eliciting_count = 0; // every two ack-eliciting packet should send ack immediately uint16_t _max_ack_delay = 25; QUICPacketNumber _largest_ack_number = 0; QUICPacketNumber _expect_next = 0; diff --git a/iocore/net/quic/QUICAltConnectionManager.cc b/iocore/net/quic/QUICAltConnectionManager.cc index 569581caf5e..3e95724905d 100644 --- a/iocore/net/quic/QUICAltConnectionManager.cc +++ b/iocore/net/quic/QUICAltConnectionManager.cc @@ -247,7 +247,7 @@ QUICAltConnectionManager::drop_cid(const QUICConnectionId &cid) { for (auto it = this->_alt_quic_connection_ids_remote.begin(); it != this->_alt_quic_connection_ids_remote.end(); ++it) { if (it->id == cid) { - QUICACMVDebug("Dropping advertized CID %" PRIx32 " seq# %" PRIu64, it->id.h32(), it->seq_num); + QUICACMVDebug("Dropping advertised CID %" PRIx32 " seq# %" PRIu64, it->id.h32(), it->seq_num); this->_retired_seq_nums.push(it->seq_num); this->_rtable.erase(it->token); this->_alt_quic_connection_ids_remote.erase(it); diff --git a/iocore/net/quic/QUICAltConnectionManager.h b/iocore/net/quic/QUICAltConnectionManager.h index f92e90e036a..6c559328179 100644 --- a/iocore/net/quic/QUICAltConnectionManager.h +++ b/iocore/net/quic/QUICAltConnectionManager.h @@ -56,7 +56,7 @@ class QUICAltConnectionManager : public QUICFrameHandler, public QUICFrameGenera /** * Migrate to new CID * - * cid need to match with one of alt CID that AltConnnectionManager prepared. + * cid need to match with one of alt CID that AltConnectionManager prepared. */ bool migrate_to(const QUICConnectionId &cid, QUICStatelessResetToken &new_reset_token); diff --git a/iocore/net/quic/QUICBidirectionalStream.cc b/iocore/net/quic/QUICBidirectionalStream.cc index c028998c765..9565b0ac444 100644 --- a/iocore/net/quic/QUICBidirectionalStream.cc +++ b/iocore/net/quic/QUICBidirectionalStream.cc @@ -161,7 +161,7 @@ QUICBidirectionalStream::is_cancelled() const /** * @brief Receive STREAM frame * @detail When receive STREAM frame, reorder frames and write to buffer of read_vio. - * If the reordering or writting operation is heavy, split out them to read function, + * If the reordering or writing operation is heavy, split out them to read function, * which is called by application via do_io_read() or reenable(). */ QUICConnectionErrorUPtr diff --git a/iocore/net/quic/QUICConfig.cc b/iocore/net/quic/QUICConfig.cc index cc44d007e79..8e39794d69a 100644 --- a/iocore/net/quic/QUICConfig.cc +++ b/iocore/net/quic/QUICConfig.cc @@ -44,13 +44,13 @@ quic_new_ssl_ctx() SSL_CTX_set_max_proto_version(ssl_ctx, TLS1_3_VERSION); #ifndef OPENSSL_IS_BORINGSSL - // FIXME: OpenSSL (1.1.1-alpha) enable this option by default. But this shoule be removed when OpenSSL disable this by default. + // FIXME: OpenSSL (1.1.1-alpha) enable this option by default. But this should be removed when OpenSSL disable this by default. SSL_CTX_clear_options(ssl_ctx, SSL_OP_ENABLE_MIDDLEBOX_COMPAT); SSL_CTX_set_max_early_data(ssl_ctx, UINT32_C(0xFFFFFFFF)); #else - // QUIC Transport Parameters are accesible with SSL_set_quic_transport_params and SSL_get_peer_quic_transport_params + // QUIC Transport Parameters are accessible with SSL_set_quic_transport_params and SSL_get_peer_quic_transport_params #endif #ifdef SSL_MODE_QUIC_HACK diff --git a/iocore/net/quic/QUICCongestionController.h b/iocore/net/quic/QUICCongestionController.h index 5afa8f01685..42b4a8bf415 100644 --- a/iocore/net/quic/QUICCongestionController.h +++ b/iocore/net/quic/QUICCongestionController.h @@ -48,7 +48,7 @@ class QUICCongestionController RECOVERY, CONGESTION_AVOIDANCE, SLOW_START, - APPPLICATION_LIMITED, + APPLICATION_LIMITED, }; virtual ~QUICCongestionController() {} diff --git a/iocore/net/quic/QUICConnection.h b/iocore/net/quic/QUICConnection.h index ed75dc6f628..57d64ba2807 100644 --- a/iocore/net/quic/QUICConnection.h +++ b/iocore/net/quic/QUICConnection.h @@ -56,6 +56,6 @@ class QUICConnection : public QUICFrameHandler, public QUICConnectionInfoProvide virtual QUICStreamManager *stream_manager() = 0; virtual void close_quic_connection(QUICConnectionErrorUPtr error) = 0; virtual void reset_quic_connection() = 0; - virtual void handle_received_packet(UDPPacket *packeet) = 0; + virtual void handle_received_packet(UDPPacket *packet) = 0; virtual void ping() = 0; }; diff --git a/iocore/net/quic/QUICContext.h b/iocore/net/quic/QUICContext.h index 31e494cc6d1..13f8935c7b3 100644 --- a/iocore/net/quic/QUICContext.h +++ b/iocore/net/quic/QUICContext.h @@ -83,7 +83,7 @@ class QUICContext virtual QUICRTTProvider *rtt_provider() const; virtual QUICPathManager *path_manager() const; - // regist a callback which will be called when specifed event happen. + // regist a callback which will be called when specified event happen. void regist_callback(std::shared_ptr cbs) { diff --git a/iocore/net/quic/QUICFlowController.cc b/iocore/net/quic/QUICFlowController.cc index 60e665c6d1a..e5b790502fe 100644 --- a/iocore/net/quic/QUICFlowController.cc +++ b/iocore/net/quic/QUICFlowController.cc @@ -79,7 +79,7 @@ QUICFlowController::update(QUICOffset offset) void QUICFlowController::forward_limit(QUICOffset limit) { - // MAX_(STREAM_)DATA might be unorderd due to delay + // MAX_(STREAM_)DATA might be unordered due to delay // Just ignore if the size was smaller than the last one if (this->_limit > limit) { return; diff --git a/iocore/net/quic/QUICFrame.cc b/iocore/net/quic/QUICFrame.cc index 1bffae34f36..6fb5cfd3aac 100644 --- a/iocore/net/quic/QUICFrame.cc +++ b/iocore/net/quic/QUICFrame.cc @@ -33,7 +33,7 @@ #define LEFT_SPACE(pos) ((size_t)(buf + len - pos)) #define FRAME_SIZE(pos) (pos - buf) -// the pos will auto move forward . return true if the data vaild +// the pos will auto move forward . return true if the data valid static bool read_varint(uint8_t *&pos, size_t len, uint64_t &field, size_t &field_len) { @@ -3072,10 +3072,10 @@ QUICFrameFactory::create_stop_sending_frame(uint8_t *buf, QUICStreamId stream_id QUICNewConnectionIdFrame * QUICFrameFactory::create_new_connection_id_frame(uint8_t *buf, uint64_t sequence, uint64_t retire_prior_to, - QUICConnectionId connectoin_id, QUICStatelessResetToken stateless_reset_token, + QUICConnectionId connection_id, QUICStatelessResetToken stateless_reset_token, QUICFrameId id, QUICFrameGenerator *owner) { - new (buf) QUICNewConnectionIdFrame(sequence, retire_prior_to, connectoin_id, stateless_reset_token, id, owner); + new (buf) QUICNewConnectionIdFrame(sequence, retire_prior_to, connection_id, stateless_reset_token, id, owner); return reinterpret_cast(buf); } diff --git a/iocore/net/quic/QUICFrame.h b/iocore/net/quic/QUICFrame.h index e933e68f53f..730453a0c82 100644 --- a/iocore/net/quic/QUICFrame.h +++ b/iocore/net/quic/QUICFrame.h @@ -271,7 +271,7 @@ class QUICAckFrame : public QUICFrame QUICFrameGenerator *owner = nullptr); std::set ranges() const; - // There's no reasont restrict copy, but we need to write the copy constructor. Otherwise it will crash on destruct. + // There's no reason to restrict copy, but we need to write the copy constructor. Otherwise it will crash on destruct. QUICAckFrame(const QUICAckFrame &) = delete; virtual ~QUICAckFrame(); @@ -876,7 +876,7 @@ class QUICFrameFactory * Creates a NEW_CONNECTION_ID frame. */ static QUICNewConnectionIdFrame *create_new_connection_id_frame(uint8_t *buf, uint64_t sequence, uint64_t retire_prior_to, - QUICConnectionId connectoin_id, + QUICConnectionId connection_id, QUICStatelessResetToken stateless_reset_token, QUICFrameId id = 0, QUICFrameGenerator *owner = nullptr); diff --git a/iocore/net/quic/QUICGlobals.cc b/iocore/net/quic/QUICGlobals.cc index 14761aa5d8d..9cef369b684 100644 --- a/iocore/net/quic/QUICGlobals.cc +++ b/iocore/net/quic/QUICGlobals.cc @@ -89,7 +89,7 @@ QUIC::_register_stats() { quic_rsb = RecAllocateRawStatBlock(static_cast(QUICStats::count)); - // Transfered packet counts + // Transferred packet counts RecRegisterRawStat(quic_rsb, RECT_PROCESS, "proxy.process.quic.total_packets_sent", RECD_INT, RECP_PERSISTENT, static_cast(QUICStats::total_packets_sent_stat), RecRawStatSyncSum); // RecRegisterRawStat(quic_rsb, RECT_PROCESS, "proxy.process.quic.total_packets_retransmitted", RECD_INT, RECP_PERSISTENT, diff --git a/iocore/net/quic/QUICHandshake.cc b/iocore/net/quic/QUICHandshake.cc index 08c30619640..51376670d25 100644 --- a/iocore/net/quic/QUICHandshake.cc +++ b/iocore/net/quic/QUICHandshake.cc @@ -106,13 +106,13 @@ QUICHandshake::~QUICHandshake() QUICConnectionErrorUPtr QUICHandshake::start(const QUICTPConfig &tp_config, QUICPacketFactory *packet_factory, bool vn_exercise_enabled) { - QUICVersion initital_version = QUIC_SUPPORTED_VERSIONS[0]; + QUICVersion initial_version = QUIC_SUPPORTED_VERSIONS[0]; if (vn_exercise_enabled) { - initital_version = QUIC_EXERCISE_VERSION; + initial_version = QUIC_EXERCISE_VERSION; } this->_load_local_client_transport_parameters(tp_config); - packet_factory->set_version(initital_version); + packet_factory->set_version(initial_version); return nullptr; } @@ -132,7 +132,7 @@ QUICHandshake::start(const QUICTPConfig &tp_config, const QUICInitialPacketR &in this->_load_local_server_transport_parameters(tp_config, pref_addr); packet_factory->set_version(this->_version_negotiator->negotiated_version()); } else { - ink_assert(!"Unsupported version initial packet should be droped QUICPakcetHandler"); + ink_assert(!"Unsupported version initial packet should be dropped QUICPacketHandler"); } } else { return std::make_unique(QUICTransErrorCode::PROTOCOL_VIOLATION); diff --git a/iocore/net/quic/QUICHandshakeProtocol.h b/iocore/net/quic/QUICHandshakeProtocol.h index 2d56e020f09..0c7c09b55e7 100644 --- a/iocore/net/quic/QUICHandshakeProtocol.h +++ b/iocore/net/quic/QUICHandshakeProtocol.h @@ -34,7 +34,7 @@ struct QUICHandshakeMsgs { uint8_t *buf = nullptr; //< pointer to the buffer size_t max_buf_len = 0; //< size of buffer size_t offsets[5] = {0}; //< offset to the each encryption level - {initial, zero_rtt, handshake, one_rtt, total length} - uint16_t error_code = 0; //< CRYPTO_ERROR - TLS Alert Desciption + 0x100 + uint16_t error_code = 0; //< CRYPTO_ERROR - TLS Alert Description + 0x100 }; class QUICHandshakeProtocol diff --git a/iocore/net/quic/QUICKeyGenerator_boringssl.cc b/iocore/net/quic/QUICKeyGenerator_boringssl.cc index 4406bbd376c..ecc9cdfa838 100644 --- a/iocore/net/quic/QUICKeyGenerator_boringssl.cc +++ b/iocore/net/quic/QUICKeyGenerator_boringssl.cc @@ -59,7 +59,7 @@ QUICKeyGenerator::_get_cipher_for_protected_packet(const SSL *ssl) const } } -// SSL_HANDSHAKE_MAC_SHA256, SSL_HANDSHAKE_MAC_SHA384 are defind in `ssl/internal.h` of BoringSSL +// SSL_HANDSHAKE_MAC_SHA256, SSL_HANDSHAKE_MAC_SHA384 are defined in `ssl/internal.h` of BoringSSL /* const EVP_MD * QUICKeyGenerator::get_handshake_digest(const SSL *ssl) diff --git a/iocore/net/quic/QUICKeyGenerator_openssl.cc b/iocore/net/quic/QUICKeyGenerator_openssl.cc index e7bb227faf0..f85f4758882 100644 --- a/iocore/net/quic/QUICKeyGenerator_openssl.cc +++ b/iocore/net/quic/QUICKeyGenerator_openssl.cc @@ -61,7 +61,7 @@ QUICKeyGenerator::_get_cipher_for_protected_packet(const SSL *ssl) const } } -// SSL_HANDSHAKE_MAC_SHA256, SSL_HANDSHAKE_MAC_SHA384 are defind in `ssl/internal.h` of BoringSSL +// SSL_HANDSHAKE_MAC_SHA256, SSL_HANDSHAKE_MAC_SHA384 are defined in `ssl/internal.h` of BoringSSL /* const EVP_MD * QUICKeyGenerator::get_handshake_digest(const SSL *ssl) diff --git a/iocore/net/quic/QUICLossDetector.cc b/iocore/net/quic/QUICLossDetector.cc index 6a0138d30a4..ad3dbfe1fc7 100644 --- a/iocore/net/quic/QUICLossDetector.cc +++ b/iocore/net/quic/QUICLossDetector.cc @@ -322,7 +322,7 @@ QUICLossDetector::_set_loss_detection_timer() // Don't arm the alarm if there are no packets with retransmittable data in flight. // -- MODIFIED CODE -- - // In psuedocode, `bytes_in_flight` is used, but we're tracking "retransmittable data in flight" by `_ack_eliciting_outstanding` + // In pseudocode, `bytes_in_flight` is used, but we're tracking "retransmittable data in flight" by `_ack_eliciting_outstanding` if (this->_ack_eliciting_outstanding == 0) { if (this->_loss_detection_timer) { this->_loss_detection_alarm_at = 0; diff --git a/iocore/net/quic/QUICLossDetector.h b/iocore/net/quic/QUICLossDetector.h index 42afd81891f..9546a5e08b9 100644 --- a/iocore/net/quic/QUICLossDetector.h +++ b/iocore/net/quic/QUICLossDetector.h @@ -191,7 +191,7 @@ class QUICLossDetector : public Continuation, public QUICFrameHandler class QUICRTTMeasure : public QUICRTTProvider { public: - // use `friend` so ld can acesss RTTMeasure. + // use `friend` so ld can access RTTMeasure. // friend QUICLossDetector; QUICRTTMeasure(const QUICLDConfig &ld_config); diff --git a/iocore/net/quic/QUICNewRenoCongestionController.cc b/iocore/net/quic/QUICNewRenoCongestionController.cc index db6ec90a149..a874c62e2a6 100644 --- a/iocore/net/quic/QUICNewRenoCongestionController.cc +++ b/iocore/net/quic/QUICNewRenoCongestionController.cc @@ -96,7 +96,7 @@ QUICNewRenoCongestionController::on_packet_acked(const QUICPacketInfo &acked_pac // Slow start. this->_context.trigger(QUICContext::CallbackEvent::CONGESTION_STATE_CHANGED, QUICCongestionController::State::SLOW_START); this->_congestion_window += acked_packet.sent_bytes; - QUICCCDebug("slow start window chaged"); + QUICCCDebug("slow start window changed"); } else { // Congestion avoidance. this->_context.trigger(QUICContext::CallbackEvent::CONGESTION_STATE_CHANGED, @@ -106,7 +106,7 @@ QUICNewRenoCongestionController::on_packet_acked(const QUICPacketInfo &acked_pac } } -// addtional code +// additional code // the original one is: // CongestionEvent(sent_time): void diff --git a/iocore/net/quic/QUICPacket.cc b/iocore/net/quic/QUICPacket.cc index 494dd3249f8..8026e4f5994 100644 --- a/iocore/net/quic/QUICPacket.cc +++ b/iocore/net/quic/QUICPacket.cc @@ -684,11 +684,11 @@ QUICShortHeaderPacketR::QUICShortHeaderPacketR(UDPConnection *udp_con, IpEndpoin len += b->size(); } - Ptr concatinated_block = make_ptr(new_IOBufferBlock()); - concatinated_block->alloc(iobuffer_size_to_index(len, BUFFER_SIZE_INDEX_32K)); - concatinated_block->fill(len); + Ptr concatenated_block = make_ptr(new_IOBufferBlock()); + concatenated_block->alloc(iobuffer_size_to_index(len, BUFFER_SIZE_INDEX_32K)); + concatenated_block->fill(len); - uint8_t *raw_buf = reinterpret_cast(concatinated_block->start()); + uint8_t *raw_buf = reinterpret_cast(concatenated_block->start()); size_t copied_len = 0; for (auto b = blocks; b; b = b->next) { @@ -710,10 +710,10 @@ QUICShortHeaderPacketR::QUICShortHeaderPacketR(UDPConnection *udp_con, IpEndpoin QUICPacket::decode_packet_number(this->_packet_number, src, this->_packet_number_len, base_packet_number); offset += this->_packet_number_len; - this->_header_block = concatinated_block->clone(); + this->_header_block = concatenated_block->clone(); this->_header_block->_end = this->_header_block->_start + offset; this->_header_block->next = nullptr; - this->_payload_block = concatinated_block->clone(); + this->_payload_block = concatenated_block->clone(); this->_payload_block->_start = this->_payload_block->_start + offset; } @@ -993,11 +993,11 @@ QUICVersionNegotiationPacketR::QUICVersionNegotiationPacketR(UDPConnection *udp_ len += b->size(); } - Ptr concatinated_block = make_ptr(new_IOBufferBlock()); - concatinated_block->alloc(iobuffer_size_to_index(len, BUFFER_SIZE_INDEX_32K)); - concatinated_block->fill(len); + Ptr concatenated_block = make_ptr(new_IOBufferBlock()); + concatenated_block->alloc(iobuffer_size_to_index(len, BUFFER_SIZE_INDEX_32K)); + concatenated_block->fill(len); - uint8_t *raw_buf = reinterpret_cast(concatinated_block->start()); + uint8_t *raw_buf = reinterpret_cast(concatenated_block->start()); size_t copied_len = 0; for (auto b = blocks; b; b = b->next) { @@ -1019,10 +1019,10 @@ QUICVersionNegotiationPacketR::QUICVersionNegotiationPacketR(UDPConnection *udp_ this->_versions = raw_buf + offset; this->_nversions = (len - offset) / sizeof(QUICVersion); - this->_header_block = concatinated_block->clone(); + this->_header_block = concatenated_block->clone(); this->_header_block->_end = this->_header_block->_start + offset; this->_header_block->next = nullptr; - this->_payload_block = concatinated_block->clone(); + this->_payload_block = concatenated_block->clone(); this->_payload_block->_start = this->_payload_block->_start + offset; } @@ -1185,11 +1185,11 @@ QUICInitialPacketR::QUICInitialPacketR(UDPConnection *udp_con, IpEndpoint from, len += b->size(); } - Ptr concatinated_block = make_ptr(new_IOBufferBlock()); - concatinated_block->alloc(iobuffer_size_to_index(len, BUFFER_SIZE_INDEX_32K)); - concatinated_block->fill(len); + Ptr concatenated_block = make_ptr(new_IOBufferBlock()); + concatenated_block->alloc(iobuffer_size_to_index(len, BUFFER_SIZE_INDEX_32K)); + concatenated_block->fill(len); - uint8_t *raw_buf = reinterpret_cast(concatinated_block->start()); + uint8_t *raw_buf = reinterpret_cast(concatenated_block->start()); size_t copied_len = 0; for (auto b = blocks; b; b = b->next) { @@ -1229,10 +1229,10 @@ QUICInitialPacketR::QUICInitialPacketR(UDPConnection *udp_con, IpEndpoint from, base_packet_number); offset += pn_len; - this->_header_block = concatinated_block->clone(); + this->_header_block = concatenated_block->clone(); this->_header_block->_end = this->_header_block->_start + offset; this->_header_block->next = nullptr; - this->_payload_block = concatinated_block->clone(); + this->_payload_block = concatenated_block->clone(); this->_payload_block->_start = this->_payload_block->_start + offset; } @@ -1411,11 +1411,11 @@ QUICZeroRttPacketR::QUICZeroRttPacketR(UDPConnection *udp_con, IpEndpoint from, len += b->size(); } - Ptr concatinated_block = make_ptr(new_IOBufferBlock()); - concatinated_block->alloc(iobuffer_size_to_index(len, BUFFER_SIZE_INDEX_32K)); - concatinated_block->fill(len); + Ptr concatenated_block = make_ptr(new_IOBufferBlock()); + concatenated_block->alloc(iobuffer_size_to_index(len, BUFFER_SIZE_INDEX_32K)); + concatenated_block->fill(len); - uint8_t *raw_buf = reinterpret_cast(concatinated_block->start()); + uint8_t *raw_buf = reinterpret_cast(concatenated_block->start()); size_t copied_len = 0; for (auto b = blocks; b; b = b->next) { @@ -1443,10 +1443,10 @@ QUICZeroRttPacketR::QUICZeroRttPacketR(UDPConnection *udp_con, IpEndpoint from, base_packet_number); offset += pn_len; - this->_header_block = concatinated_block->clone(); + this->_header_block = concatenated_block->clone(); this->_header_block->_end = this->_header_block->_start + offset; this->_header_block->next = nullptr; - this->_payload_block = concatinated_block->clone(); + this->_payload_block = concatenated_block->clone(); this->_payload_block->_start = this->_payload_block->_start + offset; } @@ -1590,11 +1590,11 @@ QUICHandshakePacketR::QUICHandshakePacketR(UDPConnection *udp_con, IpEndpoint fr len += b->size(); } - Ptr concatinated_block = make_ptr(new_IOBufferBlock()); - concatinated_block->alloc(iobuffer_size_to_index(len, BUFFER_SIZE_INDEX_32K)); - concatinated_block->fill(len); + Ptr concatenated_block = make_ptr(new_IOBufferBlock()); + concatenated_block->alloc(iobuffer_size_to_index(len, BUFFER_SIZE_INDEX_32K)); + concatenated_block->fill(len); - uint8_t *raw_buf = reinterpret_cast(concatinated_block->start()); + uint8_t *raw_buf = reinterpret_cast(concatenated_block->start()); size_t copied_len = 0; for (auto b = blocks; b; b = b->next) { @@ -1622,10 +1622,10 @@ QUICHandshakePacketR::QUICHandshakePacketR(UDPConnection *udp_con, IpEndpoint fr base_packet_number); offset += pn_len; - this->_header_block = concatinated_block->clone(); + this->_header_block = concatenated_block->clone(); this->_header_block->_end = this->_header_block->_start + offset; this->_header_block->next = nullptr; - this->_payload_block = concatinated_block->clone(); + this->_payload_block = concatenated_block->clone(); this->_payload_block->_start = this->_payload_block->_start + offset; } @@ -1758,11 +1758,11 @@ QUICRetryPacketR::QUICRetryPacketR(UDPConnection *udp_con, IpEndpoint from, IpEn len += b->size(); } - Ptr concatinated_block = make_ptr(new_IOBufferBlock()); - concatinated_block->alloc(iobuffer_size_to_index(len, BUFFER_SIZE_INDEX_32K)); - concatinated_block->fill(len); + Ptr concatenated_block = make_ptr(new_IOBufferBlock()); + concatenated_block->alloc(iobuffer_size_to_index(len, BUFFER_SIZE_INDEX_32K)); + concatenated_block->fill(len); - uint8_t *raw_buf = reinterpret_cast(concatinated_block->start()); + uint8_t *raw_buf = reinterpret_cast(concatenated_block->start()); size_t copied_len = 0; for (auto b = blocks; b; b = b->next) { @@ -1788,10 +1788,10 @@ QUICRetryPacketR::QUICRetryPacketR(UDPConnection *udp_con, IpEndpoint from, IpEn // Retry Integrity Tag memcpy(this->_integrity_tag, raw_buf + offset, QUICRetryIntegrityTag::LEN); - this->_header_block = concatinated_block->clone(); + this->_header_block = concatenated_block->clone(); this->_header_block->_end = this->_header_block->_start + offset; this->_header_block->next = nullptr; - this->_payload_block = concatinated_block->clone(); + this->_payload_block = concatenated_block->clone(); this->_payload_block->_start = this->_payload_block->_start + offset; this->_payload_block_without_tag = this->_payload_block->clone(); this->_payload_block_without_tag->_end = this->_payload_block_without_tag->_end - QUICRetryIntegrityTag::LEN; diff --git a/iocore/net/quic/QUICPathValidator.h b/iocore/net/quic/QUICPathValidator.h index c575f5a596e..e06c64e18ec 100644 --- a/iocore/net/quic/QUICPathValidator.h +++ b/iocore/net/quic/QUICPathValidator.h @@ -45,7 +45,7 @@ class QUICPathValidator : public QUICFrameHandler, public QUICFrameGenerator std::vector interests() override; QUICConnectionErrorUPtr handle_frame(QUICEncryptionLevel level, const QUICFrame &frame) override; - // QUICFrameGeneratro + // QUICFrameGenerator bool will_generate_frame(QUICEncryptionLevel level, size_t current_packet_size, bool ack_eliciting, uint32_t seq_num) override; QUICFrame *generate_frame(uint8_t *buf, QUICEncryptionLevel level, uint64_t connection_credit, uint16_t maximum_frame_size, size_t current_packet_size, uint32_t seq_num) override; diff --git a/iocore/net/quic/QUICStreamState.cc b/iocore/net/quic/QUICStreamState.cc index d88348dcc17..c1c77e7ed37 100644 --- a/iocore/net/quic/QUICStreamState.cc +++ b/iocore/net/quic/QUICStreamState.cc @@ -199,7 +199,7 @@ QUICSendStreamStateMachine::is_allowed_to_send(QUICFrameType type) const } break; default: - ink_assert("This shouuldn't be happen"); + ink_assert("This shouldn't be happen"); break; } @@ -221,7 +221,7 @@ QUICSendStreamStateMachine::is_allowed_to_receive(QUICFrameType type) const // A sender could receive either of these two frames(MAX_STREAM_DATA and STOP_SENDING) in any state as a result of delayed // delivery of packets. - // PS: Because we need to reply a RESET_STREAM frame. STOP_SENDING frame is accpeted in all states. But we + // PS: Because we need to reply a RESET_STREAM frame. STOP_SENDING frame is accepted in all states. But we // don't need to do anything for MAX_STREAM_DATA frame when we are in terminal state. if (type == QUICFrameType::STOP_SENDING) { return true; diff --git a/iocore/net/quic/QUICTLS_boringssl.cc b/iocore/net/quic/QUICTLS_boringssl.cc index 46584384801..46f70f0c633 100644 --- a/iocore/net/quic/QUICTLS_boringssl.cc +++ b/iocore/net/quic/QUICTLS_boringssl.cc @@ -331,7 +331,7 @@ QUICTLS::_pass_quic_data_to_ssl_impl(const QUICHandshakeMsgs &in) ossl_level = ssl_encryption_application; break; default: - // Should not be happend + // Should not be happened ossl_level = ssl_encryption_application; break; } diff --git a/iocore/net/quic/QUICTLS_legacy.cc b/iocore/net/quic/QUICTLS_legacy.cc index 3b6e8ea4fca..d9cc410b515 100644 --- a/iocore/net/quic/QUICTLS_legacy.cc +++ b/iocore/net/quic/QUICTLS_legacy.cc @@ -75,7 +75,7 @@ QUICTLS::_msg_cb(int write_p, int version, int content_type, const void *buf, si } /** - This is very inspired from writting keylog format of ngtcp2's examples + This is very inspired from writing keylog format of ngtcp2's examples https://github.com/ngtcp2/ngtcp2/blob/894ed23c970d61eede74f69d9178090af63fdf70/examples/keylog.cc */ static void diff --git a/iocore/net/quic/QUICTLS_openssl.cc b/iocore/net/quic/QUICTLS_openssl.cc index 6b8668c299d..28dfbf1a5b7 100644 --- a/iocore/net/quic/QUICTLS_openssl.cc +++ b/iocore/net/quic/QUICTLS_openssl.cc @@ -298,7 +298,7 @@ QUICTLS::_pass_quic_data_to_ssl_impl(const QUICHandshakeMsgs &in) ossl_level = ssl_encryption_application; break; default: - // Should not be happend + // Should not be happened ossl_level = ssl_encryption_application; break; } diff --git a/iocore/net/quic/QUICTypes.h b/iocore/net/quic/QUICTypes.h index bb5c02818d8..6441ceb7e1e 100644 --- a/iocore/net/quic/QUICTypes.h +++ b/iocore/net/quic/QUICTypes.h @@ -66,7 +66,7 @@ enum class QUICEncryptionLevel { }; // For range-based for loop. This starts from INITIAL to ONE_RTT. It doesn't include NONE. -// Defining begin, end, operator*, operator++ doen't work for duplicate symbol issue with libmgmt_p.a :( +// Defining begin, end, operator*, operator++ doesn't work for duplicate symbol issue with libmgmt_p.a :( // TODO: support ZERO_RTT constexpr QUICEncryptionLevel QUIC_ENCRYPTION_LEVELS[] = { QUICEncryptionLevel::INITIAL, @@ -83,7 +83,7 @@ enum class QUICPacketNumberSpace { ApplicationData = 2, }; -// Devide to QUICPacketType and QUICPacketLongHeaderType ? +// Divide to QUICPacketType and QUICPacketLongHeaderType ? enum class QUICPacketType : uint8_t { INITIAL = 0x00, // draft-17 version-specific type ZERO_RTT_PROTECTED = 0x01, // draft-17 version-specific type diff --git a/iocore/net/quic/QUICUnidirectionalStream.cc b/iocore/net/quic/QUICUnidirectionalStream.cc index 90bd1ddaa07..9a2d32143e0 100644 --- a/iocore/net/quic/QUICUnidirectionalStream.cc +++ b/iocore/net/quic/QUICUnidirectionalStream.cc @@ -572,7 +572,7 @@ QUICReceiveStream::recv(const QUICStreamDataBlockedFrame &frame) /** * @brief Receive STREAM frame * @detail When receive STREAM frame, reorder frames and write to buffer of read_vio. - * If the reordering or writting operation is heavy, split out them to read function, + * If the reordering or writing operation is heavy, split out them to read function, * which is called by application via do_io_read() or reenable(). */ QUICConnectionErrorUPtr diff --git a/iocore/net/quic/QUICVersionNegotiator.h b/iocore/net/quic/QUICVersionNegotiator.h index 6b86d7f73a5..55068f036ec 100644 --- a/iocore/net/quic/QUICVersionNegotiator.h +++ b/iocore/net/quic/QUICVersionNegotiator.h @@ -28,7 +28,7 @@ #include "QUICTransportParameters.h" /** - * @brief Abstruct QUIC Application Class + * @brief Abstract QUIC Application Class * @detail Every quic application must inherits this class */ class QUICVersionNegotiator diff --git a/iocore/net/quic/qlog/QLogEvent.cc b/iocore/net/quic/qlog/QLogEvent.cc index 98bec4ed898..ce7bce35ffd 100644 --- a/iocore/net/quic/qlog/QLogEvent.cc +++ b/iocore/net/quic/qlog/QLogEvent.cc @@ -216,7 +216,7 @@ namespace Transport { node["new"] = static_cast(_new); node["stream_id"] = _stream_id; - // FXIME + // FIXME // node["stream_type"] = bidi ? "bidirectional" : "unidirectional"; // node["stream_side"] = "sending"; } diff --git a/iocore/net/quic/qlog/QLogUtils.h b/iocore/net/quic/qlog/QLogUtils.h index 2242a4fd6e4..d39fce8c89f 100644 --- a/iocore/net/quic/qlog/QLogUtils.h +++ b/iocore/net/quic/qlog/QLogUtils.h @@ -53,7 +53,7 @@ inline static Recovery::CongestionStateUpdated::State CongestionStateConvert(QUICCongestionController::State state) { switch (state) { - case QUICCongestionController::State::APPPLICATION_LIMITED: + case QUICCongestionController::State::APPLICATION_LIMITED: return Recovery::CongestionStateUpdated::State::application_limited; case QUICCongestionController::State::SLOW_START: return Recovery::CongestionStateUpdated::State::slow_start; diff --git a/iocore/net/quic/test/test_QUICAckFrameCreator.cc b/iocore/net/quic/test/test_QUICAckFrameCreator.cc index c60ecd9c765..2b66f061f72 100644 --- a/iocore/net/quic/test/test_QUICAckFrameCreator.cc +++ b/iocore/net/quic/test/test_QUICAckFrameCreator.cc @@ -178,7 +178,7 @@ TEST_CASE("QUICAckFrameManager should send", "[quic]") CHECK(ack_manager.will_generate_frame(level, 0, true, 0) == true); } - SECTION("QUIC intial packet", "[quic]") + SECTION("QUIC initial packet", "[quic]") { QUICAckFrameManager ack_manager; diff --git a/iocore/net/quic/test/test_QUICFlowController.cc b/iocore/net/quic/test/test_QUICFlowController.cc index 61bb652ab1c..3f9ca899438 100644 --- a/iocore/net/quic/test/test_QUICFlowController.cc +++ b/iocore/net/quic/test/test_QUICFlowController.cc @@ -369,7 +369,7 @@ TEST_CASE("Frame retransmission", "[quic]") frame = fc.generate_frame(frame_buf, level, 1024, 1024, 0, 0); CHECK(!frame); - // This should not be retransmition + // This should not be retransmission ret = fc.update(2048); frame = fc.generate_frame(frame_buf, level, 1024, 1024, 0, 0); REQUIRE(frame); @@ -410,7 +410,7 @@ TEST_CASE("Frame retransmission", "[quic]") frame = fc.generate_frame(frame_buf, level, 1024, 1024, 0, 0); CHECK(!frame); - // This should not be retransmition + // This should not be retransmission ret = fc.update(2048); frame = fc.generate_frame(frame_buf, level, 1024, 1024, 0, 0); REQUIRE(frame); diff --git a/iocore/net/quic/test/test_QUICFrame.cc b/iocore/net/quic/test/test_QUICFrame.cc index ec7a4324e00..2eb0c5ea1d5 100644 --- a/iocore/net/quic/test/test_QUICFrame.cc +++ b/iocore/net/quic/test/test_QUICFrame.cc @@ -70,7 +70,7 @@ TEST_CASE("QUICFrame Type", "[quic]") CHECK(QUICFrame::type(reinterpret_cast("\x1e")) == QUICFrameType::HANDSHAKE_DONE); - // Undefined ragne + // Undefined range CHECK(QUICFrame::type(reinterpret_cast("\x1f")) == QUICFrameType::UNKNOWN); CHECK(QUICFrame::type(reinterpret_cast("\xff")) == QUICFrameType::UNKNOWN); } @@ -456,7 +456,7 @@ TEST_CASE("CRYPTO Frame", "[quic]") uint8_t buf[32] = {0}; size_t len = 0; uint8_t expected[] = { - 0x06, // Typr + 0x06, // Type 0x80, 0x01, 0x00, 0x00, // Offset 0x05, // Length 0x01, 0x02, 0x03, 0x04, 0x05, // Crypto Data diff --git a/iocore/net/quic/test/test_QUICFrameRetransmitter.cc b/iocore/net/quic/test/test_QUICFrameRetransmitter.cc index 916c65f5ede..a72ee1a267e 100644 --- a/iocore/net/quic/test/test_QUICFrameRetransmitter.cc +++ b/iocore/net/quic/test/test_QUICFrameRetransmitter.cc @@ -28,7 +28,7 @@ constexpr static uint8_t data[] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10}; -TEST_CASE("QUICFrameRetransmitter ignore frame which can not be retranmistted", "[quic]") +TEST_CASE("QUICFrameRetransmitter ignore frame which can not be retransmitted", "[quic]") { QUICFrameRetransmitter retransmitter; QUICFrameInformationUPtr info = QUICFrameInformationUPtr(quicFrameInformationAllocator.alloc()); @@ -120,7 +120,7 @@ TEST_CASE("QUICFrameRetransmitter successfully create stream frame", "[quic]") CHECK(memcmp(stream_frame->data()->start(), data, sizeof(data)) == 0); std::destroy_at(frame); frame = nullptr; - // Becasue the info has been released, the refcount should be 1 (var block). + // Because the info has been released, the refcount should be 1 (var block). CHECK(block->refcount() == 1); } diff --git a/iocore/net/quic/test/test_QUICPacketFactory.cc b/iocore/net/quic/test/test_QUICPacketFactory.cc index 39c2c43e29d..0df343660fa 100644 --- a/iocore/net/quic/test/test_QUICPacketFactory.cc +++ b/iocore/net/quic/test/test_QUICPacketFactory.cc @@ -57,7 +57,7 @@ TEST_CASE("QUICPacketFactory_Create_VersionNegotiationPacket", "[quic]") 0x08, // SCID Len 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, // Source Connection ID 0xff, 0x00, 0x00, 0x1b, // Supported Version - 0x1a, 0x2a, 0x3a, 0x4a, // Excercise Version + 0x1a, 0x2a, 0x3a, 0x4a, // Exercise Version }; uint8_t buf[1024] = {0}; size_t buf_len; diff --git a/iocore/net/quic/test/test_QUICPinger.cc b/iocore/net/quic/test/test_QUICPinger.cc index bb257026c78..d6b58e228b6 100644 --- a/iocore/net/quic/test/test_QUICPinger.cc +++ b/iocore/net/quic/test/test_QUICPinger.cc @@ -69,7 +69,7 @@ TEST_CASE("QUICPinger", "[quic]") REQUIRE(pinger.count(level) == 0); } - SECTION("generating PING Frame for next continuos un-ack-eliciting packets") + SECTION("generating PING Frame for next continuous un-ack-eliciting packets") { QUICPinger pinger; REQUIRE(pinger.will_generate_frame(level, UINT64_MAX, false, 0) == true); diff --git a/iocore/net/quic/test/test_QUICStream.cc b/iocore/net/quic/test/test_QUICStream.cc index 5527fdd691c..3d57a81ba06 100644 --- a/iocore/net/quic/test/test_QUICStream.cc +++ b/iocore/net/quic/test/test_QUICStream.cc @@ -373,7 +373,7 @@ TEST_CASE("QUICBidiStream", "[quic]") frame = stream->generate_frame(frame_buf, level, 4096, 4096, 0, 0); REQUIRE(frame); CHECK(frame->type() == QUICFrameType::RESET_STREAM); - // Don't send it again untill it is considers as lost + // Don't send it again until it is considers as lost CHECK(stream->generate_frame(frame_buf, level, 4096, 4096, 0, 0) == nullptr); // Loss the frame stream->on_frame_lost(frame->id()); @@ -404,7 +404,7 @@ TEST_CASE("QUICBidiStream", "[quic]") frame = stream->generate_frame(frame_buf, level, 4096, 4096, 0, 0); REQUIRE(frame); CHECK(frame->type() == QUICFrameType::STOP_SENDING); - // Don't send it again untill it is considers as lost + // Don't send it again until it is considers as lost CHECK(stream->generate_frame(frame_buf, level, 4096, 4096, 0, 0) == nullptr); // Loss the frame stream->on_frame_lost(frame->id()); @@ -602,7 +602,7 @@ TEST_CASE("QUIC receive only stream", "[quic]") frame = stream->generate_frame(frame_buf, level, 4096, 4096, 0, 0); REQUIRE(frame); CHECK(frame->type() == QUICFrameType::STOP_SENDING); - // Don't send it again untill it is considers as lost + // Don't send it again until it is considers as lost CHECK(stream->generate_frame(frame_buf, level, 4096, 4096, 0, 0) == nullptr); // Loss the frame stream->on_frame_lost(frame->id()); @@ -826,7 +826,7 @@ TEST_CASE("QUIC send only stream", "[quic]") frame = stream->generate_frame(frame_buf, level, 4096, 4096, 0, 0); REQUIRE(frame); CHECK(frame->type() == QUICFrameType::RESET_STREAM); - // Don't send it again untill it is considers as lost + // Don't send it again until it is considers as lost CHECK(stream->generate_frame(frame_buf, level, 4096, 4096, 0, 0) == nullptr); // Loss the frame stream->on_frame_lost(frame->id()); diff --git a/proxy/http3/Http3App.cc b/proxy/http3/Http3App.cc index dddcfea11fd..f24cc7442fc 100644 --- a/proxy/http3/Http3App.cc +++ b/proxy/http3/Http3App.cc @@ -195,7 +195,7 @@ Http3App::_handle_uni_stream_on_read_ready(int /* event */, QUICStreamIO *stream case Http3StreamType::QPACK_DECODER: { this->_set_qpack_stream(type, stream_io); } - case Http3StreamType::UNKOWN: + case Http3StreamType::UNKNOWN: default: // TODO: just ignore or trigger QUIC STOP_SENDING frame with HTTP_UNKNOWN_STREAM_TYPE break; @@ -241,7 +241,7 @@ Http3App::_handle_uni_stream_on_write_ready(int /* event */, QUICStreamIO *strea case Http3StreamType::QPACK_DECODER: { this->_set_qpack_stream(it->second, stream_io); } - case Http3StreamType::UNKOWN: + case Http3StreamType::UNKNOWN: case Http3StreamType::PUSH: default: break; diff --git a/proxy/http3/Http3App.h b/proxy/http3/Http3App.h index fd1893d9722..a48432a7dfe 100644 --- a/proxy/http3/Http3App.h +++ b/proxy/http3/Http3App.h @@ -51,7 +51,7 @@ class Http3App : public QUICApplication virtual void start(); virtual int main_event_handler(int event, Event *data); - // TODO: Return StreamIO. It looks bother that coller have to look up StreamIO by stream id. + // TODO: Return StreamIO. It looks bother that caller have to look up StreamIO by stream id. // Why not create_bidi_stream ? QUICConnectionErrorUPtr create_uni_stream(QUICStreamId &new_stream_id, Http3StreamType type); @@ -106,6 +106,6 @@ class Http3SettingsFramer : public Http3FrameGenerator private: NetVConnectionContext_t _context; - bool _is_done = false; ///< Becarefull when set FIN flag on CONTROL stream. Maybe never? + bool _is_done = false; ///< Be careful when setting FIN flag on CONTROL stream. Maybe never? bool _is_sent = false; ///< Send SETTINGS frame only once }; diff --git a/proxy/http3/Http3HeaderFramer.cc b/proxy/http3/Http3HeaderFramer.cc index 4a86fd4e705..b69f298c092 100644 --- a/proxy/http3/Http3HeaderFramer.cc +++ b/proxy/http3/Http3HeaderFramer.cc @@ -107,7 +107,7 @@ Http3HeaderFramer::_generate_header_block() case PARSE_RESULT_CONT: break; default: - Debug("http3_trans", "Ignore ivalid headers"); + Debug("http3_trans", "Ignore invalid headers"); break; } } diff --git a/proxy/http3/Http3HeaderVIOAdaptor.h b/proxy/http3/Http3HeaderVIOAdaptor.h index 1df2b71a75f..f81456b02d1 100644 --- a/proxy/http3/Http3HeaderVIOAdaptor.h +++ b/proxy/http3/Http3HeaderVIOAdaptor.h @@ -27,7 +27,7 @@ #include "Http3FrameHandler.h" -// TODO: rename, this is not VIOAdoptor anymore +// TODO: rename, this is not VIOAdaptor anymore class Http3HeaderVIOAdaptor : public Http3FrameHandler { public: diff --git a/proxy/http3/Http3Types.cc b/proxy/http3/Http3Types.cc index 77eb2158fb8..d8c1e4ab0a7 100644 --- a/proxy/http3/Http3Types.cc +++ b/proxy/http3/Http3Types.cc @@ -36,6 +36,6 @@ Http3Stream::type(const uint8_t *buf) case static_cast(Http3StreamType::QPACK_DECODER): return Http3StreamType::QPACK_DECODER; default: - return Http3StreamType::UNKOWN; + return Http3StreamType::UNKNOWN; } } diff --git a/proxy/http3/Http3Types.h b/proxy/http3/Http3Types.h index c6bba88483f..f2ac5e8f7dd 100644 --- a/proxy/http3/Http3Types.h +++ b/proxy/http3/Http3Types.h @@ -33,7 +33,7 @@ enum class Http3StreamType : uint8_t { QPACK_ENCODER = 0x02, ///< QPACK : encoder -> decoder QPACK_DECODER = 0x03, ///< QPACK : decoder -> encoder RESERVED = 0x21, - UNKOWN = 0xFF, + UNKNOWN = 0xFF, }; enum class Http3SettingsId : uint64_t { diff --git a/proxy/http3/QPACK.cc b/proxy/http3/QPACK.cc index c331dce81fe..6af4a16e928 100644 --- a/proxy/http3/QPACK.cc +++ b/proxy/http3/QPACK.cc @@ -1106,7 +1106,7 @@ QPACK::_on_encoder_stream_read_ready(QUICStreamIO &stream_io) } QPACKDebug("Received Dynamic Table Size Update: max_size=%d", max_size); this->_dynamic_table.update_size(max_size); - } else { // Duplicatex + } else { // Duplicates uint16_t index; if (this->_read_duplicate(stream_io, index) < 0) { this->_abort_decode(); @@ -1266,7 +1266,7 @@ QPACK::DynamicTable::lookup(const char *name, int name_len, const char *value, i return {candidate_index, match_type}; } - // TODO Use a tree for better perfomance + // TODO Use a tree for better performance for (; i <= end; i = (i + 1) % this->_max_entries) { if (name_len != 0 && this->_entries[i].name_len == name_len) { this->_storage->read(this->_entries[i].offset, &tmp_name, this->_entries[i].name_len, &tmp_value, @@ -1531,7 +1531,7 @@ QPACK::_write_dynamic_table_size_update(uint16_t max_size) } int -QPACK::_write_table_state_syncrhonize(uint16_t insert_count) +QPACK::_write_table_state_synchronize(uint16_t insert_count) { IOBufferBlock *instruction = new_IOBufferBlock(); instruction->alloc(TS_IOBUFFER_SIZE_INDEX_128); diff --git a/proxy/http3/QPACK.h b/proxy/http3/QPACK.h index f8f1889f1dd..9b40c17cb47 100644 --- a/proxy/http3/QPACK.h +++ b/proxy/http3/QPACK.h @@ -281,7 +281,7 @@ class QPACK : public QUICApplication int _read_table_state_synchronize(QUICStreamIO &stream_io, uint16_t &insert_count); int _read_header_acknowledgement(QUICStreamIO &stream_io, uint64_t &stream_id); int _read_stream_cancellation(QUICStreamIO &stream_io, uint64_t &stream_id); - int _write_table_state_syncrhonize(uint16_t insert_count); + int _write_table_state_synchronize(uint16_t insert_count); int _write_header_acknowledgement(uint64_t stream_id); int _write_stream_cancellation(uint64_t stream_id); diff --git a/proxy/http3/test/test_Http3Frame.cc b/proxy/http3/test/test_Http3Frame.cc index a7f90d8938d..9aa4efd4c9d 100644 --- a/proxy/http3/test/test_Http3Frame.cc +++ b/proxy/http3/test/test_Http3Frame.cc @@ -29,7 +29,7 @@ TEST_CASE("Http3Frame Type", "[http3]") { CHECK(Http3Frame::type(reinterpret_cast("\x00\x00"), 2) == Http3FrameType::DATA); - // Undefined ragne + // Undefined range CHECK(Http3Frame::type(reinterpret_cast("\x0f\x00"), 2) == Http3FrameType::UNKNOWN); CHECK(Http3Frame::type(reinterpret_cast("\xff\xff\xff\xff\xff\xff\xff\x00"), 9) == Http3FrameType::UNKNOWN); } diff --git a/proxy/http3/test/test_QPACK.cc b/proxy/http3/test/test_QPACK.cc index 211030764e8..88fb509b471 100644 --- a/proxy/http3/test/test_QPACK.cc +++ b/proxy/http3/test/test_QPACK.cc @@ -158,7 +158,7 @@ output_encoder_stream_data(FILE *fd, TestQUICStream *stream) uint64_t stream_id = 0; fwrite(reinterpret_cast(&stream_id), 8, 1, fd); - // Skip 32 bits for Legnth + // Skip 32 bits for Length fseek(fd, 4, SEEK_CUR); // Write QPACKData @@ -169,7 +169,7 @@ output_encoder_stream_data(FILE *fd, TestQUICStream *stream) total += nread; } - // Back to the posistion for Length + // Back to the position for Length fseek(fd, -(total + 4), SEEK_CUR); // Write Length @@ -189,7 +189,7 @@ output_encoded_data(FILE *fd, uint64_t stream_id, IOBufferReader *header_block_r stream_id = htobe64(stream_id); fwrite(reinterpret_cast(&stream_id), 8, 1, fd); - // Skip 32 bits for Legnth + // Skip 32 bits for Length fseek(fd, 4, SEEK_CUR); // Write QPACKData @@ -200,7 +200,7 @@ output_encoded_data(FILE *fd, uint64_t stream_id, IOBufferReader *header_block_r total += nread; } - // Back to the posistion for Length + // Back to the position for Length fseek(fd, -(total + 4), SEEK_CUR); // Write Length diff --git a/src/traffic_quic/quic_client.cc b/src/traffic_quic/quic_client.cc index 8fc6e373a9b..8a65c288c0a 100644 --- a/src/traffic_quic/quic_client.cc +++ b/src/traffic_quic/quic_client.cc @@ -284,7 +284,7 @@ Http3ClientApp::start() this->_qc->close_quic_connection( QUICConnectionErrorUPtr(new QUICConnectionError(QUICTransErrorCode::NO_ERROR, "Close Exercise"))); } else if (this->_config->reset) { - // Stateless Reset Excercise + // Stateless Reset Exercise this->_qc->reset_quic_connection(); } }); diff --git a/src/traffic_quic/traffic_quic.cc b/src/traffic_quic/traffic_quic.cc index 00ac53a303a..829704e477b 100644 --- a/src/traffic_quic/traffic_quic.cc +++ b/src/traffic_quic/traffic_quic.cc @@ -63,8 +63,8 @@ main(int argc, const char **argv) {"path", 'P', "Path", "S1017", config.path, nullptr, nullptr}, {"server", 's', "Server name", "S127", config.server_name, nullptr, nullptr}, {"debug", 'T', "Vertical-bar-separated Debug Tags", "S1023", config.debug_tags, nullptr, nullptr}, - {"close", 'c', "Enable connection close excercise", "F", &config.close, nullptr, nullptr}, - {"reset", 'r', "Enable stateless reset excercise", "F", &config.reset, nullptr, nullptr}, + {"close", 'c', "Enable connection close exercise", "F", &config.close, nullptr, nullptr}, + {"reset", 'r', "Enable stateless reset exercise", "F", &config.reset, nullptr, nullptr}, {"http0_9", '-', "Enable HTTP/0.9", "T", &config.http0_9, nullptr, nullptr}, {"http3", '-', "Enable HTTP/3", "F", &config.http3, nullptr, nullptr},