[hipl-commit] [tiny] Rev 3581: Fixed performance measurement for R2 packets.

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

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

Log:
  Fixed performance measurement for R2 packets.

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

=== modified file 'hipd/init.c'
--- hipd/init.c 2010-02-26 11:19:57 +0000
+++ hipd/init.c 2010-02-26 11:21:20 +0000
@@ -457,17 +457,6 @@
     hip_register_handle_function(HIP_R2, HIP_STATE_CLOSED,       
&hip_drop_packet, 0);
     hip_register_handle_function(HIP_R2, 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_R2\n");
-    hip_perf_start_benchmark(perf_set, PERF_R2);
-    HIP_DEBUG("Stop and write PERF_R2\n");
-    hip_perf_stop_benchmark(perf_set, PERF_R2);
-    hip_perf_write_benchmark(perf_set, PERF_R2);
-#endif
-#endif
-
     hip_register_handle_function(HIP_NOTIFY, HIP_STATE_I1_SENT,     
&hip_handle_notify, 0);
     hip_register_handle_function(HIP_NOTIFY, HIP_STATE_I2_SENT,     
&hip_handle_notify, 0);
     hip_register_handle_function(HIP_NOTIFY, HIP_STATE_R2_SENT,     
&hip_handle_notify, 0);

=== modified file 'hipd/input.c'
--- hipd/input.c        2010-02-26 11:19:57 +0000
+++ hipd/input.c        2010-02-26 11:21:20 +0000
@@ -2132,6 +2132,10 @@
     struct hip_esp_info *esp_info   = NULL;
     struct hip_locator *locator     = NULL;
     struct hip_spi_out_item spi_out_data;
+#ifdef CONFIG_HIP_PERFORMANCE
+    HIP_DEBUG("Start PERF_R2\n");
+    hip_perf_start_benchmark(perf_set, PERF_R2);
+#endif
 
     HIP_IFEL(ipv6_addr_any(&(packet_ctx->msg)->hitr), -1,
              "Received NULL receiver HIT in R2. Dropping\n");
@@ -2348,6 +2352,11 @@
     if (ctx) {
         HIP_FREE(ctx);
     }
+#ifdef CONFIG_HIP_PERFORMANCE
+    HIP_DEBUG("Stop and write PERF_R2\n");
+    hip_perf_stop_benchmark(perf_set, PERF_R2);
+    hip_perf_write_benchmark(perf_set, PERF_R2);
+#endif
     return err;
 }

Other related posts:

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