[Olsr-cvs] olsrd-current/src link_set.c, 1.61, 1.62 olsr.c, 1.46, 1.47 olsr_cfg.h, 1.26, 1.27 process_package.c, 1.34, 1.35 scheduler.c, 1.31, 1.32 tc_set.c, 1.22, 1.23

Thomas Lopatic (spam-protected)
Thu Nov 17 05:25:46 CET 2005


Update of /cvsroot/olsrd/olsrd-current/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26679/src

Modified Files:
	link_set.c olsr.c olsr_cfg.h process_package.c scheduler.c 
	tc_set.c 
Log Message:
Added experimental LinkQualityDijkstraLimit option, which prevents
LQ TCs from nodes more than x1 hops away from us to trigger routing table
recalculation using Dijkstra. Instead integrate these changes into the
routing table every x2 seconds. This is to reduce CPU load. Triggering
Dijkstra too often uses up a lot of CPU cycles.


Index: olsr_cfg.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/olsr_cfg.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** olsr_cfg.h	17 Nov 2005 01:58:52 -0000	1.26
--- olsr_cfg.h	17 Nov 2005 04:25:44 -0000	1.27
***************
*** 56,59 ****
--- 56,61 ----
  #define DEF_LQ_LEVEL        0
  #define DEF_LQ_FISH         0
+ #define DEF_LQ_DIJK_LIMIT   255
+ #define DEF_LQ_DIJK_INTER   0.0
  #define DEF_LQ_WSIZE        10
  #define DEF_CLEAR_SCREEN    OLSR_FALSE
***************
*** 209,212 ****
--- 211,216 ----
    olsr_u32_t               lq_wsize;
    olsr_u8_t                lq_fish;
+   olsr_u8_t                lq_dlimit;
+   float                    lq_dinter;
    struct plugin_entry      *plugins;
    struct hna4_entry        *hna4_entries;

Index: process_package.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/process_package.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** process_package.c	11 Apr 2005 18:43:40 -0000	1.34
--- process_package.c	17 Nov 2005 04:25:44 -0000	1.35
***************
*** 129,134 ****
            link->saved_neigh_link_quality = link->neigh_link_quality;
  
!           changes_neighborhood = OLSR_TRUE;
!           changes_topology = OLSR_TRUE;
  
            // create a new ANSN
--- 129,140 ----
            link->saved_neigh_link_quality = link->neigh_link_quality;
  
!           if (olsr_cnf->lq_dlimit > 0)
!           {
!             changes_neighborhood = OLSR_TRUE;
!             changes_topology = OLSR_TRUE;
!           }
! 
!           else
!             OLSR_PRINTF(3, "Skipping Dijkstra (2)\n")
  
            // create a new ANSN
***************
*** 646,651 ****
                              walker->path_link_quality;
  
!                           changes_neighborhood = OLSR_TRUE;
!                           changes_topology = OLSR_TRUE;
                          }
                      }
--- 652,663 ----
                              walker->path_link_quality;
  
!                           if (olsr_cnf->lq_dlimit > 0)
!                           {
!                             changes_neighborhood = OLSR_TRUE;
!                             changes_topology = OLSR_TRUE;
!                           }
! 
!                           else
!                             OLSR_PRINTF(3, "Skipping Dijkstra (3)\n")
                          }
                      }

Index: tc_set.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/tc_set.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** tc_set.c	29 May 2005 12:47:46 -0000	1.22
--- tc_set.c	17 Nov 2005 04:25:44 -0000	1.23
***************
*** 304,308 ****
                      existing_dst->link_quality;
  
!                   retval = 1;
                  }
  
--- 304,312 ----
                      existing_dst->link_quality;
  
!                   if (msg->hop_count <= olsr_cnf->lq_dlimit)
!                     retval = 1;
! 
!                   else
!                     OLSR_PRINTF(3, "Skipping Dijkstra (4)\n")
                  }
  
***************
*** 321,325 ****
                      existing_dst->inverse_link_quality;
  
!                   retval = 1;
                  }
              }
--- 325,333 ----
                      existing_dst->inverse_link_quality;
  
!                   if (msg->hop_count <= olsr_cnf->lq_dlimit)
!                     retval = 1;
! 
!                   else
!                     OLSR_PRINTF(3, "Skipping Dijkstra (5)\n")
                  }
              }

Index: scheduler.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/scheduler.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** scheduler.c	28 Oct 2005 18:39:33 -0000	1.31
--- scheduler.c	17 Nov 2005 04:25:44 -0000	1.32
***************
*** 65,68 ****
--- 65,76 ----
  
  
+ static void trigger_dijkstra(void *dummy)
+ {
+   OLSR_PRINTF(3, "Triggering Dijkstra\n");
+ 
+   changes_neighborhood = OLSR_TRUE;
+   changes_topology = OLSR_TRUE;
+ }
+ 
  /**
   *Main scheduler event loop. Polls at every
***************
*** 100,103 ****
--- 108,114 ----
    struct tms tms_buf;
   
+   if(olsr_cnf->lq_level > 1 && olsr_cnf->lq_dinter > 0.0)
+     olsr_register_scheduler_event(trigger_dijkstra, NULL, olsr_cnf->lq_dinter, 0, NULL);
+ 
    pollrate = olsr_cnf->pollrate;
    interval_usec = (olsr_u32_t)(pollrate * 1000000);

Index: link_set.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/link_set.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -C2 -d -r1.61 -r1.62
*** link_set.c	23 Oct 2005 20:58:14 -0000	1.61
--- link_set.c	17 Nov 2005 04:25:44 -0000	1.62
***************
*** 968,973 ****
        entry->saved_loss_link_quality = entry->loss_link_quality;
  
!       changes_neighborhood = OLSR_TRUE;
!       changes_topology = OLSR_TRUE;
  
        // create a new ANSN
--- 968,979 ----
        entry->saved_loss_link_quality = entry->loss_link_quality;
  
!       if (olsr_cnf->lq_dlimit > 0)
!       {
!         changes_neighborhood = OLSR_TRUE;
!         changes_topology = OLSR_TRUE;
!       }
! 
!       else
!         OLSR_PRINTF(3, "Skipping Dijkstra (1)\n")
  
        // create a new ANSN

Index: olsr.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/olsr.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** olsr.c	29 May 2005 12:47:45 -0000	1.46
--- olsr.c	17 Nov 2005 04:25:44 -0000	1.47
***************
*** 70,74 ****
  olsr_bool changes_hna;
  
- 
  /**
   * Process changes functions
--- 70,73 ----





More information about the Olsr-cvs mailing list