From 537f5831c4400dea7fa15032c4cd6bd2fae86bb1 Mon Sep 17 00:00:00 2001 From: imarom Date: Mon, 28 Nov 2016 11:25:32 +0200 Subject: RX features - self code review Signed-off-by: imarom --- src/stateless/messaging/trex_stateless_messaging.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/stateless/messaging/trex_stateless_messaging.cpp') diff --git a/src/stateless/messaging/trex_stateless_messaging.cpp b/src/stateless/messaging/trex_stateless_messaging.cpp index a8fb7ba9..cad4fe7a 100644 --- a/src/stateless/messaging/trex_stateless_messaging.cpp +++ b/src/stateless/messaging/trex_stateless_messaging.cpp @@ -259,14 +259,16 @@ bool TrexStatelessRxQuit::handle (CRxCoreStateless *rx_core) { bool TrexStatelessRxStartCapture::handle(CRxCoreStateless *rx_core) { - rx_core->start_capture(m_port_id, m_pcap_filename, m_limit, m_shared_counter); + rx_core->start_recorder(m_port_id, m_pcap_filename, m_limit, m_shared_counter); + set_reply(true); + return true; } bool TrexStatelessRxStopCapture::handle(CRxCoreStateless *rx_core) { - rx_core->stop_capture(m_port_id); + rx_core->stop_recorder(m_port_id); return true; } @@ -274,7 +276,10 @@ TrexStatelessRxStopCapture::handle(CRxCoreStateless *rx_core) { bool TrexStatelessRxStartQueue::handle(CRxCoreStateless *rx_core) { rx_core->start_queue(m_port_id, m_size, m_shared_counter); - + + /* mark as done */ + set_reply(true); + return true; } @@ -290,7 +295,9 @@ TrexStatelessRxStopQueue::handle(CRxCoreStateless *rx_core) { bool TrexStatelessRxQueueGetPkts::handle(CRxCoreStateless *rx_core) { RXPacketBuffer *pkt_buffer = rx_core->get_rx_queue_pkts(m_port_id); assert(pkt_buffer); - m_reply.set(pkt_buffer); + + /* set the reply */ + set_reply(pkt_buffer); return true; } -- cgit 1.2.3-korg