[Olsr-users] LinkQualityMult

Krzysztof Szuster (spam-protected)
Thu Apr 9 15:13:12 CEST 2009


On Thursday 09 of April 2009 11:10:08 (spam-protected) wrote:

> unfortunetley in 0.5.6 there were some bugs introduced, which made it hard
> using it,..
> 
> mostly the interface sections started to overwirte other interface
> sections,.
> this means you have to specify your (host specific) lqmults in every
> interface section of the olsrd.config to make them work,..
> 
> (to get default-lqmults working is even worse i guess)
> 
> this should be already fixed in tip-tip again, but probably not in
> 0.5.6-r4,..
I patched the lq-mult code to work properly, as I needed it too. My testbed uses single radio interface and so far the patch is sufficient.

diff -ruN orig/src/link_set.c nowy/src/link_set.c
--- orig/src/link_set.c	2009-03-26 18:13:23.000000000 +0100
+++ nowy/src/link_set.c	2009-03-31 09:46:05.000000000 +0200
@@ -284,7 +284,7 @@
   struct interface *inter;
   struct olsr_if *cfg_inter;
   struct olsr_lq_mult *mult;
-  uint32_t val = 0;
+  uint32_t val = LINK_LOSS_MULTIPLIER;
   union olsr_ip_addr null_addr;

   /* find the interface for the link */
@@ -307,14 +307,13 @@
      * use the default multiplier only if there isn't any entry that
      * has a matching IP address.
      */
-    if ((ipequal(&mult->addr, &null_addr) && val < 0.0) || ipequal(&mult->addr, &entry->neighbor_iface_addr)) {
-      val = mult->value;
-    }
-  }
-
-  /* if we have not found an entry, then use the default multiplier */
-  if (val == 0) {
-    val = LINK_LOSS_MULTIPLIER;
+    if (ipequal(&mult->addr, &null_addr))  //  default
+	val = mult->value;
+    else
+	if (ipequal(&mult->addr, &entry->neighbor_iface_addr)) {  //  exect match
+	    val = mult->value;
+	    break;
+	}
   }

   /* store the multiplier */

> 
> but also take care of not lqmulting too low, as new olsr versions stop
> using/announcing there links it the lq goes under 0.1
> 
> Markus
>
I had to modify that threshold from 0.1 to 0.001 in my project. My radio device supports variable transfer rates and I wanted to include the link rate intu LQ calculation. Since the link rate varies in range 1...30, my LQ range is also much greater than 10. This is the reason,why I need to use very low LQ's. I hope this won't affect the topology stability.

Krzysztof




More information about the Olsr-users mailing list