]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/netapi.git/commitdiff
cleaned up debug printfs
authorDavid Lide <a0216552@gtudci01.(none)>
Tue, 31 Jan 2012 14:40:55 +0000 (09:40 -0500)
committerDavid Lide <a0216552@gtudci01.(none)>
Tue, 31 Jan 2012 14:40:55 +0000 (09:40 -0500)
13 files changed:
ti/runtime/netapi/netapi.h
ti/runtime/netapi/netapi_err.h
ti/runtime/netapi/netapi_timer.h
ti/runtime/netapi/netapi_tune.h
ti/runtime/netapi/netcp_cfg.h
ti/runtime/netapi/pktio.h
ti/runtime/netapi/src/netapi.c
ti/runtime/netapi/src/netapi_init.c
ti/runtime/netapi/src/netapi_timer.c
ti/runtime/netapi/src/netapi_vm.c
ti/runtime/netapi/src/netcp_cfg.c
ti/runtime/netapi/src/pktio.c
ti/runtime/netapi/src/tim64.c

index 0e5bf454f684412ab867315f6b05101026237842..30cbc48a60b5fdda32d412f6d389e7fcc39f9dd4 100644 (file)
@@ -2,9 +2,9 @@
  * FILE PURPOSE :  -----------NETAPI-------------
  *         user space access to transport resources on SOC
  **************************************************************
- * FILE: netapi.h
+ * @file netapi.h
  * 
- * DESCRIPTION:  netapi main header file for user space transport
+ * @brief DESCRIPTION:  netapi main header file for user space transport
  *               library
  * 
  * REVISION HISTORY:  rev 0.0.1 
 /**  @ingroup netapi */
 
 /** @defgroup netapi_api_functions NETAPI API's
- *  @ingroup netapi
+ *  @ingroup netapi_api_functions
  */
 
 /**  @ingroup netapi_structures */
 /**
  * @def NETAPI_T
- *  netapi handle:  one per thread
- *  used in most NETAPI calls
+ * @brief  netapi handle:  one per thread
+ *         used in most NETAPI calls
  */
 typedef void * NETAPI_T;
 
@@ -164,6 +164,7 @@ void netapi_shutdown(NETAPI_T  p);
 
 /**  @ingroup netapi_api_functions */
 /*
+
 *  @brief  API returns a @ref Pktlib_HeapIfTable to use when creating pktlib heaps 
  *
  *  @details  Application will need a heapIfTable in order to create its own heaps. This
index 309038313068a13a6cef4360b3b00920d6bc7795..ce788fd2d8c6122120ec41978fdc519402c7ccbc 100644 (file)
@@ -2,9 +2,9 @@
  * file: netapi_err.h
  * purpose: netapi error codes
  **************************************************************
- * FILE: netapi.h
+ * @file netapi.h
  * 
- * DESCRIPTION:  netapi Error Definitions for user space transport
+ * @brief DESCRIPTION:  netapi Error Definitions for user space transport
  *               library
  * 
  * REVISION HISTORY:  rev 0.0.1 
  */
 #define NETAPI_ERR_OK  0
 /**
+ *  @ingroup NETAPI_RetValue
  *  @def  NETAPI_ERR_NOMEM
- *       out of memory error  
+ *  @brief   out of memory error  
  */
 #define NETAPI_ERR_NOMEM -1
 /**
+*  @ingroup NETAPI_RetValue
  *  @def  NETAPI_ERR_BAD_INPUT
  *       arguments or configuraiton is invalid
  */
 #define NETAPI_ERR_BAD_INPUT -2
 /**
+*  @ingroup NETAPI_RetValue
  *  @def  NETAPI_ERR_QLLD 
  *       QUEUE MANAGER Reports an error
  */
 #define NETAPI_ERR_QLLD -3
 /**
+*  @ingroup NETAPI_RetValue
  *  @def  NETAPI_ERR_NOTFOUND
  *       the resource cannot be located
  */
 #define NETAPI_ERR_NOTFOUND -4
 /**
+*  @ingroup NETAPI_RetValue
  *  @def  NETAPI_ERR_BUSY
  *       Temporarily out of resources or resource leak
  */
 #define NETAPI_ERR_BUSY -5 
 /**
+*  @ingroup NETAPI_RetValue
  *  @def  NETAPI_ERR_NWAL_ERR0
  *       NWAL subsytem reports error 
  */
 #define NETAPI_ERR_NWAL_ERR0 -6
 /**
+*  @ingroup NETAPI_RetValue
  *  @def  NETAPI_ERR_ALREADY_CANCELLED
  *       timer has already been cancelled
  */
 #define NETAPI_ERR_ALREADY_CANCELLED -100
 /**
+*  @ingroup NETAPI_RetValue
  *  @def  NETAPI_ERR_NWAL_TX_ERR
  *       error trying to send to NWAL. 
  */
