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)
#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
//install signal handler for ^c
signal(SIGINT,netTest_utilMySig);
- if (initRm())
+ if (initRm())
{
printf("main: initRm() returned error\n");
exit(1);
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')
{
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)
{