[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] 07/18: TNG: Introduced frags_in_flight flag. With this flag we
From: |
gnunet |
Subject: |
[gnunet] 07/18: TNG: Introduced frags_in_flight flag. With this flag we check if fragments of a PendingMessage are being send right now, to not resend single fragments, but the PendingMessage at once. |
Date: |
Tue, 02 May 2023 12:53:22 +0200 |
This is an automated email from the git hooks/post-receive script.
t3sserakt pushed a commit to branch master
in repository gnunet.
commit 1c95729d2d62f8bd151db2f78d5166a5aec14539
Author: t3sserakt <t3ss@posteo.de>
AuthorDate: Thu Apr 27 17:36:27 2023 +0200
TNG: Introduced frags_in_flight flag. With this flag we check if fragments
of a PendingMessage are being send right now, to not resend single fragments,
but the PendingMessage at once.
---
src/transport/gnunet-service-tng.c | 39 +++++++++++++++++++++++++++++---------
1 file changed, 30 insertions(+), 9 deletions(-)
diff --git a/src/transport/gnunet-service-tng.c
b/src/transport/gnunet-service-tng.c
index e7acd49f5..6b835a209 100644
--- a/src/transport/gnunet-service-tng.c
+++ b/src/transport/gnunet-service-tng.c
@@ -2281,6 +2281,10 @@ struct PendingMessage
*/
uint16_t frag_off;
+ /**
+ * Are we sending fragments at the moment?
+ */
+ unsigned int frags_in_flight;
/**
* #GNUNET_YES once @e msg_uuid was initialized
*/
@@ -9626,6 +9630,11 @@ struct PendingMessageScoreContext
*/
int to_early;
+ /**
+ * There is a pending messages we are sending fragments at the moment.
+ */
+ unsigned int frags_in_flight;
+
/**
* When will we try to transmit the message again for which it was to early
to retry.
*/
@@ -9654,6 +9663,8 @@ select_best_pending_from_link (struct
PendingMessageScoreContext *sc,
struct GNUNET_TIME_Absolute now;
now = GNUNET_TIME_absolute_get ();
+ sc->to_early = GNUNET_NO;
+ sc->frags_in_flight = GNUNET_NO;
for (struct PendingMessage *pos = vl->pending_msg_head; NULL != pos;
pos = pos->next_vl)
{
@@ -9669,15 +9680,25 @@ select_best_pending_from_link (struct
PendingMessageScoreContext *sc,
}
if (pos->next_attempt.abs_value_us > now.abs_value_us)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "too early for all messages, they are sorted by
next_attempt\n");
- sc->to_early = GNUNET_YES;
- sc->to_early_retry_delay = GNUNET_TIME_absolute_get_remaining (
- pos->next_attempt);
-
- break; /* too early for all messages, they are sorted by next_attempt
*/
+ if (GNUNET_YES == pos->frags_in_flight)
+ {
+ sc->frags_in_flight = GNUNET_YES;
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Fragments in flight for message %llu\n",
+ pos->logging_uuid);
+ }
+ else
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Maybe too early, because message are sorted by
next_attempt, if there are no fragments in flight.Checked message %llu\n",
+ pos->logging_uuid);
+ sc->to_early = GNUNET_YES;
+ sc->to_early_retry_delay = GNUNET_TIME_absolute_get_remaining (
+ pos->next_attempt);
+ continue;
+ }
+ // break; /* too early for all messages, they are sorted by
next_attempt */
}
- sc->to_early = GNUNET_NO;
if (NULL != pos->qe)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -9741,7 +9762,7 @@ select_best_pending_from_link (struct
PendingMessageScoreContext *sc,
/* Finally, compare to existing 'best' in sc to see if this 'pos' pending
message would beat it! */
- if (NULL != sc->best)
+ if (GNUNET_NO == sc->frags_in_flight && NULL != sc->best)
{
/* CHECK if pos fits queue BETTER (=smaller) than pm, if not: continue;
OPTIMIZE-ME: This is a heuristic, which so far has NOT been
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet] 01/18: TNG: Fixed several bugs in QueueEntry handling and acknowledgment., (continued)
- [gnunet] 01/18: TNG: Fixed several bugs in QueueEntry handling and acknowledgment., gnunet, 2023/05/02
- [gnunet] 03/18: TNG: Fixed formating., gnunet, 2023/05/02
- [gnunet] 04/18: TNG: Removed misplaced sending of an acknowlegement in udp communicator., gnunet, 2023/05/02
- [gnunet] 06/18: TNG: Do not update queue performance if PendingMessage was resend., gnunet, 2023/05/02
- [gnunet] 05/18: TNG: Changed test case to except 0.5% packet loss., gnunet, 2023/05/02
- [gnunet] 11/18: TNG: Fixed bug in calculation of delay for PendingAcknowledgement., gnunet, 2023/05/02
- [gnunet] 10/18: TNG: Fixed bug when checking, if fragment sub tree is done., gnunet, 2023/05/02
- [gnunet] 12/18: TNG: ValidationState now contains the addres prefix of the address being validated, because we have to check which communicator gave us the validation response., gnunet, 2023/05/02
- [gnunet] 15/18: TNG: Fixed bug that additional queues for the same communicator inherit the validity period., gnunet, 2023/05/02
- [gnunet] 09/18: TNG: GNUNET_SERVICE_client_continue was misplaced blocking the service., gnunet, 2023/05/02
- [gnunet] 07/18: TNG: Introduced frags_in_flight flag. With this flag we check if fragments of a PendingMessage are being send right now, to not resend single fragments, but the PendingMessage at once.,
gnunet <=
- [gnunet] 13/18: TNG: Handling flow control takes used window size into account, together with data loss., gnunet, 2023/05/02
- [gnunet] 14/18: TNG: Fixed bug in calculation of subtree fragment message size., gnunet, 2023/05/02
- [gnunet] 16/18: TNG: Fixed misplaced increase of queue length., gnunet, 2023/05/02
- [gnunet] 17/18: TNG: Fixed logic bug in search for QueueEntry after receiving SendMessageToAck., gnunet, 2023/05/02
- [gnunet] 18/18: TNG: Change config of performance test case to used TCP and UDP together., gnunet, 2023/05/02
- [gnunet] 08/18: TNG: The time to wait for resending a PendingMessage - which was fragmented - is calculated, depending on the number of fragments present, and how much of the PendingMessage was already fragmented., gnunet, 2023/05/02