aboutsummaryrefslogtreecommitdiff
path: root/src/ats/gnunet-service-ats_normalization.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2014-05-06 15:50:20 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2014-05-06 15:50:20 +0000
commit6e198fdbfa22da72fadcae22b8797af76696b78a (patch)
treec5f5ff123a8670df80a7a286879f7e710aefe843 /src/ats/gnunet-service-ats_normalization.c
parent4e1baae59f18ee5d7cd47afe28ced3daaaa5a5ad (diff)
downloadgnunet-6e198fdbfa22da72fadcae22b8797af76696b78a.tar.gz
gnunet-6e198fdbfa22da72fadcae22b8797af76696b78a.zip
- refine preference calculcations to reflect all clients
- refining bandwidth distribution in a network - adding a configurable factor to better respect preferences
Diffstat (limited to 'src/ats/gnunet-service-ats_normalization.c')
-rw-r--r--src/ats/gnunet-service-ats_normalization.c260
1 files changed, 150 insertions, 110 deletions
diff --git a/src/ats/gnunet-service-ats_normalization.c b/src/ats/gnunet-service-ats_normalization.c
index 3ecbabbf8..fd09a262f 100644
--- a/src/ats/gnunet-service-ats_normalization.c
+++ b/src/ats/gnunet-service-ats_normalization.c
@@ -53,11 +53,16 @@ struct PreferenceClient
53 void *client; 53 void *client;
54 54
55 /** 55 /**
56 * Total preference for this peer 56 * Array of sum of absolute preferences for this client
57 */ 57 */
58 double f_abs_sum[GNUNET_ATS_PreferenceCount]; 58 double f_abs_sum[GNUNET_ATS_PreferenceCount];
59 59
60 /** 60 /**
61 * Array of sum of relative preferences for this client
62 */
63 double f_rel_sum[GNUNET_ATS_PreferenceCount];
64
65 /**
61 * List of peer preferences for this client 66 * List of peer preferences for this client
62 */ 67 */
63 68
@@ -98,15 +103,18 @@ struct PreferencePeer
98 struct GNUNET_PeerIdentity id; 103 struct GNUNET_PeerIdentity id;
99 104
100 /** 105 /**
101 * Absolute preference values 106 * Absolute preference values for all preference types
102 */ 107 */
103 double f_abs[GNUNET_ATS_PreferenceCount]; 108 double f_abs[GNUNET_ATS_PreferenceCount];
104 109
105 /** 110 /**
106 * Relative preference values 111 * Relative preference values for all preference types
107 */ 112 */
108 double f_rel[GNUNET_ATS_PreferenceCount]; 113 double f_rel[GNUNET_ATS_PreferenceCount];
109 114
115 /**
116 * Absolute point of time of next aging process
117 */
110 struct GNUNET_TIME_Absolute next_aging[GNUNET_ATS_PreferenceCount]; 118 struct GNUNET_TIME_Absolute next_aging[GNUNET_ATS_PreferenceCount];
111}; 119};
112 120
@@ -127,6 +135,20 @@ struct PeerRelative
127}; 135};
128 136
129/** 137/**
138 * Quality Normalization
139 */
140struct Property
141{
142 uint32_t prop_type;
143 uint32_t atsi_type;
144 uint32_t min;
145 uint32_t max;
146};
147
148struct Property properties[GNUNET_ATS_QualityPropertiesCount];
149
150
151/**
130 * Callback to call on changing preference values 152 * Callback to call on changing preference values
131 */ 153 */
132static GAS_Normalization_preference_changed_cb pref_changed_cb; 154static GAS_Normalization_preference_changed_cb pref_changed_cb;
@@ -184,128 +206,110 @@ static GNUNET_SCHEDULER_TaskIdentifier aging_task;
184 * @param kind the kind 206 * @param kind the kind
185 * @return the new relative preference 207 * @return the new relative preference
186 */ 208 */
187static double 209static void
188update_peers (struct GNUNET_PeerIdentity *id, 210update_relative_values_for_peer (const struct GNUNET_PeerIdentity *id,
189 enum GNUNET_ATS_PreferenceKind kind) 211 enum GNUNET_ATS_PreferenceKind kind, struct PeerRelative *rp)
190{ 212{
191 struct PreferenceClient *c_cur; 213 struct PreferenceClient *c_cur;
192 struct PreferencePeer *p_cur; 214 struct PreferencePeer *p_cur;
193 struct PeerRelative *rp;
194 double f_rel_total; 215 double f_rel_total;
216 double f_rel_sum;
195 double backup; 217 double backup;
196 unsigned int count; 218 unsigned int peer_count;
197 219
220 f_rel_sum = 0.0;
198 f_rel_total = 0.0; 221 f_rel_total = 0.0;
199 count = 0; 222 peer_count = 0;
200 223
201 /* For all clients */ 224 /* For all clients */
202 for (c_cur = pc_head; NULL != c_cur; c_cur = c_cur->next) 225 for (c_cur = pc_head; NULL != c_cur; c_cur = c_cur->next)
203 { 226 {
204 /* Find peer with id */ 227 /* For peer entries with this id */
205 for (p_cur = c_cur->p_head; NULL != p_cur; p_cur = p_cur->next) 228 for (p_cur = c_cur->p_head; NULL != p_cur; p_cur = p_cur->next)
206 { 229 {
230 f_rel_sum += p_cur->f_rel[kind];
207 if (0 == memcmp (id, &p_cur->id, sizeof(struct GNUNET_PeerIdentity))) 231 if (0 == memcmp (id, &p_cur->id, sizeof(struct GNUNET_PeerIdentity)))
208 break; 232 {
209 } 233 peer_count ++;
210 if (NULL != p_cur) 234 f_rel_total += p_cur->f_rel[kind];
211 { 235 }
212 /* Found peer with id */ 236
213 f_rel_total += p_cur->f_rel[kind];
214 count++;
215 } 237 }
216 } 238 }
217 239
218 /* Find a client */ 240 LOG (GNUNET_ERROR_TYPE_DEBUG,
219 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 241 "%u clients have a total relative preference for peer `%s' `%s' of %.3f and for %s in total %.3f\n",
220 "%u clients have a total relative preference for peer `%s''s `%s' of %.3f\n", 242 peer_count, GNUNET_i2s (id),
221 count, GNUNET_i2s (id), GNUNET_ATS_print_preference_type (kind), 243 GNUNET_ATS_print_preference_type (kind),
222 f_rel_total); 244 f_rel_total,
223 if (NULL != (rp = GNUNET_CONTAINER_multipeermap_get (preference_peers, id))) 245 GNUNET_ATS_print_preference_type (kind),
246 f_rel_sum);
247
248 /* Find entry for the peer containing relative values in the hashmap */
249 if (NULL != rp)
224 { 250 {
225 backup = rp->f_rel[kind]; 251 backup = rp->f_rel[kind];
226 if (0 < count) 252 if (f_rel_sum > 0)
227 { 253 rp->f_rel[kind] = f_rel_total / f_rel_sum;
228 rp->f_rel[kind] = f_rel_total / count;
229 }
230 else 254 else
231 { 255 {
256 /* No client had any preferences for this type and any peer */
232 rp->f_rel[kind] = DEFAULT_REL_PREFERENCE; 257 rp->f_rel[kind] = DEFAULT_REL_PREFERENCE;
233 } 258 }
234 } 259 }
235 else
236 {
237 return DEFAULT_REL_PREFERENCE;
238 }
239 260
240 if ((backup != rp->f_rel[kind]) && (NULL != pref_changed_cb)) 261 if ((backup != rp->f_rel[kind]) && (NULL != pref_changed_cb))
241 { 262 {
242 pref_changed_cb (pref_changed_cb_cls, &rp->id, kind, rp->f_rel[kind]); 263 pref_changed_cb (pref_changed_cb_cls, &rp->id, kind, rp->f_rel[kind]);
243 } 264 }
244
245 return rp->f_rel[kind];
246} 265}
247 266
248/** 267/**
249 * Recalculate preference for a specific ATS property 268 * Recalculate preference for a specific ATS property
250 * 269 *
251 * @param c the preference client 270 * @param c the preference client
252 * @param p the peer
253 * @param kind the preference kind 271 * @param kind the preference kind
254 * @return the result 272 * @return the result
255 */ 273 */
256static double 274static void
257recalculate_rel_preferences (struct PreferenceClient *c, 275recalculate_relative_preferences (struct PreferenceClient *c, enum GNUNET_ATS_PreferenceKind kind)
258 struct PreferencePeer *p, enum GNUNET_ATS_PreferenceKind kind)
259{ 276{
260 struct PreferencePeer *p_cur; 277 struct PreferencePeer *p_cur;
261 struct PeerRelative *rp;
262 double backup;
263 double res;
264 double ret;
265 278
266 /* For this client: sum preferences to total preference */ 279 /* For this client: sum of absolute preference values for this preference */
267 c->f_abs_sum[kind] = 0; 280 c->f_abs_sum[kind] = 0.0;
281 /* For this client: sum of relative preference values for this preference
282 *
283 * Note: this value should also be 1.0, but:
284 * if no preferences exist due to aging, this value can be 0.0
285 * and the client can be removed */
286 c->f_rel_sum[kind] = 0.0;
287
268 for (p_cur = c->p_head; NULL != p_cur; p_cur = p_cur->next) 288 for (p_cur = c->p_head; NULL != p_cur; p_cur = p_cur->next)
269 c->f_abs_sum[kind] += p_cur->f_abs[kind]; 289 c->f_abs_sum[kind] += p_cur->f_abs[kind];
270 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 290 LOG (GNUNET_ERROR_TYPE_DEBUG,
271 "Client %p has total preference for %s of %.3f\n", c->client, 291 "Client %p has sum of total preferences for %s of %.3f\n",
272 GNUNET_ATS_print_preference_type (kind), c->f_abs_sum[kind]); 292 c->client, GNUNET_ATS_print_preference_type (kind), c->f_abs_sum[kind]);
273 293
274 ret = DEFAULT_REL_PREFERENCE;
275 /* For all peers: calculate relative preference */ 294 /* For all peers: calculate relative preference */
276 for (p_cur = c->p_head; NULL != p_cur; p_cur = p_cur->next) 295 for (p_cur = c->p_head; NULL != p_cur; p_cur = p_cur->next)
277 { 296 {
278 /* Calculate relative preference for specific kind */ 297 /* Calculate relative preference for specific kind */
279 backup = p_cur->f_rel[kind];
280 if (DEFAULT_ABS_PREFERENCE == c->f_abs_sum[kind])
281 /* No peer has a preference for this property,
282 * so set default preference */
283 p_cur->f_rel[kind] = DEFAULT_REL_PREFERENCE;
284 else
285 p_cur->f_rel[kind] = (c->f_abs_sum[kind] + p_cur->f_abs[kind])
286 / c->f_abs_sum[kind];
287 298
288 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 299 /* Every application has a preference for each peer between
289 "Client %p: peer `%s' has relative preference for %s of %.3f\n", 300 * [0 .. 1] in relative values
290 c->client, GNUNET_i2s (&p_cur->id), 301 * and [0 .. inf] in absolute values */
291 GNUNET_ATS_print_preference_type (kind), p_cur->f_rel[kind]); 302 p_cur->f_rel[kind] = p_cur->f_abs[kind] / c->f_abs_sum[kind];
303 c->f_rel_sum[kind] += p_cur->f_rel[kind];
292 304
293 if (p_cur->f_rel[kind] != backup) 305 LOG (GNUNET_ERROR_TYPE_DEBUG,
294 { 306 "Client %p has relative preference for %s for peer `%s' of %.3f\n",
295 /* Value changed, recalculate */ 307 c->client,
296 res = update_peers (&p_cur->id, kind); 308 GNUNET_ATS_print_preference_type (kind),
297 if (0 == memcmp (&p->id, &p_cur->id, sizeof(struct GNUNET_PeerIdentity))) 309 GNUNET_i2s (&p_cur->id),
298 ret = res; 310 p_cur->f_rel[kind]);
299 }
300 else
301 {
302 /* Value did not chang, return old value*/
303 GNUNET_assert(
304 NULL != (rp = GNUNET_CONTAINER_multipeermap_get (preference_peers, &p->id)));
305 ret = rp->f_rel[kind];
306 }
307 } 311 }
308 return ret; 312
309} 313}
310 314
311/** 315/**
@@ -316,8 +320,8 @@ recalculate_rel_preferences (struct PreferenceClient *c,
316 * @param score_abs the absolute value 320 * @param score_abs the absolute value
317 * @return the new relative preference value 321 * @return the new relative preference value
318 */ 322 */
319static double 323static void
320update_preference (struct PreferenceClient *c, struct PreferencePeer *p, 324update_abs_preference (struct PreferenceClient *c, struct PreferencePeer *p,
321 enum GNUNET_ATS_PreferenceKind kind, float score_abs) 325 enum GNUNET_ATS_PreferenceKind kind, float score_abs)
322{ 326{
323 double score = score_abs; 327 double score = score_abs;
@@ -327,7 +331,8 @@ update_preference (struct PreferenceClient *c, struct PreferencePeer *p,
327 { 331 {
328 case GNUNET_ATS_PREFERENCE_BANDWIDTH: 332 case GNUNET_ATS_PREFERENCE_BANDWIDTH:
329 case GNUNET_ATS_PREFERENCE_LATENCY: 333 case GNUNET_ATS_PREFERENCE_LATENCY:
330 p->f_abs[kind] = (p->f_abs[kind] + score) / 2; 334 p->f_abs[kind] = score;
335 /* p->f_abs[kind] = (p->f_abs[kind] + score) / 2; */
331 p->next_aging[kind] = GNUNET_TIME_absolute_add (GNUNET_TIME_absolute_get (), 336 p->next_aging[kind] = GNUNET_TIME_absolute_add (GNUNET_TIME_absolute_get (),
332 PREF_AGING_INTERVAL); 337 PREF_AGING_INTERVAL);
333 break; 338 break;
@@ -336,7 +341,32 @@ update_preference (struct PreferenceClient *c, struct PreferencePeer *p,
336 default: 341 default:
337 break; 342 break;
338 } 343 }
339 return recalculate_rel_preferences (c, p, kind); 344}
345
346static int update_iterator (void *cls,
347 const struct GNUNET_PeerIdentity *key,
348 void *value)
349{
350 enum GNUNET_ATS_PreferenceKind *kind = cls;
351 update_relative_values_for_peer (key, (*kind), (struct PeerRelative *) value);
352 return GNUNET_OK;
353}
354
355static void
356run_preference_update (struct PreferenceClient *c_cur,
357 struct PreferencePeer *p_cur,enum GNUNET_ATS_PreferenceKind kind,
358 float score_abs)
359{
360 double old_value;
361
362 /* Update relative value */
363 old_value = p_cur->f_rel[kind];
364 recalculate_relative_preferences (c_cur, kind);
365 if (p_cur->f_rel[kind] == old_value)
366 return;
367
368 /* Relative preference value changed, recalculate for all peers */
369 GNUNET_CONTAINER_multipeermap_iterate (preference_peers, &update_iterator, &kind);
340} 370}
341 371
342/** 372/**
@@ -373,15 +403,19 @@ preference_aging (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
373 backup = p->f_abs[i]; 403 backup = p->f_abs[i];
374 if (p->f_abs[i] > DEFAULT_ABS_PREFERENCE) 404 if (p->f_abs[i] > DEFAULT_ABS_PREFERENCE)
375 p->f_abs[i] *= PREF_AGING_FACTOR; 405 p->f_abs[i] *= PREF_AGING_FACTOR;
406
376 if (p->f_abs[i] <= DEFAULT_ABS_PREFERENCE + PREF_EPSILON) 407 if (p->f_abs[i] <= DEFAULT_ABS_PREFERENCE + PREF_EPSILON)
377 p->f_abs[i] = DEFAULT_ABS_PREFERENCE; 408 p->f_abs[i] = DEFAULT_ABS_PREFERENCE;
378 if ((p->f_abs[i] != DEFAULT_ABS_PREFERENCE) 409
379 && (backup != p->f_abs[i])) 410 if ( (p->f_abs[i] != DEFAULT_ABS_PREFERENCE) &&
411 (backup != p->f_abs[i]) )
380 { 412 {
381 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 413 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
382 "Aged preference for peer `%s' from %.3f to %.3f\n", 414 "Aged preference for peer `%s' from %.3f to %.3f\n",
383 GNUNET_i2s (&p->id), backup, p->f_abs[i]); 415 GNUNET_i2s (&p->id), backup, p->f_abs[i]);
384 recalculate_rel_preferences (p->client, p, i); 416
417 run_preference_update(cur_client, p, i, p->f_abs[i]);
418
385 p->next_aging[i] = GNUNET_TIME_absolute_add ( 419 p->next_aging[i] = GNUNET_TIME_absolute_add (
386 GNUNET_TIME_absolute_get (), PREF_AGING_INTERVAL); 420 GNUNET_TIME_absolute_get (), PREF_AGING_INTERVAL);
387 values_to_update++; 421 values_to_update++;
@@ -408,27 +442,31 @@ preference_aging (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
408/** 442/**
409 * Normalize an updated preference value 443 * Normalize an updated preference value
410 * 444 *
411 * @param src the client with this preference 445 * @param client the client with this preference
412 * @param peer the peer to change the preference for 446 * @param peer the peer to change the preference for
413 * @param kind the kind to change the preference 447 * @param kind the kind to change the preference
414 * @param score_abs the normalized score 448 * @param score_abs the normalized score
415 */ 449 */
416void 450void
417GAS_normalization_normalize_preference (void *src, 451GAS_normalization_normalize_preference (void *client,
418 const struct GNUNET_PeerIdentity *peer, enum GNUNET_ATS_PreferenceKind kind, 452 const struct GNUNET_PeerIdentity *peer, enum GNUNET_ATS_PreferenceKind kind,
419 float score_abs) 453 float score_abs)
420{ 454{
421 struct PreferenceClient *c_cur; 455 struct PreferenceClient *c_cur;
422 struct PreferencePeer *p_cur; 456 struct PreferencePeer *p_cur;
423 struct PeerRelative *r_cur; 457 struct PeerRelative *r_cur;
458 double old_value;
424 int i; 459 int i;
425 460
426 GNUNET_assert(NULL != src); 461 GNUNET_assert(NULL != client);
427 GNUNET_assert(NULL != peer); 462 GNUNET_assert(NULL != peer);
428 463
429 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 464 LOG (GNUNET_ERROR_TYPE_DEBUG,
430 "Client %p changes preference for peer `%s' for `%s' to %.2f\n", src, 465 "Client %p changes preference for peer `%s' for `%s' to %.2f\n",
431 GNUNET_i2s (peer), GNUNET_ATS_print_preference_type (kind), score_abs); 466 client,
467 GNUNET_i2s (peer),
468 GNUNET_ATS_print_preference_type (kind),
469 score_abs);
432 470
433 if (kind >= GNUNET_ATS_PreferenceCount) 471 if (kind >= GNUNET_ATS_PreferenceCount)
434 { 472 {
@@ -439,16 +477,22 @@ GAS_normalization_normalize_preference (void *src,
439 /* Find preference client */ 477 /* Find preference client */
440 for (c_cur = pc_head; NULL != c_cur; c_cur = c_cur->next) 478 for (c_cur = pc_head; NULL != c_cur; c_cur = c_cur->next)
441 { 479 {
442 if (src == c_cur->client) 480 if (client == c_cur->client)
443 break; 481 break;
444 } 482 }
445 /* Not found: create new preference client */ 483 /* Not found: create new preference client */
446 if (NULL == c_cur) 484 if (NULL == c_cur)
447 { 485 {
448 c_cur = GNUNET_new (struct PreferenceClient); 486 c_cur = GNUNET_new (struct PreferenceClient);
449 c_cur->client = src; 487 c_cur->client = client;
488 for (i = 0; i < GNUNET_ATS_PreferenceCount; i++)
489 {
490 c_cur->f_abs_sum[i] = DEFAULT_ABS_PREFERENCE;
491 c_cur->f_rel_sum[i] = DEFAULT_REL_PREFERENCE;
492 }
493
450 GNUNET_CONTAINER_DLL_insert(pc_head, pc_tail, c_cur); 494 GNUNET_CONTAINER_DLL_insert(pc_head, pc_tail, c_cur);
451 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Adding new client %p \n", c_cur); 495 LOG (GNUNET_ERROR_TYPE_DEBUG, "Adding new client %p \n", c_cur);
452 } 496 }
453 497
454 /* Find entry for peer */ 498 /* Find entry for peer */
@@ -464,32 +508,42 @@ GAS_normalization_normalize_preference (void *src,
464 p_cur->id = (*peer); 508 p_cur->id = (*peer);
465 for (i = 0; i < GNUNET_ATS_PreferenceCount; i++) 509 for (i = 0; i < GNUNET_ATS_PreferenceCount; i++)
466 { 510 {
467 /* Default value per peer absolut preference for a quality: 511 /* Default value per peer absolute preference for a preference: 0 */
468 * No value set, so absolute preference 0 */
469 p_cur->f_abs[i] = DEFAULT_ABS_PREFERENCE; 512 p_cur->f_abs[i] = DEFAULT_ABS_PREFERENCE;
470 /* Default value per peer relative preference for a quality: 1.0 */ 513 /* Default value per peer relative preference for a quality: 1.0 */
471 p_cur->f_rel[i] = DEFAULT_REL_PREFERENCE; 514 p_cur->f_rel[i] = DEFAULT_REL_PREFERENCE;
472 p_cur->next_aging[i] = GNUNET_TIME_UNIT_FOREVER_ABS; 515 p_cur->next_aging[i] = GNUNET_TIME_UNIT_FOREVER_ABS;
473 } 516 }
517 LOG (GNUNET_ERROR_TYPE_DEBUG, "Adding new peer %p for client %p \n",
518 p_cur, c_cur);
474 GNUNET_CONTAINER_DLL_insert(c_cur->p_head, c_cur->p_tail, p_cur); 519 GNUNET_CONTAINER_DLL_insert(c_cur->p_head, c_cur->p_tail, p_cur);
475 } 520 }
476 521
522 /* Create struct for peer */
477 if (NULL == GNUNET_CONTAINER_multipeermap_get (preference_peers, peer)) 523 if (NULL == GNUNET_CONTAINER_multipeermap_get (preference_peers, peer))
478 { 524 {
479 r_cur = GNUNET_new (struct PeerRelative); 525 r_cur = GNUNET_new (struct PeerRelative);
480 r_cur->id = (*peer); 526 r_cur->id = (*peer);
481 for (i = 0; i < GNUNET_ATS_PreferenceCount; i++) 527 for (i = 0; i < GNUNET_ATS_PreferenceCount; i++)
482 r_cur->f_rel[i] = DEFAULT_REL_PREFERENCE; 528 r_cur->f_rel[i] = DEFAULT_REL_PREFERENCE;
483 GNUNET_assert (GNUNET_OK == 529 GNUNET_assert(
484 GNUNET_CONTAINER_multipeermap_put (preference_peers, &r_cur->id, r_cur, 530 GNUNET_OK == GNUNET_CONTAINER_multipeermap_put (preference_peers,
485 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)); 531 &r_cur->id, r_cur, GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
486 } 532 }
487 533
534 /* Update absolute value */
535 old_value = p_cur->f_abs[kind];
536 update_abs_preference (c_cur, p_cur, kind, score_abs);
537 if (p_cur->f_abs[kind] == old_value)
538 return;
539
540 run_preference_update (c_cur, p_cur, kind, score_abs);
541
542 /* Start aging task */
488 if (GNUNET_SCHEDULER_NO_TASK == aging_task) 543 if (GNUNET_SCHEDULER_NO_TASK == aging_task)
489 aging_task = GNUNET_SCHEDULER_add_delayed (PREF_AGING_INTERVAL, 544 aging_task = GNUNET_SCHEDULER_add_delayed (PREF_AGING_INTERVAL,
490 &preference_aging, NULL ); 545 &preference_aging, NULL );
491 546
492 update_preference (c_cur, p_cur, kind, score_abs);
493} 547}
494 548
495/** 549/**
@@ -576,20 +630,6 @@ GAS_normalization_get_properties (struct ATS_Address *address)
576 return norm_values; 630 return norm_values;
577} 631}
578 632
579
580/**
581 * Quality Normalization
582 */
583struct Property
584{
585 uint32_t prop_type;
586 uint32_t atsi_type;
587 uint32_t min;
588 uint32_t max;
589};
590
591struct Property properties[GNUNET_ATS_QualityPropertiesCount];
592
593/** 633/**
594 * Normalize a specific ATS type with the values in queue 634 * Normalize a specific ATS type with the values in queue
595 * @param address the address 635 * @param address the address