]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/netapi.git/commitdiff
NETAPI test application changes for MCSDK 3.1 which supports k2l/k2e
authorTinku Mannan <tmannan@ti.com>
Thu, 23 Jan 2014 14:27:18 +0000 (09:27 -0500)
committerTinku Mannan <tmannan@ti.com>
Thu, 23 Jan 2014 14:27:18 +0000 (09:27 -0500)
ti/runtime/netapi/applications/ipsec_offload/config-app/build/Makefile
ti/runtime/netapi/applications/ipsec_offload/ipsecmgr/build/Makefile
ti/runtime/netapi/applications/ipsec_offload/ipsecmgr/src/netapi_ipsecmgr.c
ti/runtime/netapi/makefile_armv7
ti/runtime/netapi/test/build/Makefile
ti/runtime/netapi/test/ifdma_test.c
ti/runtime/netapi/test/net_test_bench.c
ti/runtime/netapi/test/net_test_loopback.c
ti/runtime/netapi/test/net_test_max_params.c
ti/runtime/netapi/test/net_test_router.c

index 5f39989e3127101cd8b641a81071e0848da35f0c..6595543801fc6bd01635aea9c48bf7efc45fce83 100755 (executable)
@@ -91,7 +91,7 @@ $(BIN_DIR)/$(EXE_NAME): $(CONFIG_APP_OBJS) $(BIN_DIR)/.created
 
 install:
        install -d $(INSTALL_BIN_BASE_DIR)
-       install -c -m 755 $(BIN_DIR)/* $(INSTALL_BIN_BASE_DIR)
+       install -c -m 755 $(BIN_DIR)/$(EXE_NAME) $(INSTALL_BIN_BASE_DIR)/$(EXE_NAME_PRFX)_$(DEVICE).out
 
 clean:
        rm -rf $(OBJ_DIR)
index f454de71fc81fbf96109ac295dda6b2858fbfe0e..3b0d08abafcb77c812c7d0bc0f54f33f8d1f3742 100755 (executable)
@@ -114,7 +114,8 @@ $(BIN_DIR)/$(EXE_NAME): $(DAEMON_OBJS) $(BIN_DIR)/.created
 
 install:
        install -d $(INSTALL_BIN_BASE_DIR)
-       install -c -m 755 $(BIN_DIR)/* $(INSTALL_BIN_BASE_DIR)
+       install -c -m 755 $(BIN_DIR)/ipsecmgr_daemon $(INSTALL_BIN_BASE_DIR)/ipsecmgr_daemon_$(DEVICE)
+       install -c -m 755 $(BIN_DIR)/$(EXE_NAME) $(INSTALL_BIN_BASE_DIR)/$(EXE_NAME_PRFX)_$(DEVICE).out
 clean:
        rm -rf $(OBJ_DIR)
        rm -rf $(BIN_DIR)
index d32aa166ee5153f7aa3bdfeee01e4b5174008353..eaf7f60904c71f34da3b844f00732c1cc097d576 100755 (executable)
 #include <netinet/in.h> 
 #include <string.h> 
 
+#if defined(DEVICE_K2H)
+#include <ti/runtime/hplib/device/k2h/src/hplib_device.c>
+#include <ti/drv/nwal/device/k2h/src/nwal_device.c>
+#include <ti/runtime/netapi/device/k2h/src/netapi_device.c>
+#include <ti/drv/qmss/device/k2h/src/qmss_device.c>
+#include <ti/drv/cppi/device/k2h/src/cppi_device.c>
+#elif defined (DEVICE_K2K)
+#include <ti/runtime/hplib/device/k2k/src/hplib_device.c>
+#include <ti/drv/nwal/device/k2k/src/nwal_device.c>
+#include <ti/runtime/netapi/device/k2k/src/netapi_device.c>
+#include <ti/drv/qmss/device/k2k/src/qmss_device.c>
+#include <ti/drv/cppi/device/k2k/src/cppi_device.c>
+#elif defined (DEVICE_K2L)
+#include <ti/runtime/hplib/device/k2l/src/hplib_device.c>
+#include <ti/drv/nwal/device/k2l/src/nwal_device.c>
+#include <ti/runtime/netapi/device/k2l/src/netapi_device.c>
+#include <ti/drv/qmss/device/k2l/src/qmss_device.c>
+#include <ti/drv/cppi/device/k2l/src/cppi_device.c>
+#elif defined (DEVICE_K2E)
+#include <ti/runtime/hplib/device/k2e/src/hplib_device.c>
+#include <ti/drv/nwal/device/k2e/src/nwal_device.c>
+#include <ti/runtime/netapi/device/k2e/src/netapi_device.c>
+#include <ti/drv/qmss/device/k2e/src/qmss_device.c>
+#include <ti/drv/cppi/device/k2e/src/cppi_device.c>
+#else /*Default */
+#include <ti/runtime/hplib/device/k2h/src/hplib_device.c>
+#include <ti/drv/nwal/device/k2h/src/nwal_device.c>
+#include <ti/runtime/netapi/device/k2h/src/netapi_device.c>
+#include <ti/drv/qmss/device/k2h/src/qmss_device.c>
+#include <ti/drv/cppi/device/k2h/src/cppi_device.c>
+#endif
+
 /**********************************************************************
  ************************** Local Definitions *************************
  **********************************************************************/