index 213974c6deb2c8d0bad729b01b797e1715d8b0dd..a59a905b91d695cd08869f090581a522156c2fe9 100644 (file)
@@ -2,9 +2,9 @@
  *FILE: netapi_timer.h
  *Purpose:  netapi timer related functions
  **************************************************************
- * FILE: netapi_timer.h
+ * @file  netapi_timer.h
  * 
- * DESCRIPTION:  netapi timer library header file for user space transport
+ * @breif DESCRIPTION:  netapi timer library header file for user space transport
  *               library
  * 
  * REVISION HISTORY:  rev 0.0.1 
index 66ebeb67cfdca184bbb99346c63ac17bc57508bc..4c7b3f969085c91a9af55fd822e9e7fd7db6ed39 100644 (file)
@@ -2,9 +2,9 @@
  * FILE: netapi_tune.h
  * Purpose:  hold tunable parameters (build time)
  **************************************************************
- * FILE: netapi_tune.h.h
+ * @file netapi_tune.h
  * 
- * DESCRIPTION:  Tuneable (compile time) parameters  for user space transport
+ * @brief DESCRIPTION:  Tuneable (compile time) parameters  for user space transport
  *               library
  * 
  * REVISION HISTORY:  rev 0.0.1 
index 9a5cabdf1142a4e12fc15d22507217da536e670d..780768a70b4d973d8d59cc5ddff53a766e2befd3 100644 (file)
@@ -2,9 +2,9 @@
  * File: netcp_cfg.h 
  * Purpose: netcp config API
  **************************************************************
- * FILE: netcp_cfg.h
+ *@file netcp_cfg.h
  * 
- * DESCRIPTION:  netapi NETCP configuration API header  file 
+ * @brief DESCRIPTION:  netapi NETCP configuration API header  file 
  *          for user space transport library
  * 
  * REVISION HISTORY:  rev 0.0.1 
index 96bba3ec11632a65a5b5526766fd2c067d7c8a09..3f1f55a00afd6a76e53ff9a42da0cb15e7b764bb 100644 (file)
@@ -2,9 +2,9 @@
  *FILE:  pktio.h
  *PURPOSE:  pktio library header
  **************************************************************
- * FILE: pktio.h
+ * @file  pktio.h
  * 
- * DESCRIPTION:  pktio module  main header file for user space transport
+ * @bried DESCRIPTION:  pktio module  main header file for user space transport
  *               library
  * 
  * REVISION HISTORY:  rev 0.0.1 
index bb8d37109054f0d82279d25e8dab738e80991439..30ee6eb625792c4a4291235d82eb39af0ccf46ca 100644 (file)
@@ -167,7 +167,7 @@ return  (uint8_t *)netapi_VM_memAlloc(size, 128);
 static void netapiSharedMemoryFree(uint8_t* ptr)
 {
     /* Do Nothing. */
-    printf("!!netapi>> Unexpected.  need to provide a free () for some reason!! \n");
+    printf(">netapi Unexpected.  need to provide a free () for some reason!! \n");
     return;
 }
 
@@ -182,8 +182,8 @@ static int system_init(NETAPI_HANDLE_T * handle)
        - chunk for buffers, descriptors
        - memory mapped peripherals we use, such as QMSS, PA, etc */
     result= netapi_VM_memory_setup();
-    if (result) printf("NETAPI: system init - memory set  up OK\n");
-    else {printf("NETAPI: system init - memory set up failed\n"); return -1;}
+    if (result) printf(">netapi: system init - memory set  up OK\n");
+    else {printf(">netap: system init - memory set up failed\n"); return -1;}
 
     //get timer running
     netapi_init_timer();
@@ -210,7 +210,7 @@ static int system_init(NETAPI_HANDLE_T * handle)
                       SIZE_SHARED_DESC,
                       netapi_VM_QMemGlobalDescRam,
                       NETAPI_GLOBAL_REGION);
