[tor-commits] [tor/master] Merge remote-tracking branch 'andrea/cmux_refactor_configurable_threshold'

nickm at torproject.org nickm at torproject.org
Fri Nov 28 03:58:34 UTC 2014


commit a28df3fb6713043e801fb5fcf5019fc0539b5066
Merge: 3d2366c 12b6c7d
Author: Nick Mathewson <nickm at torproject.org>
Date:   Thu Nov 27 22:39:46 2014 -0500

    Merge remote-tracking branch 'andrea/cmux_refactor_configurable_threshold'
    
    Conflicts:
    	src/or/or.h
    	src/test/Makefile.nmake

 changes/global_scheduler     |    4 +
 scripts/maint/checkSpace.pl  |    3 +-
 src/common/compat_libevent.c |    4 +-
 src/common/compat_libevent.h |    2 +-
 src/common/torlog.h          |    4 +-
 src/or/Makefile.nmake        |    1 +
 src/or/buffers.c             |    4 +-
 src/or/buffers.h             |    2 +-
 src/or/channel.c             |  477 ++++++++++--
 src/or/channel.h             |   87 ++-
 src/or/channeltls.c          |  141 ++--
 src/or/channeltls.h          |    2 -
 src/or/circuitbuild.c        |    1 +
 src/or/circuitlist.c         |    4 +-
 src/or/circuitlist.h         |    3 +-
 src/or/circuitmux.c          |   56 +-
 src/or/circuitmux.h          |   12 +-
 src/or/circuitmux_ewma.c     |   58 +-
 src/or/config.c              |   35 +-
 src/or/config.h              |    2 +-
 src/or/connection.c          |    2 +
 src/or/connection_or.c       |   67 +-
 src/or/connection_or.h       |    8 +-
 src/or/include.am            |    2 +
 src/or/main.c                |    2 +
 src/or/or.h                  |   30 +
 src/or/relay.c               |   15 +-
 src/or/relay.h               |    3 +-
 src/or/scheduler.c           |  708 ++++++++++++++++++
 src/or/scheduler.h           |   50 ++
 src/test/Makefile.nmake      |    7 +-
 src/test/fakechans.h         |   25 +
 src/test/include.am          |    4 +
 src/test/test.c              |    9 +
 src/test/test_channel.c      | 1669 ++++++++++++++++++++++++++++++++++++++++++
 src/test/test_channeltls.c   |  332 +++++++++
 src/test/test_circuitmux.c   |    3 +
 src/test/test_relay.c        |  134 ++++
 src/test/test_scheduler.c    |  763 +++++++++++++++++++
 39 files changed, 4558 insertions(+), 177 deletions(-)

diff --cc src/or/include.am
index 0f53f00,b2b9406..643f7ce
--- a/src/or/include.am
+++ b/src/or/include.am
@@@ -74,11 -80,12 +74,12 @@@ LIBTOR_A_SOURCES = 
  	src/or/routerlist.c				\
  	src/or/routerparse.c				\
  	src/or/routerset.c				\
+ 	src/or/scheduler.c				\
  	src/or/statefile.c				\
  	src/or/status.c					\
 +	src/or/onion_ntor.c				\
  	$(evdns_source)					\
  	$(tor_platform_source)				\
 -	$(onion_ntor_source)				\
  	src/or/config_codedigest.c
  
  src_or_libtor_a_SOURCES = $(LIBTOR_A_SOURCES)
diff --cc src/or/or.h
index bff7267,25df54a..ccb29ee
--- a/src/or/or.h
+++ b/src/or/or.h
@@@ -4230,6 -4227,21 +4248,18 @@@ typedef struct 
    /** How long (seconds) do we keep a guard before picking a new one? */
    int GuardLifetime;
  
 -  /** Should we send the timestamps that pre-023 hidden services want? */
 -  int Support022HiddenServices;
 -
+   /** Low-water mark for global scheduler - start sending when estimated
+    * queued size falls below this threshold.
+    */
+   uint32_t SchedulerLowWaterMark;
+   /** High-water mark for global scheduler - stop sending when estimated
+    * queued size exceeds this threshold.
+    */
+   uint32_t SchedulerHighWaterMark;
+   /** Flush size for global scheduler - flush this many cells at a time
+    * when sending.
+    */
+   unsigned int SchedulerMaxFlushCells;
  } or_options_t;
  
  /** Persistent state for an onion router, as saved to disk. */
diff --cc src/test/Makefile.nmake
index f6ee7f3,e2cf538..0435617
--- a/src/test/Makefile.nmake
+++ b/src/test/Makefile.nmake
@@@ -11,11 -11,11 +11,12 @@@ LIBS = ..\..\..\build-alpha\lib\libeven
   ws2_32.lib advapi32.lib shell32.lib \
   crypt32.lib gdi32.lib user32.lib
  
- TEST_OBJECTS = test.obj test_addr.obj test_containers.obj \
+ TEST_OBJECTS = test.obj test_addr.obj test_channel.obj test_channeltls.obj \
 -	test_containers.obj test_controller_events.obj test_crypto.obj \
 -	test_data.obj test_dir.obj test_microdesc.obj test_pt.obj test_util.obj \
 -	test_config.obj test_cell_formats.obj test_relay.obj test_replay.obj \
++        test_containers.obj \
 +	test_controller_events.obj test_crypto.obj test_data.obj test_dir.obj \
 +	test_checkdir.obj test_microdesc.obj test_pt.obj test_util.obj test_config.obj \
- 	test_cell_formats.obj test_replay.obj test_introduce.obj tinytest.obj \
- 	test_hs.obj
++	test_cell_formats.obj test_relay.obj test_replay.obj \
+ 	test_scheduler.obj test_introduce.obj test_hs.obj tinytest.obj
  
  tinytest.obj: ..\ext\tinytest.c
  	$(CC) $(CFLAGS) /D snprintf=_snprintf /c ..\ext\tinytest.c





More information about the tor-commits mailing list