aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-01-01 15:22:07 +0100
committerChristian Grothoff <christian@grothoff.org>2018-01-01 15:30:04 +0100
commit4b766fd267ca83a8faa4e22353d5942074d6f2b7 (patch)
tree8cd218b442028b2c68883667baef2658bccaa49f /src
parente34b18243af83e8d9ac8da6d96d5b395dae2ced5 (diff)
downloadgnunet-4b766fd267ca83a8faa4e22353d5942074d6f2b7.tar.gz
gnunet-4b766fd267ca83a8faa4e22353d5942074d6f2b7.zip
remove speed bumps
Diffstat (limited to 'src')
-rw-r--r--src/cadet/test_cadet.c16
-rw-r--r--src/core/gnunet-service-core_sessions.c18
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
@@ -58,6 +58,11 @@ struct CadetTestChannelWrapper
58#define SHORT_TIME GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 20) 58#define SHORT_TIME GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 20)
59 59
60/** 60/**
61 * How fast do we send messages?
62 */
63#define SEND_INTERVAL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 10)
64
65/**
61 * DIFFERENT TESTS TO RUN 66 * DIFFERENT TESTS TO RUN
62 */ 67 */
63#define SETUP 0 68#define SETUP 0
@@ -525,6 +530,7 @@ send_test_message (struct GNUNET_CADET_Channel *channel)
525 GNUNET_MQ_send (GNUNET_CADET_get_mq (channel), env); 530 GNUNET_MQ_send (GNUNET_CADET_get_mq (channel), env);
526} 531}
527 532
533
528/** 534/**
529 * Task to request a new data transmission in a SPEED test, without waiting 535 * Task to request a new data transmission in a SPEED test, without waiting
530 * for previous messages to be sent/arrrive. 536 * for previous messages to be sent/arrrive.
@@ -537,7 +543,9 @@ send_next_msg (void *cls)
537 struct GNUNET_CADET_Channel *channel; 543 struct GNUNET_CADET_Channel *channel;
538 544
539 send_next_msg_task = NULL; 545 send_next_msg_task = NULL;
540 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending next message: %d\n", data_sent); 546 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
547 "Sending next message: %d\n",
548 data_sent);
541 549
542 channel = GNUNET_YES == test_backwards ? incoming_ch : outgoing_ch; 550 channel = GNUNET_YES == test_backwards ? incoming_ch : outgoing_ch;
543 GNUNET_assert (NULL != channel); 551 GNUNET_assert (NULL != channel);
@@ -550,9 +558,9 @@ send_next_msg (void *cls)
550 "Scheduling message %d\n", 558 "Scheduling message %d\n",
551 data_sent + 1); 559 data_sent + 1);
552 send_next_msg_task = 560 send_next_msg_task =
553 GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_UNIT_SECONDS, 561 GNUNET_SCHEDULER_add_delayed (SEND_INTERVAL,
554 &send_next_msg, 562 &send_next_msg,
555 NULL); 563 NULL);
556 } 564 }
557} 565}
558 566
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
@@ -147,12 +147,6 @@ struct Session
147 struct GNUNET_TIME_Relative typemap_delay; 147 struct GNUNET_TIME_Relative typemap_delay;
148 148
149 /** 149 /**
150 * Is the neighbour queue empty and thus ready for us
151 * to transmit an encrypted message?
152 */
153 int ready_to_transmit;
154
155 /**
156 * Is this the first time we're sending the typemap? If so, 150 * Is this the first time we're sending the typemap? If so,
157 * we want to send it a bit faster the second time. 0 if 151 * we want to send it a bit faster the second time. 0 if
158 * we are sending for the first time, 1 if not. 152 * we are sending for the first time, 1 if not.
@@ -641,13 +635,7 @@ try_transmission (struct Session *session)
641 enum GNUNET_CORE_Priority maxpc; 635 enum GNUNET_CORE_Priority maxpc;
642 struct GSC_ClientActiveRequest *car; 636 struct GSC_ClientActiveRequest *car;
643 int excess; 637 int excess;
644 638
645 if (GNUNET_YES != session->ready_to_transmit)
646 {
647 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
648 "Not yet ready to transmit, not evaluating queue\n");
649 return;
650 }
651 msize = 0; 639 msize = 0;
652 min_deadline = GNUNET_TIME_UNIT_FOREVER_ABS; 640 min_deadline = GNUNET_TIME_UNIT_FOREVER_ABS;
653 /* if the peer has excess bandwidth, background traffic is allowed, 641 /* if the peer has excess bandwidth, background traffic is allowed,
@@ -888,10 +876,12 @@ GSC_SESSIONS_solicit (const struct GNUNET_PeerIdentity *pid)
888{ 876{
889 struct Session *session; 877 struct Session *session;
890 878
879 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
880 "Transport solicits for %s\n",
881 GNUNET_i2s (pid));
891 session = find_session (pid); 882 session = find_session (pid);
892 if (NULL == session) 883 if (NULL == session)
893 return; 884 return;
894 session->ready_to_transmit = GNUNET_YES;
895 try_transmission (session); 885 try_transmission (session);
896} 886}
897 887