@@ -747,7 +779,10 @@ int32_t main (int argc, char* argv[])
     hplib_utilSetupThread(0, &cpu_set, hplib_spinLock_Type_LOL);
     /* create netapi */
     netapi_handle = netapi_init(NETAPI_SYS_MASTER,
-                                &our_netapi_default_cfg);
+                                &our_netapi_default_cfg,
+                                &hplibDeviceGblCfgParam,
+                                &nwalDeviceGblCfgParam,
+                                &netapiDeviceGblCfgParam);
     if(netapi_handle == NULL)
     {
         ipsecmgr_syslog_msg (SYSLOG_LEVEL_ERROR,
index 80ef727604c7e0098259841d9c663203dc26d4a8..b8e1955bcafe70a7f6013bb4ea9ea864e1480528 100755 (executable)
@@ -89,13 +89,16 @@ install:
        install -d $(INSTALL_INC_BASE_DIR)/ti/runtime/netapi/src
        install -d $(INSTALL_LIB_BASE_DIR)
        $(CP) ./*.h                $(INSTALL_INC_BASE_DIR)/ti/runtime/netapi
+       $(CP) -r ./device $(INSTALL_INC_BASE_DIR)/ti/runtime/netapi/
        @$(CP) -r $(ARMV7LIBDIR)/libnetapi.a         $(INSTALL_LIB_BASE_DIR)
        @$(CP) -rp $(ARMV7LIBDIR)/libnetapi.so*         $(INSTALL_LIB_BASE_DIR)
        $(CP) src/*.h                $(INSTALL_INC_BASE_DIR)/ti/runtime/netapi/src
 
 installbin:
        install -d $(INSTALL_BIN_BASE_DIR)
-       install -c -m 755 $(ARMV7BINDIR)/netapi/test/* $(INSTALL_BIN_BASE_DIR)
+       install -c -m 755 $(ARMV7BINDIR)/netapi/test/net_test_loopback $(INSTALL_BIN_BASE_DIR)/net_test_loopback_$(DEVICE)
+       install -c -m 755 $(ARMV7BINDIR)/netapi/test/net_test_router $(INSTALL_BIN_BASE_DIR)/net_test_router_$(DEVICE)
+       install -c -m 755 $(ARMV7BINDIR)/netapi/test/net_test_bench $(INSTALL_BIN_BASE_DIR)/net_test_bench_$(DEVICE)
        install -d $(SYSCONFDIR)/netapi
        $(CP) test/net_test_config.txt                $(SYSCONFDIR)/netapi
        install -c -m 755 tools/net_test_loopback_setup.sh    $(SYSCONFDIR)/netapi
index 331a9d54c3656bcb259912313c7efb62463249e0..8679038ff0a97452c06d3d38d29a5db5a0ccedd1 100755 (executable)
@@ -73,14 +73,14 @@ ifdef CROSS_TOOL_INSTALL_PATH
  LD = $(CROSS_TOOL_INSTALL_PATH)/$(CROSS_TOOL_PRFX)gcc
 endif
 
-CFLAGS+= $(DEBUG_FLAG) -I../ -I. -I$(NETAPI_SRC_DIR) -I$(NETAPI_SRC_DIR)/src -I$(HPLIB_INC_DIR) -I$(NETAPI_INC_DIR)-I$(PDK_INSTALL_PATH) -I$(NWAL_INSTALL_PATH) -I$(PKTLIB_INSTALL_PATH) -I$(SA_INSTALL_PATH) -I$(QMSS_INC_DIR) -I$(CPPI_INC_DIR) -I$(SA_INC_DIR) $(CSL_DEVICE) -D__ARMv7 -D_VIRTUAL_ADDR_SUPPORT -D__LINUX_USER_SPACE -D_LITTLE_ENDIAN=1 -DNWAL_ENABLE_SA -DMAKEFILE_BUILD -D _GNU_SOURCE
+CFLAGS+= $(DEBUG_FLAG) -I../ -I. -I$(NETAPI_SRC_DIR) -I$(NETAPI_SRC_DIR)/src -I$(HPLIB_INC_DIR) -I$(NETAPI_INC_DIR)-I$(PDK_INSTALL_PATH) -I$(NWAL_INSTALL_PATH) -I$(PKTLIB_INSTALL_PATH) -I$(SA_INSTALL_PATH) -I$(QMSS_INC_DIR) -I$(CPPI_INC_DIR) $(CSL_DEVICE) -D__ARMv7 -D_VIRTUAL_ADDR_SUPPORT -D__LINUX_USER_SPACE -D_LITTLE_ENDIAN=1 -DNWAL_ENABLE_SA -DMAKEFILE_BUILD -D _GNU_SOURCE
 # Linker options
 INTERNALLINKDEFS = -Wl,--start-group $(LIBS) -Wl,--end-group -lrt -pthread  -L$(ARMV7LIBDIR)  -L$(ARMV7LIBDIRLOCAL) -L$(ARMV7SALIBDIR)
 
 
 all: tests 
 
-tests: $(ARMV7BINDIR)/netapi/test/.created $(ARMV7BINDIR)/netapi/test/net_test_loopback $(ARMV7BINDIR)/netapi/test/net_test_router $(ARMV7BINDIR)/netapi/test/net_test_max_params $(ARMV7BINDIR)/netapi/test/ifdma_test  $(ARMV7BINDIR)/netapi/test/net_test_bench
+tests: $(ARMV7BINDIR)/netapi/test/.created $(ARMV7BINDIR)/netapi/test/net_test_loopback $(ARMV7BINDIR)/netapi/test/net_test_router $(ARMV7BINDIR)/netapi/test/net_test_bench
 
 
 api_clean:
index 475510d320cc3bbaa177be451658399c3b2c80e2..736ba8baa1d86f4f02ce9fe1a80e0a84539b0815 100755 (executable)
@@ -132,7 +132,8 @@ TUNE_NETAPI_DEFAULT_NUM_BUFFERS,   //#descriptors+buffers in default heap
 64, //#descriptors w/o buffers in default heap
 TUNE_NETAPI_DEFAULT_BUFFER_SIZE+128+128,  //size of buffers in default heap
 128   ,  //tail room
-256      //extra room 
+256,      //extra room 
+0
 };
 
 Pktlib_HeapHandle OurHeap;     //default heap, used by producer
@@ -150,7 +151,10 @@ PKTIO_CONTROL_T zap_channel_control={PKTIO_CLEAR, NULL};
 
 NETCP_CFG_ROUTE_T  test_route=
 {
-NULL, NULL  //* to be filled in
+0,
+NULL,
+NULL,
+0//* to be filled in
 };
 
 
index 0aa4feafa4e6aed53cf4d0f60d16d31145fdf43d..190db3db7060b8503238ac6752eacdef70d7a8ba 100755 (executable)
 #include "net_test.h"
 #include <ti/drv/sa/salld.h>
 
+#if defined(DEVICE_K2H)
+#include <ti/runtime/hplib/device/k2h/src/hplib_device.c>
+#include <ti/drv/nwal/device/k2h/src/nwal_device.c>
+#include <ti/runtime/netapi/device/k2h/src/netapi_device.c>
+#include <ti/drv/qmss/device/k2h/src/qmss_device.c>
+#include <ti/drv/cppi/device/k2h/src/cppi_device.c>
+#elif defined (DEVICE_K2K)
+#include <ti/runtime/hplib/device/k2k/src/hplib_device.c>
+#include <ti/drv/nwal/device/k2k/src/nwal_device.c>
+#include <ti/runtime/netapi/device/k2k/src/netapi_device.c>
+#include <ti/drv/qmss/device/k2k/src/qmss_device.c>
+#include <ti/drv/cppi/device/k2k/src/cppi_device.c>
+#elif defined (DEVICE_K2L)
+#include <ti/runtime/hplib/device/k2l/src/hplib_device.c>
+#include <ti/drv/nwal/device/k2l/src/nwal_device.c>
+#include <ti/runtime/netapi/device/k2l/src/netapi_device.c>
+#include <ti/drv/qmss/device/k2l/src/qmss_device.c>
+#include <ti/drv/cppi/device/k2l/src/cppi_device.c>
+#elif defined (DEVICE_K2E)
+#include <ti/runtime/hplib/device/k2e/src/hplib_device.c>
+#include <ti/drv/nwal/device/k2e/src/nwal_device.c>
+#include <ti/runtime/netapi/device/k2e/src/netapi_device.c>
+#include <ti/drv/qmss/device/k2e/src/qmss_device.c>
+#include <ti/drv/cppi/device/k2e/src/cppi_device.c>
+#else /*Default */
+#include <ti/runtime/hplib/device/k2h/src/hplib_device.c>
+#include <ti/drv/nwal/device/k2h/src/nwal_device.c>
+#include <ti/runtime/netapi/device/k2h/src/netapi_device.c>
+#include <ti/drv/qmss/device/k2h/src/qmss_device.c>
+#include <ti/drv/cppi/device/k2h/src/cppi_device.c>
+#endif /* Device */
+
 #define netapi_timing_start hplib_mUtilGetPmuCCNT
 
 static int scnt=0;
@@ -143,8 +175,9 @@ TUNE_NETAPI_NUM_GLOBAL_DESC,        //total we will use
 TUNE_NETAPI_DEFAULT_NUM_BUFFERS,   //#descriptors+buffers in default heap
 64, //#descriptors w/o buffers in default heap
 TUNE_NETAPI_DEFAULT_BUFFER_SIZE+128+128,  //size of buffers in default heap
-128   ,  //tail room
-256      //extra room 
+128,       //tail room
+256,      //extra room
+0
 };
 
 Pktlib_HeapHandle OurHeap;     //default heap, used by producer
@@ -182,7 +215,10 @@ nwalTxPktInfo_t txPktInfoNoCrypto =
 
 NETCP_CFG_ROUTE_T  test_route=
 {
-NULL, NULL  //* to be filled in
+0,
+NULL,
+NULL,
+0//* to be filled in
 };
 
 
@@ -294,7 +330,11 @@ int main(int argc, char **argv)
     /*******************************************/
 
     /* create netapi */
-    netapi_handle = netapi_init(NETAPI_SYS_MASTER, &our_netapi_default_cfg);
+    netapi_handle = netapi_init(NETAPI_SYS_MASTER,
+                                &our_netapi_default_cfg,
+                                &hplibDeviceGblCfgParam,
+                                &nwalDeviceGblCfgParam,
+                                &netapiDeviceGblCfgParam);
     if (netapi_handle == NULL)
     {
         printf("main: netapi_init failure, exiting\n");
@@ -629,7 +669,7 @@ for(i=0;i<ntrials;i++)
     k=j;
     for(j=0;j<k;j++)
     {
-       pHd[j]  =  Osal_qmssConvertDescPhyToVirt(pHd[j]);
+       pHd[j]  =  Osal_qmssConvertDescPhyToVirt(0,pHd[j]);
     }
     t3= netapi_timing_start();
     sum1 += (t2-t1);
@@ -639,7 +679,7 @@ for(i=0;i<ntrials;i++)
     for(j=0;j<k;j++)
     {
        if (!pHd[j]) continue;
-       pHd[j]= Osal_qmssConvertDescVirtToPhy(pHd[j]);
+       pHd[j]= Osal_qmssConvertDescVirtToPhy(0,pHd[j]);
     }
     t5= netapi_timing_start();
     for(j=0;j<k;j++)
index 3d19e9fe69cb7f96873870de811fd1c4e0d425cb..f215bb1f1e8511509b8189e1c2edf3081bb229f3 100755 (executable)
 #include <signal.h>
 #include <pthread.h>
 
+
+#if defined(DEVICE_K2H)
+#include <ti/runtime/hplib/device/k2h/src/hplib_device.c>
+#include <ti/drv/nwal/device/k2h/src/nwal_device.c>
+#include <ti/runtime/netapi/device/k2h/src/netapi_device.c>
+#include <ti/drv/qmss/device/k2h/src/qmss_device.c>
+#include <ti/drv/cppi/device/k2h/src/cppi_device.c>
+#elif defined (DEVICE_K2K)
+#include <ti/runtime/hplib/device/k2k/src/hplib_device.c>
+#include <ti/drv/nwal/device/k2k/src/nwal_device.c>
+#include <ti/runtime/netapi/device/k2k/src/netapi_device.c>
+#include <ti/drv/qmss/device/k2k/src/qmss_device.c>
+#include <ti/drv/cppi/device/k2k/src/cppi_device.c>
+#elif defined (DEVICE_K2L)
+#include <ti/runtime/hplib/device/k2l/src/hplib_device.c>
+#include <ti/drv/nwal/device/k2l/src/nwal_device.c>
+#include <ti/runtime/netapi/device/k2l/src/netapi_device.c>
+#include <ti/drv/qmss/device/k2l/src/qmss_device.c>
+#include <ti/drv/cppi/device/k2l/src/cppi_device.c>
+#elif defined (DEVICE_K2E)
+#include <ti/runtime/hplib/device/k2e/src/hplib_device.c>
+#include <ti/drv/nwal/device/k2e/src/nwal_device.c>
+#include <ti/runtime/netapi/device/k2e/src/netapi_device.c>
+#include <ti/drv/qmss/device/k2e/src/qmss_device.c>
+#include <ti/drv/cppi/device/k2e/src/cppi_device.c>
+#else /*Default */
+#include <ti/runtime/hplib/device/k2h/src/hplib_device.c>
+#include <ti/drv/nwal/device/k2h/src/nwal_device.c>
+#include <ti/runtime/netapi/device/k2h/src/netapi_device.c>
+#include <ti/drv/qmss/device/k2h/src/qmss_device.c>
+#include <ti/drv/cppi/device/k2h/src/cppi_device.c>
+#endif /* Device */
+
+
 extern int QUIT;
 extern netTestStats_T stats[TUNE_NETAPI_NUM_CORES];
 extern paSysStats_t netcp_stats;
@@ -96,8 +130,9 @@ static NETAPI_CFG_T our_netapi_default_cfg=
     TUNE_NETAPI_DEFAULT_NUM_BUFFERS,   //#descriptors+buffers in default heap
     64, //#descriptors w/o buffers in default heap
     TUNE_NETAPI_DEFAULT_BUFFER_SIZE+128+128,  //size of buffers in default heap
-    128   ,  //tail room
-    256      //extra room
+    128, //tail room
+    256, //extra room
+    0
 };
 
 NETAPI_T netapi_handle;
@@ -981,7 +1016,12 @@ void slow_path_thread(uint32_t index)
     }
     hplib_utilSetupThread(thread_num, &cpu_set, hplib_spinLock_Type_LOL);
 #endif
