update DT path to rxqueue DEV.NETAPI.01.01.00.07
authorVitaly Andrianov <vitalya@ti.com>
Mon, 4 Apr 2016 13:28:21 +0000 (09:28 -0400)
committerVitaly Andrianov <vitalya@ti.com>
Mon, 4 Apr 2016 20:11:02 +0000 (16:11 -0400)
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
ti/runtime/netapi/applications/ipsec_offload/ipsecmgr/src/netapi_ipsecmgr.c

index 185fce88223665708b73952adba0003534bde5c5..f2a99b2585b4f9eb90d596fdf8fe5ed9944b0449 100644 (file)
 #include <ti/drv/qmss/device/k2h/src/qmss_device.c>
 #include <ti/drv/cppi/device/k2h/src/cppi_device.c>
 char*  DTS_LOG_FILE_QUEUE_ETHx[] = {
- "/proc/device-tree/soc/pktdma@2004000/channels/netrx0/complete-queue"};
-char*  DTS_LOG_FILE_FLOW_ETHx[] = {
-"/proc/device-tree/soc/pktdma@2004000/channels/netrx0/flow"};
+ "/proc/device-tree/soc/netcp@2000000/netcp-interfaces/interface-0/rx-queue"};
 #elif defined (DEVICE_K2K)
 #include <ti/drv/qmss/device/k2k/src/qmss_device.c>
 #include <ti/drv/cppi/device/k2k/src/cppi_device.c>
 char*  DTS_LOG_FILE_QUEUE_ETHx[] = {
- "/proc/device-tree/soc/pktdma@2004000/channels/netrx0/complete-queue"};
-char*  DTS_LOG_FILE_FLOW_ETHx[] = {
-"/proc/device-tree/soc/pktdma@2004000/channels/netrx0/flow"};
+ "/proc/device-tree/soc/netcp@2000000/netcp-interfaces/interface-0/rx-queue"};
 #elif defined (DEVICE_K2L)
 #include <ti/drv/qmss/device/k2l/src/qmss_device.c>
 #include <ti/drv/cppi/device/k2l/src/cppi_device.c>
 char*  DTS_LOG_FILE_QUEUE_ETHx[] = {
- "/proc/device-tree/soc/pktdma@26186000/channels/netrx0/complete-queue"};
-char*  DTS_LOG_FILE_FLOW_ETHx[] = {
-"/proc/device-tree/soc/pktdma@26186000/channels/netrx0/flow"};
+ "/proc/device-tree/soc/netcp@2600000/netcp-interfaces/interface-0/rx-queue"};
 #elif defined (DEVICE_K2E)
 #include <ti/drv/qmss/device/k2e/src/qmss_device.c>
 #include <ti/drv/cppi/device/k2e/src/cppi_device.c>
 char*  DTS_LOG_FILE_QUEUE_ETHx[] = {
- "/proc/device-tree/soc/pktdma@24186000/channels/netrx0/complete-queue"};
-char*  DTS_LOG_FILE_FLOW_ETHx[] = {
-"/proc/device-tree/soc/pktdma@24186000/channels/netrx0/flow"};
+ "/proc/device-tree/soc/netcp@2400000/netcp-interfaces/interface-0/rx-queue"};
 
 #else /*Default */
 #include <ti/runtime/hplib/device/k2h/src/hplib_device.c>
@@ -95,9 +87,7 @@ char*  DTS_LOG_FILE_FLOW_ETHx[] = {
 #include <ti/drv/qmss/device/k2h/src/qmss_device.c>
 #include <ti/drv/cppi/device/k2h/src/cppi_device.c>
 char*  DTS_LOG_FILE_QUEUE_ETHx[] = {
- "/proc/device-tree/soc/pktdma@2004000/channels/netrx0/complete-queue"};
-char*  DTS_LOG_FILE_FLOW_ETHx[] = {
-"/proc/device-tree/soc/pktdma@2004000/channels/netrx0/flow"};
+ "/proc/device-tree/soc/netcp@2000000/netcp-interfaces/interface-0/rx-queue"};
 
 #endif
 
@@ -761,24 +751,11 @@ int get_kernel_config()
             "main: error opening device tree file: %s\n",DTS_LOG_FILE_QUEUE_ETHx[0]);
         return -1;
     }
-
-    pDts = NULL;
-    pDts = fopen(DTS_LOG_FILE_FLOW_ETHx[0], "rb");
-
-    if(pDts)
-    {
-        if (fread((void*)&temp, sizeof(uint32_t), 1, pDts))
-        {
-            globalDB.flowId = (int)swap32(temp);
-        }
-        fclose(pDts);
-    }
-    else
-    {
-        ipsecmgr_syslog_msg (SYSLOG_LEVEL_ERROR,
-            "main: error opening device tree file: %s\n",DTS_LOG_FILE_FLOW_ETHx[0]);
-        return -1;
-    }
+#if (defined(DEVICE_K2L) || defined(DEVICE_K2E))
+    globalDB.flowId = 0;
+#else
+    globalDB.flowId = 22;
+#endif
     ipsecmgr_syslog_msg (SYSLOG_LEVEL_INFO,
             "get_kernel_config: flow: 0x%x, qNum: 0x%x\n", 
              globalDB.flowId, globalDB.qNum);
@@ -885,8 +862,6 @@ int32_t main (int argc, char* argv[])
                -t <stats collection mode\n \
                -m <master Type ,sysMaster or procMaster >\n";
 
-
-
     memset(&globalDB, 0, sizeof(globalDB));
     globalDB.sa_tx_flow = -1;
     globalDB.masterType = NETAPI_SYS_MASTER;