Updated netapi makefile to use correct DEVICE define, net_test cleanup, version update. DEV.NETAPI.01.00.00.05
authorTinku Mannan <tmannan@ti.com>
Tue, 26 Mar 2013 14:42:23 +0000 (10:42 -0400)
committerTinku Mannan <tmannan@ti.com>
Tue, 26 Mar 2013 18:13:53 +0000 (14:13 -0400)
ti/runtime/netapi/build/Makefile
ti/runtime/netapi/netapi_ver.h
ti/runtime/netapi/test/net_test.c

index aa6ec562cb160b18f57fb8d37c4b443835184864..5bfe9fca7a4ae6b8d00889b3646ac65bd3ee802d 100755 (executable)
@@ -17,10 +17,10 @@ ifeq ($(CPU), cortex-a15)
         CFLAGS += -DCORTEX_A15
 endif
 
-export SOC ?= tci6634
+export DEVICE?= k2h
 ifeq ($(PDK_VER),v3)
-QMSS_DEV_DIR = $(PDK_INSTALL_PATH)/ti/drv/qmss/device/$(SOC)/src
-CPPI_DEV_DIR = $(PDK_INSTALL_PATH)/ti/drv/cppi/device/$(SOC)/src
+QMSS_DEV_DIR = $(PDK_INSTALL_PATH)/ti/drv/qmss/device/$(DEVICE)/src
+CPPI_DEV_DIR = $(PDK_INSTALL_PATH)/ti/drv/cppi/device/$(DEVICE)/src
 endif
 ifeq ($(PDK_VER),v2)
 QMSS_DEV_DIR = $(PDK_INSTALL_PATH)/ti/drv/qmss/device
index 6f50f0978a1eaf88342562d2e6f48f4c10ecd4d3..ef671373f51046156dc0c197206131563edf5062 100755 (executable)
  *      format:
  *              0xAABBCCDD -> Arch (AA); API Changes (BB); Major (CC); Minor (DD)
  */
-#define NETAPI_VERSION_ID                   (0x01000004)
+#define NETAPI_VERSION_ID                   (0x01000005)
 
 /**
  * @def NETAPI_VERSION_STR
  *      This is the version string which describes the NETAPI along with the
  *      date and build information.
  */
-#define NETAPI_VERSION_STR      "NETAPI Revision: 01.00.00.04"
+#define NETAPI_VERSION_STR      "NETAPI Revision: 01.00.00.05"
 
 /**
  *  @ingroup netapi_gen_functions
index 4d38d0f207aefb0ea2ac228a55e37e443defa244..43a1db965f4eb51e3e6c792741506c0e303bcfb9 100755 (executable)
@@ -223,7 +223,6 @@ int coreid=0;
         /* setting udp ports */
         if (netTestCfg.dest_udp_port_config == 0)
         {
-            printf("dest_udp_port_config is 0, use src port as dest port\n");
             memcpy(&p_pkt[p_sa_info->tx_payload_info.encOffset+netTest_IP_HEADER_LEN+2],
                    &p_pkt[p_sa_info->tx_payload_info.encOffset+netTest_IP_HEADER_LEN],2);
         }
@@ -246,14 +245,12 @@ int coreid=0;
         /* flip udp port */
         if (netTestCfg.dest_udp_port_config == 0)
         {
-            printf("dest_udp_port_config is 0, use src port as dest port\n");
             memcpy(&p_pkt[netTest_MAC_HEADER_LEN+netTest_IP_HEADER_LEN+2],
                    &p_pkt[netTest_MAC_HEADER_LEN+netTest_IP_HEADER_LEN],2);
         }
         else
         {
             dest_udp_port_config = htons(netTestCfg.dest_udp_port_config);
-            printf("flip_and_send_pkt: dest udp port is %d\n", netTestCfg.dest_udp_port_config);
             //memcpy(&p_pkt[netTest_MAC_HEADER_LEN+20+2],&new_dest_port[0],2);
             memcpy(&p_pkt[netTest_MAC_HEADER_LEN+netTest_IP_HEADER_LEN+2],&dest_udp_port_config,2);
         }