-    worker_nh[thread_num] = netapi_init(NETAPI_CORE_MASTER,NULL);
+    worker_nh[thread_num] = netapi_init(NETAPI_CORE_MASTER,
+                                        NULL,
+                                        &hplibDeviceGblCfgParam,
+                                        &nwalDeviceGblCfgParam,
+                                        &netapiDeviceGblCfgParam);
+
     if (worker_nh[thread_num] == NULL)
     {
         printf("slow_path_thread: netapi_init failure, exiting\n");
@@ -1035,7 +1075,11 @@ void fast_path_thread(uint32_t index)
     }
     hplib_utilSetupThread(thread_num, &cpu_set, hplib_spinLock_Type_LOL);
 #endif
-    worker_nh[thread_num]=netapi_init(NETAPI_CORE_MASTER,NULL);
+    worker_nh[thread_num]=netapi_init(NETAPI_CORE_MASTER,
+                                      NULL,
+                                      &hplibDeviceGblCfgParam,
+                                      &nwalDeviceGblCfgParam,
+                                      &netapiDeviceGblCfgParam);
     if (worker_nh[thread_num] == NULL)
     {
         printf("fast_path_thread: netapi_init failure, exiting\n");
@@ -1146,8 +1190,13 @@ int main(int argc, char **argv)
     hplib_utilSetupThread(0, &cpu_set, hplib_spinLock_Type_LOL);
 #endif
 
+    /* hplib_globalDeviceConfigParams_t hplibDeviceGblCfgParam/
     /* create netapi */
-    netapi_handle = netapi_init(NETAPI_SYS_MASTER, &our_netapi_default_cfg);
+    netapi_handle = netapi_init(NETAPI_SYS_MASTER,
+                                &our_netapi_default_cfg,
+                                &hplibDeviceGblCfgParam,
+                                &nwalDeviceGblCfgParam,
+                                &netapiDeviceGblCfgParam);
 
     if (netapi_handle == NULL)
     {
@@ -1213,6 +1262,31 @@ int main(int argc, char **argv)
     printf("\n net_test_loopback running ....\n");
     printf("\n Enter 's' for stats or 'q'to quit net_test_loopback app, or 'h' for help\n");
 
+
+    for (i=0;i<10;i++)
+    {
+        void* ptr;
+        ptr = hplib_vmMemAlloc(127,128,0);
+        printf("*************** Debug: MemPtr with size 127: 0x%x\n", ptr);
+    }
+    for (i=0;i<10;i++)
+    {
+        void* ptr;
+        ptr = hplib_vmMemAlloc(128,128,0);
+        printf("*************** Debug: MemPtr with size 128: 0x%x\n", ptr);
+    }
+    for (i=0;i<10;i++)
+    {
+        void* ptr;
+        ptr = hplib_vmMemAlloc(1,128,0);
+        printf("*************** Debug: MemPtr with size 1: 0x%x\n", ptr);
+    }
+        for (i=0;i<10;i++)
+    {
+        void* ptr;
+        ptr = hplib_vmMemAlloc(128*4,128,0);
+        printf("*************** Debug: MemPtr with size 128 * 4: 0x%x\n", ptr);
+    }
     char c;
         //this thread of execution (main) now just waits on user input
         for(;;)
index b5aae76a9f97f657755a97b31ad935a2c08c8f03..75b0460914ac3ddca8560319bed336515b9db6b1 100755 (executable)
@@ -102,8 +102,9 @@ TUNE_NETAPI_NUM_GLOBAL_DESC,        //total we will use
 TUNE_NETAPI_DEFAULT_NUM_BUFFERS,   //#descriptors+buffers in default heap
 64, //#descriptors w/o buffers in default heap
 TUNE_NETAPI_DEFAULT_BUFFER_SIZE+128+128,  //size of buffers in default heap
-128   ,  //tail room
-256      //extra room 
+128,       //tail room
+256,      //extra room
+0
 };
 
 NETAPI_T netapi_handle;
index 670578e5c0eee3e8e80521c738e6f42210d2fc8b..7dbe5d04e124c179d24d35562a1cdbf6134a29c3 100755 (executable)
 #include "router.h"
 extern int QUIT;
 
+
+#if defined(DEVICE_K2H)
+#include <ti/runtime/hplib/device/k2h/src/hplib_device.c>
+#include <ti/drv/nwal/device/k2h/src/nwal_device.c>
+#include <ti/runtime/netapi/device/k2h/src/netapi_device.c>
+#include <ti/drv/qmss/device/k2h/src/qmss_device.c>
+#include <ti/drv/cppi/device/k2h/src/cppi_device.c>
+#elif defined (DEVICE_K2K)
+#include <ti/runtime/hplib/device/k2k/src/hplib_device.c>
+#include <ti/drv/nwal/device/k2k/src/nwal_device.c>
+#include <ti/runtime/netapi/device/k2k/src/netapi_device.c>
+#include <ti/drv/qmss/device/k2k/src/qmss_device.c>
+#include <ti/drv/cppi/device/k2k/src/cppi_device.c>
+#elif defined (DEVICE_K2L)
+#include <ti/runtime/hplib/device/k2l/src/hplib_device.c>
+#include <ti/drv/nwal/device/k2l/src/nwal_device.c>
+#include <ti/runtime/netapi/device/k2l/src/netapi_device.c>
+#include <ti/drv/qmss/device/k2l/src/qmss_device.c>
+#include <ti/drv/cppi/device/k2l/src/cppi_device.c>
+#elif defined (DEVICE_K2E)
+#include <ti/runtime/hplib/device/k2e/src/hplib_device.c>
+#include <ti/drv/nwal/device/k2e/src/nwal_device.c>
+#include <ti/runtime/netapi/device/k2e/src/netapi_device.c>
+#include <ti/drv/qmss/device/k2e/src/qmss_device.c>
+#include <ti/drv/cppi/device/k2e/src/cppi_device.c>
+#else /*Default */
+#include <ti/runtime/hplib/device/k2h/src/hplib_device.c>
+#include <ti/drv/nwal/device/k2h/src/nwal_device.c>
+#include <ti/runtime/netapi/device/k2h/src/netapi_device.c>
+#include <ti/drv/qmss/device/k2h/src/qmss_device.c>
+#include <ti/drv/cppi/device/k2h/src/cppi_device.c>
+#endif
 /* Global definitions */
 
 netTestConfig_t netTestCfg;
@@ -112,8 +144,9 @@ TUNE_NETAPI_NUM_GLOBAL_DESC,        //total we will use
 TUNE_NETAPI_DEFAULT_NUM_BUFFERS,   //#descriptors+buffers in default heap
 64, //#descriptors w/o buffers in default heap
 TUNE_NETAPI_DEFAULT_BUFFER_SIZE+128+128,  //size of buffers in default heap
-128   ,  //tail room
-256      //extra room 
+128,  //tail room
+256,  //extra room
+0
 };
 
 
