[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] 31/164: Fixed a bug in implementation added if max size thresol
From: |
gnunet |
Subject: |
[gnunet] 31/164: Fixed a bug in implementation added if max size thresold instead of dont allow ibfs to get smaler |
Date: |
Fri, 30 Jul 2021 15:31:37 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
commit 717b24a92ce64e33ac528c67f8047c4290ea260c
Author: Elias Summermatter <elias.summermatter@seccom.ch>
AuthorDate: Fri Apr 16 07:42:25 2021 +0200
Fixed a bug in implementation added if max size thresold instead of dont
allow ibfs to get smaler
---
src/setu/gnunet-service-setu.c | 19 ++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/src/setu/gnunet-service-setu.c b/src/setu/gnunet-service-setu.c
index 0c16bbb46..f903739da 100644
--- a/src/setu/gnunet-service-setu.c
+++ b/src/setu/gnunet-service-setu.c
@@ -66,11 +66,11 @@
#define MAX_BUCKETS_PER_MESSAGE ((1 << 15) / IBF_BUCKET_SIZE)
/**
- * The maximum size of an ibf we use is 2^(MAX_IBF_ORDER).
+ * The maximum size of an ibf we use is MAX_IBF_SIZE=2^20.
* Choose this value so that computing the IBF is still cheaper
* than transmitting all values.
*/
-#define MAX_IBF_ORDER (20)
+#define MAX_IBF_SIZE 1048576
/**
* Number of buckets used in the ibf per estimated
@@ -1441,16 +1441,6 @@ get_size_from_difference (unsigned int diff, int
number_buckets_per_element, flo
/** Make ibf estimation size odd **/
return (((int)(diff * ibf_bucket_number_factor)) | 1);
- unsigned int ibf_order;
- ibf_order = 2;
- while (((1 << ibf_order) < (ibf_bucket_number_factor * diff) ||
- ((1 << ibf_order) < number_buckets_per_element)) &&
- (ibf_order < MAX_IBF_ORDER))
- ibf_order++;
- // add one for correction
- LOG (GNUNET_ERROR_TYPE_ERROR,"IBF ORDER: %d\n", ibf_order);
-
- return ibf_order + 1;
}
static unsigned int
@@ -1458,6 +1448,9 @@ get_next_ibf_size(float ibf_bucket_number_factor,
unsigned int decoded_elements,
{
unsigned int next_size = (unsigned int) ((last_ibf_size * 1.5) - (
ibf_bucket_number_factor * decoded_elements ));
+ if(next_size > MAX_IBF_SIZE)
+ next_size = MAX_IBF_SIZE;
+
if(next_size < IBF_MIN_SIZE)
next_size = IBF_MIN_SIZE;
return next_size | 1;
@@ -1839,7 +1832,7 @@ decode_and_send (struct Operation *op)
next_size = get_next_ibf_size(op->ibf_bucket_number_factor, num_decoded,
diff_ibf->size);
- if (next_size > diff_ibf->size) /** FIXME: ADD HERA A MAX LIMIT! if
(next_order <= MAX_IBF_ORDER) **/
+ if (next_size <= MAX_IBF_SIZE)
{
LOG (GNUNET_ERROR_TYPE_DEBUG,
"decoding failed, sending larger ibf (size %u)\n",
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet] 26/164: Simulation with 10x more elements, (continued)
- [gnunet] 26/164: Simulation with 10x more elements, gnunet, 2021/07/30
- [gnunet] 11/164: Fixed bug in perfomance forking, gnunet, 2021/07/30
- [gnunet] 21/164: Improved perfomance, gnunet, 2021/07/30
- [gnunet] 04/164: added thread lib to setu perf, gnunet, 2021/07/30
- [gnunet] 22/164: Added some more granuar facor increase, gnunet, 2021/07/30
- [gnunet] 37/164: Test to 500 elements, gnunet, 2021/07/30
- [gnunet] 28/164: Added heuristic to imporve size increasement of ibf in case of failure, gnunet, 2021/07/30
- [gnunet] 30/164: Limit increase to 1.5 ibf, gnunet, 2021/07/30
- [gnunet] 29/164: Wrong set, gnunet, 2021/07/30
- [gnunet] 36/164: Test to 50 elements, gnunet, 2021/07/30
- [gnunet] 31/164: Fixed a bug in implementation added if max size thresold instead of dont allow ibfs to get smaler,
gnunet <=
- [gnunet] 43/164: 5k element difference, gnunet, 2021/07/30
- [gnunet] 34/164: Make 5000 elements perftest for perftest, gnunet, 2021/07/30
- [gnunet] 39/164: Test to overlap 5000 elements, gnunet, 2021/07/30
- [gnunet] 41/164: Fixed compiler bug, gnunet, 2021/07/30
- [gnunet] 47/164: Extend plot, gnunet, 2021/07/30
- [gnunet] 57/164: Simulation, gnunet, 2021/07/30
- [gnunet] 42/164: Compare check, gnunet, 2021/07/30
- [gnunet] 60/164: Simulation, gnunet, 2021/07/30
- [gnunet] 70/164: Rewritten dynamic counter, gnunet, 2021/07/30
- [gnunet] 76/164: Final performance check, gnunet, 2021/07/30