Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/records/P_RecDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ struct RecConfigMeta {

struct RecRecord {
RecT rec_type;
const char *name;
RecDataT data_type;
const char *name;
RecData data;
RecData data_default;
RecMutex lock;
unsigned char sync_required;
uint32_t version;
bool registered;
uint32_t version;
union {
RecStatMeta stat_meta;
RecConfigMeta config_meta;
Expand Down
2 changes: 1 addition & 1 deletion include/ts/apidefs.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -1056,8 +1056,8 @@ typedef struct {
typedef struct TSFetchUrlParams {
const char *request;
int request_len;
struct sockaddr_storage ip;
int port;
struct sockaddr_storage ip;
TSCont contp;
TSFetchEvent events;
TSFetchWakeUpOptions options;
Expand Down
2 changes: 1 addition & 1 deletion include/tscore/MatcherUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ struct matcher_line {
matcher_type type; // dest type
int dest_entry; // entry which specifies the destination
int num_el; // Number of elements
char *line[2][MATCHER_MAX_TOKENS]; // label, value pairs
int line_num; // config file line number
char *line[2][MATCHER_MAX_TOKENS]; // label, value pairs
matcher_line *next; // use for linked list
};

Expand Down
4 changes: 2 additions & 2 deletions include/tscore/ink_string++.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ struct StrListOverflow;

struct StrList {
public:
int count;
Str *head;
Str *tail;
int count;

public:
StrList(bool do_copy_when_adding_string = true);
Expand All @@ -121,11 +121,11 @@ struct StrList {
void *overflow_heap_alloc(int size);
void overflow_heap_clean();

int base_heap_used;
Str base_cells[STRLIST_BASE_CELLS];
char base_heap[STRLIST_BASE_HEAP_SIZE];
int cells_allocated;
int base_heap_size;
int base_heap_used;
StrListOverflow *overflow_current;
StrListOverflow *overflow_first;
bool copy_when_adding_string;
Expand Down
2 changes: 1 addition & 1 deletion iocore/eventsystem/I_EventProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#ifdef TS_MAX_THREADS_IN_EACH_THREAD_TYPE
constexpr int MAX_THREADS_IN_EACH_TYPE = TS_MAX_THREADS_IN_EACH_THREAD_TYPE;
#else
constexpr int MAX_THREADS_IN_EACH_TYPE = 3072;
constexpr int MAX_THREADS_IN_EACH_TYPE = 3071;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems pretty rando.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was pretty random, I was going to restore it but ran into a squirrel, but making that odd also made it 16 bytes smaller for some reason ... Should we restore it? It'd be surprising if 3072 is a magic number that actually matters?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah ya never know when you'll need 16 bytes.

#endif

#ifdef TS_MAX_NUMBER_EVENT_THREADS
Expand Down
8 changes: 5 additions & 3 deletions iocore/eventsystem/I_VIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ class VIO
*/
int op = VIO::NONE;

// This is a little odd location, but this saves on padding, and an entire cache line
private:
bool _disabled = false;

public:
/**
Provides access to the reader or writer for this operation.

Expand All @@ -215,7 +220,4 @@ class VIO

*/
Ptr<ProxyMutex> mutex;

private:
bool _disabled = false;
};
4 changes: 2 additions & 2 deletions iocore/net/I_NetVConnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ struct NetVCOptions {
// Use TCP Fast Open on this socket. The connect(2) call will be omitted.
bool f_tcp_fastopen = false;

bool tls_upstream = false;

/// Control use of SOCKS.
/// Set to @c NO_SOCKS to disable use of SOCKS. Otherwise SOCKS is
/// used if available.
Expand Down Expand Up @@ -227,8 +229,6 @@ struct NetVCOptions {
*/
const char *ssl_client_ca_cert_path = nullptr;

bool tls_upstream = false;

unsigned char alpn_protocols_array[MAX_ALPN_STRING];
int alpn_protocols_array_size = 0;

Expand Down
2 changes: 1 addition & 1 deletion proxy/InkAPIInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ enum CacheInfoMagic {
struct CacheInfo {
CryptoHash cache_key;
CacheFragType frag_type = CACHE_FRAG_TYPE_NONE;
char *hostname = nullptr;
int len = 0;
char *hostname = nullptr;
time_t pin_in_cache = 0;
CacheInfoMagic magic = CACHE_INFO_MAGIC_ALIVE;

Expand Down
12 changes: 6 additions & 6 deletions proxy/PoolableSession.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,19 @@ class PoolableSession : public ProxySession

virtual void set_netvc(NetVConnection *newvc);

// Keep track of connection limiting and a pointer to the
// singleton that keeps track of the connection counts.
OutboundConnTrack::Group *conn_track_group = nullptr;

virtual IOBufferReader *get_remote_reader() = 0;

// Used to determine whether the session is for parent proxy
// it is session to origin server
// We need to determine whether a closed connection was to
// close parent proxy to update the
// proxy.process.http.current_parent_proxy_connections
bool to_parent_proxy = false;

// Keep track of connection limiting and a pointer to the
// singleton that keeps track of the connection counts.
OutboundConnTrack::Group *conn_track_group = nullptr;

virtual IOBufferReader *get_remote_reader() = 0;

private:
// Sessions become if authentication headers
// are sent over them
Expand Down
13 changes: 6 additions & 7 deletions proxy/hdrs/HTTP.h
Original file line number Diff line number Diff line change
Expand Up @@ -479,21 +479,20 @@ class HTTPHdr : public MIMEHdr
{
public:
HTTPHdrImpl *m_http = nullptr;
// This is all cached data and so is mutable.
mutable URL m_url_cached;
mutable MIMEField *m_host_mime = nullptr;
mutable int m_host_length = 0; ///< Length of hostname.
mutable int m_port = 0; ///< Target port.
mutable bool m_target_cached = false; ///< Whether host name and port are cached.
mutable bool m_target_in_url = false; ///< Whether host name and port are in the URL.
mutable bool m_100_continue_required = false; ///< Whether 100_continue is in the Expect header.
mutable bool m_target_in_url = false; ///< Whether host name and port are in the URL.
mutable bool m_target_cached = false; ///< Whether host name and port are cached.
mutable bool early_data = false;
/// Set if the port was effectively specified in the header.
/// @c true if the target (in the URL or the HOST field) also specified
/// a port. That is, @c true if whatever source had the target host
/// also had a port, @c false otherwise.
mutable bool m_port_in_header = false;

mutable bool early_data = false;
mutable int m_port = 0; ///< Target port.
mutable int m_host_length = 0; ///< Length of hostname.
mutable MIMEField *m_host_mime = nullptr;

HTTPHdr() = default; // Force the creation of the default constructor

Expand Down
9 changes: 4 additions & 5 deletions proxy/hdrs/HdrHeap.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,13 @@ class HdrHeap
void dump_heap(int len = -1);

uint32_t m_magic;
bool m_writeable;
char *m_free_start;
char *m_data_start;
uint32_t m_size;

bool m_writeable;
// HdrBuf heap pointers
uint32_t m_free_size;

// Overflow block ptr
// Overflow blocks are necessary because we can
Expand All @@ -273,9 +275,6 @@ class HdrHeap
// point to string heaps
HdrHeap *m_next;

// HdrBuf heap pointers
uint32_t m_free_size;

int demote_rw_str_heap();
void coalesce_str_heaps(int incoming_size = 0);
void evacuate_from_str_heaps(HdrStrHeap *new_heap);
Expand Down Expand Up @@ -315,8 +314,8 @@ class HdrHeap

// String Heap access
Ptr<HdrStrHeap> m_read_write_heap;
StrHeapDesc m_ronly_heap[HDR_BUF_RONLY_HEAPS];
int m_lost_string_space;
StrHeapDesc m_ronly_heap[HDR_BUF_RONLY_HEAPS];
};

static constexpr HdrHeapMarshalBlocks HDR_HEAP_HDR_SIZE{swoc::round_up(sizeof(HdrHeap))};
Expand Down
Loading