This is an automated email from the ASF dual-hosted git repository.
maskit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 755d660274 cleanup: Remove
CLIENT_CONNECTION_FIRST_READ_BUFFER_SIZE_INDEX (#11289)
755d660274 is described below
commit 755d66027455bc8085e751af201e2ae1f961eef4
Author: Masakazu Kitajo <[email protected]>
AuthorDate: Tue Apr 30 08:59:49 2024 -0600
cleanup: Remove CLIENT_CONNECTION_FIRST_READ_BUFFER_SIZE_INDEX (#11289)
---
include/proxy/http/HttpSM.h | 2 +-
include/proxy/http2/Http2CommonSession.h | 2 +-
include/proxy/http2/Http2Stream.h | 2 +-
include/proxy/http3/Http3Transaction.h | 2 +-
src/iocore/net/P_Net.h | 4 ----
src/proxy/ProtocolProbeSessionAccept.cc | 2 +-
6 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/include/proxy/http/HttpSM.h b/include/proxy/http/HttpSM.h
index 5898a3a1f0..d191a16641 100644
--- a/include/proxy/http/HttpSM.h
+++ b/include/proxy/http/HttpSM.h
@@ -61,7 +61,7 @@
// The default size for http header buffers when we don't
// need to include extra space for the document
-static size_t const HTTP_HEADER_BUFFER_SIZE_INDEX =
CLIENT_CONNECTION_FIRST_READ_BUFFER_SIZE_INDEX;
+static size_t const HTTP_HEADER_BUFFER_SIZE_INDEX = BUFFER_SIZE_INDEX_4K;
// We want to use a larger buffer size when reading response
// headers from the origin server since we want to get
diff --git a/include/proxy/http2/Http2CommonSession.h
b/include/proxy/http2/Http2CommonSession.h
index 4982b160b9..5507a3a07f 100644
--- a/include/proxy/http2/Http2CommonSession.h
+++ b/include/proxy/http2/Http2CommonSession.h
@@ -59,7 +59,7 @@ enum class Http2SsnMilestone {
LAST_ENTRY,
};
-size_t const HTTP2_HEADER_BUFFER_SIZE_INDEX =
CLIENT_CONNECTION_FIRST_READ_BUFFER_SIZE_INDEX;
+size_t const HTTP2_HEADER_BUFFER_SIZE_INDEX = BUFFER_SIZE_INDEX_4K;
/**
@startuml
diff --git a/include/proxy/http2/Http2Stream.h
b/include/proxy/http2/Http2Stream.h
index 68b7cae807..26b93e4041 100644
--- a/include/proxy/http2/Http2Stream.h
+++ b/include/proxy/http2/Http2Stream.h
@@ -210,7 +210,7 @@ private:
int64_t _http_sm_id = -1;
HTTPHdr _receive_header;
- MIOBuffer _receive_buffer = CLIENT_CONNECTION_FIRST_READ_BUFFER_SIZE_INDEX;
+ MIOBuffer _receive_buffer = BUFFER_SIZE_INDEX_4K;
VIO read_vio;
VIO write_vio;
diff --git a/include/proxy/http3/Http3Transaction.h
b/include/proxy/http3/Http3Transaction.h
index f3d786c600..4389d5eab3 100644
--- a/include/proxy/http3/Http3Transaction.h
+++ b/include/proxy/http3/Http3Transaction.h
@@ -94,7 +94,7 @@ protected:
EThread *_thread = nullptr;
- MIOBuffer _read_vio_buf =
CLIENT_CONNECTION_FIRST_READ_BUFFER_SIZE_INDEX;
+ MIOBuffer _read_vio_buf = BUFFER_SIZE_INDEX_4K;
QUICStreamVCAdapter::IOInfo &_info;
size_t _sent_bytes = 0;
diff --git a/src/iocore/net/P_Net.h b/src/iocore/net/P_Net.h
index 1a6c9abd88..e4a034eeee 100644
--- a/src/iocore/net/P_Net.h
+++ b/src/iocore/net/P_Net.h
@@ -109,7 +109,3 @@ static constexpr ts::ModuleVersion
NET_SYSTEM_MODULE_INTERNAL_VERSION(NET_SYSTEM
#else
#define NetDbg(dbg_ctl, fmt, ...) Dbg(dbg_ctl, fmt, ##__VA_ARGS__)
#endif
-
-/// Default amount of buffer space to use for the initial read on an incoming
connection.
-/// This is an IOBufferBlock index, not the size in bytes.
-static size_t const CLIENT_CONNECTION_FIRST_READ_BUFFER_SIZE_INDEX =
BUFFER_SIZE_INDEX_4K;
diff --git a/src/proxy/ProtocolProbeSessionAccept.cc
b/src/proxy/ProtocolProbeSessionAccept.cc
index 2996d2000d..6da06ec578 100644
--- a/src/proxy/ProtocolProbeSessionAccept.cc
+++ b/src/proxy/ProtocolProbeSessionAccept.cc
@@ -50,7 +50,7 @@ proto_is_http2(IOBufferReader *reader)
struct ProtocolProbeTrampoline : public Continuation, public
ProtocolProbeSessionAcceptEnums {
static const size_t minimum_read_size = 1;
- static const unsigned buffer_size_index =
CLIENT_CONNECTION_FIRST_READ_BUFFER_SIZE_INDEX;
+ static const unsigned buffer_size_index = BUFFER_SIZE_INDEX_4K;
IOBufferReader *reader;
explicit ProtocolProbeTrampoline(const ProtocolProbeSessionAccept *probe,
Ptr<ProxyMutex> &mutex, MIOBuffer *buffer,