git://git.onelab.eu
/
distributedratelimiting.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added an 'independent' option for set identites that will put them under the
[distributedratelimiting.git]
/
drl
/
drl_state.h
diff --git
a/drl/drl_state.h
b/drl/drl_state.h
index
2b1ec5e
..
950ea7e
100644
(file)
--- a/
drl/drl_state.h
+++ b/
drl/drl_state.h
@@
-31,7
+31,10
@@
#define MAX_IDENTS (1024)
#define MAX_LIMITERS (128)
#define MAX_IDENTS (1024)
#define MAX_LIMITERS (128)
-#define REMOTE_AWOL_THRESHOLD (3)
+#define MESH_REMOTE_AWOL_THRESHOLD (5)
+
+//FIXME: Make this more scientific?
+#define GOSSIP_REMOTE_AWOL_THRESHOLD (10 * comm->remote_node_count / comm->gossip.gossip_branch)
enum transports { UDP, TCP };
enum transports { UDP, TCP };
@@
-208,9
+211,13
@@
void free_comm(comm_t *comm);
* @param aggregate The location at which the aggregate value will
* be stored.
*
* @param aggregate The location at which the aggregate value will
* be stored.
*
+ * @param decayto When using a mesh comm fabric, limiters whose value
+ * has not been heard in several timesteps will decay to this value.
+ * Generally globallimit/N.
+ *
* @returns 0 on success, EINVAL on error.
*/
* @returns 0 on success, EINVAL on error.
*/
-int read_comm(comm_t *comm, double *aggregate);
+int read_comm(comm_t *comm, double *aggregate
, double decayto
);
/**
* Updates the locally observed value of an identity.
/**
* Updates the locally observed value of an identity.