diff options
author | bartpolot <bartpolot@140774ce-b5e7-0310-ab8b-a85725594a96> | 2012-10-15 08:58:25 +0000 |
---|---|---|
committer | bartpolot <bartpolot@140774ce-b5e7-0310-ab8b-a85725594a96> | 2012-10-15 08:58:25 +0000 |
commit | 7bd863c9808a9787cebf4b4fdc68d98669ee0ade (patch) | |
tree | 1c9d06aa947a6a316d1f36730ca6ef56cca881bf /src/mesh/gnunet-service-mesh.c | |
parent | 590077230733ea5984f82839ef342b4352457b93 (diff) |
- fix bck testcase, fix crash on warning, add FIXME
git-svn-id: https://gnunet.org/svn/gnunet@24320 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/mesh/gnunet-service-mesh.c')
-rw-r--r-- | src/mesh/gnunet-service-mesh.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index c58a25d230..9ccf89a929 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c @@ -3997,6 +3997,14 @@ tunnel_send_child_bck_ack (void *cls, * @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 @@ tunnel_send_clients_bck_ack (struct MeshTunnel *t) 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 @@ queue_add (void *cls, uint16_t type, size_t size, 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 @@ handle_mesh_data_to_orig (void *cls, const struct GNUNET_PeerIdentity *peer, 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; } |