General cleanup to remove collection of debug stats
authorTinku Mannan <tmannan@ti.com>
Tue, 12 Nov 2013 17:43:44 +0000 (12:43 -0500)
committerTinku Mannan <tmannan@ti.com>
Tue, 12 Nov 2013 17:43:44 +0000 (12:43 -0500)
ti/runtime/netapi/applications/ipsec_offload/ipsecmgr/src/netapi_ipsecmgr.c

index 8e95419a79c7205791056d7c74f0ae03b821c45e..aecda9ba2587d2fb1026cbe78f458ccaea5da13a 100755 (executable)
@@ -76,7 +76,6 @@ char*  DTS_LOG_FILE_FLOW_ETHx[] = {
 static ipsecmgr_ipc_daemon_send_if_t *send_iface;
 NETAPI_T netapi_handle;
 
-//paSysStats_t netcp_stats;
 ipsecMgrMcb_t globalDB;
 
 /* Lock file for the daemon */
@@ -167,76 +166,7 @@ void cleanup_sa_sp()
     }
 }
 
-//void netTest_utilsStatsCb(NETAPI_T h, paSysStats_t* pPaStats)
-NETAPI_SA_STATS_T netapi_sa_statsrx;
-NETAPI_SA_STATS_T netapi_sa_statstx;
 
-
-void printIPSecStats(Sa_IpsecStats_t* p_saIpsecStats,
-                     nwal_saAALG auth,
-                     nwal_saEALG cipher,
-                     uint32_t    saAppId)
-{
-
-    printf("\n appId: 0x%x: Autentication mode: %d, Encryption Mode: %d\n",
-                saAppId,
-                auth,
-                cipher);
-                
-    printf("IPSec replayOld:0x%x,replayDup:0x%x,authFail:0x%x \n",
-                   p_saIpsecStats->replayOld,p_saIpsecStats->replayDup,p_saIpsecStats->authFail);
-    printf("IPSec txESN:0x%x,rxESN:0x%x,pktEncHi:0x%x,pktEncLo:0x%x,pktDecHi:0x%x,pktDecLo:0x%x \n",
-                   p_saIpsecStats->txESN,p_saIpsecStats->rxESN,p_saIpsecStats->pktEncHi,
-                   p_saIpsecStats->pktEncLo,p_saIpsecStats->pktDecHi,p_saIpsecStats->pktDecLo);
-}
-
-
-
-
-
-void utilsStatsCb(NETAPI_T h)
-{
-    uint32_t numFreeDataPackets;
-    uint32_t            numZeroBufferPackets;
-    uint32_t            numPacketsinGarbage;
-    Pktlib_HeapStats    pktLibHeapStats;
-    int i,j;
-
-
-
-
-        if(globalDB.rx_sa[0].saAppId)
-        {
-            /* Statistics for RX Tunnel */
-            memset(&netapi_sa_statsrx, 0, sizeof(netapi_sa_statsrx));
-            netapi_getSaStats(netapi_handle,
-                              globalDB.rx_sa[0].saAppId,
-                              &netapi_sa_statsrx);
-            if (netapi_sa_statsrx.validParams & NETAPI_IPSEC_STAT_VALID)
-            {
-                printIPSecStats(&netapi_sa_statsrx.saIpsecStats,
-                                 NWAL_SA_AALG_HMAC_SHA1,
-                                 NWAL_SA_EALG_AES_CBC,
-                                 globalDB.rx_sa[0].saAppId);
-            }
-        }
-#if 1
-        if (globalDB.tx_sa[0].saAppId)
-        {
-            memset(&netapi_sa_statstx, 0, sizeof(netapi_sa_statstx));
-            netapi_getSaStats(netapi_handle,
-                              globalDB.tx_sa[0].saAppId,
-                              &netapi_sa_statstx);
-            if (netapi_sa_statstx.validParams & NETAPI_IPSEC_STAT_VALID)
-            {
-                 printIPSecStats(&netapi_sa_statstx.saIpsecStats,
-                                   NWAL_SA_AALG_HMAC_SHA1,
-                                   NWAL_SA_EALG_AES_CBC,
-                                   globalDB.tx_sa[0].saAppId);
-            }
-        }
-#endif
-}
 static void* snoop_run_thread (void* arg)
 {
     cpu_set_t cpu_set;
@@ -255,18 +185,11 @@ static void* snoop_run_thread (void* arg)
 
         /* Poll for message from Kernel */
         ipsecmgr_snoop_run();
-#if 1
-        if((count % 500000) == 0)
-            utilsStatsCb(netapi_handle);
-        
-#endif
-        count++;
         if (QUIT == 1)
             break;
     }
     ipsecmgr_syslog_msg(SYSLOG_LEVEL_INFO,
         "snoop_run_thread: calling shutdown\n");
-    utilsStatsCb(netapi_handle);
     ipsecmgr_snoop_shutdown ();
     cleanup_sa_sp();
     netapi_shutdown(netapi_handle);