int load_list_of_cap_files(CParserOption * op){ CFlowGenList fl; fl.Create(); fl.load_from_yaml(op->cfg_file,1); if ( op->preview.getVMode() >0 ) { fl.DumpCsv(stdout); } uint32_t start= os_get_time_msec(); CErfIF erf_vif; //CNullIF erf_vif; fl.generate_p_thread_info(1); CFlowGenListPerThread * lpt; lpt=fl.m_threads_info[0]; lpt->set_vif(&erf_vif); if ( (op->preview.getVMode() >1) || op->preview.getFileWrite() ) { lpt->generate_erf(op->out_file,op->preview); } lpt->m_node_gen.DumpHist(stdout); uint32_t stop= os_get_time_msec(); printf(" d time = %ul %ul \n",stop-start,os_get_time_freq()); fl.Delete(); return (0); }
void TrexDpPortEvent::init(TrexStatelessPort *port, int event_id, int timeout_ms) { m_port = port; m_event_id = event_id; /* do we have a timeout ? */ if (timeout_ms > 0) { m_expire_limit_ms = os_get_time_msec() + timeout_ms; } else { m_expire_limit_ms = -1; } /* prepare the signal array */ m_pending_cnt = 0; for (int core_id : m_port->get_core_id_list()) { m_signal[core_id] = false; m_pending_cnt++; } }