[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r24320 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r24320 - gnunet/src/mesh |
Date: |
Mon, 15 Oct 2012 10:58:25 +0200 |
Author: bartpolot
Date: 2012-10-15 10:58:25 +0200 (Mon, 15 Oct 2012)
New Revision: 24320
Modified:
gnunet/src/mesh/gnunet-service-mesh.c
Log:
- fix bck testcase, fix crash on warning, add FIXME
Modified: gnunet/src/mesh/gnunet-service-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh.c 2012-10-14 20:05:31 UTC (rev
24319)
+++ gnunet/src/mesh/gnunet-service-mesh.c 2012-10-15 08:58:25 UTC (rev
24320)
@@ -3997,6 +3997,14 @@
* @brief Send BCK ACKs to clients to allow them more to_origin traffic
*
* Iterates over all clients and sends BCK ACKs to the ones that need it.
+ *
+ * FIXME fc: what happens if we have 2 clients but q_size is 1?
+ * - implement a size 1 buffer in each client_fc AND children_fc
+ * to hold at least 1 message per "child".
+ * problem: violates no buffer policy
+ * - ack 0 and make "children" poll for transmission slots
+ * problem: big overhead, extra latency even in low traffic
+ * settings
*
* @param t Tunnel on which to send the BCK ACKs.
*/
@@ -4008,7 +4016,7 @@
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Sending BCK ACK to clients\n");
- tunnel_delta = t->bck_ack - t->bck_pid;
+ tunnel_delta = t->bck_queue_max - t->bck_queue_n;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " tunnel delta: %u\n", tunnel_delta);
/* Find client whom to allow to send to origin (with lowest buffer space) */
@@ -5086,10 +5094,14 @@
if (NULL != n) {
if (*n >= *max)
{
- if (NULL == t->owner)
- GNUNET_break_op(0); // TODO: kill connection?
- else
- GNUNET_break(0);
+ struct MeshTransmissionDescriptor *td = cls;
+ struct GNUNET_MESH_ToOrigin *to;
+
+ to = td->mesh_data->data;
+ GNUNET_break(0);
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "bck pid %u, bck ack %u, msg pid %u\n",
+ t->bck_pid, t->bck_ack, ntohl(to->pid));
GNUNET_STATISTICS_update(stats, "# messages dropped (buffer full)",
1, GNUNET_NO);
return; // Drop message
@@ -5762,8 +5774,8 @@
GNUNET_STATISTICS_update (stats, "# data on unknown tunnel", 1, GNUNET_NO);
GNUNET_break_op (0);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Received PID %u, ACK %u\n",
- pid, t->bck_ack);
+ "Received to_origin with PID %u on unknown tunnel\n",
+ pid);
return GNUNET_OK;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r24320 - gnunet/src/mesh,
gnunet <=