A brief file description. More...
#include "libts.h"
#include "P_UnixNetProcessor.h"
#include "P_UnixNetVConnection.h"
#include "P_NetAccept.h"
#include "P_DNSConnection.h"
#include "P_UnixUDPConnection.h"
#include "P_UnixPollDescriptor.h"
Go to the source code of this file.
A brief file description.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file P_UnixNet.h.
#define ACCEPT_PERIOD -HRTIME_MSECONDS(4) |
Definition at line 156 of file P_UnixNet.h.
#define EMERGENCY_THROTTLE 16 |
Definition at line 149 of file P_UnixNet.h.
#define EVENTIO_ASYNC_SIGNAL 5 |
Definition at line 38 of file P_UnixNet.h.
Referenced by NetHandler::mainNetEvent().
#define EVENTIO_DNS_CONNECTION 3 |
Definition at line 36 of file P_UnixNet.h.
Referenced by EventIO::close(), and NetHandler::mainNetEvent().
#define EVENTIO_NETACCEPT 1 |
Definition at line 34 of file P_UnixNet.h.
Referenced by EventIO::close().
#define EVENTIO_READWRITE_VC 2 |
Definition at line 35 of file P_UnixNet.h.
Referenced by EventIO::close(), and NetHandler::mainNetEvent().
#define EVENTIO_UDP_CONNECTION 4 |
Definition at line 37 of file P_UnixNet.h.
#define HYPER_EMERGENCY_THROTTLE 6 |
Definition at line 150 of file P_UnixNet.h.
#define NET_PERIOD -HRTIME_MSECONDS(5) |
Definition at line 155 of file P_UnixNet.h.
Referenced by NetHandler::startNetEvent().
#define NET_RETRY_DELAY HRTIME_MSECONDS(10) |
Definition at line 145 of file P_UnixNet.h.
Referenced by UnixNetVConnection::acceptEvent(), UnixNetVConnection::mainEvent(), ShowNet::showConnectionsOnThread(), ShowNet::showSingleThread(), and UnixNetVConnection::startEvent().
#define NET_THROTTLE_ACCEPT_HEADROOM 1.1 |
Definition at line 152 of file P_UnixNet.h.
Referenced by net_connections_to_throttle().
#define NET_THROTTLE_CONNECT_HEADROOM 1.0 |
Definition at line 153 of file P_UnixNet.h.
#define NET_THROTTLE_DELAY 50 |
Definition at line 157 of file P_UnixNet.h.
Referenced by NetAccept::do_blocking_accept(), and send_throttle_message().
#define NET_THROTTLE_MESSAGE_EVERY HRTIME_MINUTES(10) |
Definition at line 154 of file P_UnixNet.h.
Referenced by check_shedding_warning(), and check_throttle_warning().
#define PRINT_IP | ( | x | ) | ((uint8_t*)&(x))[0],((uint8_t*)&(x))[1], ((uint8_t*)&(x))[2],((uint8_t*)&(x))[3] |
Definition at line 159 of file P_UnixNet.h.
Referenced by ShowHostDB::showLookupDone().
#define THROTTLE_AT_ONCE 5 |
Definition at line 148 of file P_UnixNet.h.
Referenced by send_throttle_message().
#define THROTTLE_FD_HEADROOM (128 + 64) |
Definition at line 142 of file P_UnixNet.h.
Referenced by adjust_sys_settings(), and check_fd_limit().
#define TRANSIENT_ACCEPT_ERROR_MESSAGE_EVERY HRTIME_HOURS(24) |
Definition at line 144 of file P_UnixNet.h.
Referenced by check_transient_accept_error().
#define USE_EDGE_TRIGGER_EPOLL 1 |
Definition at line 29 of file P_UnixNet.h.
#define USE_EDGE_TRIGGER_KQUEUE 1 |
Definition at line 30 of file P_UnixNet.h.
#define USE_EDGE_TRIGGER_PORT 1 |
Definition at line 31 of file P_UnixNet.h.
typedef PollDescriptor* EventLoop |
Definition at line 72 of file P_UnixNet.h.
typedef int(NetHandler::* NetContHandler)(int, void *) |
Definition at line 122 of file P_UnixNet.h.
typedef unsigned int uint32 |
Definition at line 123 of file P_UnixNet.h.
enum ThrottleType |
Definition at line 225 of file P_UnixNet.h.
TS_INLINE int accept_error_seriousness | ( | int | res | ) |
Definition at line 336 of file P_UnixNet.h.
References ink_assert.
Referenced by NetAccept::acceptFastEvent(), and NetAccept::do_blocking_accept().
TS_INLINE int change_net_connections_throttle | ( | const char * | token, | |
RecDataT | data_type, | |||
RecData | value, | |||
void * | data | |||
) |
Definition at line 314 of file P_UnixNet.h.
References fds_limit, fds_throttle, and net_connections_throttle.
Referenced by configure_net(), and UnixNetProcessor::start().
TS_INLINE int check_emergency_throttle | ( | Connection & | con | ) |
Definition at line 296 of file P_UnixNet.h.
References Connection::close(), emergency_throttle_time, Connection::fd, fds_limit, HRTIME_SECOND, ink_get_hrtime(), REC_SIGNAL_SYSTEM_ERROR, and RecSignalWarning().
Referenced by UnixNetVConnection::connectUp(), and NetAccept::do_blocking_accept().
TS_INLINE int check_net_throttle | ( | ThrottleType | t, | |
ink_hrtime | now | |||
) |
Definition at line 260 of file P_UnixNet.h.
References connections, emergency_throttle(), net_connections_throttle, and net_connections_to_throttle().
Referenced by NetAccept::acceptFastEvent(), UnixNetVConnection::connectUp(), NetAccept::do_blocking_accept(), and send_throttle_message().
TS_INLINE void check_shedding_warning | ( | ) |
Definition at line 244 of file P_UnixNet.h.
References ink_get_hrtime(), last_shedding_warning, NET_THROTTLE_MESSAGE_EVERY, REC_SIGNAL_SYSTEM_ERROR, and RecSignalWarning().
TS_INLINE void check_throttle_warning | ( | ) |
Definition at line 274 of file P_UnixNet.h.
References ink_get_hrtime(), last_throttle_warning, NET_THROTTLE_MESSAGE_EVERY, REC_SIGNAL_SYSTEM_ERROR, and RecSignalWarning().
Referenced by UnixNetVConnection::connectUp(), and NetAccept::do_blocking_accept().
TS_INLINE void check_transient_accept_error | ( | int | res | ) |
Definition at line 373 of file P_UnixNet.h.
References ink_get_hrtime(), last_transient_accept_error, TRANSIENT_ACCEPT_ERROR_MESSAGE_EVERY, and Warning.
Referenced by NetAccept::acceptFastEvent(), and NetAccept::do_blocking_accept().
TS_INLINE int emergency_throttle | ( | ink_hrtime | now | ) |
Definition at line 254 of file P_UnixNet.h.
References emergency_throttle_time.
Referenced by check_net_throttle().
static NetHandler* get_NetHandler | ( | EThread * | t | ) | [inline, static] |
Definition at line 208 of file P_UnixNet.h.
References ETHREAD_GET_PTR, UnixNetProcessor::netHandler_offset, and unix_netProcessor.
Referenced by UnixNetVConnection::acceptEvent(), NetAccept::acceptFastEvent(), InactivityCop::check_inactivity(), UnixNetProcessor::connect_re_internal(), UnixNetVConnection::connectUp(), NetAccept::init_accept_per_thread(), SSLNetAccept::init_accept_per_thread(), initialize_thread_for_net(), UnixNetVConnection::mainEvent(), ShowNet::showConnectionsOnThread(), ShowNet::showSingleThread(), ClusterHandler::startClusterEvent(), and UnixNetVConnection::startEvent().
Definition at line 213 of file P_UnixNet.h.
References ETHREAD_GET_PTR, UnixNetProcessor::pollCont_offset, and unix_netProcessor.
Referenced by get_PollDescriptor(), initialize_thread_for_net(), and UDPReadContinuation::setupPollDescriptor().
static PollDescriptor* get_PollDescriptor | ( | EThread * | t | ) | [inline, static] |
Definition at line 218 of file P_UnixNet.h.
References get_PollCont(), and PollCont::pollDescriptor.
Referenced by UnixNetVConnection::acceptEvent(), NetAccept::acceptFastEvent(), UnixNetVConnection::connectUp(), NetAccept::init_accept_per_thread(), SSLNetAccept::init_accept_per_thread(), NetHandler::mainNetEvent(), net_signal_hook_function(), DNSHandler::open_con(), ShowNet::showSingleThread(), and ClusterHandler::startClusterEvent().
TS_INLINE int net_connections_to_throttle | ( | ThrottleType | t | ) |
Definition at line 229 of file P_UnixNet.h.
References ACCEPT, net_connections_currently_open_stat, NET_READ_GLOBAL_DYN_SUM, and NET_THROTTLE_ACCEPT_HEADROOM.
Referenced by check_net_throttle().
unsigned int net_next_connection_number | ( | ) |
Definition at line 56 of file UnixNetProcessor.cc.
References net_connection_number.
Referenced by NetAccept::acceptFastEvent(), UnixNetProcessor::connect_re_internal(), NetAccept::do_blocking_accept(), net_accept(), and TSVConnFdCreate().
static void read_disable | ( | NetHandler * | nh, | |
UnixNetVConnection * | vc | |||
) | [inline, static] |
Definition at line 390 of file P_UnixNet.h.
References NetState::enabled, UnixNetVConnection::ep, EventIO::modify(), UnixNetVConnection::next_inactivity_timeout_at, UnixNetVConnection::read, and UnixNetVConnection::write.
Referenced by SSLNetVConnection::net_read_io(), read_from_net(), and UnixNetVConnection::readDisable().
static void write_disable | ( | NetHandler * | nh, | |
UnixNetVConnection * | vc | |||
) | [inline, static] |
Definition at line 409 of file P_UnixNet.h.
References NetState::enabled, UnixNetVConnection::ep, EventIO::modify(), UnixNetVConnection::next_inactivity_timeout_at, UnixNetVConnection::read, and UnixNetVConnection::write.
Referenced by write_to_net_io().
Definition at line 28 of file UnixNet.cc.
Referenced by check_emergency_throttle(), and emergency_throttle().
int fds_limit |
Definition at line 31 of file UnixNet.cc.
Referenced by adjust_sys_settings(), change_net_connections_throttle(), check_emergency_throttle(), check_fd_limit(), and init_system().
int fds_throttle |
Definition at line 30 of file UnixNet.cc.
Referenced by adjust_sys_settings(), change_net_connections_throttle(), check_fd_limit(), and configure_net().
Definition at line 54 of file LogStandalone.cc.
Definition at line 27 of file UnixNet.cc.
Referenced by check_shedding_warning().
Definition at line 26 of file UnixNet.cc.
Referenced by check_throttle_warning().
Definition at line 32 of file UnixNet.cc.
Referenced by check_transient_accept_error().
Definition at line 29 of file UnixNet.cc.
Referenced by change_net_connections_throttle(), and check_net_throttle().