[hipl-commit] [trunk] Rev 4444: Added performance measurement for UPDATE packets.

  • From: Tim Just <tim.just@xxxxxxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Thu, 29 Apr 2010 22:36:48 +0300

Committer: Tim Just <tim.just@xxxxxxxxxxxxxx>
Date: 29/04/2010 at 22:36:48
Revision: 4444
Revision-id: tim.just@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  Added performance measurement for UPDATE packets.

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

=== modified file 'hipd/hipd.c'
--- hipd/hipd.c 2010-04-27 21:15:32 +0000
+++ hipd/hipd.c 2010-04-29 19:36:31 +0000
@@ -371,6 +371,7 @@
     hip_perf_set_name(perf_set, PERF_R1, "results/PERF_R1.csv");
     hip_perf_set_name(perf_set, PERF_I2, "results/PERF_I2.csv");
     hip_perf_set_name(perf_set, PERF_R2, "results/PERF_R2.csv");
+    hip_perf_set_name(perf_set, PERF_UPDATE, "results/PERF_UPDATE.csv");
     hip_perf_set_name(perf_set, PERF_DH_CREATE, "results/PERF_DH_CREATE.csv");
     hip_perf_set_name(perf_set, PERF_SIGN, "results/PERF_SIGN.csv");
     hip_perf_set_name(perf_set, PERF_DSA_SIGN_IMPL, 
"results/PERF_DSA_SIGN_IMPL.csv");

=== modified file 'hipd/input.c'
--- hipd/input.c        2010-04-27 16:38:06 +0000
+++ hipd/input.c        2010-04-29 19:36:31 +0000
@@ -765,6 +765,10 @@
         break;
 
     case HIP_UPDATE:
+#ifdef CONFIG_HIP_PERFORMANCE
+        HIP_DEBUG("Start PERF_UPDATE\n");
+        hip_perf_start_benchmark(perf_set, PERF_UPDATE);
+#endif
         HIP_DEBUG_HIT("received an UPDATE:  ", src_addr );
         if (entry) {
             HIP_IFCS(entry, err = entry->hadb_rcv_func->hip_receive_update(msg,
@@ -777,6 +781,11 @@
             HIP_DEBUG("FOUND A UPDATE FROM FIREWALL \n");
             hip_receive_update(msg, src_addr, dst_addr, entry, msg_info);
         }
+#ifdef CONFIG_HIP_PERFORMANCE
+        HIP_DEBUG("Stop and write PERF_UPDATE\n");
+        hip_perf_stop_benchmark(perf_set, PERF_UPDATE);
+        hip_perf_write_benchmark(perf_set, PERF_UPDATE);
+#endif
         break;
 
     case HIP_NOTIFY:
@@ -807,7 +816,7 @@
         HIP_IFCS(entry, err = entry->hadb_rcv_func->
                               hip_receive_close(msg, entry));
 #ifdef CONFIG_HIP_PERFORMANCE
-        HIP_DEBUG("Stop and write PERF_HANDLE_CLOSE");
+        HIP_DEBUG("Stop and write PERF_HANDLE_CLOSE\n");
         hip_perf_stop_benchmark(perf_set, PERF_HANDLE_CLOSE);
         hip_perf_write_benchmark(perf_set, PERF_HANDLE_CLOSE);
 #endif

Other related posts:

  • » [hipl-commit] [trunk] Rev 4444: Added performance measurement for UPDATE packets. - Tim Just