-    if(result <0) {printf("can't setup shared region\n"); return -1;}
+    if(result <0) {printf(">netapi; can't setup QM shared region\n"); return -1;}
 
 #if 0 //todo setup 2nd region
 /* Initialize the local memory region configuration. */
@@ -225,12 +225,12 @@ static int system_init(NETAPI_HANDLE_T * handle)
     result = netapi_init_cppi ();
     if (result != 1)
     {
-        printf ("Error initializing CPPI SubSystem error code : %d\n",result);
+        printf (">netapi: Error initializing CPPI SubSystem error code : %d\n",result);
         return -1;
     }
 
     /* CPPI and Queue Manager are initialized. */
-    printf ("Debug: Queue Manager and CPPI are initialized.\n");
+    printf (">netapi: Queue Manager and CPPI are initialized.\n");
 
     /* create main pkt heap */
     /* Initialize the Shared Heaps. */
@@ -249,7 +249,7 @@ static int system_init(NETAPI_HANDLE_T * handle)
                                                 TUNE_NETAPI_DEFAULT_NUM_SOLO_DESCRIPTORS,
                                                 &netapi_pktlib_ifTable);
    //todo -> cleanup on failure
-   if (!sharedHeapHandle) { printf("netapi -> 'netapi' heap create failed\n"); return -1;}
+   if (!sharedHeapHandle) { printf(">'netapi' heap create failed\n"); return -1;}
    handle->netcp_heap= sharedHeapHandle;
 
   controlHeapHandle = Pktlib_createHeap("netapi_control", Qmss_MemRegion_MEMORY_REGION0,
@@ -259,7 +259,7 @@ static int system_init(NETAPI_HANDLE_T * handle)
                                                0,
                                                &netapi_pktlib_ifTable);
    //todo -> cleanup on failure
-   if (!controlHeapHandle) { printf("netapi -> 'netapicontrol' heap create failed\n"); return -1;}
+   if (!controlHeapHandle) { printf(">netapi -'netapicontrol' heap create failed\n"); return -1;}
    handle->netcp_control_heap= controlHeapHandle;
 
 
@@ -268,14 +268,14 @@ static int system_init(NETAPI_HANDLE_T * handle)
                               Qmss_MemRegion_MEMORY_REGION0,
                               &netapi_pktlib_ifTable, 
                               &netapi_global.nwal_context);
-    if (result<0) {printf("netapi -> init_nwal() failed\n"); return -1; }
+    if (result<0) {printf(">netapi  init_nwal() failed\n"); return -1; }
 
     /* start NWAL */
     result = netapi_start_nwal(sharedHeapHandle, 
                                controlHeapHandle,
                                &handle->nwal_local,
                                &netapi_global.nwal_context);
-    if (result<0) {printf("netapi -> start_nwal() failed\n"); return -1; }
+    if (result<0) {printf(">netapi start_nwal() failed\n"); return -1; }
     //** success **
 
 
@@ -334,7 +334,7 @@ for (i=0;;i+=1 )
                 }
                 else {/*printf("netapi qzap in play\n");*/}
         }
-        if(i) printf(">netapi qzap in play. %d descriptors cleaned\n",i);
+        if(i) printf(">netapi: @recovery -  %d descriptors cleaned\n",i);
 }
 
 //defensive: clean out stuff hanging around
index 2f0deb2b06903ad9737e638d422097b52872e68f..dd76161faeeabbce7085858f6094db7b331a1ba6 100644 (file)
@@ -196,7 +196,7 @@ int netapi_init_qm(void)
 
   result = Qmss_init (&qmssInitConfig, &nwalTest_qmssGblCfgParams);
   if (result != QMSS_SOK)  {
-    System_printf ("function init_qm: qmss_Init failed with error code %d\n", result);
+    System_printf (">function init_qm: qmss_Init failed with error code %d\n", result);
     return (nwal_FALSE);
   }
 
