[hipl-commit] [tiny] Rev 3580: Fixed performance measurement for R1 packets.

  • From: Tim Just <tim.just@xxxxxxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Fri, 26 Feb 2010 13:20:18 +0200

Committer: Tim Just <tim.just@xxxxxxxxxxxxxx>
Date: Fri Feb 26 12:19:57 2010 +0100
Revision: 3580
Revision-id: tim.just@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: tiny

Log:
  Fixed performance measurement for R1 packets.

Modified:
  M  hipd/init.c
  M  hipd/input.c

=== modified file 'hipd/init.c'
--- hipd/init.c 2010-02-26 11:18:32 +0000
+++ hipd/init.c 2010-02-26 11:19:57 +0000
@@ -448,17 +448,6 @@
     hip_register_handle_function(HIP_R1, HIP_STATE_CLOSED,       
&hip_handle_r1, 0);
     hip_register_handle_function(HIP_R1, HIP_STATE_NONE,         
&hip_drop_packet, 0);
 
-    /** @todo Register performance measurement functions as handle functions */
-#if 0
-#ifdef CONFIG_HIP_PERFORMANCE
-    HIP_DEBUG("Start PERF_R1\n");
-    hip_perf_start_benchmark(perf_set, PERF_R1);
-    HIP_DEBUG("Stop and write PERF_R1\n");
-    hip_perf_stop_benchmark(perf_set, PERF_R1);
-    hip_perf_write_benchmark(perf_set, PERF_R1);
-#endif
-#endif
-
     hip_register_handle_function(HIP_R2, HIP_STATE_UNASSOCIATED, 
&hip_drop_packet, 0);
     hip_register_handle_function(HIP_R2, HIP_STATE_I1_SENT,      
&hip_drop_packet, 0);
     hip_register_handle_function(HIP_R2, HIP_STATE_I2_SENT,      
&hip_handle_r2, 0);

=== modified file 'hipd/input.c'
--- hipd/input.c        2010-02-26 11:18:32 +0000
+++ hipd/input.c        2010-02-26 11:19:57 +0000
@@ -1096,6 +1096,10 @@
     struct hip_locator *locator      = NULL;
     char *str                        = NULL;
     struct in6_addr daddr;
+#ifdef CONFIG_HIP_PERFORMANCE
+    HIP_DEBUG("Start PERF_R1\n");
+    hip_perf_start_benchmark(perf_set, PERF_R1);
+#endif
 
     HIP_IFEL(!packet_ctx->hadb_entry, -1,
              "No entry in host association database when receiving R1." \
@@ -1290,6 +1294,11 @@
     if (ctx) {
         HIP_FREE(ctx);
     }
+#ifdef CONFIG_HIP_PERFORMANCE
+    HIP_DEBUG("Stop and write PERF_R1\n");
+    hip_perf_stop_benchmark(perf_set, PERF_R1);
+    hip_perf_write_benchmark(perf_set, PERF_R1);
+#endif
     return err;
 }

Other related posts:

  • » [hipl-commit] [tiny] Rev 3580: Fixed performance measurement for R1 packets. - Tim Just