@@ -321,7 +354,11 @@ void slow_path_thread(uint32_t index)
     }
     hplib_utilSetupThread(thread_num, &cpu_set, hplib_spinLock_Type_LOL);
 #endif
-    worker_nh[thread_num]=netapi_init(NETAPI_CORE_MASTER,NULL);
+    worker_nh[thread_num]=netapi_init(NETAPI_CORE_MASTER,
+                                      NULL,
+                                      &hplibDeviceGblCfgParam,
+                                      &nwalDeviceGblCfgParam,
+                                      &netapiDeviceGblCfgParam);
     if (worker_nh[thread_num] == NULL)
     {
         printf("slow_path_thread: netapi_init failure, exiting\n");
@@ -383,7 +420,11 @@ void fast_path_thread(uint32_t index)
     }
     hplib_utilSetupThread(thread_num, &cpu_set, hplib_spinLock_Type_LOL);
 #endif
-    worker_nh[thread_num]=netapi_init(NETAPI_CORE_MASTER,NULL);
+    worker_nh[thread_num]=netapi_init(NETAPI_CORE_MASTER,
+                                      NULL,
+                                      &hplibDeviceGblCfgParam,
+                                      &nwalDeviceGblCfgParam,
+                                      &netapiDeviceGblCfgParam);
     if (worker_nh[thread_num] == NULL)
     {
         printf("fast_path_thread: netapi_init failure, exiting\n");
@@ -481,7 +522,12 @@ int main(int argc, char **argv)
     hplib_utilSetupThread(0, &cpu_set, hplib_spinLock_Type_LOL);
 #endif
     /* create netapi */
-    netapi_handle = netapi_init(NETAPI_SYS_MASTER, &our_netapi_default_cfg);
+    netapi_handle = netapi_init(NETAPI_SYS_MASTER,
+                                &our_netapi_default_cfg,
+                                &hplibDeviceGblCfgParam,
+                                &nwalDeviceGblCfgParam,
+                                &netapiDeviceGblCfgParam);
+
     if (netapi_handle == NULL)
     {
         printf("main: netapi_init failure, exiting\n");