summaryrefslogtreecommitdiffstats
path: root/src/stateless/cp/trex_stateless.cpp
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2017-01-11 18:19:47 +0200
committerimarom <imarom@cisco.com>2017-01-11 18:19:47 +0200
commitac2e93d4247b2db94cd07301b274336bb08dec46 (patch)
tree8dfe8250526cd797ab9af46f4b54cfbec0832fc0 /src/stateless/cp/trex_stateless.cpp
parent5257dbb8253fe5b70b75f9c064c4593ca7aee99f (diff)
capture - draft commit
Signed-off-by: imarom <imarom@cisco.com>
Diffstat (limited to 'src/stateless/cp/trex_stateless.cpp')
-rw-r--r--src/stateless/cp/trex_stateless.cpp31
1 files changed, 3 insertions, 28 deletions
diff --git a/src/stateless/cp/trex_stateless.cpp b/src/stateless/cp/trex_stateless.cpp
index 32babbf7..6ab9b417 100644
--- a/src/stateless/cp/trex_stateless.cpp
+++ b/src/stateless/cp/trex_stateless.cpp
@@ -19,7 +19,6 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-//#include <sched.h>
#include <iostream>
#include <unistd.h>
@@ -142,35 +141,11 @@ TrexStateless::get_dp_core_count() {
return m_platform_api->get_dp_core_count();
}
-capture_id_t
-TrexStateless::start_capture(const CaptureFilter &filter, uint64_t limit) {
- static MsgReply<capture_id_t> reply;
-
- reply.reset();
-
- CNodeRing *ring = CMsgIns::Ins()->getCpRx()->getRingCpToDp(0);
- TrexStatelessRxStartCapture *msg = new TrexStatelessRxStartCapture(filter, limit, reply);
-
- ring->Enqueue((CGenNode *)msg);
-
- capture_id_t new_id = reply.wait_for_reply();
-
- return (new_id);
-}
+void
+TrexStateless::send_msg_to_rx(TrexStatelessCpToRxMsgBase *msg) const {
-capture_id_t
-TrexStateless::stop_capture(capture_id_t capture_id) {
- static MsgReply<capture_id_t> reply;
-
- reply.reset();
-
CNodeRing *ring = CMsgIns::Ins()->getCpRx()->getRingCpToDp(0);
- TrexStatelessRxStopCapture *msg = new TrexStatelessRxStopCapture(capture_id, reply);
-
ring->Enqueue((CGenNode *)msg);
-
- capture_id_t rc = reply.wait_for_reply();
-
- return (rc);
}
+