[hipl-commit] [tiny] Rev 3583: Fixed performance measurement for CLOSE_ACK packets.

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

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

Log:
  Fixed performance measurement for CLOSE_ACK packets.

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

=== modified file 'hipd/close.c'
--- hipd/close.c        2010-02-26 11:22:52 +0000
+++ hipd/close.c        2010-02-26 11:24:27 +0000
@@ -291,13 +291,13 @@
                          const uint32_t ha_state,
                          struct hip_packet_context *ctx)
 {
+    int err       = 0;
+    struct hip_echo_request *echo_resp;
+    uint16_t mask = HIP_PACKET_CTRL_ANON;
 #ifdef CONFIG_HIP_PERFORMANCE
     HIP_DEBUG("Start PERF_HANDLE_CLOSE_ACK\n");
     hip_perf_start_benchmark( perf_set, PERF_HANDLE_CLOSE_ACK );
 #endif
-    int err       = 0;
-    struct hip_echo_request *echo_resp;
-    uint16_t mask = HIP_PACKET_CTRL_ANON;
 
     HIP_IFEL(ipv6_addr_any(&(ctx->msg)->hitr), -1,
             "Received NULL receiver HIT in CLOSE ACK. Dropping\n");
@@ -364,6 +364,7 @@
      * be 1 */
     /* hip_put_ha(entry); */
 
+out_err:
 #ifdef CONFIG_HIP_PERFORMANCE
     HIP_DEBUG("Stop and write PERF_HANDLE_CLOSE_ACK, PERF_CLOSE_COMPLETE\n");
     hip_perf_stop_benchmark( perf_set, PERF_HANDLE_CLOSE_ACK );
@@ -372,7 +373,6 @@
     hip_perf_write_benchmark( perf_set, PERF_CLOSE_COMPLETE );
 #endif
 
-out_err:
     return err;
 }
 

=== modified file 'hipd/init.c'
--- hipd/init.c 2010-02-26 11:22:52 +0000
+++ hipd/init.c 2010-02-26 11:24:27 +0000
@@ -482,17 +482,6 @@
     hip_register_handle_function(HIP_CLOSE_ACK, HIP_STATE_CLOSED,       
&hip_handle_close_ack, 0);
     hip_register_handle_function(HIP_CLOSE_ACK, 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_HANDLE_CLOSE_ACK\n");
-    hip_perf_start_benchmark(perf_set, PERF_HANDLE_CLOSE_ACK);
-    HIP_DEBUG("Stop and write PERF_HANDLE_CLOSE_ACK\n");
-    hip_perf_stop_benchmark(perf_set, PERF_HANDLE_CLOSE_ACK);
-    hip_perf_write_benchmark(perf_set, PERF_HANDLE_CLOSE_ACK);
-#endif
-#endif
-
     return err;
 }

Other related posts:

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