diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-11-27 22:39:46 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-11-27 22:39:46 -0500 |
commit | a28df3fb6713043e801fb5fcf5019fc0539b5066 (patch) | |
tree | c67fce712d60ac0ff073b0c59bb4b06e7dae04b4 /src/or/or.h | |
parent | 3d2366c676233c30133928940b4bc19d8f25f193 (diff) | |
parent | 12b6c7df4aaf3224bc5649ef69a06dccc58ae961 (diff) | |
download | tor-a28df3fb6713043e801fb5fcf5019fc0539b5066.tar.gz tor-a28df3fb6713043e801fb5fcf5019fc0539b5066.zip |
Merge remote-tracking branch 'andrea/cmux_refactor_configurable_threshold'
Conflicts:
src/or/or.h
src/test/Makefile.nmake
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/or/or.h b/src/or/or.h index bff7267d37..ccb29ee7df 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -1431,6 +1431,18 @@ typedef struct or_handshake_state_t { /** Length of Extended ORPort connection identifier. */ #define EXT_OR_CONN_ID_LEN DIGEST_LEN /* 20 */ +/* + * OR_CONN_HIGHWATER and OR_CONN_LOWWATER moved from connection_or.c so + * channeltls.c can see them too. + */ + +/** When adding cells to an OR connection's outbuf, keep adding until the + * outbuf is at least this long, or we run out of cells. */ +#define OR_CONN_HIGHWATER (32*1024) + +/** Add cells to an OR connection's outbuf whenever the outbuf's data length + * drops below this size. */ +#define OR_CONN_LOWWATER (16*1024) /** Subtype of connection_t for an "OR connection" -- that is, one that speaks * cells over TLS. */ @@ -1522,6 +1534,12 @@ typedef struct or_connection_t { /** Last emptied write token bucket in msec since midnight; only used if * TB_EMPTY events are enabled. */ uint32_t write_emptied_time; + + /* + * Count the number of bytes flushed out on this orconn, and the number of + * bytes TLS actually sent - used for overhead estimation for scheduling. + */ + uint64_t bytes_xmitted, bytes_xmitted_by_tls; } or_connection_t; /** Subtype of connection_t for an "edge connection" -- that is, an entry (ap) @@ -4230,6 +4248,18 @@ typedef struct { /** How long (seconds) do we keep a guard before picking a new one? */ int GuardLifetime; + /** 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. */ |