@@ -241,7 +241,7 @@ int netapi_qm_setup_mem_region(
   result = Qmss_insertMemoryRegion (&memInfo);
   if (result < QMSS_SOK)  
   {
-    printf ("function setup_qm_region: Qmss_insertMemoryRegion returned error code %d\n", result);
+    printf (">function setup_qm_region: Qmss_insertMemoryRegion returned error code %d\n", result);
     return (-1);
   }
 
@@ -258,7 +258,7 @@ int netapi_start_qm(void)
      result = Qmss_start();
      if (result != QMSS_SOK)
      {
-         System_printf ("start_qm: Qmss_start failed with error code %d\n", result);
+         System_printf (">start_qm: Qmss_start failed with error code %d\n", result);
          return (-1);
      }
      return 1;
@@ -329,7 +329,7 @@ int netapi_init_cppi(void)
   result = Cppi_init (nwalTest_cppiGblCfgParams);
   if (result != CPPI_SOK)  
   {
-    printf ("function cppi_init: Cppi_init failed with error code %d\n", result);
+    printf (">function cppi_init: Cppi_init failed with error code %d\n", result);
     return (-1);
   }
    return 1;
@@ -418,7 +418,7 @@ int netapi_init_nwal(
                        p_table);
     if(nwalGlobCfg.pa2SaBufPool.bufPool[0].heapHandle == NULL)
     {
-        printf ("Pktlib_createHeap:Heap Creation Failed for PA to SA Buffer Pool \n");
+        printf (">Pktlib_createHeap:Heap Creation Failed for PA to SA Buffer Pool \n");
         netapi_err_teardown(); 
         return -1;
     }
@@ -438,7 +438,7 @@ int netapi_init_nwal(
                           p_table);
     if(nwalGlobCfg.sa2PaBufPool.bufPool[0].heapHandle == NULL)
     {
-        printf ("Pktlib_createHeap:Heap Creation Failed for SA to PA Buffer Pool \n");
+        printf (">Pktlib_createHeap:Heap Creation Failed for SA to PA Buffer Pool \n");
         netapi_err_teardown();
         return -1;
     }
@@ -472,7 +472,7 @@ int netapi_init_nwal(
                                    aligns);
     if(nwalRetVal != nwal_OK)
     {
-        printf ("init_nwal: nwal_getBufferReq Failed %d\n", nwalRetVal);
+        printf (">netapi: init_nwal - nwal_getBufferReq Failed %d\n", nwalRetVal);
         return nwal_FALSE;
     }
 
@@ -561,11 +561,11 @@ int netapi_init_nwal(
                              &p_nwal_context->nwalInstHandle);
     if(nwalRetVal != nwal_OK)
     {
-        printf ("init_nwal: nwal_create Failed %d\n",nwalRetVal);
+        printf (">netapi: init_nwal- nwal_create Failed %d\n",nwalRetVal);
         while(1);
     }
 
-    printf("init_nwal: Global and Local Network initialization Successful \n");
+    printf(">netapi: init_nwal - Global and Local Network initialization Successful \n");
     return 1;
 }
 
@@ -632,7 +632,7 @@ int netapi_start_nwal(Pktlib_HeapHandle pkt_heap,
 
     if(nwalRetVal != nwal_OK)
     {
-        printf ("nwal_start:Failed ->err %d !!!\n", nwalRetVal);
+        printf (">nwal_start:Failed ->err %d !!!\n", nwalRetVal);
         return -1;
     }
     p->state = NETAPI_NW_CXT_LOC_ACTIVE;
index ffa5f01f17103f9d06e01bb5d48d3b39c539ef81..1da8eaab9b847966d8af6aab24aa344508f83380 100644 (file)
@@ -148,7 +148,7 @@ timer_obj =tim_set(
    cookie,
    pErr);
 if (!timer_obj)  {return NULL;}
-printf(">timer: setting timer %x for %lld ticks -> hased to cell %d\n",cookie, ct,cell);
+//DEBUGprintf(">timer: setting timer %x for %lld ticks -> hased to cell %d\n",cookie, ct,cell);
 return (NETAPI_TIMER_T) timer_obj;
 }
 
