From 4b766fd267ca83a8faa4e22353d5942074d6f2b7 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 1 Jan 2018 15:22:07 +0100 Subject: [PATCH] remove speed bumps --- src/cadet/test_cadet.c | 16 ++++++++++++---- src/core/gnunet-service-core_sessions.c | 18 ++++-------------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/src/cadet/test_cadet.c b/src/cadet/test_cadet.c index 6691a0573..bc4414054 100644 --- a/src/cadet/test_cadet.c +++ b/src/cadet/test_cadet.c @@ -57,6 +57,11 @@ struct CadetTestChannelWrapper */ #define SHORT_TIME GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 20) +/** + * How fast do we send messages? + */ +#define SEND_INTERVAL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 10) + /** * DIFFERENT TESTS TO RUN */ @@ -525,6 +530,7 @@ send_test_message (struct GNUNET_CADET_Channel *channel) GNUNET_MQ_send (GNUNET_CADET_get_mq (channel), env); } + /** * Task to request a new data transmission in a SPEED test, without waiting * for previous messages to be sent/arrrive. @@ -537,7 +543,9 @@ send_next_msg (void *cls) struct GNUNET_CADET_Channel *channel; send_next_msg_task = NULL; - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending next message: %d\n", data_sent); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Sending next message: %d\n", + data_sent); channel = GNUNET_YES == test_backwards ? incoming_ch : outgoing_ch; GNUNET_assert (NULL != channel); @@ -550,9 +558,9 @@ send_next_msg (void *cls) "Scheduling message %d\n", data_sent + 1); send_next_msg_task = - GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_UNIT_SECONDS, - &send_next_msg, - NULL); + GNUNET_SCHEDULER_add_delayed (SEND_INTERVAL, + &send_next_msg, + NULL); } } diff --git a/src/core/gnunet-service-core_sessions.c b/src/core/gnunet-service-core_sessions.c index 5d34b7c26..973ef9c2f 100644 --- a/src/core/gnunet-service-core_sessions.c +++ b/src/core/gnunet-service-core_sessions.c @@ -146,12 +146,6 @@ struct Session */ struct GNUNET_TIME_Relative typemap_delay; - /** - * Is the neighbour queue empty and thus ready for us - * to transmit an encrypted message? - */ - int ready_to_transmit; - /** * Is this the first time we're sending the typemap? If so, * we want to send it a bit faster the second time. 0 if @@ -641,13 +635,7 @@ try_transmission (struct Session *session) enum GNUNET_CORE_Priority maxpc; struct GSC_ClientActiveRequest *car; int excess; - - if (GNUNET_YES != session->ready_to_transmit) - { - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Not yet ready to transmit, not evaluating queue\n"); - return; - } + msize = 0; min_deadline = GNUNET_TIME_UNIT_FOREVER_ABS; /* if the peer has excess bandwidth, background traffic is allowed, @@ -888,10 +876,12 @@ GSC_SESSIONS_solicit (const struct GNUNET_PeerIdentity *pid) { struct Session *session; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Transport solicits for %s\n", + GNUNET_i2s (pid)); session = find_session (pid); if (NULL == session) return; - session->ready_to_transmit = GNUNET_YES; try_transmission (session); } -- 2.25.1