diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-08-02 13:26:10 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-08-02 13:33:08 -0400 |
commit | 88a7a027286046b1f9af3d495c1081a7f503efc5 (patch) | |
tree | 67f3ca07641d63ad7c5ab27915381fa8aa54d382 /src | |
parent | ca67dd83674583a07429df283444ed8d77ae8250 (diff) | |
download | tor-88a7a027286046b1f9af3d495c1081a7f503efc5.tar.gz tor-88a7a027286046b1f9af3d495c1081a7f503efc5.zip |
Bufferevent removal: remove more bufferevent-only options
(All this IOCP stuff was bufferevent-only.)
Diffstat (limited to 'src')
-rw-r--r-- | src/common/compat_libevent.h | 2 | ||||
-rw-r--r-- | src/or/config.c | 15 | ||||
-rw-r--r-- | src/or/or.h | 11 |
3 files changed, 4 insertions, 24 deletions
diff --git a/src/common/compat_libevent.h b/src/common/compat_libevent.h index d9ccf1aabf..33da4fe782 100644 --- a/src/common/compat_libevent.h +++ b/src/common/compat_libevent.h @@ -34,8 +34,6 @@ void periodic_timer_free(periodic_timer_t *); /** Defines a configuration for using libevent with Tor: passed as an argument * to tor_libevent_initialize() to describe how we want to set up. */ typedef struct tor_libevent_cfg { - /** Flag: if true, disable IOCP (assuming that it could be enabled). */ - int disable_iocp; /** How many CPUs should we use (relevant only with IOCP). */ int num_cpus; /** How many milliseconds should we allow between updating bandwidth limits? diff --git a/src/or/config.c b/src/or/config.c index 5a59e2adea..661a42e987 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -113,7 +113,6 @@ static config_abbrev_t option_abbrevs_[] = { { "BridgeAuthoritativeDirectory", "BridgeAuthoritativeDir", 0, 0}, { "HashedControlPassword", "__HashedControlSessionPassword", 1, 0}, { "VirtualAddrNetwork", "VirtualAddrNetworkIPv4", 0, 0}, - { "_UseFilteringSSLBufferevents", "UseFilteringSSLBufferevents", 0, 1}, { NULL, NULL, 0, 0}, }; @@ -225,7 +224,7 @@ static config_var_t option_vars_[] = { V(DirAuthorityFallbackRate, DOUBLE, "1.0"), V(DisableAllSwap, BOOL, "0"), V(DisableDebuggerAttachment, BOOL, "1"), - V(DisableIOCP, BOOL, "1"), + OBSOLETE("DisableIOCP"), OBSOLETE("DisableV2DirectoryInfo_"), OBSOLETE("DynamicDHGroups"), VPORT(DNSPort, LINELIST, NULL), @@ -440,7 +439,7 @@ static config_var_t option_vars_[] = { V(UseMicrodescriptors, AUTOBOOL, "auto"), V(UseNTorHandshake, AUTOBOOL, "1"), V(User, STRING, NULL), - V(UserspaceIOCPBuffers, BOOL, "0"), + OBSOLETE("UserspaceIOCPBuffers"), V(AuthDirSharedRandomness, BOOL, "1"), OBSOLETE("V1AuthoritativeDirectory"), OBSOLETE("V2AuthoritativeDirectory"), @@ -461,7 +460,8 @@ static config_var_t option_vars_[] = { V(VirtualAddrNetworkIPv4, STRING, "127.192.0.0/10"), V(VirtualAddrNetworkIPv6, STRING, "[FE80::]/10"), V(WarnPlaintextPorts, CSV, "23,109,110,143"), - V(UseFilteringSSLBufferevents, BOOL, "0"), + OBSOLETE("UseFilteringSSLBufferevents"), + OBSOLETE("__UseFilteringSSLBufferevents"), VAR("__ReloadTorrcOnSIGHUP", BOOL, ReloadTorrcOnSIGHUP, "1"), VAR("__AllDirActionsPrivate", BOOL, AllDirActionsPrivate, "0"), VAR("__DisablePredictedCircuits",BOOL,DisablePredictedCircuits, "0"), @@ -4218,12 +4218,6 @@ options_transition_allowed(const or_options_t *old, return -1; } - if (old->DisableIOCP != new_val->DisableIOCP) { - *msg = tor_strdup("While Tor is running, changing DisableIOCP " - "is not allowed."); - return -1; - } - if (old->DisableDebuggerAttachment && !new_val->DisableDebuggerAttachment) { *msg = tor_strdup("While Tor is running, disabling " @@ -7192,7 +7186,6 @@ init_libevent(const or_options_t *options) suppress_libevent_log_msg("Function not implemented"); memset(&cfg, 0, sizeof(cfg)); - cfg.disable_iocp = options->DisableIOCP; cfg.num_cpus = get_num_cpus(options); cfg.msec_per_tick = options->TokenBucketRefillInterval; diff --git a/src/or/or.h b/src/or/or.h index e091d5cfd3..3ca9ea248f 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -4292,12 +4292,6 @@ typedef struct { */ double CircuitPriorityHalflife; - /** If true, do not enable IOCP on windows with bufferevents, even if - * we think we could. */ - int DisableIOCP; - /** For testing only: will go away eventually. */ - int UseFilteringSSLBufferevents; - /** Set to true if the TestingTorNetwork configuration option is set. * This is used so that options_validate() has a chance to realize that * the defaults have changed. */ @@ -4321,11 +4315,6 @@ typedef struct { * never use it. If -1, we do what the consensus says. */ int OptimisticData; - /** If 1, and we are using IOCP, we set the kernel socket SNDBUF and RCVBUF - * to 0 to try to save kernel memory and avoid the dread "Out of buffers" - * issue. */ - int UserspaceIOCPBuffers; - /** If 1, we accept and launch no external network connections, except on * control ports. */ int DisableNetwork; |