index 9cc66f41b209b0bfbe0405823bb8852f44653224..b990d48fa08bafa0eec8811d5c88d7625732c9c0 100644 (file)
@@ -84,7 +84,7 @@ nwal_Bool_t netapi_VM_memAllocInit
 
     if((dev_mem_fd = open("/dev/mem", (O_RDWR | O_SYNC))) == -1)
     {
-        printf("netapi_VM_memAllocInit: Failed to open \"dev/mem\" err=%s\n",
+        printf(">netapi_VM_memAllocInit: Failed to open \"dev/mem\" err=%s\n",
                strerror(errno));
         return nwal_FALSE;
     }
@@ -93,11 +93,11 @@ nwal_Bool_t netapi_VM_memAllocInit
 
     if (!map_base)
     {
-        printf("netapi_VM_memAllocInit: Failed to mmap addr (0x%x)", addr);
+        printf(">netapi_VM_memAllocInit: Failed to mmap addr (0x%x)", addr);
         return nwal_FALSE;
     }
 
-    printf("netapi_VM_memAllocInit: Phy Addr %x Memory (%d bytes) mapped at address %p.\n", addr,size,  map_base); 
+    printf(">netapi_VM_memAllocInit: Phy Addr %x Memory (%d bytes) mapped at address %p.\n", addr,size,  map_base); 
 
     netapi_VM_mem_alloc_ptr = netapi_VM_mem_start = map_base;
     netapi_VM_mem_size = size;
@@ -148,7 +148,7 @@ void *netapi_VM_memMap
     retval = sysconf(_SC_PAGE_SIZE);
     if (retval == -1)
     {
-        printf("netapi_VM_memMap: Failed to get page size err=%s\n",
+        printf(">netapi_VM_memMap: Failed to get page size err=%s\n",
                strerror(errno));
         return (void *)0;
     }
@@ -157,27 +157,27 @@ void *netapi_VM_memMap
 
     if (size%page_sz)
     {
-        printf("netapi_VM_memMap: error: block size not aligned to page size\n");
+        printf(">netapi_VM_memMap: error: block size not aligned to page size\n");
         return (void *)0;
     }
 
     if ((uint32_t)addr%page_sz)
     {
-        printf("netapi_VM_memMap: error: addr not aligned to page size\n");
+        printf(">netapi_VM_memMap: error: addr not aligned to page size\n");
         return (void *)0;
     }
 
     map_base = mmap(0, size, (PROT_READ|PROT_WRITE), MAP_SHARED, dev_mem_fd, (off_t)addr & ~mask);
     if(map_base == (void *) -1) 
     {
-        printf("netapi_VM_memMap: Failed to mmap \"dev/mem\" err=%s\n",
+        printf(">netapi_VM_memMap: Failed to mmap \"dev/mem\" err=%s\n",
                strerror(errno));
         return (void *)0;
     }
     virt_addr = map_base + ((off_t)addr & mask);
     if(xtraLogs)
     {
-        printf("netapi_VM_memMap:Memory mapped Begin Address 0x%x Read Value: 0x%x.\n", virt_addr,*((unsigned long *)virt_addr));
+        printf(">netapi_VM_memMap:Memory mapped Begin Address 0x%x Read Value: 0x%x.\n", virt_addr,*((unsigned long *)virt_addr));
  //       offset = size/(sizeof(unsigned long));
   //      tmpAddr = (unsigned long *)virt_addr + offset-1;
         tmpAddr = (uint8_t *)virt_addr + 0x6800c;
@@ -229,7 +229,7 @@ int netapi_VM_memory_setup(void)
     /* (1) big chunck of memory out of MSMC -> todo, get from CMA */
     if (netapi_VM_memAllocInit((uint8_t*)MSMC_SRAM_BASE_ADDR,
                               NETAPI_PERM_MEM_SZ) == nwal_FALSE) {
-        printf("ERROR: \"Top Level Test\" netapi_memAllocInit failed\n");
+        printf(">netapi ERROR: netapi_V_MmemAllocInit failed\n");
         return (-1);
     }
 
@@ -240,40 +240,40 @@ int netapi_VM_memory_setup(void)
                                             QMSS_CFG_BLK_SZ);
     if (!netapi_VM_qmssCfgVaddr)
     {
-        printf("ERROR: Failed to map QMSS CFG registers\n");
+        printf(">netapi ERROR: Failed to map QMSS CFG registers\n");
         return (-1);
     }
-    printf("main:QMSS_CFG_BASE_ADDR:0x%x Memory mapped at address %p.\n",(void*)QMSS_CFG_BASE_ADDR, netapi_VM_qmssCfgVaddr);
+    printf("netapi> QMSS_CFG_BASE_ADDR:0x%x Memory mapped at address %p.\n",(void*)QMSS_CFG_BASE_ADDR, netapi_VM_qmssCfgVaddr);
 
     /* (2b) QMSS DATA Regs */
     netapi_VM_qmssDataVaddr = netapi_VM_memMap((void*)QMSS_DATA_BASE_ADDR,
                                             QMSS_DATA_BLK_SZ);
     if (!netapi_VM_qmssDataVaddr)
     {
-        printf("ERROR: Failed to map QMSS DATA registers\n");
+        printf(">netapi ERROR: Failed to map QMSS DATA registers\n");
         return (-1);
     }
-    printf("main:QMSS_DATA_BASE_ADDR:0x%x Memory mapped at address %p.\n",(void*)QMSS_DATA_BASE_ADDR, netapi_VM_qmssDataVaddr);
+    printf(">netapi QMSS_DATA_BASE_ADDR:0x%x Memory mapped at address %p.\n",(void*)QMSS_DATA_BASE_ADDR, netapi_VM_qmssDataVaddr);
 
     /* (2c)  SRIO CFG Regs */
     netapi_VM_srioCfgVaddr = netapi_VM_memMap((void*)SRIO_CFG_BASE_ADDR,
                                             SRIO_CFG_BLK_SZ);
     if (!netapi_VM_srioCfgVaddr)
     {
-        printf("ERROR: Failed to map SRIO CFG registers\n");
+        printf(">netapi ERROR: Failed to map SRIO CFG registers\n");
         return (-1);
     }
-    printf("main:SRIO_CFG_BASE_ADDR:0x%x Memory mapped at address %p.\n",(void*)SRIO_CFG_BASE_ADDR, netapi_VM_srioCfgVaddr);
+    printf(">netapi SRIO_CFG_BASE_ADDR:0x%x Memory mapped at address %p.\n",(void*)SRIO_CFG_BASE_ADDR, netapi_VM_srioCfgVaddr);
 
     /* (2d) PASS CFG Regs */
     netapi_VM_passCfgVaddr = netapi_VM_memMap((void*)PASS_CFG_BASE_ADDR,
                                             PASS_CFG_BLK_SZ);
     if (!netapi_VM_passCfgVaddr)
     {
-        printf("ERROR: Failed to map PASS CFG registers\n");
+        printf(">netapi ERROR: Failed to map PASS CFG registers\n");
         return (-1);
     }
-    printf("main:PASS_CFG_BASE_ADDR:0x%x Memory mapped at address %p.\n",(void*)PASS_CFG_BASE_ADDR, netapi_VM_passCfgVaddr);
+    printf(">netapi PASS_CFG_BASE_ADDR:0x%x Memory mapped at address %p.\n",(void*)PASS_CFG_BASE_ADDR, netapi_VM_passCfgVaddr);
 
     /* (2e)  SA ?? */
      /*to do */
@@ -288,7 +288,7 @@ int netapi_VM_memory_setup(void)
     netapi_VM_QMemLocalDescRam = (void *)netapi_VM_memAlloc((TUNE_NETAPI_NUM_LOCAL_DESC *
                                         TUNE_NETAPI_DESC_SIZE),
                                         128);
-    printf("local desc region=%x global desc region=%x\n", netapi_VM_QMemLocalDescRam,netapi_VM_QMemGlobalDescRam);
+    printf(">netapi local desc region=%x global desc region=%x\n", netapi_VM_QMemLocalDescRam,netapi_VM_QMemGlobalDescRam);
 
        return 1;
 
index 1f72ca71709b39606c325689e24193298effaba3..6b5e54dd8b57ecc70bb26ab71c71801494399d66 100644 (file)
@@ -69,7 +69,7 @@ static NetapiNwalTransInfo_t *  netapi_GetFreeTransInfo(NETAPI_GLOBAL_T *p_globa
          
         /* trouble.  need to wait for one to free up*/
         /* to do: handle this by forcing a poll of cntrl queue*/
-        printf("netapi>> trying to get free transaction slot but all full!!\n");
+        printf(">netcp_cfg: trying to get free transaction slot but all full!!\n");
         return NULL;
 
 }
@@ -97,7 +97,7 @@ for(i=0;i<TUNE_NETAPI_MAX_IP_PER_INTERFACE;i++)
         return;
    }
 }
-printf("netcp_cfg> add ip:  no room in table\n");
+printf(">netcp_cfg - add ip:  no room in table\n");
 
 }
 
