diff options
author | imarom <imarom@cisco.com> | 2017-02-06 13:20:41 +0200 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2017-02-06 13:21:44 +0200 |
commit | bcea02625fb2ce43ee81e56320941dfd8ff10327 (patch) | |
tree | 1f237b927b4a3a75a53befca0e68ae765cd05b04 /src/stateless | |
parent | 1570aea16299122399e14c7c281fe3d4259e63a7 (diff) |
added example for functional tests using start_capture/stop_capture APIs
Signed-off-by: imarom <imarom@cisco.com>
Diffstat (limited to 'src/stateless')
-rw-r--r-- | src/stateless/rx/trex_stateless_rx_port_mngr.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/stateless/rx/trex_stateless_rx_port_mngr.cpp b/src/stateless/rx/trex_stateless_rx_port_mngr.cpp index b01665ec..6ebe0a97 100644 --- a/src/stateless/rx/trex_stateless_rx_port_mngr.cpp +++ b/src/stateless/rx/trex_stateless_rx_port_mngr.cpp @@ -367,18 +367,24 @@ RXServer::create(uint8_t port_id, CPortLatencyHWBase *io, const CManyIPInfo *src void RXServer::handle_pkt(const rte_mbuf_t *m) { - - RXPktParser parser(m); - - if (parser.m_icmp) { - handle_icmp(parser); - } else if (parser.m_arp) { - handle_arp(parser); - } else { + try { + + RXPktParser parser(m); + + if (parser.m_icmp) { + handle_icmp(parser); + } else if (parser.m_arp) { + handle_arp(parser); + } else { + return; + } + + } catch (const TrexException &e) { return; } } + void RXServer::handle_icmp(RXPktParser &parser) { |