diff options
author | 2016-12-24 23:26:04 +0200 | |
---|---|---|
committer | 2016-12-24 23:26:04 +0200 | |
commit | 262d781da5d8b51b3b5c4846f9648e00b5084fbd (patch) | |
tree | 543fb27849ffbd0f24059cbe443ffec4f736da5e | |
parent | 206a77f0ca78b3b53ca1b04a168dd3d50202011d (diff) |
disable mbug optimization in case of stateful repeat flow, this option should be done in Stateless
Signed-off-by: Hanoh Haim <hhaim@cisco.com>
-rw-r--r-- | src/main_dpdk.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
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"); |