@@ -393,7 +390,6 @@ int coreid=0;
 
         /* post it to netcp tx channel*/
         meta2.u.tx_meta=&meta_tx2;
-        printf("flip_and_send_pkt: non-ipsec packet received\n");
         netapi_pktioSend(netcp_tx_chan_no_crypto,tip,&meta2,&err);
         stats[coreid].tx +=1;
     }
@@ -425,7 +421,6 @@ void recv_sb_cb(struct PKTIO_HANDLE_Tag * channel, Ti_Pkt* p_recv[],
     uint8_t *p_spi;
     netTestSA_t *p_sa_info;
 
-    printf("recv_sb_cb: entered\n");
 #ifdef netTest_MULTI_THREAD
     int coreid=Osal_nwalGetProcId();  //who we are(thread local)
 #else
@@ -551,7 +546,6 @@ void recv_cb(struct PKTIO_HANDLE_Tag * channel, Ti_Pkt* p_recv[],
 #endif
     p_head=&temp_head;
 
-    printf("recv_cb called\n");
     /* loop over received pkts */
     for(i=0;i<n_pkts;i++)
     {
@@ -604,7 +598,7 @@ void recv_cb(struct PKTIO_HANDLE_Tag * channel, Ti_Pkt* p_recv[],
             netTest_utilDumpDescr((long *) tip,stats[coreid].rx);
         }
 #endif
-#if 1
+#if 0
         //
         if(stats[coreid].rx<=16)
         {
@@ -618,7 +612,6 @@ void recv_cb(struct PKTIO_HANDLE_Tag * channel, Ti_Pkt* p_recv[],
         /* check for IPSEC ESP or AH packet, 0x32 is ESP tunnel mode, 0x33 is AH tunnel mode*/
         if (((p_head->ip[2]&0x0000ff00)==0x00003200) || ((p_head->ip[2]&0x0000ff00)==0x00003300))
         {
-            printf("recv_cb: ipsec packet received\n");
             if (!netTest_utilCheckHeader(p_head,&meta[i]))
             {
                 printf("recv_cb: error in ipsec pkt\n");
@@ -689,7 +682,6 @@ void recv_cb(struct PKTIO_HANDLE_Tag * channel, Ti_Pkt* p_recv[],
                 }
                
                 meta_tx.appCtxId = (nwal_AppId)p_sa_info;
-                //printf("recv_cb appCtxId: %lu\n", meta_tx.appCtxId);
 
                 /* post it to netcp sb tx channel*/
                 meta2.u.tx_sb_meta=&meta_tx;
@@ -699,7 +691,6 @@ void recv_cb(struct PKTIO_HANDLE_Tag * channel, Ti_Pkt* p_recv[],
             }
             else
             {
-                printf("calling flip_and_send_pkt for inflow mode\n");
                 //inflow mode.  flip and send
                 flip_and_send_pkt(tip,p_pkt,len,1, enet_port);
             }
@@ -708,13 +699,10 @@ void recv_cb(struct PKTIO_HANDLE_Tag * channel, Ti_Pkt* p_recv[],
         else if ((p_head->ip[2]&0x0000ff00)!=0x00001100)
          //else if ((p_head->ip[2]&0x00ff0000)!=0x00110000)
         {
-            printf("not UDP packet: protocol: 0x%x\n", p_head->ip[2]&0x0000ff00);
             stats[coreid].n_new+=1;Pktlib_freePacket(tip); continue;
         }
         else  //non ipsec
         {
-            printf("UDP packet: protocol: 0x%x\n", p_head->ip[2]&0x00ff0000);
-            printf("recv_cb: calling flip_and_send_pkt\n");
             if (!netTest_utilCheckHeader(p_head,&meta[i]))
             {
                 stats[coreid].n_bad+=1;Pktlib_freePacket(tip);