updated ASCII art in generated/topo_lb_rr_multi.c p/sechting/master
authorsechting <sechting@kbs09.kbs.local>
Fri, 5 Feb 2016 14:45:45 +0000 (15:45 +0100)
committersechting <sechting@kbs09.kbs.local>
Fri, 5 Feb 2016 14:45:45 +0000 (15:45 +0100)
its now actually telling which pipe is going where, and
not only in the ASCII art at the top, even added some
comments about the pipes and their usage.

framework/generated/topo_lb_rr_multi.c

index 915064d..c397f0b 100644 (file)
@@ -1,17 +1,16 @@
 /*
  *   TD
- * (0x0b)
+ * (0x0b)                                        fw_fw_dispatch_pipe's
+ *                                   topo_pipe's         topo_pipe's
+ *                                    n+0                  0
+ *                             ,--------------> RR ----------------> FW
+ *                            /       n+1                  1
+ *     fw_fw_ready_pipe      / ,--------------> RR ----------------> FW
+ * FW ------------------> LB          n+2                  2
+ *                           \ '--------------> RR ----------------> FW
+ *                            \       n+3                  3
+ *                             '--------------> RR ----------------> FW
  *
- *                   1         5
- *                ,-----> RR -----> FW
- *               /   2         6
- *      0       / ,-----> RR -----> FW
- * FW -----> LB      3         7
- *              \ '-----> RR -----> FW
- *               \   4         8
- *                '-----> RR -----> FW
- *
- * additional link for blocked list (id 9)
  */
 
 #include <fw.h>
@@ -72,6 +71,10 @@ int fw_build_topo(void)
        /* link modules */
        temp = fw_malloc((fw_num_cpus+1) * sizeof(fw_pipe_t*));
 
+       /* initiate loadbalancer
+        * in:   fw_fw_ready_pipe
+        * outs: topo_pipes[fw_num_cpus]...topo_pipes[2*fw_num_cpu-1]
+        */
        fw_printf("Creating a new Instance of %s...", fw_modules_names[0x02]);
        temp[0] = fw_fw_ready_pipe;
        for (i=0; i<fw_num_cpus; i++)
@@ -83,6 +86,10 @@ int fw_build_topo(void)
        }
        fw_printf("done!\n");
 
+       /* initiate i rr modules
+        * in:  topo_pipes[fw_num_cpus + i]
+        * out: topo_pipes[i]
+        */
        for (i=0;i<fw_num_cpus;i++) {
                fw_printf("Creating a new Instance of %s...", fw_modules_names[0x01]);
                temp[0] = topo_pipes[fw_num_cpus+i];
@@ -94,6 +101,9 @@ int fw_build_topo(void)
                fw_printf("done!\n");
        }
 
+       /* initiate affinity module
+        * no in's or outs!
+        */
        fw_printf("Creating a new Instance of %s...", fw_modules_names[0x0D]);
        if ((fw_component_instances[i+1] = fw_modules_operations[0x0D]->_new(i, 0, NULL)) == NULL) {
                fw_panic("failed to allocate component\n");