Andrea Shepard
71a9ed6feb
Make some scheduler.c static functions visible to the test suite
2014-09-30 23:14:57 -07:00
Andrea Shepard
9869254608
Make scheduler.c static globals visible to test suite
2014-09-30 23:14:25 -07:00
Andrea Shepard
a2de0a1034
Make buf_datalen() mockable
2014-09-30 23:14:25 -07:00
Andrea Shepard
3b080230e9
Make connection_or_connect() mockable
2014-09-30 23:14:24 -07:00
Andrea Shepard
3bc7108d2c
Make is_local_addr() mockable
2014-09-30 23:14:24 -07:00
Andrea Shepard
452bce6c72
Make channel_dump_statistics() mockable
2014-09-30 23:14:23 -07:00
Andrea Shepard
5a24ff0563
What the hell was I on?
2014-09-30 23:14:23 -07:00
Andrea Shepard
9eea42f844
Make channel_flush_from_first_active_circuit() mockable
2014-09-30 23:14:02 -07:00
Andrea Shepard
5b7a58f7c4
Make circuitmux_num_cells() mockable
2014-09-30 23:14:02 -07:00
Andrea Shepard
ae3ed185e4
Let channel unit tests mess with global queue estimate
2014-09-30 23:14:01 -07:00
Andrea Shepard
bbb06b73cd
Expose some channel cell queue stuff to the test suite
2014-09-30 23:09:15 -07:00
Andrea Shepard
2ee69bd5d7
Expose get_unique_circ_id_by_chan() to test suite
2014-09-30 23:09:14 -07:00
Andrea Shepard
ade60890d0
Make scheduler_channel_doesnt_want_writes() mockable
2014-09-30 23:09:14 -07:00
Andrea Shepard
fd57840a77
Make scheduler_channel_doesnt_want_writes() mockable
2014-09-30 22:54:10 -07:00
Andrea Shepard
85ee070852
Make scheduler_release_channel() mockable
2014-09-30 22:49:58 -07:00
Andrea Shepard
8907554cf3
Make channel_note_destroy_not_pending() mockable
2014-09-30 22:49:58 -07:00
Andrea Shepard
dabf4c33e2
Refactor channel_get_cell_queue_entry_size() to avoid an unreachable line for test coverage, and fix a nasty lurking memory bug in channel_flush_some_cells_from_outgoing_queue()
2014-09-30 22:49:58 -07:00
Andrea Shepard
ac1b627e85
Implement scheduler_touch_channel()
2014-09-30 22:49:58 -07:00
Andrea Shepard
ed1927d6bf
Use a non-stupid data structure in the scheduler
2014-09-30 22:49:56 -07:00
Andrea Shepard
3530825c53
Eliminate some unnecessary smartlists in scheduler.c
2014-09-30 22:49:36 -07:00
Andrea Shepard
63bb9a795e
Fix compiler warning
2014-09-30 22:49:36 -07:00
Andrea Shepard
55907da28d
Sort the scheduler's channel list by cmux comparisons
2014-09-30 22:49:36 -07:00
Andrea Shepard
700d6e7525
Add inter-cmux comparison support to circuitmux_ewma.c
2014-09-30 22:49:35 -07:00
Andrea Shepard
9db596d2ef
Add cmux support for inter-cmux comparisons
2014-09-30 22:49:35 -07:00
Andrea Shepard
1275002a46
Schedule according to a queue size heuristic
2014-09-30 22:49:35 -07:00
Andrea Shepard
4f567c8cc8
Let the new scheduler handle writes
2014-09-30 22:49:03 -07:00
Andrea Shepard
f314d9509c
Fix return values from channel_flush_some_cells() to correctly count cells directly written by channel_flush_from_first_active_circuit()
2014-09-30 22:49:03 -07:00
Andrea Shepard
2fc3da3ff5
Implement global queue size query in channel.c
2014-09-30 22:49:03 -07:00
Andrea Shepard
8852a1794c
Track total queue size per channel, with overhead estimates, and global queue total
2014-09-30 22:49:03 -07:00
Andrea Shepard
5e0a6d54d0
Add global cell/byte counters and per channel byte counters to channel.c
2014-09-30 22:49:02 -07:00
Andrea Shepard
f0533d8d22
Remove no-longer-used channel_tls_t functions
2014-09-30 22:49:02 -07:00
Andrea Shepard
b09f41424c
Actually call channel_flush_some_cells() from the scheduler
2014-09-30 22:49:01 -07:00
Andrea Shepard
2efbab2aaf
Provide generic mechanism for scheduler to query writeable cells on a channel
2014-09-30 22:48:26 -07:00
Nick Mathewson
472b62bfe4
Uglify scheduler init logic to avoid crash on startup.
...
Otherwise, when we authority try to do a self-test because of
init-keys, if that self-test can't be launched for whatever reason and
so we close the channel immediately, we crash.
Yes, this a silly way for initialization to work.
2014-09-30 22:48:26 -07:00
Nick Mathewson
85ee5b3095
Use event_active, not 0-length timeouts. It's idempotent, too.
2014-09-30 22:48:26 -07:00
Nick Mathewson
fc13184e44
Fix unused-arguments warnings
2014-09-30 22:48:26 -07:00
Nick Mathewson
08bea13c35
Temporarily disable scheduler_trigger as unused
2014-09-30 22:48:26 -07:00
Andrea Shepard
d438cf1ec9
Implement scheduler mechanism to track lists of channels wanting cells or writes; doesn't actually drive the cell flow from it yet
2014-09-30 22:48:24 -07:00
Roger Dingledine
1987157d0c
+ is not how we say concatenate
2014-09-22 20:09:03 -04:00
Nick Mathewson
bdd0c77643
Merge branch 'bug8197_squashed'
...
Conflicts:
src/test/test_policy.c
2014-09-22 14:34:52 -04:00
rl1987
80622c0664
Writing comments for newly added functions.
2014-09-22 14:18:01 -04:00
rl1987
2e951f8dda
Whitespace fixes
2014-09-22 14:18:00 -04:00
rl1987
c735b60e4c
New API for policies_parse_exit_policy().
2014-09-22 14:18:00 -04:00
Adrien BAK
8858194952
Remove config options that have been obsolete since 0.2.3
2014-09-22 10:55:01 -04:00
Nick Mathewson
6c6ea8c425
Merge remote-tracking branch 'arma/feature13211'
2014-09-22 10:49:10 -04:00
Nick Mathewson
d3382297fe
Merge remote-tracking branch 'arma/feature13153'
2014-09-22 10:42:54 -04:00
Nick Mathewson
1a1e695800
Merge remote-tracking branch 'public/bug7733a'
2014-09-22 10:38:05 -04:00
Roger Dingledine
09183dc315
clients use optimistic data when reaching hidden services
...
Allow clients to use optimistic data when connecting to a hidden service,
which should cut out the initial round-trip for client-side programs
including Tor Browser.
(Now that Tor 0.2.2.x is obsolete, all hidden services should support
server-side optimistic data.)
See proposal 181 for details. Implements ticket 13211.
2014-09-21 20:02:12 -04:00
Roger Dingledine
530fac10aa
Use optimistic data even if we don't know exitnode->rs
...
I think we should know the routerstatus for our exit relay, since
we built a circuit to it. So I think this is just a code simplication.
2014-09-21 19:12:20 -04:00
Roger Dingledine
bbfb1aca55
get rid of routerstatus->version_supports_optimistic_data
...
Clients are now willing to send optimistic circuit data (before they
receive a 'connected' cell) to relays of any version. We used to
only do it for relays running 0.2.3.1-alpha or later, but now all
relays are new enough.
Resolves ticket 13153.
2014-09-21 19:04:18 -04:00