@@ -115,7 +115,7 @@ void netcp_cfgp_insert_mac(NETAPI_NWAL_GLOBAL_CONTEXT_T *p, unsigned char * p_ma
        //todo p->interfaces[iface_no].vlan = vlan;
        p->interfaces[iface_no].nwal_handle = handle; //save handle assoicated with this rule
    }
-   else printf("netcp_cfg> insert interface # out of range %d\n",iface_no);
+   else printf(">netcp_cfg insert interface # out of range %d\n",iface_no);
 
 }
 //internal: clear inteface entry
@@ -125,7 +125,7 @@ void netcp_cfgp_delete_mac(NETAPI_NWAL_GLOBAL_CONTEXT_T *p,int iface_no)
    {
         p->interfaces[iface_no].in_use = 0;
    }
-   else printf("netcp_cfg> delete interface # out of range %d\n",iface_no);
+   else printf(">netcp_cfg delete interface # out of range %d\n",iface_no);
 
 }
 
@@ -162,7 +162,7 @@ if(ret !=  nwal_OK)
 {
    pTransInfo->inUse = nwal_FALSE;
    *err = NETAPI_ERR_BUSY;  //no resources??
-   printf("reqStats-> failed, err=%d\n",ret);
+   printf("> netcp_cfg reqStats failed, err=%d\n",ret);
 }
 
 }
