[hipl-commit] [tiny] Rev 3578: Fixed performance measurement for I1 packets.

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

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

Log:
  Fixed performance measurement for I1 packets.

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

=== modified file 'hipd/init.c'
--- hipd/init.c 2010-02-25 09:15:07 +0000
+++ hipd/init.c 2010-02-26 11:16:19 +0000
@@ -430,17 +430,6 @@
     hip_register_handle_function(HIP_DATA, HIP_STATE_CLOSED,       
&hip_handle_i1, 0);
     hip_register_handle_function(HIP_DATA, HIP_STATE_NONE,         
&hip_handle_i1, 0);
 
-    /** @todo Register performance measurement functions as handle functions */
-#if 0
-#ifdef CONFIG_HIP_PERFORMANCE
-    HIP_DEBUG("Start PERF_I1\n");
-    hip_perf_start_benchmark(perf_set, PERF_I1);
-    HIP_DEBUG("Stop and write PERF_I1\n");
-    hip_perf_stop_benchmark(perf_set, PERF_I1);
-    hip_perf_write_benchmark(perf_set, PERF_I1);
-#endif
-#endif
-
     hip_register_handle_function(HIP_I2, HIP_STATE_UNASSOCIATED, 
&hip_handle_i2, 0);
     hip_register_handle_function(HIP_I2, HIP_STATE_I1_SENT,      
&hip_handle_i2, 0);
     hip_register_handle_function(HIP_I2, HIP_STATE_I2_SENT,      
&hip_handle_i2, 0);

=== modified file 'hipd/input.c'
--- hipd/input.c        2010-02-25 11:13:41 +0000
+++ hipd/input.c        2010-02-26 11:16:19 +0000
@@ -2380,6 +2380,8 @@
 #ifdef CONFIG_HIP_PERFORMANCE
     HIP_DEBUG("Start PERF_BASE\n");
     hip_perf_start_benchmark(perf_set, PERF_BASE);
+    HIP_DEBUG("Start PERF_I1\n");
+    hip_perf_start_benchmark(perf_set, PERF_I1);
 #endif
     int err = 0, mask = 0, src_hit_is_our;
     hip_tlv_type_t relay_para_type = 0;
@@ -2429,6 +2431,12 @@
                       dest_port,
                       ctx->msg_info,
                       relay_para_type);
+
+#ifdef CONFIG_HIP_PERFORMANCE
+    HIP_DEBUG("Stop and write PERF_I1\n");
+    hip_perf_stop_benchmark(perf_set, PERF_I1);
+    hip_perf_write_benchmark(perf_set, PERF_I1);
+#endif
 out_err:
     return err;
 }

Other related posts:

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