]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/netapi.git/blobdiff - ti/runtime/netapi/test/net_test_bench.c
Merge branch 'multi-proc'
[keystone-rtos/netapi.git] / ti / runtime / netapi / test / net_test_bench.c
index 70933a82ea3a8c56bc715cf3a622839c4b93fb73..37102aeb434e111e9b9d1eaec5414dd28f065470 100755 (executable)
 #include <pthread.h>
 #include <sched.h>
 
-#include "trie.h"
+//#include "trie.h"
 #include "string.h"
 #include "netapi.h"
-#include "pktio.h"
+//#include "pktio.h"
 #include "net_test.h"
+#include "net_test_sa_utils.h"
+#include "net_test_utils.h"
+#include "net_test_thread_utils.h"
 #include <ti/drv/sa/salld.h>
 
 #if defined(DEVICE_K2H)
@@ -72,6 +75,7 @@
 #include <ti/drv/qmss/device/k2h/src/qmss_device.c>
 #include <ti/drv/cppi/device/k2h/src/cppi_device.c>
 #endif /* Device */
+extern Rm_ServiceHandle   *rmClientServiceHandle;
 
 extern Rm_ServiceHandle   *rmClientServiceHandle;
 #define netapi_timing_start hplib_mUtilGetPmuCCNT
@@ -302,7 +306,7 @@ int main(int argc, char **argv)
      //install signal handler for ^c
     signal(SIGINT,netTest_utilMySig);
 
-        if (initRm())
+    if (initRm())
     {
         printf("main: initRm() returned error\n");
         exit(1);
@@ -417,8 +421,13 @@ netapi_netcpCfgCreateMacInterface(
                        pkt_rx,pkt_tx,
                        idle_cycles,
                        (et-start_time),
-                       (idle_cycles*100)/(CALIB*(et-start_time))
-                    );
+                       (idle_cycles*100)/(CALIB*(et-start_time)));
+              Pktlib_HeapStats    pktLibHeapStats;
+              Pktlib_getHeapStats(OurHeap, &pktLibHeapStats);
+              printf("main  heap stats>  #free=%d #zb=%d #garbage=%d\n",
+                                pktLibHeapStats.numFreeDataPackets,
+                                pktLibHeapStats.numZeroBufferPackets,
+                                pktLibHeapStats.numPacketsinGarbage);
            }
            else if (c=='r')
            {
@@ -610,23 +619,6 @@ volatile unsigned long sum3=0;
 volatile unsigned long sum4=0;
 volatile Ti_Pkt * pHd[NTOPOP];
 
-void * pop_raw(int n)
-{
-
-}
-void * p2v (void* in)
-{
-
-
-}
-void * v2p(void * in)
-{
-
-}
-void push_raw(void *pkt, int n)
-{
-
-}
 
 void benchmarks2(Pktlib_HeapHandle h , int ntrials)
 {