@@ -226,13 +226,12 @@ nwal_TransID_t     trans_id;
     if(retValue !=  nwal_OK)
     {
        *err = NETAPI_ERR_NWAL_ERR0;
-        printf ("ERROR: nwal_setMacIface returned Error Code %d\n",
+        printf (">netcp cfg - ERROR: nwal_setMacIface returned Error Code %d\n",
                     retValue);
         pTransInfo->inUse = nwal_FALSE;
         return NULL;
     }
     //pTransInfo->inUse = nwal_FALSE;
-    printf ("MAC Open sent with  trans_id: %d\n",trans_id);
 
     //wait here until its done since scheduler isn't running yet most likely..
     // todo:  make this handled by scheduler poll later ??
@@ -246,7 +245,7 @@ nwal_TransID_t     trans_id;
             nwal_pollCtl(((NETAPI_GLOBAL_T*) (n->global))->nwal_context.nwalInstHandle,NULL,NULL);
         }
     }
-    printf ("MAC i/f added\n");
+    printf (">netcp cfg: MAC i/f added\n");
     netcp_cfgp_insert_mac(&netapi_get_global()->nwal_context, 
                           p_mac, iface_no, state,vlan,
                           (void *) pTransInfo->handle);
@@ -265,7 +264,7 @@ void netcp_cfgDelMac(NETAPI_T h,int iface_no,  int *err)
     *err =0;
 
     netcp_cfgp_delete_mac(&netapi_get_global()->nwal_context,  iface_no);
-    printf("netcp_cfg>  del mac not fully implemented \n");
+    printf(">netcp_cfg:  del mac not fully implemented \n");
     return;
 }
 
@@ -343,14 +342,11 @@ nwal_TransID_t     trans_id;
     if(retValue !=  nwal_OK)
     {
         *err = NETAPI_ERR_NWAL_ERR0;
-        printf ("ERROR: nwal_setIP returned Error Code %d\n",
+        printf (">netcp cfg: nwal_setIP returned Error Code %d\n",
                     retValue);
         pTransInfo->inUse = nwal_FALSE;
         return NULL;
     }
-    //pTransInfo->inUse = nwal_FALSE;
-    printf (" SeIPAddr sent with  trans_id: %d\n",trans_id);
-
     //wait here until its done since scheduler isn't running yet most likely..
     // todo:  make this handled by scheduler poll later ??
     if(trans_id != NWAL_TRANSID_SPIN_WAIT)
@@ -363,7 +359,7 @@ nwal_TransID_t     trans_id;
             nwal_pollCtl(((NETAPI_GLOBAL_T*) (n->global))->nwal_context.nwalInstHandle,NULL,NULL);
         }
     }
-    printf ("IP added\n");
+    printf (">netcp cfg: IP added\n");
     netcp_cfgp_insert_ip(&netapi_get_global()->nwal_context, ipType, 
                           ip_addr, ip_qualifiers, iface_no, 
                           pTransInfo->handle);
