[keystone-rtos/netapi.git] / ti / runtime / netapi / applications / ipsec_offload / ipsecmgr / src / netapi_ipsecmgr.c
diff --git a/ti/runtime/netapi/applications/ipsec_offload/ipsecmgr/src/netapi_ipsecmgr.c b/ti/runtime/netapi/applications/ipsec_offload/ipsecmgr/src/netapi_ipsecmgr.c
index 07ccd673b70aa382fceb7449292c1caca04b9c86..93dbe0df6ea23c8012e4638363bd26a824681d23 100755 (executable)
/**********************************************************************
************************** Local Definitions *************************
**********************************************************************/
-#if 0
-
-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"};
-
-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"};
-#endif
-
/**********************************************************************
************************** Global Variables **************************
cleanup_sa_sp();
netapi_shutdown(netapi_handle);
- if (use_rm)
closeRm();
return;
}
memset(&globalDB, 0, sizeof(globalDB));
globalDB.sa_tx_flow = -1;
int temp;
- while ((c = getopt (argc, argv, "s:f:r:")) != -1)
+ while ((c = getopt (argc, argv, "s:f:")) != -1)
{
switch (c)
{
- case 'r':
- if(strncmp("yes", optarg,1) == 0)
- {
- use_rm = 1;
- }
- break;
-
case 's':
/* check is user input 0 for oseq_offset (valid but also default)*/
if(strncmp("0", optarg,1) == 0)
"main: oseq_offset: %d, sa_tx_flow: %d\n",
globalDB.oseq_offset, globalDB.sa_tx_flow);
- if (use_rm)
+ if (initRm())
{
- if (initRm())
- {
- exit(EXIT_FAILURE);
- }
+ printf("main: initRm() returned error\n");
+ exit(1);
}
+ our_netapi_default_cfg.rmHandle = rmClientServiceHandle;
+
/* assign main net_test thread to run on core 0 */
CPU_ZERO( &cpu_set);
CPU_SET( 0, &cpu_set);
hplib_utilSetupThread(0, &cpu_set, hplib_spinLock_Type_LOL);
/* create netapi */
- our_netapi_default_cfg.rmHandle = rmClientServiceHandle;
netapi_handle = netapi_init(NETAPI_SYS_MASTER,
&our_netapi_default_cfg);
if(netapi_handle == NULL)