From 262d781da5d8b51b3b5c4846f9648e00b5084fbd Mon Sep 17 00:00:00 2001 From: Hanoh Haim Date: Sat, 24 Dec 2016 23:26:04 +0200 Subject: disable mbug optimization in case of stateful repeat flow, this option should be done in Stateless Signed-off-by: Hanoh Haim --- src/main_dpdk.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/main_dpdk.cpp') diff --git a/src/main_dpdk.cpp b/src/main_dpdk.cpp index 6e4b22e1..ffeec82a 100644 --- a/src/main_dpdk.cpp +++ b/src/main_dpdk.cpp @@ -2403,6 +2403,8 @@ void CCoreEthIF::handle_slowpath_features(CGenNode *node, rte_mbuf_t *m, uint8_t int CCoreEthIF::send_node(CGenNode * node) { +#ifdef OPT_REPEAT_MBUF + if ( unlikely( node->get_cache_mbuf() !=NULL ) ) { pkt_dir_t dir; rte_mbuf_t * m=node->get_cache_mbuf(); @@ -2413,7 +2415,7 @@ int CCoreEthIF::send_node(CGenNode * node) { send_pkt(lp_port,m,lp_stats); return (0); } - +#endif CFlowPktInfo * lp=node->m_pkt_info; rte_mbuf_t * m=lp->generate_new_mbuf(node); @@ -2466,6 +2468,8 @@ int CCoreEthIF::send_node(CGenNode * node) { lp->do_generate_new_mbuf_rxcheck(m, node, single_port); lp_stats->m_template.inc_template( node->get_template_id( )); }else{ + +#ifdef OPT_REPEAT_MBUF // cache only if it is not sample as this is more complex mbuf struct if ( unlikely( node->can_cache_mbuf() ) ) { if ( !CGlobalInfo::m_options.preview.isMbufCacheDisabled() ){ @@ -2478,6 +2482,8 @@ int CCoreEthIF::send_node(CGenNode * node) { } } } +#endif + } /*printf("send packet -- \n"); -- cgit 1.2.3-korg