@@ -390,7 +386,6 @@ void netapi_NWALCmdCallBack (nwal_AppId        appHandle,
 
     if(trans_id == NWAL_TRANSID_SPIN_WAIT)
     {
-        printf("ERROR:  callback found SPIN_WAIT transaction id. SO CANT FIND OUT WHO WE ARE]n");
         netapi_get_global()->nwal_context.numBogusTransIds++;
         return;
     }
@@ -400,7 +395,7 @@ void netapi_NWALCmdCallBack (nwal_AppId        appHandle,
 
     if(ret != nwal_OK)
     {
-        printf ("ERROR: NWALCmdCallBack returned Error Code %d\n",
+        printf (">netcp cfg : NWALCmdCallBack returned Error Code %d\n",
                     ret);
        //todo: atomic inc
         netapi_get_global()->nwal_context.numCmdFail++;
@@ -481,7 +476,7 @@ case TEST_NWAL_HANDLE_TRANS_SEC_POLICY:
 #endif
             default:
             {
-                printf ("ERROR: Invalid transaction type %d for trans_id: %d\n",
+                printf ("netcp cfg> Invalid transaction type %d for trans_id: %d\n",
                     p_trans->transType,trans_id);
                 break;
             }
@@ -508,10 +503,8 @@ void netapi_NWALCmdPaStatsReply (nwal_AppId        appHandle,
     NetapiNwalTransInfo_t * p_trans;
     NETAPI_NWAL_LOCAL_CONTEXT_T *p_local=NULL;
   
-    printf("stats reply for transid %d\n", trans_id);
     if(trans_id == NWAL_TRANSID_SPIN_WAIT)
     {
-        printf("ERROR:  callback found SPIN_WAIT transaction id. SO CANT FIND OUT WHO WE ARE]n");
         netapi_get_global()->nwal_context.numBogusTransIds++;
         return;
     }
index 3ddb633ffffcf70f19b412894e94958b380770dd..c0816a1f0787133659a2016880f7e4e810206541 100644 (file)
@@ -86,7 +86,7 @@ memcpy((char *)&p->cfg, (char*) p_cfg, sizeof(PKTIO_CFG_T));
                        QMSS_PARAM_NOT_SPECIFIED, &isAllocated);
     if (p->q == (Qmss_QueueHnd) NULL)
     {
-        printf("pktio_create:  queueOpen failed\n");
+        printf(">pktio_create:  queueOpen failed\n");
         p->inuse=0;
         *err= NETAPI_ERR_QLLD;  ///queue lld error
         return NULL;
@@ -155,7 +155,7 @@ else
  p_qnum = netapi_find_global_pktio(n, name);
  if (!p_qnum ) 
   {
-        printf("pktio_open: can't find %s\n",name);
+        printf(">pktio_open: can't find %s\n",name);
         p->inuse=0;
        *err= NETAPI_ERR_NOTFOUND;  ///queue lld error
         return NULL;
@@ -166,7 +166,7 @@ else
                        p_qnum->qNum , &isAllocated);
     if (p->q == (Qmss_QueueHnd) NULL)
     {
-        printf("pktio_create:  queueOpen failed\n");
+        printf(">pktio_create:  queueOpen failed\n");
         p->inuse=0;
         *err= NETAPI_ERR_QLLD;  ///queue lld error
         return NULL;
index 82c801c2cc25f6a6b7d1e6886b7f848748725912..ccf23e69b38408756341929bfe8240ba76a13cad 100644 (file)
@@ -126,7 +126,7 @@ for(i=0;i<n;i++)
 t264=read_t64();
 t2=timing_stop();
 t64_cpu_cycle_per_tick = (unsigned long) ((t2-t1)/(t264-t164));
-printf("calib - n=%d t2-t1=%lu t264-t164=%llu ccpt=%ld tps=%ld\n",
+printf(">netapi:  tim64 calibration - n=%d t2-t1=%lu t264-t164=%llu ccpt=%ld tps=%ld\n",
        n, t2-t1, t264-t164, t64_cpu_cycle_per_tick,  t64_ticks_sec());
 
 }
@@ -149,11 +149,10 @@ int t64_memmap(int fd)
     /* Map one page */
     map_base = mmap(0, MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, t64_base & ~MAP_MASK);
     if(map_base == (void *) -1) exit(-99);
-    printf("tim64>mapbase=Memory mapped at address %p.\n", map_base);
     fflush(stdout);
 
     t64_virt_addr = (long *) map_base + (t64_base & MAP_MASK);
-    printf("tim64>t64_virt_addr: Memory mapped at address %p.\n", t64_virt_addr);
+    printf(">netapi timer64:  T64 Memory mapped at address %p.\n", t64_virt_addr);
     fflush(stdout);
     return 1;
 }