diff options
Diffstat (limited to 'src/main_dpdk.cpp')
-rw-r--r-- | src/main_dpdk.cpp | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/main_dpdk.cpp b/src/main_dpdk.cpp index 5a383bc6..c8921ba7 100644 --- a/src/main_dpdk.cpp +++ b/src/main_dpdk.cpp @@ -1774,6 +1774,7 @@ class CCoreEthIFStateless : public CCoreEthIF { public: virtual int send_node(CGenNode * node); protected: + int handle_slow_path_node(CGenNode *node); int send_pcap_node(CGenNodePCAP *pcap_node); }; @@ -2002,11 +2003,12 @@ void CCoreEthIF::update_mac_addr(CGenNode * node,uint8_t *p){ int CCoreEthIFStateless::send_node(CGenNode * no) { - /* slow path - PCAP nodes */ - if (no->m_type == CGenNode::PCAP_PKT) { - return send_pcap_node((CGenNodePCAP *)no); + /* if a node is marked as slow path - single IF to redirect it to slow path */ + if (no->get_is_slow_path()) { + return handle_slow_path_node(no); } + CGenNodeStateless * node_sl=(CGenNodeStateless *) no; /* check that we have mbuf */ rte_mbuf_t * m=node_sl->get_cache_mbuf(); @@ -2050,6 +2052,19 @@ int CCoreEthIFStateless::send_pcap_node(CGenNodePCAP *pcap_node) { return (0); } +/** + * slow path code goes here + * + */ +int CCoreEthIFStateless::handle_slow_path_node(CGenNode * no) { + + if (no->m_type == CGenNode::PCAP_PKT) { + return send_pcap_node((CGenNodePCAP *)no); + } + + return (-1); +} + int CCoreEthIF::send_node(CGenNode * node){ |